@slicemachine/manager 0.26.5-alpha.jp-import-slices-tracking.1 → 0.26.5-alpha.jp-import-slices-tracking.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.
@@ -51,10 +51,8 @@ const SegmentEventType = {
51
51
  slice_library_slice_selected: "slice-library:slice-selected",
52
52
  slice_library_fetching_started: "slice-library:fetching-started",
53
53
  slice_library_fetching_ended: "slice-library:fetching-ended",
54
- slice_library_fetching_failed: "slice-library:fetching-failed",
55
54
  slice_library_import_started: "slice-library:import-started",
56
- slice_library_import_complete: "slice-library:import-completed",
57
- slice_library_import_failed: "slice-library:import-failed"
55
+ slice_library_import_ended: "slice-library:import-ended"
58
56
  };
59
57
  const HumanSegmentEventType = {
60
58
  [SegmentEventType.command_init_start]: "SliceMachine Init Start",
@@ -107,10 +105,8 @@ const HumanSegmentEventType = {
107
105
  [SegmentEventType.slice_library_slice_selected]: "SliceMachine Slice Library - Slice Selected",
108
106
  [SegmentEventType.slice_library_fetching_started]: "SliceMachine Slice Library - Slice Fetching Started",
109
107
  [SegmentEventType.slice_library_fetching_ended]: "SliceMachine Slice Library - Slice Fetching Ended",
110
- [SegmentEventType.slice_library_fetching_failed]: "SliceMachine Slice Library - Slice Fetching Failed",
111
108
  [SegmentEventType.slice_library_import_started]: "SliceMachine Slice Library - Slice Import Started",
112
- [SegmentEventType.slice_library_import_complete]: "SliceMachine Slice Library - Slice Import Complete",
113
- [SegmentEventType.slice_library_import_failed]: "SliceMachine Slice Library - Slice Import Failed"
109
+ [SegmentEventType.slice_library_import_ended]: "SliceMachine Slice Library - Slice Import Ended"
114
110
  };
115
111
  exports.HumanSegmentEventType = HumanSegmentEventType;
116
112
  exports.SegmentEventType = SegmentEventType;
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","sources":["../../../../src/managers/telemetry/types.ts"],"sourcesContent":["import {\n\tFieldType,\n\tLinkConfig,\n} from \"@prismicio/types-internal/lib/customtypes/widgets\";\n\nimport { CustomTypeFormat } from \"../customTypes/types\";\nimport type { PushChangesLimitType } from \"../prismicRepository/types\";\n\nexport type { Variant } from \"@amplitude/experiment-node-server\";\n\nexport const SegmentEventType = {\n\tcommand_init_start: \"command:init:start\",\n\tcommand_init_identify: \"command:init:identify\",\n\tcommand_init_end: \"command:init:end\",\n\tsliceSimulator_open: \"slice-simulator:open\",\n\tsliceSimulator_isNotRunning: \"slice-simulator:is-not-running\",\n\tpageView: \"page-view\",\n\topenVideoTutorials: \"open-video-tutorials\",\n\tfield_added: \"field:added\",\n\tfield_updated: \"field:updated\",\n\tfield_settingsOpened: \"field:settings-opened\",\n\tcustomType_created: \"custom-type:created\",\n\tcustomType_sliceZoneUpdated: \"custom-type:slice-zone-updated\",\n\tcustomType_openAddFromTemplates: \"custom-type:open-add-from-templates\",\n\tcustomType_saved: \"custom-type:saved\",\n\tslice_created: \"slice:created\",\n\tlegacySlice_converted: \"legacy-slice:converted\",\n\tscreenshotTaken: \"screenshot-taken\",\n\tchanges_pushed: \"changes:pushed\",\n\tchanges_groupPushed: \"changes:group-pushed\",\n\tchanges_limitReach: \"changes:limit-reach\",\n\teditor_widgetUsed: \"editor:widget-used\",\n\topen_page_snippet: \"page-type:open-snippet\",\n\tcopy_page_snippet: \"page-type:copy-snippet\",\n\tswitch_environment: \"environment:switch\",\n\tdevCollab_joinBetaClicked: \"dev-collab:join-beta-clicked\",\n\tdevCollab_setUpWorkflowOpened: \"dev-collab:set-up-workflow-opened\",\n\tdevCollab_workflowStubDisplayed: \"dev-collab:workflow-stub-displayed\",\n\tsliceMachine_start: \"slice-machine:start\",\n\tpostPush_emptyStateCtaClicked: \"post-push:empty-state-cta-clicked\",\n\tpostPush_toastCtaClicked: \"post-push:toast-cta-clicked\",\n\texperiment_exposure: \"experiment:exposure\",\n\tsharedOnboarding_step_opened: \"shared-onboarding:step-opened\",\n\tsharedOnboarding_step_completed: \"shared-onboarding:step-completed\",\n\tsharedOnboarding_completed: \"shared-onboarding:completed\",\n\tsharedOnboarding_tutorial: \"shared-onboarding:follow-tutorial\",\n\tsliceGenerationFeedback: \"slice-generation-feedback\",\n\tsliceGeneration_pastedFromFigma: \"slice-generation:pasted-from-figma\",\n\tsliceGeneration_started: \"slice-generation:started\",\n\tsliceGeneration_ended: \"slice-generation:ended\",\n\tsliceGeneration_pluginInstallationClicked:\n\t\t\"slice-generation:plugin-installation-clicked\",\n\tnavigation_documentationLinkClicked: \"navigation:documentation-link-clicked\",\n\tsidebar_link_clicked: \"sidebar:link-clicked\",\n\tmcp_promo_link_clicked: \"mcp:promo-link-clicked\",\n\tinfo_banner_dismissed: \"info-banner:dismissed\",\n\tinfo_banner_button_clicked: \"info-banner:button-clicked\",\n\tslice_library_opened: \"slice-library:opened\",\n\tslice_library_projects_listed: \"slice-library:projects-listed\",\n\tslice_library_slice_selected: \"slice-library:slice-selected\",\n\tslice_library_fetching_started: \"slice-library:fetching-started\",\n\tslice_library_fetching_ended: \"slice-library:fetching-ended\",\n\tslice_library_fetching_failed: \"slice-library:fetching-failed\",\n\tslice_library_import_started: \"slice-library:import-started\",\n\tslice_library_import_complete: \"slice-library:import-completed\",\n\tslice_library_import_failed: \"slice-library:import-failed\",\n} as const;\ntype SegmentEventTypes =\n\t(typeof SegmentEventType)[keyof typeof SegmentEventType];\n\nexport const HumanSegmentEventType = {\n\t[SegmentEventType.command_init_start]: \"SliceMachine Init Start\",\n\t[SegmentEventType.command_init_identify]: \"SliceMachine Init Identify\",\n\t[SegmentEventType.command_init_end]: \"SliceMachine Init End\",\n\t[SegmentEventType.sliceSimulator_open]: \"SliceMachine Slice Simulator Open\",\n\t[SegmentEventType.sliceSimulator_isNotRunning]:\n\t\t\"SliceMachine Slice Simulator is not running\",\n\t[SegmentEventType.pageView]: \"SliceMachine Page View\",\n\t[SegmentEventType.openVideoTutorials]: \"SliceMachine Open Video Tutorials\",\n\t[SegmentEventType.field_added]: \"SliceMachine Field Added\",\n\t[SegmentEventType.field_updated]: \"SliceMachine Field Updated\",\n\t[SegmentEventType.field_settingsOpened]: \"SliceMachine Field Settings Opened\",\n\t[SegmentEventType.customType_created]: \"SliceMachine Custom Type Created\",\n\t[SegmentEventType.customType_sliceZoneUpdated]:\n\t\t\"SliceMachine Slicezone Updated\",\n\t[SegmentEventType.customType_openAddFromTemplates]:\n\t\t\"SliceMachine Open Add from templates\",\n\t[SegmentEventType.customType_saved]: \"SliceMachine Custom Type Saved\",\n\t[SegmentEventType.slice_created]: \"SliceMachine Slice Created\",\n\t[SegmentEventType.legacySlice_converted]:\n\t\t\"SliceMachine Legacy Slice Converted\",\n\t[SegmentEventType.screenshotTaken]: \"SliceMachine Screenshot Taken\",\n\t[SegmentEventType.changes_pushed]: \"SliceMachine Changes Pushed\",\n\t[SegmentEventType.changes_groupPushed]: \"SliceMachine Group Field Pushed\",\n\t[SegmentEventType.changes_limitReach]: \"SliceMachine Changes Limit Reach\",\n\t[SegmentEventType.editor_widgetUsed]: \"SliceMachine Editor Widget Used\",\n\t[SegmentEventType.open_page_snippet]:\n\t\t\"SliceMachine Opens Page Type Snippet Dialog\",\n\t[SegmentEventType.copy_page_snippet]:\n\t\t\"Slice Machine page code snippet copied\",\n\t[SegmentEventType.switch_environment]: \"SliceMachine environment switch\",\n\t[SegmentEventType.devCollab_joinBetaClicked]:\n\t\t\"SliceMachine Dev Collab Join Beta Clicked\",\n\t[SegmentEventType.devCollab_setUpWorkflowOpened]:\n\t\t\"SliceMachine Dev Collab Set Up Workflow Opened\",\n\t[SegmentEventType.devCollab_workflowStubDisplayed]:\n\t\t\"SliceMachine Dev Collab Workflow Stub Displayed\",\n\t[SegmentEventType.sliceMachine_start]: \"SliceMachine Start\",\n\t[SegmentEventType.postPush_emptyStateCtaClicked]:\n\t\t\"SliceMachine Post Push Empty State CTA Clicked\",\n\t[SegmentEventType.postPush_toastCtaClicked]:\n\t\t\"SliceMachine Post Push Toast CTA Clicked\",\n\t[SegmentEventType.experiment_exposure]: \"$exposure\",\n\t[SegmentEventType.sharedOnboarding_step_completed]:\n\t\t\"Prismic Onboarding Guide Step Completed\",\n\t[SegmentEventType.sharedOnboarding_step_opened]:\n\t\t\"Prismic Onboarding Guide Step Open\",\n\t[SegmentEventType.sharedOnboarding_completed]:\n\t\t\"Prismic Onboarding Guide Completed\",\n\t[SegmentEventType.sharedOnboarding_tutorial]:\n\t\t\"Prismic Onboarding Guide Follow Tutorial\",\n\t[SegmentEventType.sliceGenerationFeedback]: \"Slice Generation Feedback\",\n\t[SegmentEventType.sliceGeneration_pastedFromFigma]:\n\t\t\"SliceMachine Shared Slice Generation - Pasted From Figma\",\n\t[SegmentEventType.sliceGeneration_started]:\n\t\t\"SliceMachine Shared Slice Generation - Started\",\n\t[SegmentEventType.sliceGeneration_ended]:\n\t\t\"SliceMachine Shared Slice Generation - Ended\",\n\t[SegmentEventType.sliceGeneration_pluginInstallationClicked]:\n\t\t\"SliceMachine Shared Slice Generation - Plugin Installation Clicked\",\n\t[SegmentEventType.navigation_documentationLinkClicked]:\n\t\t\"SliceMachine Documentation Link Clicked\",\n\t[SegmentEventType.sidebar_link_clicked]: \"Sidebar Link Clicked\",\n\t[SegmentEventType.mcp_promo_link_clicked]: \"MCP Promo Link Clicked\",\n\t[SegmentEventType.info_banner_dismissed]:\n\t\t\"SliceMachine Info Banner Dismissed\",\n\t[SegmentEventType.info_banner_button_clicked]:\n\t\t\"SliceMachine Info Banner Button Clicked\",\n\t[SegmentEventType.slice_library_opened]:\n\t\t\"SliceMachine Slice Library - Opened\",\n\t[SegmentEventType.slice_library_projects_listed]:\n\t\t\"SliceMachine Slice Library - Projects Listed\",\n\t[SegmentEventType.slice_library_slice_selected]:\n\t\t\"SliceMachine Slice Library - Slice Selected\",\n\t[SegmentEventType.slice_library_fetching_started]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Started\",\n\t[SegmentEventType.slice_library_fetching_ended]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Ended\",\n\t[SegmentEventType.slice_library_fetching_failed]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Failed\",\n\t[SegmentEventType.slice_library_import_started]:\n\t\t\"SliceMachine Slice Library - Slice Import Started\",\n\t[SegmentEventType.slice_library_import_complete]:\n\t\t\"SliceMachine Slice Library - Slice Import Complete\",\n\t[SegmentEventType.slice_library_import_failed]:\n\t\t\"SliceMachine Slice Library - Slice Import Failed\",\n} as const;\n\nexport type HumanSegmentEventTypes =\n\t(typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];\n\ntype SegmentEvent<\n\tTType extends SegmentEventTypes,\n\tTProperties extends Record<string, unknown> | void = void,\n> = TProperties extends void\n\t? {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t }\n\t: {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t } & TProperties;\n\ntype CommandInitStartSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_start\n>;\n\n// This event feels off, we have a dedicated `identify` method...\ntype CommandInitIdentifySegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_identify\n>;\n\ntype CommandInitEndSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_end,\n\t{ framework: string; success: boolean; error?: string }\n>;\n\ntype SliceSimulatorOpenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_open\n>;\n\ntype SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_isNotRunning\n>;\n\ntype PageViewSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.pageView,\n\t{\n\t\turl: string;\n\t\tpath: string;\n\t\tsearch: string;\n\t\ttitle: string;\n\t\treferrer: string;\n\t\tadapter: string;\n\t\t/*\n\t\t * We are tracking outer sizes instead of inner sizes as with the latter, we\n\t\t * can't differentiate between users with a high-density screen and those\n\t\t * zooming in/out with ⌘ + / ⌘ -. Indeed, when users zoom in/out, some\n\t\t * browsers (like Google Chrome) will update `window.devicePixelRatio` while\n\t\t * others (like Safari) will keep it unchanged so that it always reflects\n\t\t * the ratio of physical pixels to CSS pixels.\n\t\t */\n\t\touterWidth: number;\n\t\touterHeight: number;\n\t\tscreenWidth: number;\n\t\tscreenHeight: number;\n\t}\n>;\n\ntype OpenPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.open_page_snippet,\n\t{ framework: string }\n>;\n\ntype CopyPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.copy_page_snippet,\n\t{ framework: string }\n>;\n\ntype SwitchEnvironmentSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.switch_environment,\n\t{ domain: string }\n>;\n\ntype OpenVideoTutorialsSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.openVideoTutorials,\n\t{ video: string }\n>;\n\ntype FieldAddedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_added,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_updated,\n\t{\n\t\tpreviousId: string;\n\t\tid: string;\n\t\tidUpdated: boolean;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldSettingsOpenedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_settingsOpened,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t}\n>;\n\ntype CustomTypeCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t\torigin: \"onboarding\" | \"table\";\n\t}\n>;\n\ntype CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_sliceZoneUpdated,\n\t{ customTypeId: string }\n>;\n\ntype CustomTypeOpenAddFromTemplatesEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_openAddFromTemplates,\n\t{ customTypeId: string; customTypeFormat: CustomTypeFormat }\n>;\n\ntype CustomTypeSavedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_saved,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t}\n>;\n\ntype SliceCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.slice_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tlibrary: string;\n\t\tlocation: \"custom_type\" | \"page_type\" | \"slices\";\n\t} & (\n\t\t| { mode: \"ai\"; langSmithUrl?: string }\n\t\t| { mode: \"figma-to-slice\" }\n\t\t| { mode: \"manual\" }\n\t\t| { mode: \"template\"; sliceTemplate: string }\n\t\t| { mode: \"import\" }\n\t)\n>;\n\ntype LegacySliceConvertedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.legacySlice_converted,\n\t{\n\t\tid: string;\n\t\tvariation: string;\n\t\tlibrary: string;\n\t\tconversionType:\n\t\t\t| \"as_new_slice\"\n\t\t\t| \"as_new_variation\"\n\t\t\t| \"merge_with_identical\";\n\t}\n>;\n\ntype ScreenshotTakenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.screenshotTaken,\n\t{\n\t\ttype: \"custom\";\n\t\tmethod: \"upload\" | \"dragAndDrop\";\n\t}\n>;\n\ntype ChangesPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_pushed,\n\t{\n\t\tcustomTypesCreated: number;\n\t\tcustomTypesModified: number;\n\t\tcustomTypesDeleted: number;\n\t\tslicesCreated: number;\n\t\tslicesModified: number;\n\t\tslicesDeleted: number;\n\t\tmissingScreenshots: number;\n\t\ttotal: number;\n\t\tduration: number;\n\t\thasDeletedDocuments: boolean;\n\t}\n>;\n\ntype ChangesGroupPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_groupPushed,\n\t{\n\t\tisInStaticZone: boolean;\n\t\tisInSlice: boolean;\n\t} & {\n\t\t[key in FieldType]?: number;\n\t}\n>;\n\ntype ChangesLimitReachSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_limitReach,\n\t{ limitType: PushChangesLimitType }\n>;\n\ntype EditorWidgetUsedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.editor_widgetUsed,\n\t{ sliceId: string }\n>;\n\ntype DevCollabJoinBetaClicked = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_joinBetaClicked\n>;\n\ntype DevCollabSetUpWorkflowOpened = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_setUpWorkflowOpened\n>;\n\ntype DevCollabWorkflowStubDisplayed = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_workflowStubDisplayed\n>;\n\ntype SliceMachineStart = SegmentEvent<\n\ttypeof SegmentEventType.sliceMachine_start,\n\t{\n\t\tadapter?: string;\n\t\tadapterVersion?: string;\n\t\tisAdapterUpdateAvailable?: boolean;\n\t\tisLoggedIn?: boolean;\n\t\tisSliceMachineUpdateAvailable?: boolean;\n\t\tisTypeScriptProject?: boolean;\n\t\tnodeVersion?: string;\n\t\tnumberOfCustomTypes?: number;\n\t\tnumberOfSlices?: number;\n\t\tosPlatform?: string;\n\t\tpackageManager?: string;\n\t\tprojectPort?: string;\n\t\tsliceMachineVersion?: string;\n\t\tversionControlSystem?: string;\n\t}\n>;\n\ntype OnboardingCommonPayload = { stepId: string; stepTitle: string };\ntype SharedOnboardingProperties<T = Record<string, string>> = T & {\n\tsource: \"SliceMachine\";\n};\n\ntype SliceMachineSharedOnboardingStepOpened = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_opened,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingStepCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_completed,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_completed,\n\tSharedOnboardingProperties\n>;\ntype SliceMachineSharedOnboardingTutorial = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_tutorial,\n\tSharedOnboardingProperties\n>;\ntype SliceMachinePostPushEmptyStateCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_emptyStateCtaClicked\n>;\n\ntype SliceMachinePostPushToastCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_toastCtaClicked\n>;\n\ntype SliceMachineExperimentExposure = SegmentEvent<\n\ttypeof SegmentEventType.experiment_exposure,\n\t{\n\t\tflag_key: string;\n\t\tvariant: string;\n\t}\n>;\n\ntype SliceGenerationFeedback = SegmentEvent<\n\ttypeof SegmentEventType.sliceGenerationFeedback,\n\t{\n\t\ttype: \"model\";\n\t\tsliceId: string;\n\t\tvariationId: string;\n\t\tfeedback: \"up\" | \"down\";\n\t\tlangSmithUrl?: string;\n\t}\n>;\n\ntype SliceGenerationPastedFromFigma = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pastedFromFigma,\n\t{\n\t\tsource: \"shortcut\" | \"button\";\n\t}\n>;\n\ntype SliceGenerationStarted = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_started,\n\t{\n\t\tsource: \"figma\" | \"upload\";\n\t\tllmProxyUrl: string;\n\t}\n>;\n\ntype SliceGenerationEnded = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_ended,\n\t{\n\t\terror: boolean;\n\t\tsource: \"figma\" | \"upload\";\n\t}\n>;\n\ntype SliceGenerationPluginInstallationClicked = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pluginInstallationClicked\n>;\n\ntype NavigationDocumentationLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.navigation_documentationLinkClicked,\n\t{\n\t\tframework: string;\n\t}\n>;\n\ntype SidebarLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.sidebar_link_clicked,\n\t{\n\t\tlink_name: string;\n\t\tsource: string;\n\t}\n>;\n\ntype McpPromoLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.mcp_promo_link_clicked,\n\t{\n\t\tsource: string;\n\t\ttarget: string;\n\t}\n>;\n\ntype InfoBannerDismissed = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_dismissed,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype InfoBannerButtonClicked = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_button_clicked,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype SliceLibraryOpened = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_opened\n>;\ntype SliceLibraryProjectsListed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_projects_listed,\n\t{\n\t\trepositories_count: number;\n\t}\n>;\ntype SliceLibrarySliceSelected = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_slice_selected,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t\tdestination_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingEnded = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_ended,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingFailed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_failed,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryImportStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryImportComplete = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_complete,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t\tdestination_project_id: string;\n\t}\n>;\ntype SliceLibraryImportFailed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_failed,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\n\nexport type SegmentEvents =\n\t| CommandInitStartSegmentEvent\n\t| CommandInitIdentifySegmentEvent\n\t| CommandInitEndSegmentEvent\n\t| SliceSimulatorOpenSegmentEvent\n\t| SliceSimulatorIsNotRunningSegmentEvent\n\t| PageViewSegmentEvent\n\t| OpenVideoTutorialsSegmentEvent\n\t| FieldAddedSegmentEvent\n\t| FieldUpdatedSegmentEvent\n\t| FieldSettingsOpenedSegmentEvent\n\t| CustomTypeCreatedSegmentEvent\n\t| CustomTypeSliceZoneUpdatedSegmentEvent\n\t| CustomTypeOpenAddFromTemplatesEvent\n\t| CustomTypeSavedSegmentEvent\n\t| SliceCreatedSegmentEvent\n\t| LegacySliceConvertedSegmentEvent\n\t| ScreenshotTakenSegmentEvent\n\t| ChangesPushedSegmentEvent\n\t| ChangesGroupPushedSegmentEvent\n\t| ChangesLimitReachSegmentEvent\n\t| EditorWidgetUsedSegmentEvent\n\t| OpenPageSnippetSegmentEvent\n\t| CopyPageSnippetSegmentEvent\n\t| SwitchEnvironmentSegmentEvent\n\t| DevCollabJoinBetaClicked\n\t| DevCollabSetUpWorkflowOpened\n\t| DevCollabWorkflowStubDisplayed\n\t| SliceMachineStart\n\t| SliceMachineSharedOnboardingStepOpened\n\t| SliceMachineSharedOnboardingStepCompleted\n\t| SliceMachineSharedOnboardingCompleted\n\t| SliceMachineSharedOnboardingTutorial\n\t| SliceMachinePostPushEmptyStateCtaClicked\n\t| SliceMachinePostPushToastCtaClicked\n\t| SliceMachineExperimentExposure\n\t| SliceGenerationFeedback\n\t| SliceGenerationPastedFromFigma\n\t| SliceGenerationStarted\n\t| SliceGenerationEnded\n\t| SliceGenerationPluginInstallationClicked\n\t| NavigationDocumentationLinkClicked\n\t| SidebarLinkClicked\n\t| McpPromoLinkClicked\n\t| InfoBannerDismissed\n\t| InfoBannerButtonClicked\n\t| SliceLibraryOpened\n\t| SliceLibraryProjectsListed\n\t| SliceLibrarySliceSelected\n\t| SliceLibraryFetchingStarted\n\t| SliceLibraryFetchingEnded\n\t| SliceLibraryFetchingFailed\n\t| SliceLibraryImportStarted\n\t| SliceLibraryImportComplete\n\t| SliceLibraryImportFailed;\n"],"names":[],"mappings":";;AAUO,MAAM,mBAAmB;AAAA,EAC/B,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,iCAAiC;AAAA,EACjC,oBAAoB;AAAA,EACpB,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,qBAAqB;AAAA,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AA8B,GAC/C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,6BAA6B,GAC9C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,6BAA6B,GAC9C;AAAA,EACD,CAAC,iBAAiB,2BAA2B,GAC5C;;;;"}
1
+ {"version":3,"file":"types.cjs","sources":["../../../../src/managers/telemetry/types.ts"],"sourcesContent":["import {\n\tFieldType,\n\tLinkConfig,\n} from \"@prismicio/types-internal/lib/customtypes/widgets\";\n\nimport { CustomTypeFormat } from \"../customTypes/types\";\nimport type { PushChangesLimitType } from \"../prismicRepository/types\";\n\nexport type { Variant } from \"@amplitude/experiment-node-server\";\n\nexport const SegmentEventType = {\n\tcommand_init_start: \"command:init:start\",\n\tcommand_init_identify: \"command:init:identify\",\n\tcommand_init_end: \"command:init:end\",\n\tsliceSimulator_open: \"slice-simulator:open\",\n\tsliceSimulator_isNotRunning: \"slice-simulator:is-not-running\",\n\tpageView: \"page-view\",\n\topenVideoTutorials: \"open-video-tutorials\",\n\tfield_added: \"field:added\",\n\tfield_updated: \"field:updated\",\n\tfield_settingsOpened: \"field:settings-opened\",\n\tcustomType_created: \"custom-type:created\",\n\tcustomType_sliceZoneUpdated: \"custom-type:slice-zone-updated\",\n\tcustomType_openAddFromTemplates: \"custom-type:open-add-from-templates\",\n\tcustomType_saved: \"custom-type:saved\",\n\tslice_created: \"slice:created\",\n\tlegacySlice_converted: \"legacy-slice:converted\",\n\tscreenshotTaken: \"screenshot-taken\",\n\tchanges_pushed: \"changes:pushed\",\n\tchanges_groupPushed: \"changes:group-pushed\",\n\tchanges_limitReach: \"changes:limit-reach\",\n\teditor_widgetUsed: \"editor:widget-used\",\n\topen_page_snippet: \"page-type:open-snippet\",\n\tcopy_page_snippet: \"page-type:copy-snippet\",\n\tswitch_environment: \"environment:switch\",\n\tdevCollab_joinBetaClicked: \"dev-collab:join-beta-clicked\",\n\tdevCollab_setUpWorkflowOpened: \"dev-collab:set-up-workflow-opened\",\n\tdevCollab_workflowStubDisplayed: \"dev-collab:workflow-stub-displayed\",\n\tsliceMachine_start: \"slice-machine:start\",\n\tpostPush_emptyStateCtaClicked: \"post-push:empty-state-cta-clicked\",\n\tpostPush_toastCtaClicked: \"post-push:toast-cta-clicked\",\n\texperiment_exposure: \"experiment:exposure\",\n\tsharedOnboarding_step_opened: \"shared-onboarding:step-opened\",\n\tsharedOnboarding_step_completed: \"shared-onboarding:step-completed\",\n\tsharedOnboarding_completed: \"shared-onboarding:completed\",\n\tsharedOnboarding_tutorial: \"shared-onboarding:follow-tutorial\",\n\tsliceGenerationFeedback: \"slice-generation-feedback\",\n\tsliceGeneration_pastedFromFigma: \"slice-generation:pasted-from-figma\",\n\tsliceGeneration_started: \"slice-generation:started\",\n\tsliceGeneration_ended: \"slice-generation:ended\",\n\tsliceGeneration_pluginInstallationClicked:\n\t\t\"slice-generation:plugin-installation-clicked\",\n\tnavigation_documentationLinkClicked: \"navigation:documentation-link-clicked\",\n\tsidebar_link_clicked: \"sidebar:link-clicked\",\n\tmcp_promo_link_clicked: \"mcp:promo-link-clicked\",\n\tinfo_banner_dismissed: \"info-banner:dismissed\",\n\tinfo_banner_button_clicked: \"info-banner:button-clicked\",\n\tslice_library_opened: \"slice-library:opened\",\n\tslice_library_projects_listed: \"slice-library:projects-listed\",\n\tslice_library_slice_selected: \"slice-library:slice-selected\",\n\tslice_library_fetching_started: \"slice-library:fetching-started\",\n\tslice_library_fetching_ended: \"slice-library:fetching-ended\",\n\tslice_library_import_started: \"slice-library:import-started\",\n\tslice_library_import_ended: \"slice-library:import-ended\",\n} as const;\ntype SegmentEventTypes =\n\t(typeof SegmentEventType)[keyof typeof SegmentEventType];\n\nexport const HumanSegmentEventType = {\n\t[SegmentEventType.command_init_start]: \"SliceMachine Init Start\",\n\t[SegmentEventType.command_init_identify]: \"SliceMachine Init Identify\",\n\t[SegmentEventType.command_init_end]: \"SliceMachine Init End\",\n\t[SegmentEventType.sliceSimulator_open]: \"SliceMachine Slice Simulator Open\",\n\t[SegmentEventType.sliceSimulator_isNotRunning]:\n\t\t\"SliceMachine Slice Simulator is not running\",\n\t[SegmentEventType.pageView]: \"SliceMachine Page View\",\n\t[SegmentEventType.openVideoTutorials]: \"SliceMachine Open Video Tutorials\",\n\t[SegmentEventType.field_added]: \"SliceMachine Field Added\",\n\t[SegmentEventType.field_updated]: \"SliceMachine Field Updated\",\n\t[SegmentEventType.field_settingsOpened]: \"SliceMachine Field Settings Opened\",\n\t[SegmentEventType.customType_created]: \"SliceMachine Custom Type Created\",\n\t[SegmentEventType.customType_sliceZoneUpdated]:\n\t\t\"SliceMachine Slicezone Updated\",\n\t[SegmentEventType.customType_openAddFromTemplates]:\n\t\t\"SliceMachine Open Add from templates\",\n\t[SegmentEventType.customType_saved]: \"SliceMachine Custom Type Saved\",\n\t[SegmentEventType.slice_created]: \"SliceMachine Slice Created\",\n\t[SegmentEventType.legacySlice_converted]:\n\t\t\"SliceMachine Legacy Slice Converted\",\n\t[SegmentEventType.screenshotTaken]: \"SliceMachine Screenshot Taken\",\n\t[SegmentEventType.changes_pushed]: \"SliceMachine Changes Pushed\",\n\t[SegmentEventType.changes_groupPushed]: \"SliceMachine Group Field Pushed\",\n\t[SegmentEventType.changes_limitReach]: \"SliceMachine Changes Limit Reach\",\n\t[SegmentEventType.editor_widgetUsed]: \"SliceMachine Editor Widget Used\",\n\t[SegmentEventType.open_page_snippet]:\n\t\t\"SliceMachine Opens Page Type Snippet Dialog\",\n\t[SegmentEventType.copy_page_snippet]:\n\t\t\"Slice Machine page code snippet copied\",\n\t[SegmentEventType.switch_environment]: \"SliceMachine environment switch\",\n\t[SegmentEventType.devCollab_joinBetaClicked]:\n\t\t\"SliceMachine Dev Collab Join Beta Clicked\",\n\t[SegmentEventType.devCollab_setUpWorkflowOpened]:\n\t\t\"SliceMachine Dev Collab Set Up Workflow Opened\",\n\t[SegmentEventType.devCollab_workflowStubDisplayed]:\n\t\t\"SliceMachine Dev Collab Workflow Stub Displayed\",\n\t[SegmentEventType.sliceMachine_start]: \"SliceMachine Start\",\n\t[SegmentEventType.postPush_emptyStateCtaClicked]:\n\t\t\"SliceMachine Post Push Empty State CTA Clicked\",\n\t[SegmentEventType.postPush_toastCtaClicked]:\n\t\t\"SliceMachine Post Push Toast CTA Clicked\",\n\t[SegmentEventType.experiment_exposure]: \"$exposure\",\n\t[SegmentEventType.sharedOnboarding_step_completed]:\n\t\t\"Prismic Onboarding Guide Step Completed\",\n\t[SegmentEventType.sharedOnboarding_step_opened]:\n\t\t\"Prismic Onboarding Guide Step Open\",\n\t[SegmentEventType.sharedOnboarding_completed]:\n\t\t\"Prismic Onboarding Guide Completed\",\n\t[SegmentEventType.sharedOnboarding_tutorial]:\n\t\t\"Prismic Onboarding Guide Follow Tutorial\",\n\t[SegmentEventType.sliceGenerationFeedback]: \"Slice Generation Feedback\",\n\t[SegmentEventType.sliceGeneration_pastedFromFigma]:\n\t\t\"SliceMachine Shared Slice Generation - Pasted From Figma\",\n\t[SegmentEventType.sliceGeneration_started]:\n\t\t\"SliceMachine Shared Slice Generation - Started\",\n\t[SegmentEventType.sliceGeneration_ended]:\n\t\t\"SliceMachine Shared Slice Generation - Ended\",\n\t[SegmentEventType.sliceGeneration_pluginInstallationClicked]:\n\t\t\"SliceMachine Shared Slice Generation - Plugin Installation Clicked\",\n\t[SegmentEventType.navigation_documentationLinkClicked]:\n\t\t\"SliceMachine Documentation Link Clicked\",\n\t[SegmentEventType.sidebar_link_clicked]: \"Sidebar Link Clicked\",\n\t[SegmentEventType.mcp_promo_link_clicked]: \"MCP Promo Link Clicked\",\n\t[SegmentEventType.info_banner_dismissed]:\n\t\t\"SliceMachine Info Banner Dismissed\",\n\t[SegmentEventType.info_banner_button_clicked]:\n\t\t\"SliceMachine Info Banner Button Clicked\",\n\t[SegmentEventType.slice_library_opened]:\n\t\t\"SliceMachine Slice Library - Opened\",\n\t[SegmentEventType.slice_library_projects_listed]:\n\t\t\"SliceMachine Slice Library - Projects Listed\",\n\t[SegmentEventType.slice_library_slice_selected]:\n\t\t\"SliceMachine Slice Library - Slice Selected\",\n\t[SegmentEventType.slice_library_fetching_started]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Started\",\n\t[SegmentEventType.slice_library_fetching_ended]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Ended\",\n\t[SegmentEventType.slice_library_import_started]:\n\t\t\"SliceMachine Slice Library - Slice Import Started\",\n\t[SegmentEventType.slice_library_import_ended]:\n\t\t\"SliceMachine Slice Library - Slice Import Ended\",\n} as const;\n\nexport type HumanSegmentEventTypes =\n\t(typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];\n\ntype SegmentEvent<\n\tTType extends SegmentEventTypes,\n\tTProperties extends Record<string, unknown> | void = void,\n> = TProperties extends void\n\t? {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t }\n\t: {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t } & TProperties;\n\ntype CommandInitStartSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_start\n>;\n\n// This event feels off, we have a dedicated `identify` method...\ntype CommandInitIdentifySegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_identify\n>;\n\ntype CommandInitEndSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_end,\n\t{ framework: string; success: boolean; error?: string }\n>;\n\ntype SliceSimulatorOpenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_open\n>;\n\ntype SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_isNotRunning\n>;\n\ntype PageViewSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.pageView,\n\t{\n\t\turl: string;\n\t\tpath: string;\n\t\tsearch: string;\n\t\ttitle: string;\n\t\treferrer: string;\n\t\tadapter: string;\n\t\t/*\n\t\t * We are tracking outer sizes instead of inner sizes as with the latter, we\n\t\t * can't differentiate between users with a high-density screen and those\n\t\t * zooming in/out with ⌘ + / ⌘ -. Indeed, when users zoom in/out, some\n\t\t * browsers (like Google Chrome) will update `window.devicePixelRatio` while\n\t\t * others (like Safari) will keep it unchanged so that it always reflects\n\t\t * the ratio of physical pixels to CSS pixels.\n\t\t */\n\t\touterWidth: number;\n\t\touterHeight: number;\n\t\tscreenWidth: number;\n\t\tscreenHeight: number;\n\t}\n>;\n\ntype OpenPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.open_page_snippet,\n\t{ framework: string }\n>;\n\ntype CopyPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.copy_page_snippet,\n\t{ framework: string }\n>;\n\ntype SwitchEnvironmentSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.switch_environment,\n\t{ domain: string }\n>;\n\ntype OpenVideoTutorialsSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.openVideoTutorials,\n\t{ video: string }\n>;\n\ntype FieldAddedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_added,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_updated,\n\t{\n\t\tpreviousId: string;\n\t\tid: string;\n\t\tidUpdated: boolean;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldSettingsOpenedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_settingsOpened,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t}\n>;\n\ntype CustomTypeCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t\torigin: \"onboarding\" | \"table\";\n\t}\n>;\n\ntype CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_sliceZoneUpdated,\n\t{ customTypeId: string }\n>;\n\ntype CustomTypeOpenAddFromTemplatesEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_openAddFromTemplates,\n\t{ customTypeId: string; customTypeFormat: CustomTypeFormat }\n>;\n\ntype CustomTypeSavedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_saved,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t}\n>;\n\ntype SliceCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.slice_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tlibrary: string;\n\t\tlocation: \"custom_type\" | \"page_type\" | \"slices\";\n\t} & (\n\t\t| { mode: \"ai\"; langSmithUrl?: string }\n\t\t| { mode: \"figma-to-slice\" }\n\t\t| { mode: \"manual\" }\n\t\t| { mode: \"template\"; sliceTemplate: string }\n\t\t| { mode: \"import\" }\n\t)\n>;\n\ntype LegacySliceConvertedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.legacySlice_converted,\n\t{\n\t\tid: string;\n\t\tvariation: string;\n\t\tlibrary: string;\n\t\tconversionType:\n\t\t\t| \"as_new_slice\"\n\t\t\t| \"as_new_variation\"\n\t\t\t| \"merge_with_identical\";\n\t}\n>;\n\ntype ScreenshotTakenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.screenshotTaken,\n\t{\n\t\ttype: \"custom\";\n\t\tmethod: \"upload\" | \"dragAndDrop\";\n\t}\n>;\n\ntype ChangesPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_pushed,\n\t{\n\t\tcustomTypesCreated: number;\n\t\tcustomTypesModified: number;\n\t\tcustomTypesDeleted: number;\n\t\tslicesCreated: number;\n\t\tslicesModified: number;\n\t\tslicesDeleted: number;\n\t\tmissingScreenshots: number;\n\t\ttotal: number;\n\t\tduration: number;\n\t\thasDeletedDocuments: boolean;\n\t}\n>;\n\ntype ChangesGroupPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_groupPushed,\n\t{\n\t\tisInStaticZone: boolean;\n\t\tisInSlice: boolean;\n\t} & {\n\t\t[key in FieldType]?: number;\n\t}\n>;\n\ntype ChangesLimitReachSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_limitReach,\n\t{ limitType: PushChangesLimitType }\n>;\n\ntype EditorWidgetUsedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.editor_widgetUsed,\n\t{ sliceId: string }\n>;\n\ntype DevCollabJoinBetaClicked = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_joinBetaClicked\n>;\n\ntype DevCollabSetUpWorkflowOpened = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_setUpWorkflowOpened\n>;\n\ntype DevCollabWorkflowStubDisplayed = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_workflowStubDisplayed\n>;\n\ntype SliceMachineStart = SegmentEvent<\n\ttypeof SegmentEventType.sliceMachine_start,\n\t{\n\t\tadapter?: string;\n\t\tadapterVersion?: string;\n\t\tisAdapterUpdateAvailable?: boolean;\n\t\tisLoggedIn?: boolean;\n\t\tisSliceMachineUpdateAvailable?: boolean;\n\t\tisTypeScriptProject?: boolean;\n\t\tnodeVersion?: string;\n\t\tnumberOfCustomTypes?: number;\n\t\tnumberOfSlices?: number;\n\t\tosPlatform?: string;\n\t\tpackageManager?: string;\n\t\tprojectPort?: string;\n\t\tsliceMachineVersion?: string;\n\t\tversionControlSystem?: string;\n\t}\n>;\n\ntype OnboardingCommonPayload = { stepId: string; stepTitle: string };\ntype SharedOnboardingProperties<T = Record<string, string>> = T & {\n\tsource: \"SliceMachine\";\n};\n\ntype SliceMachineSharedOnboardingStepOpened = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_opened,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingStepCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_completed,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_completed,\n\tSharedOnboardingProperties\n>;\ntype SliceMachineSharedOnboardingTutorial = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_tutorial,\n\tSharedOnboardingProperties\n>;\ntype SliceMachinePostPushEmptyStateCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_emptyStateCtaClicked\n>;\n\ntype SliceMachinePostPushToastCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_toastCtaClicked\n>;\n\ntype SliceMachineExperimentExposure = SegmentEvent<\n\ttypeof SegmentEventType.experiment_exposure,\n\t{\n\t\tflag_key: string;\n\t\tvariant: string;\n\t}\n>;\n\ntype SliceGenerationFeedback = SegmentEvent<\n\ttypeof SegmentEventType.sliceGenerationFeedback,\n\t{\n\t\ttype: \"model\";\n\t\tsliceId: string;\n\t\tvariationId: string;\n\t\tfeedback: \"up\" | \"down\";\n\t\tlangSmithUrl?: string;\n\t}\n>;\n\ntype SliceGenerationPastedFromFigma = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pastedFromFigma,\n\t{\n\t\tsource: \"shortcut\" | \"button\";\n\t}\n>;\n\ntype SliceGenerationStarted = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_started,\n\t{\n\t\tsource: \"figma\" | \"upload\";\n\t\tllmProxyUrl: string;\n\t}\n>;\n\ntype SliceGenerationEnded = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_ended,\n\t{\n\t\terror: boolean;\n\t\tsource: \"figma\" | \"upload\";\n\t}\n>;\n\ntype SliceGenerationPluginInstallationClicked = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pluginInstallationClicked\n>;\n\ntype NavigationDocumentationLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.navigation_documentationLinkClicked,\n\t{\n\t\tframework: string;\n\t}\n>;\n\ntype SidebarLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.sidebar_link_clicked,\n\t{\n\t\tlink_name: string;\n\t\tsource: string;\n\t}\n>;\n\ntype McpPromoLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.mcp_promo_link_clicked,\n\t{\n\t\tsource: string;\n\t\ttarget: string;\n\t}\n>;\n\ntype InfoBannerDismissed = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_dismissed,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype InfoBannerButtonClicked = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_button_clicked,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype SliceLibraryOpened = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_opened\n>;\ntype SliceLibraryProjectsListed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_projects_listed,\n\t{\n\t\trepositories_count: number;\n\t}\n>;\ntype SliceLibrarySliceSelected = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_slice_selected,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t\tdestination_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingEnded = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_ended,\n\t| {\n\t\t\terror: false;\n\t\t\tslices_count: number;\n\t\t\tsource_project_id: string;\n\t }\n\t| {\n\t\t\terror: true;\n\t\t\tslices_count?: never;\n\t\t\tsource_project_id: string;\n\t }\n>;\ntype SliceLibraryImportStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryImportEnded = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_ended,\n\t| {\n\t\t\terror: false;\n\t\t\tslices_count: number;\n\t\t\tsource_project_id: string;\n\t\t\tdestination_project_id: string;\n\t }\n\t| {\n\t\t\terror: true;\n\t\t\tslices_count?: never;\n\t\t\tsource_project_id: string;\n\t\t\tdestination_project_id: string;\n\t }\n>;\n\nexport type SegmentEvents =\n\t| CommandInitStartSegmentEvent\n\t| CommandInitIdentifySegmentEvent\n\t| CommandInitEndSegmentEvent\n\t| SliceSimulatorOpenSegmentEvent\n\t| SliceSimulatorIsNotRunningSegmentEvent\n\t| PageViewSegmentEvent\n\t| OpenVideoTutorialsSegmentEvent\n\t| FieldAddedSegmentEvent\n\t| FieldUpdatedSegmentEvent\n\t| FieldSettingsOpenedSegmentEvent\n\t| CustomTypeCreatedSegmentEvent\n\t| CustomTypeSliceZoneUpdatedSegmentEvent\n\t| CustomTypeOpenAddFromTemplatesEvent\n\t| CustomTypeSavedSegmentEvent\n\t| SliceCreatedSegmentEvent\n\t| LegacySliceConvertedSegmentEvent\n\t| ScreenshotTakenSegmentEvent\n\t| ChangesPushedSegmentEvent\n\t| ChangesGroupPushedSegmentEvent\n\t| ChangesLimitReachSegmentEvent\n\t| EditorWidgetUsedSegmentEvent\n\t| OpenPageSnippetSegmentEvent\n\t| CopyPageSnippetSegmentEvent\n\t| SwitchEnvironmentSegmentEvent\n\t| DevCollabJoinBetaClicked\n\t| DevCollabSetUpWorkflowOpened\n\t| DevCollabWorkflowStubDisplayed\n\t| SliceMachineStart\n\t| SliceMachineSharedOnboardingStepOpened\n\t| SliceMachineSharedOnboardingStepCompleted\n\t| SliceMachineSharedOnboardingCompleted\n\t| SliceMachineSharedOnboardingTutorial\n\t| SliceMachinePostPushEmptyStateCtaClicked\n\t| SliceMachinePostPushToastCtaClicked\n\t| SliceMachineExperimentExposure\n\t| SliceGenerationFeedback\n\t| SliceGenerationPastedFromFigma\n\t| SliceGenerationStarted\n\t| SliceGenerationEnded\n\t| SliceGenerationPluginInstallationClicked\n\t| NavigationDocumentationLinkClicked\n\t| SidebarLinkClicked\n\t| McpPromoLinkClicked\n\t| InfoBannerDismissed\n\t| InfoBannerButtonClicked\n\t| SliceLibraryOpened\n\t| SliceLibraryProjectsListed\n\t| SliceLibrarySliceSelected\n\t| SliceLibraryFetchingStarted\n\t| SliceLibraryFetchingEnded\n\t| SliceLibraryImportStarted\n\t| SliceLibraryImportEnded;\n"],"names":[],"mappings":";;AAUO,MAAM,mBAAmB;AAAA,EAC/B,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/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CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,8BAA8B,GAC/C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,0BAA0B,GAC3C;;;;"}
@@ -53,10 +53,8 @@ export declare const SegmentEventType: {
53
53
  readonly slice_library_slice_selected: "slice-library:slice-selected";
54
54
  readonly slice_library_fetching_started: "slice-library:fetching-started";
55
55
  readonly slice_library_fetching_ended: "slice-library:fetching-ended";
56
- readonly slice_library_fetching_failed: "slice-library:fetching-failed";
57
56
  readonly slice_library_import_started: "slice-library:import-started";
58
- readonly slice_library_import_complete: "slice-library:import-completed";
59
- readonly slice_library_import_failed: "slice-library:import-failed";
57
+ readonly slice_library_import_ended: "slice-library:import-ended";
60
58
  };
61
59
  type SegmentEventTypes = (typeof SegmentEventType)[keyof typeof SegmentEventType];
62
60
  export declare const HumanSegmentEventType: {
@@ -110,10 +108,8 @@ export declare const HumanSegmentEventType: {
110
108
  readonly "slice-library:slice-selected": "SliceMachine Slice Library - Slice Selected";
111
109
  readonly "slice-library:fetching-started": "SliceMachine Slice Library - Slice Fetching Started";
112
110
  readonly "slice-library:fetching-ended": "SliceMachine Slice Library - Slice Fetching Ended";
113
- readonly "slice-library:fetching-failed": "SliceMachine Slice Library - Slice Fetching Failed";
114
111
  readonly "slice-library:import-started": "SliceMachine Slice Library - Slice Import Started";
115
- readonly "slice-library:import-completed": "SliceMachine Slice Library - Slice Import Complete";
116
- readonly "slice-library:import-failed": "SliceMachine Slice Library - Slice Import Failed";
112
+ readonly "slice-library:import-ended": "SliceMachine Slice Library - Slice Import Ended";
117
113
  };
118
114
  export type HumanSegmentEventTypes = (typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];
119
115
  type SegmentEvent<TType extends SegmentEventTypes, TProperties extends Record<string, unknown> | void = void> = TProperties extends void ? {
@@ -348,21 +344,26 @@ type SliceLibraryFetchingStarted = SegmentEvent<typeof SegmentEventType.slice_li
348
344
  source_project_id: string;
349
345
  }>;
350
346
  type SliceLibraryFetchingEnded = SegmentEvent<typeof SegmentEventType.slice_library_fetching_ended, {
347
+ error: false;
351
348
  slices_count: number;
352
349
  source_project_id: string;
353
- }>;
354
- type SliceLibraryFetchingFailed = SegmentEvent<typeof SegmentEventType.slice_library_fetching_failed, {
350
+ } | {
351
+ error: true;
352
+ slices_count?: never;
355
353
  source_project_id: string;
356
354
  }>;
357
355
  type SliceLibraryImportStarted = SegmentEvent<typeof SegmentEventType.slice_library_import_started, {
358
356
  source_project_id: string;
359
357
  }>;
360
- type SliceLibraryImportComplete = SegmentEvent<typeof SegmentEventType.slice_library_import_complete, {
358
+ type SliceLibraryImportEnded = SegmentEvent<typeof SegmentEventType.slice_library_import_ended, {
359
+ error: false;
361
360
  slices_count: number;
362
361
  source_project_id: string;
363
362
  destination_project_id: string;
364
- }>;
365
- type SliceLibraryImportFailed = SegmentEvent<typeof SegmentEventType.slice_library_import_failed, {
363
+ } | {
364
+ error: true;
365
+ slices_count?: never;
366
366
  source_project_id: string;
367
+ destination_project_id: string;
367
368
  }>;
368
- export type SegmentEvents = CommandInitStartSegmentEvent | CommandInitIdentifySegmentEvent | CommandInitEndSegmentEvent | SliceSimulatorOpenSegmentEvent | SliceSimulatorIsNotRunningSegmentEvent | PageViewSegmentEvent | OpenVideoTutorialsSegmentEvent | FieldAddedSegmentEvent | FieldUpdatedSegmentEvent | FieldSettingsOpenedSegmentEvent | CustomTypeCreatedSegmentEvent | CustomTypeSliceZoneUpdatedSegmentEvent | CustomTypeOpenAddFromTemplatesEvent | CustomTypeSavedSegmentEvent | SliceCreatedSegmentEvent | LegacySliceConvertedSegmentEvent | ScreenshotTakenSegmentEvent | ChangesPushedSegmentEvent | ChangesGroupPushedSegmentEvent | ChangesLimitReachSegmentEvent | EditorWidgetUsedSegmentEvent | OpenPageSnippetSegmentEvent | CopyPageSnippetSegmentEvent | SwitchEnvironmentSegmentEvent | DevCollabJoinBetaClicked | DevCollabSetUpWorkflowOpened | DevCollabWorkflowStubDisplayed | SliceMachineStart | SliceMachineSharedOnboardingStepOpened | SliceMachineSharedOnboardingStepCompleted | SliceMachineSharedOnboardingCompleted | SliceMachineSharedOnboardingTutorial | SliceMachinePostPushEmptyStateCtaClicked | SliceMachinePostPushToastCtaClicked | SliceMachineExperimentExposure | SliceGenerationFeedback | SliceGenerationPastedFromFigma | SliceGenerationStarted | SliceGenerationEnded | SliceGenerationPluginInstallationClicked | NavigationDocumentationLinkClicked | SidebarLinkClicked | McpPromoLinkClicked | InfoBannerDismissed | InfoBannerButtonClicked | SliceLibraryOpened | SliceLibraryProjectsListed | SliceLibrarySliceSelected | SliceLibraryFetchingStarted | SliceLibraryFetchingEnded | SliceLibraryFetchingFailed | SliceLibraryImportStarted | SliceLibraryImportComplete | SliceLibraryImportFailed;
369
+ export type SegmentEvents = CommandInitStartSegmentEvent | CommandInitIdentifySegmentEvent | CommandInitEndSegmentEvent | SliceSimulatorOpenSegmentEvent | SliceSimulatorIsNotRunningSegmentEvent | PageViewSegmentEvent | OpenVideoTutorialsSegmentEvent | FieldAddedSegmentEvent | FieldUpdatedSegmentEvent | FieldSettingsOpenedSegmentEvent | CustomTypeCreatedSegmentEvent | CustomTypeSliceZoneUpdatedSegmentEvent | CustomTypeOpenAddFromTemplatesEvent | CustomTypeSavedSegmentEvent | SliceCreatedSegmentEvent | LegacySliceConvertedSegmentEvent | ScreenshotTakenSegmentEvent | ChangesPushedSegmentEvent | ChangesGroupPushedSegmentEvent | ChangesLimitReachSegmentEvent | EditorWidgetUsedSegmentEvent | OpenPageSnippetSegmentEvent | CopyPageSnippetSegmentEvent | SwitchEnvironmentSegmentEvent | DevCollabJoinBetaClicked | DevCollabSetUpWorkflowOpened | DevCollabWorkflowStubDisplayed | SliceMachineStart | SliceMachineSharedOnboardingStepOpened | SliceMachineSharedOnboardingStepCompleted | SliceMachineSharedOnboardingCompleted | SliceMachineSharedOnboardingTutorial | SliceMachinePostPushEmptyStateCtaClicked | SliceMachinePostPushToastCtaClicked | SliceMachineExperimentExposure | SliceGenerationFeedback | SliceGenerationPastedFromFigma | SliceGenerationStarted | SliceGenerationEnded | SliceGenerationPluginInstallationClicked | NavigationDocumentationLinkClicked | SidebarLinkClicked | McpPromoLinkClicked | InfoBannerDismissed | InfoBannerButtonClicked | SliceLibraryOpened | SliceLibraryProjectsListed | SliceLibrarySliceSelected | SliceLibraryFetchingStarted | SliceLibraryFetchingEnded | SliceLibraryImportStarted | SliceLibraryImportEnded;
@@ -49,10 +49,8 @@ const SegmentEventType = {
49
49
  slice_library_slice_selected: "slice-library:slice-selected",
50
50
  slice_library_fetching_started: "slice-library:fetching-started",
51
51
  slice_library_fetching_ended: "slice-library:fetching-ended",
52
- slice_library_fetching_failed: "slice-library:fetching-failed",
53
52
  slice_library_import_started: "slice-library:import-started",
54
- slice_library_import_complete: "slice-library:import-completed",
55
- slice_library_import_failed: "slice-library:import-failed"
53
+ slice_library_import_ended: "slice-library:import-ended"
56
54
  };
57
55
  const HumanSegmentEventType = {
58
56
  [SegmentEventType.command_init_start]: "SliceMachine Init Start",
@@ -105,10 +103,8 @@ const HumanSegmentEventType = {
105
103
  [SegmentEventType.slice_library_slice_selected]: "SliceMachine Slice Library - Slice Selected",
106
104
  [SegmentEventType.slice_library_fetching_started]: "SliceMachine Slice Library - Slice Fetching Started",
107
105
  [SegmentEventType.slice_library_fetching_ended]: "SliceMachine Slice Library - Slice Fetching Ended",
108
- [SegmentEventType.slice_library_fetching_failed]: "SliceMachine Slice Library - Slice Fetching Failed",
109
106
  [SegmentEventType.slice_library_import_started]: "SliceMachine Slice Library - Slice Import Started",
110
- [SegmentEventType.slice_library_import_complete]: "SliceMachine Slice Library - Slice Import Complete",
111
- [SegmentEventType.slice_library_import_failed]: "SliceMachine Slice Library - Slice Import Failed"
107
+ [SegmentEventType.slice_library_import_ended]: "SliceMachine Slice Library - Slice Import Ended"
112
108
  };
113
109
  export {
114
110
  HumanSegmentEventType,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../../src/managers/telemetry/types.ts"],"sourcesContent":["import {\n\tFieldType,\n\tLinkConfig,\n} from \"@prismicio/types-internal/lib/customtypes/widgets\";\n\nimport { CustomTypeFormat } from \"../customTypes/types\";\nimport type { PushChangesLimitType } from \"../prismicRepository/types\";\n\nexport type { Variant } from \"@amplitude/experiment-node-server\";\n\nexport const SegmentEventType = {\n\tcommand_init_start: \"command:init:start\",\n\tcommand_init_identify: \"command:init:identify\",\n\tcommand_init_end: \"command:init:end\",\n\tsliceSimulator_open: \"slice-simulator:open\",\n\tsliceSimulator_isNotRunning: \"slice-simulator:is-not-running\",\n\tpageView: \"page-view\",\n\topenVideoTutorials: \"open-video-tutorials\",\n\tfield_added: \"field:added\",\n\tfield_updated: \"field:updated\",\n\tfield_settingsOpened: \"field:settings-opened\",\n\tcustomType_created: \"custom-type:created\",\n\tcustomType_sliceZoneUpdated: \"custom-type:slice-zone-updated\",\n\tcustomType_openAddFromTemplates: \"custom-type:open-add-from-templates\",\n\tcustomType_saved: \"custom-type:saved\",\n\tslice_created: \"slice:created\",\n\tlegacySlice_converted: \"legacy-slice:converted\",\n\tscreenshotTaken: \"screenshot-taken\",\n\tchanges_pushed: \"changes:pushed\",\n\tchanges_groupPushed: \"changes:group-pushed\",\n\tchanges_limitReach: \"changes:limit-reach\",\n\teditor_widgetUsed: \"editor:widget-used\",\n\topen_page_snippet: \"page-type:open-snippet\",\n\tcopy_page_snippet: \"page-type:copy-snippet\",\n\tswitch_environment: \"environment:switch\",\n\tdevCollab_joinBetaClicked: \"dev-collab:join-beta-clicked\",\n\tdevCollab_setUpWorkflowOpened: \"dev-collab:set-up-workflow-opened\",\n\tdevCollab_workflowStubDisplayed: \"dev-collab:workflow-stub-displayed\",\n\tsliceMachine_start: \"slice-machine:start\",\n\tpostPush_emptyStateCtaClicked: \"post-push:empty-state-cta-clicked\",\n\tpostPush_toastCtaClicked: \"post-push:toast-cta-clicked\",\n\texperiment_exposure: \"experiment:exposure\",\n\tsharedOnboarding_step_opened: \"shared-onboarding:step-opened\",\n\tsharedOnboarding_step_completed: \"shared-onboarding:step-completed\",\n\tsharedOnboarding_completed: \"shared-onboarding:completed\",\n\tsharedOnboarding_tutorial: \"shared-onboarding:follow-tutorial\",\n\tsliceGenerationFeedback: \"slice-generation-feedback\",\n\tsliceGeneration_pastedFromFigma: \"slice-generation:pasted-from-figma\",\n\tsliceGeneration_started: \"slice-generation:started\",\n\tsliceGeneration_ended: \"slice-generation:ended\",\n\tsliceGeneration_pluginInstallationClicked:\n\t\t\"slice-generation:plugin-installation-clicked\",\n\tnavigation_documentationLinkClicked: \"navigation:documentation-link-clicked\",\n\tsidebar_link_clicked: \"sidebar:link-clicked\",\n\tmcp_promo_link_clicked: \"mcp:promo-link-clicked\",\n\tinfo_banner_dismissed: \"info-banner:dismissed\",\n\tinfo_banner_button_clicked: \"info-banner:button-clicked\",\n\tslice_library_opened: \"slice-library:opened\",\n\tslice_library_projects_listed: \"slice-library:projects-listed\",\n\tslice_library_slice_selected: \"slice-library:slice-selected\",\n\tslice_library_fetching_started: \"slice-library:fetching-started\",\n\tslice_library_fetching_ended: \"slice-library:fetching-ended\",\n\tslice_library_fetching_failed: \"slice-library:fetching-failed\",\n\tslice_library_import_started: \"slice-library:import-started\",\n\tslice_library_import_complete: \"slice-library:import-completed\",\n\tslice_library_import_failed: \"slice-library:import-failed\",\n} as const;\ntype SegmentEventTypes =\n\t(typeof SegmentEventType)[keyof typeof SegmentEventType];\n\nexport const HumanSegmentEventType = {\n\t[SegmentEventType.command_init_start]: \"SliceMachine Init Start\",\n\t[SegmentEventType.command_init_identify]: \"SliceMachine Init Identify\",\n\t[SegmentEventType.command_init_end]: \"SliceMachine Init End\",\n\t[SegmentEventType.sliceSimulator_open]: \"SliceMachine Slice Simulator Open\",\n\t[SegmentEventType.sliceSimulator_isNotRunning]:\n\t\t\"SliceMachine Slice Simulator is not running\",\n\t[SegmentEventType.pageView]: \"SliceMachine Page View\",\n\t[SegmentEventType.openVideoTutorials]: \"SliceMachine Open Video Tutorials\",\n\t[SegmentEventType.field_added]: \"SliceMachine Field Added\",\n\t[SegmentEventType.field_updated]: \"SliceMachine Field Updated\",\n\t[SegmentEventType.field_settingsOpened]: \"SliceMachine Field Settings Opened\",\n\t[SegmentEventType.customType_created]: \"SliceMachine Custom Type Created\",\n\t[SegmentEventType.customType_sliceZoneUpdated]:\n\t\t\"SliceMachine Slicezone Updated\",\n\t[SegmentEventType.customType_openAddFromTemplates]:\n\t\t\"SliceMachine Open Add from templates\",\n\t[SegmentEventType.customType_saved]: \"SliceMachine Custom Type Saved\",\n\t[SegmentEventType.slice_created]: \"SliceMachine Slice Created\",\n\t[SegmentEventType.legacySlice_converted]:\n\t\t\"SliceMachine Legacy Slice Converted\",\n\t[SegmentEventType.screenshotTaken]: \"SliceMachine Screenshot Taken\",\n\t[SegmentEventType.changes_pushed]: \"SliceMachine Changes Pushed\",\n\t[SegmentEventType.changes_groupPushed]: \"SliceMachine Group Field Pushed\",\n\t[SegmentEventType.changes_limitReach]: \"SliceMachine Changes Limit Reach\",\n\t[SegmentEventType.editor_widgetUsed]: \"SliceMachine Editor Widget Used\",\n\t[SegmentEventType.open_page_snippet]:\n\t\t\"SliceMachine Opens Page Type Snippet Dialog\",\n\t[SegmentEventType.copy_page_snippet]:\n\t\t\"Slice Machine page code snippet copied\",\n\t[SegmentEventType.switch_environment]: \"SliceMachine environment switch\",\n\t[SegmentEventType.devCollab_joinBetaClicked]:\n\t\t\"SliceMachine Dev Collab Join Beta Clicked\",\n\t[SegmentEventType.devCollab_setUpWorkflowOpened]:\n\t\t\"SliceMachine Dev Collab Set Up Workflow Opened\",\n\t[SegmentEventType.devCollab_workflowStubDisplayed]:\n\t\t\"SliceMachine Dev Collab Workflow Stub Displayed\",\n\t[SegmentEventType.sliceMachine_start]: \"SliceMachine Start\",\n\t[SegmentEventType.postPush_emptyStateCtaClicked]:\n\t\t\"SliceMachine Post Push Empty State CTA Clicked\",\n\t[SegmentEventType.postPush_toastCtaClicked]:\n\t\t\"SliceMachine Post Push Toast CTA Clicked\",\n\t[SegmentEventType.experiment_exposure]: \"$exposure\",\n\t[SegmentEventType.sharedOnboarding_step_completed]:\n\t\t\"Prismic Onboarding Guide Step Completed\",\n\t[SegmentEventType.sharedOnboarding_step_opened]:\n\t\t\"Prismic Onboarding Guide Step Open\",\n\t[SegmentEventType.sharedOnboarding_completed]:\n\t\t\"Prismic Onboarding Guide Completed\",\n\t[SegmentEventType.sharedOnboarding_tutorial]:\n\t\t\"Prismic Onboarding Guide Follow Tutorial\",\n\t[SegmentEventType.sliceGenerationFeedback]: \"Slice Generation Feedback\",\n\t[SegmentEventType.sliceGeneration_pastedFromFigma]:\n\t\t\"SliceMachine Shared Slice Generation - Pasted From Figma\",\n\t[SegmentEventType.sliceGeneration_started]:\n\t\t\"SliceMachine Shared Slice Generation - Started\",\n\t[SegmentEventType.sliceGeneration_ended]:\n\t\t\"SliceMachine Shared Slice Generation - Ended\",\n\t[SegmentEventType.sliceGeneration_pluginInstallationClicked]:\n\t\t\"SliceMachine Shared Slice Generation - Plugin Installation Clicked\",\n\t[SegmentEventType.navigation_documentationLinkClicked]:\n\t\t\"SliceMachine Documentation Link Clicked\",\n\t[SegmentEventType.sidebar_link_clicked]: \"Sidebar Link Clicked\",\n\t[SegmentEventType.mcp_promo_link_clicked]: \"MCP Promo Link Clicked\",\n\t[SegmentEventType.info_banner_dismissed]:\n\t\t\"SliceMachine Info Banner Dismissed\",\n\t[SegmentEventType.info_banner_button_clicked]:\n\t\t\"SliceMachine Info Banner Button Clicked\",\n\t[SegmentEventType.slice_library_opened]:\n\t\t\"SliceMachine Slice Library - Opened\",\n\t[SegmentEventType.slice_library_projects_listed]:\n\t\t\"SliceMachine Slice Library - Projects Listed\",\n\t[SegmentEventType.slice_library_slice_selected]:\n\t\t\"SliceMachine Slice Library - Slice Selected\",\n\t[SegmentEventType.slice_library_fetching_started]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Started\",\n\t[SegmentEventType.slice_library_fetching_ended]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Ended\",\n\t[SegmentEventType.slice_library_fetching_failed]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Failed\",\n\t[SegmentEventType.slice_library_import_started]:\n\t\t\"SliceMachine Slice Library - Slice Import Started\",\n\t[SegmentEventType.slice_library_import_complete]:\n\t\t\"SliceMachine Slice Library - Slice Import Complete\",\n\t[SegmentEventType.slice_library_import_failed]:\n\t\t\"SliceMachine Slice Library - Slice Import Failed\",\n} as const;\n\nexport type HumanSegmentEventTypes =\n\t(typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];\n\ntype SegmentEvent<\n\tTType extends SegmentEventTypes,\n\tTProperties extends Record<string, unknown> | void = void,\n> = TProperties extends void\n\t? {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t }\n\t: {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t } & TProperties;\n\ntype CommandInitStartSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_start\n>;\n\n// This event feels off, we have a dedicated `identify` method...\ntype CommandInitIdentifySegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_identify\n>;\n\ntype CommandInitEndSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_end,\n\t{ framework: string; success: boolean; error?: string }\n>;\n\ntype SliceSimulatorOpenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_open\n>;\n\ntype SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_isNotRunning\n>;\n\ntype PageViewSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.pageView,\n\t{\n\t\turl: string;\n\t\tpath: string;\n\t\tsearch: string;\n\t\ttitle: string;\n\t\treferrer: string;\n\t\tadapter: string;\n\t\t/*\n\t\t * We are tracking outer sizes instead of inner sizes as with the latter, we\n\t\t * can't differentiate between users with a high-density screen and those\n\t\t * zooming in/out with ⌘ + / ⌘ -. Indeed, when users zoom in/out, some\n\t\t * browsers (like Google Chrome) will update `window.devicePixelRatio` while\n\t\t * others (like Safari) will keep it unchanged so that it always reflects\n\t\t * the ratio of physical pixels to CSS pixels.\n\t\t */\n\t\touterWidth: number;\n\t\touterHeight: number;\n\t\tscreenWidth: number;\n\t\tscreenHeight: number;\n\t}\n>;\n\ntype OpenPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.open_page_snippet,\n\t{ framework: string }\n>;\n\ntype CopyPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.copy_page_snippet,\n\t{ framework: string }\n>;\n\ntype SwitchEnvironmentSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.switch_environment,\n\t{ domain: string }\n>;\n\ntype OpenVideoTutorialsSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.openVideoTutorials,\n\t{ video: string }\n>;\n\ntype FieldAddedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_added,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_updated,\n\t{\n\t\tpreviousId: string;\n\t\tid: string;\n\t\tidUpdated: boolean;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldSettingsOpenedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_settingsOpened,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t}\n>;\n\ntype CustomTypeCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t\torigin: \"onboarding\" | \"table\";\n\t}\n>;\n\ntype CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_sliceZoneUpdated,\n\t{ customTypeId: string }\n>;\n\ntype CustomTypeOpenAddFromTemplatesEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_openAddFromTemplates,\n\t{ customTypeId: string; customTypeFormat: CustomTypeFormat }\n>;\n\ntype CustomTypeSavedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_saved,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t}\n>;\n\ntype SliceCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.slice_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tlibrary: string;\n\t\tlocation: \"custom_type\" | \"page_type\" | \"slices\";\n\t} & (\n\t\t| { mode: \"ai\"; langSmithUrl?: string }\n\t\t| { mode: \"figma-to-slice\" }\n\t\t| { mode: \"manual\" }\n\t\t| { mode: \"template\"; sliceTemplate: string }\n\t\t| { mode: \"import\" }\n\t)\n>;\n\ntype LegacySliceConvertedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.legacySlice_converted,\n\t{\n\t\tid: string;\n\t\tvariation: string;\n\t\tlibrary: string;\n\t\tconversionType:\n\t\t\t| \"as_new_slice\"\n\t\t\t| \"as_new_variation\"\n\t\t\t| \"merge_with_identical\";\n\t}\n>;\n\ntype ScreenshotTakenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.screenshotTaken,\n\t{\n\t\ttype: \"custom\";\n\t\tmethod: \"upload\" | \"dragAndDrop\";\n\t}\n>;\n\ntype ChangesPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_pushed,\n\t{\n\t\tcustomTypesCreated: number;\n\t\tcustomTypesModified: number;\n\t\tcustomTypesDeleted: number;\n\t\tslicesCreated: number;\n\t\tslicesModified: number;\n\t\tslicesDeleted: number;\n\t\tmissingScreenshots: number;\n\t\ttotal: number;\n\t\tduration: number;\n\t\thasDeletedDocuments: boolean;\n\t}\n>;\n\ntype ChangesGroupPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_groupPushed,\n\t{\n\t\tisInStaticZone: boolean;\n\t\tisInSlice: boolean;\n\t} & {\n\t\t[key in FieldType]?: number;\n\t}\n>;\n\ntype ChangesLimitReachSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_limitReach,\n\t{ limitType: PushChangesLimitType }\n>;\n\ntype EditorWidgetUsedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.editor_widgetUsed,\n\t{ sliceId: string }\n>;\n\ntype DevCollabJoinBetaClicked = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_joinBetaClicked\n>;\n\ntype DevCollabSetUpWorkflowOpened = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_setUpWorkflowOpened\n>;\n\ntype DevCollabWorkflowStubDisplayed = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_workflowStubDisplayed\n>;\n\ntype SliceMachineStart = SegmentEvent<\n\ttypeof SegmentEventType.sliceMachine_start,\n\t{\n\t\tadapter?: string;\n\t\tadapterVersion?: string;\n\t\tisAdapterUpdateAvailable?: boolean;\n\t\tisLoggedIn?: boolean;\n\t\tisSliceMachineUpdateAvailable?: boolean;\n\t\tisTypeScriptProject?: boolean;\n\t\tnodeVersion?: string;\n\t\tnumberOfCustomTypes?: number;\n\t\tnumberOfSlices?: number;\n\t\tosPlatform?: string;\n\t\tpackageManager?: string;\n\t\tprojectPort?: string;\n\t\tsliceMachineVersion?: string;\n\t\tversionControlSystem?: string;\n\t}\n>;\n\ntype OnboardingCommonPayload = { stepId: string; stepTitle: string };\ntype SharedOnboardingProperties<T = Record<string, string>> = T & {\n\tsource: \"SliceMachine\";\n};\n\ntype SliceMachineSharedOnboardingStepOpened = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_opened,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingStepCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_completed,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_completed,\n\tSharedOnboardingProperties\n>;\ntype SliceMachineSharedOnboardingTutorial = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_tutorial,\n\tSharedOnboardingProperties\n>;\ntype SliceMachinePostPushEmptyStateCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_emptyStateCtaClicked\n>;\n\ntype SliceMachinePostPushToastCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_toastCtaClicked\n>;\n\ntype SliceMachineExperimentExposure = SegmentEvent<\n\ttypeof SegmentEventType.experiment_exposure,\n\t{\n\t\tflag_key: string;\n\t\tvariant: string;\n\t}\n>;\n\ntype SliceGenerationFeedback = SegmentEvent<\n\ttypeof SegmentEventType.sliceGenerationFeedback,\n\t{\n\t\ttype: \"model\";\n\t\tsliceId: string;\n\t\tvariationId: string;\n\t\tfeedback: \"up\" | \"down\";\n\t\tlangSmithUrl?: string;\n\t}\n>;\n\ntype SliceGenerationPastedFromFigma = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pastedFromFigma,\n\t{\n\t\tsource: \"shortcut\" | \"button\";\n\t}\n>;\n\ntype SliceGenerationStarted = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_started,\n\t{\n\t\tsource: \"figma\" | \"upload\";\n\t\tllmProxyUrl: string;\n\t}\n>;\n\ntype SliceGenerationEnded = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_ended,\n\t{\n\t\terror: boolean;\n\t\tsource: \"figma\" | \"upload\";\n\t}\n>;\n\ntype SliceGenerationPluginInstallationClicked = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pluginInstallationClicked\n>;\n\ntype NavigationDocumentationLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.navigation_documentationLinkClicked,\n\t{\n\t\tframework: string;\n\t}\n>;\n\ntype SidebarLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.sidebar_link_clicked,\n\t{\n\t\tlink_name: string;\n\t\tsource: string;\n\t}\n>;\n\ntype McpPromoLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.mcp_promo_link_clicked,\n\t{\n\t\tsource: string;\n\t\ttarget: string;\n\t}\n>;\n\ntype InfoBannerDismissed = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_dismissed,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype InfoBannerButtonClicked = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_button_clicked,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype SliceLibraryOpened = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_opened\n>;\ntype SliceLibraryProjectsListed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_projects_listed,\n\t{\n\t\trepositories_count: number;\n\t}\n>;\ntype SliceLibrarySliceSelected = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_slice_selected,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t\tdestination_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingEnded = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_ended,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingFailed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_failed,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryImportStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryImportComplete = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_complete,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t\tdestination_project_id: string;\n\t}\n>;\ntype SliceLibraryImportFailed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_failed,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\n\nexport type SegmentEvents =\n\t| CommandInitStartSegmentEvent\n\t| CommandInitIdentifySegmentEvent\n\t| CommandInitEndSegmentEvent\n\t| SliceSimulatorOpenSegmentEvent\n\t| SliceSimulatorIsNotRunningSegmentEvent\n\t| PageViewSegmentEvent\n\t| OpenVideoTutorialsSegmentEvent\n\t| FieldAddedSegmentEvent\n\t| FieldUpdatedSegmentEvent\n\t| FieldSettingsOpenedSegmentEvent\n\t| CustomTypeCreatedSegmentEvent\n\t| CustomTypeSliceZoneUpdatedSegmentEvent\n\t| CustomTypeOpenAddFromTemplatesEvent\n\t| CustomTypeSavedSegmentEvent\n\t| SliceCreatedSegmentEvent\n\t| LegacySliceConvertedSegmentEvent\n\t| ScreenshotTakenSegmentEvent\n\t| ChangesPushedSegmentEvent\n\t| ChangesGroupPushedSegmentEvent\n\t| ChangesLimitReachSegmentEvent\n\t| EditorWidgetUsedSegmentEvent\n\t| OpenPageSnippetSegmentEvent\n\t| CopyPageSnippetSegmentEvent\n\t| SwitchEnvironmentSegmentEvent\n\t| DevCollabJoinBetaClicked\n\t| DevCollabSetUpWorkflowOpened\n\t| DevCollabWorkflowStubDisplayed\n\t| SliceMachineStart\n\t| SliceMachineSharedOnboardingStepOpened\n\t| SliceMachineSharedOnboardingStepCompleted\n\t| SliceMachineSharedOnboardingCompleted\n\t| SliceMachineSharedOnboardingTutorial\n\t| SliceMachinePostPushEmptyStateCtaClicked\n\t| SliceMachinePostPushToastCtaClicked\n\t| SliceMachineExperimentExposure\n\t| SliceGenerationFeedback\n\t| SliceGenerationPastedFromFigma\n\t| SliceGenerationStarted\n\t| SliceGenerationEnded\n\t| SliceGenerationPluginInstallationClicked\n\t| NavigationDocumentationLinkClicked\n\t| SidebarLinkClicked\n\t| McpPromoLinkClicked\n\t| InfoBannerDismissed\n\t| InfoBannerButtonClicked\n\t| SliceLibraryOpened\n\t| SliceLibraryProjectsListed\n\t| SliceLibrarySliceSelected\n\t| SliceLibraryFetchingStarted\n\t| SliceLibraryFetchingEnded\n\t| SliceLibraryFetchingFailed\n\t| SliceLibraryImportStarted\n\t| SliceLibraryImportComplete\n\t| SliceLibraryImportFailed;\n"],"names":[],"mappings":"AAUO,MAAM,mBAAmB;AAAA,EAC/B,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,oBA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B,GAC3C;AAAA,EACD,CAAC,iBAAiB,oBAAoB,GACrC;AAAA,EACD,CAAC,iBAAiB,6BAA6B,GAC9C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,8BAA8B,GAC/C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,6BAA6B,GAC9C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,6BAA6B,GAC9C;AAAA,EACD,CAAC,iBAAiB,2BAA2B,GAC5C;;"}
1
+ {"version":3,"file":"types.js","sources":["../../../../src/managers/telemetry/types.ts"],"sourcesContent":["import {\n\tFieldType,\n\tLinkConfig,\n} from \"@prismicio/types-internal/lib/customtypes/widgets\";\n\nimport { CustomTypeFormat } from \"../customTypes/types\";\nimport type { PushChangesLimitType } from \"../prismicRepository/types\";\n\nexport type { Variant } from \"@amplitude/experiment-node-server\";\n\nexport const SegmentEventType = {\n\tcommand_init_start: \"command:init:start\",\n\tcommand_init_identify: \"command:init:identify\",\n\tcommand_init_end: \"command:init:end\",\n\tsliceSimulator_open: \"slice-simulator:open\",\n\tsliceSimulator_isNotRunning: \"slice-simulator:is-not-running\",\n\tpageView: \"page-view\",\n\topenVideoTutorials: \"open-video-tutorials\",\n\tfield_added: \"field:added\",\n\tfield_updated: \"field:updated\",\n\tfield_settingsOpened: \"field:settings-opened\",\n\tcustomType_created: \"custom-type:created\",\n\tcustomType_sliceZoneUpdated: \"custom-type:slice-zone-updated\",\n\tcustomType_openAddFromTemplates: \"custom-type:open-add-from-templates\",\n\tcustomType_saved: \"custom-type:saved\",\n\tslice_created: \"slice:created\",\n\tlegacySlice_converted: \"legacy-slice:converted\",\n\tscreenshotTaken: \"screenshot-taken\",\n\tchanges_pushed: \"changes:pushed\",\n\tchanges_groupPushed: \"changes:group-pushed\",\n\tchanges_limitReach: \"changes:limit-reach\",\n\teditor_widgetUsed: \"editor:widget-used\",\n\topen_page_snippet: \"page-type:open-snippet\",\n\tcopy_page_snippet: \"page-type:copy-snippet\",\n\tswitch_environment: \"environment:switch\",\n\tdevCollab_joinBetaClicked: \"dev-collab:join-beta-clicked\",\n\tdevCollab_setUpWorkflowOpened: \"dev-collab:set-up-workflow-opened\",\n\tdevCollab_workflowStubDisplayed: \"dev-collab:workflow-stub-displayed\",\n\tsliceMachine_start: \"slice-machine:start\",\n\tpostPush_emptyStateCtaClicked: \"post-push:empty-state-cta-clicked\",\n\tpostPush_toastCtaClicked: \"post-push:toast-cta-clicked\",\n\texperiment_exposure: \"experiment:exposure\",\n\tsharedOnboarding_step_opened: \"shared-onboarding:step-opened\",\n\tsharedOnboarding_step_completed: \"shared-onboarding:step-completed\",\n\tsharedOnboarding_completed: \"shared-onboarding:completed\",\n\tsharedOnboarding_tutorial: \"shared-onboarding:follow-tutorial\",\n\tsliceGenerationFeedback: \"slice-generation-feedback\",\n\tsliceGeneration_pastedFromFigma: \"slice-generation:pasted-from-figma\",\n\tsliceGeneration_started: \"slice-generation:started\",\n\tsliceGeneration_ended: \"slice-generation:ended\",\n\tsliceGeneration_pluginInstallationClicked:\n\t\t\"slice-generation:plugin-installation-clicked\",\n\tnavigation_documentationLinkClicked: \"navigation:documentation-link-clicked\",\n\tsidebar_link_clicked: \"sidebar:link-clicked\",\n\tmcp_promo_link_clicked: \"mcp:promo-link-clicked\",\n\tinfo_banner_dismissed: \"info-banner:dismissed\",\n\tinfo_banner_button_clicked: \"info-banner:button-clicked\",\n\tslice_library_opened: \"slice-library:opened\",\n\tslice_library_projects_listed: \"slice-library:projects-listed\",\n\tslice_library_slice_selected: \"slice-library:slice-selected\",\n\tslice_library_fetching_started: \"slice-library:fetching-started\",\n\tslice_library_fetching_ended: \"slice-library:fetching-ended\",\n\tslice_library_import_started: \"slice-library:import-started\",\n\tslice_library_import_ended: \"slice-library:import-ended\",\n} as const;\ntype SegmentEventTypes =\n\t(typeof SegmentEventType)[keyof typeof SegmentEventType];\n\nexport const HumanSegmentEventType = {\n\t[SegmentEventType.command_init_start]: \"SliceMachine Init Start\",\n\t[SegmentEventType.command_init_identify]: \"SliceMachine Init Identify\",\n\t[SegmentEventType.command_init_end]: \"SliceMachine Init End\",\n\t[SegmentEventType.sliceSimulator_open]: \"SliceMachine Slice Simulator Open\",\n\t[SegmentEventType.sliceSimulator_isNotRunning]:\n\t\t\"SliceMachine Slice Simulator is not running\",\n\t[SegmentEventType.pageView]: \"SliceMachine Page View\",\n\t[SegmentEventType.openVideoTutorials]: \"SliceMachine Open Video Tutorials\",\n\t[SegmentEventType.field_added]: \"SliceMachine Field Added\",\n\t[SegmentEventType.field_updated]: \"SliceMachine Field Updated\",\n\t[SegmentEventType.field_settingsOpened]: \"SliceMachine Field Settings Opened\",\n\t[SegmentEventType.customType_created]: \"SliceMachine Custom Type Created\",\n\t[SegmentEventType.customType_sliceZoneUpdated]:\n\t\t\"SliceMachine Slicezone Updated\",\n\t[SegmentEventType.customType_openAddFromTemplates]:\n\t\t\"SliceMachine Open Add from templates\",\n\t[SegmentEventType.customType_saved]: \"SliceMachine Custom Type Saved\",\n\t[SegmentEventType.slice_created]: \"SliceMachine Slice Created\",\n\t[SegmentEventType.legacySlice_converted]:\n\t\t\"SliceMachine Legacy Slice Converted\",\n\t[SegmentEventType.screenshotTaken]: \"SliceMachine Screenshot Taken\",\n\t[SegmentEventType.changes_pushed]: \"SliceMachine Changes Pushed\",\n\t[SegmentEventType.changes_groupPushed]: \"SliceMachine Group Field Pushed\",\n\t[SegmentEventType.changes_limitReach]: \"SliceMachine Changes Limit Reach\",\n\t[SegmentEventType.editor_widgetUsed]: \"SliceMachine Editor Widget Used\",\n\t[SegmentEventType.open_page_snippet]:\n\t\t\"SliceMachine Opens Page Type Snippet Dialog\",\n\t[SegmentEventType.copy_page_snippet]:\n\t\t\"Slice Machine page code snippet copied\",\n\t[SegmentEventType.switch_environment]: \"SliceMachine environment switch\",\n\t[SegmentEventType.devCollab_joinBetaClicked]:\n\t\t\"SliceMachine Dev Collab Join Beta Clicked\",\n\t[SegmentEventType.devCollab_setUpWorkflowOpened]:\n\t\t\"SliceMachine Dev Collab Set Up Workflow Opened\",\n\t[SegmentEventType.devCollab_workflowStubDisplayed]:\n\t\t\"SliceMachine Dev Collab Workflow Stub Displayed\",\n\t[SegmentEventType.sliceMachine_start]: \"SliceMachine Start\",\n\t[SegmentEventType.postPush_emptyStateCtaClicked]:\n\t\t\"SliceMachine Post Push Empty State CTA Clicked\",\n\t[SegmentEventType.postPush_toastCtaClicked]:\n\t\t\"SliceMachine Post Push Toast CTA Clicked\",\n\t[SegmentEventType.experiment_exposure]: \"$exposure\",\n\t[SegmentEventType.sharedOnboarding_step_completed]:\n\t\t\"Prismic Onboarding Guide Step Completed\",\n\t[SegmentEventType.sharedOnboarding_step_opened]:\n\t\t\"Prismic Onboarding Guide Step Open\",\n\t[SegmentEventType.sharedOnboarding_completed]:\n\t\t\"Prismic Onboarding Guide Completed\",\n\t[SegmentEventType.sharedOnboarding_tutorial]:\n\t\t\"Prismic Onboarding Guide Follow Tutorial\",\n\t[SegmentEventType.sliceGenerationFeedback]: \"Slice Generation Feedback\",\n\t[SegmentEventType.sliceGeneration_pastedFromFigma]:\n\t\t\"SliceMachine Shared Slice Generation - Pasted From Figma\",\n\t[SegmentEventType.sliceGeneration_started]:\n\t\t\"SliceMachine Shared Slice Generation - Started\",\n\t[SegmentEventType.sliceGeneration_ended]:\n\t\t\"SliceMachine Shared Slice Generation - Ended\",\n\t[SegmentEventType.sliceGeneration_pluginInstallationClicked]:\n\t\t\"SliceMachine Shared Slice Generation - Plugin Installation Clicked\",\n\t[SegmentEventType.navigation_documentationLinkClicked]:\n\t\t\"SliceMachine Documentation Link Clicked\",\n\t[SegmentEventType.sidebar_link_clicked]: \"Sidebar Link Clicked\",\n\t[SegmentEventType.mcp_promo_link_clicked]: \"MCP Promo Link Clicked\",\n\t[SegmentEventType.info_banner_dismissed]:\n\t\t\"SliceMachine Info Banner Dismissed\",\n\t[SegmentEventType.info_banner_button_clicked]:\n\t\t\"SliceMachine Info Banner Button Clicked\",\n\t[SegmentEventType.slice_library_opened]:\n\t\t\"SliceMachine Slice Library - Opened\",\n\t[SegmentEventType.slice_library_projects_listed]:\n\t\t\"SliceMachine Slice Library - Projects Listed\",\n\t[SegmentEventType.slice_library_slice_selected]:\n\t\t\"SliceMachine Slice Library - Slice Selected\",\n\t[SegmentEventType.slice_library_fetching_started]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Started\",\n\t[SegmentEventType.slice_library_fetching_ended]:\n\t\t\"SliceMachine Slice Library - Slice Fetching Ended\",\n\t[SegmentEventType.slice_library_import_started]:\n\t\t\"SliceMachine Slice Library - Slice Import Started\",\n\t[SegmentEventType.slice_library_import_ended]:\n\t\t\"SliceMachine Slice Library - Slice Import Ended\",\n} as const;\n\nexport type HumanSegmentEventTypes =\n\t(typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];\n\ntype SegmentEvent<\n\tTType extends SegmentEventTypes,\n\tTProperties extends Record<string, unknown> | void = void,\n> = TProperties extends void\n\t? {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t }\n\t: {\n\t\t\tevent: TType;\n\t\t\trepository?: string;\n\t } & TProperties;\n\ntype CommandInitStartSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_start\n>;\n\n// This event feels off, we have a dedicated `identify` method...\ntype CommandInitIdentifySegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_identify\n>;\n\ntype CommandInitEndSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.command_init_end,\n\t{ framework: string; success: boolean; error?: string }\n>;\n\ntype SliceSimulatorOpenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_open\n>;\n\ntype SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.sliceSimulator_isNotRunning\n>;\n\ntype PageViewSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.pageView,\n\t{\n\t\turl: string;\n\t\tpath: string;\n\t\tsearch: string;\n\t\ttitle: string;\n\t\treferrer: string;\n\t\tadapter: string;\n\t\t/*\n\t\t * We are tracking outer sizes instead of inner sizes as with the latter, we\n\t\t * can't differentiate between users with a high-density screen and those\n\t\t * zooming in/out with ⌘ + / ⌘ -. Indeed, when users zoom in/out, some\n\t\t * browsers (like Google Chrome) will update `window.devicePixelRatio` while\n\t\t * others (like Safari) will keep it unchanged so that it always reflects\n\t\t * the ratio of physical pixels to CSS pixels.\n\t\t */\n\t\touterWidth: number;\n\t\touterHeight: number;\n\t\tscreenWidth: number;\n\t\tscreenHeight: number;\n\t}\n>;\n\ntype OpenPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.open_page_snippet,\n\t{ framework: string }\n>;\n\ntype CopyPageSnippetSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.copy_page_snippet,\n\t{ framework: string }\n>;\n\ntype SwitchEnvironmentSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.switch_environment,\n\t{ domain: string }\n>;\n\ntype OpenVideoTutorialsSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.openVideoTutorials,\n\t{ video: string }\n>;\n\ntype FieldAddedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_added,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_updated,\n\t{\n\t\tpreviousId: string;\n\t\tid: string;\n\t\tidUpdated: boolean;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t\tallowText?: boolean;\n\t\trepeat?: boolean;\n\t\tvariants?: string[];\n\t\tlinkSelect?: LinkConfig[\"select\"];\n\t\tlinkPickedFields?: number;\n\t\tlinkNestedPickedFields?: number;\n\t}\n>;\n\ntype FieldSettingsOpenedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.field_settingsOpened,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\ttype: FieldType;\n\t\tisInAGroup: boolean;\n\t\tcontentType: \"page type\" | \"custom type\" | \"slice\";\n\t}\n>;\n\ntype CustomTypeCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t\torigin: \"onboarding\" | \"table\";\n\t}\n>;\n\ntype CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_sliceZoneUpdated,\n\t{ customTypeId: string }\n>;\n\ntype CustomTypeOpenAddFromTemplatesEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_openAddFromTemplates,\n\t{ customTypeId: string; customTypeFormat: CustomTypeFormat }\n>;\n\ntype CustomTypeSavedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.customType_saved,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tformat: CustomTypeFormat;\n\t\ttype: \"repeatable\" | \"single\";\n\t}\n>;\n\ntype SliceCreatedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.slice_created,\n\t{\n\t\tid: string;\n\t\tname: string;\n\t\tlibrary: string;\n\t\tlocation: \"custom_type\" | \"page_type\" | \"slices\";\n\t} & (\n\t\t| { mode: \"ai\"; langSmithUrl?: string }\n\t\t| { mode: \"figma-to-slice\" }\n\t\t| { mode: \"manual\" }\n\t\t| { mode: \"template\"; sliceTemplate: string }\n\t\t| { mode: \"import\" }\n\t)\n>;\n\ntype LegacySliceConvertedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.legacySlice_converted,\n\t{\n\t\tid: string;\n\t\tvariation: string;\n\t\tlibrary: string;\n\t\tconversionType:\n\t\t\t| \"as_new_slice\"\n\t\t\t| \"as_new_variation\"\n\t\t\t| \"merge_with_identical\";\n\t}\n>;\n\ntype ScreenshotTakenSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.screenshotTaken,\n\t{\n\t\ttype: \"custom\";\n\t\tmethod: \"upload\" | \"dragAndDrop\";\n\t}\n>;\n\ntype ChangesPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_pushed,\n\t{\n\t\tcustomTypesCreated: number;\n\t\tcustomTypesModified: number;\n\t\tcustomTypesDeleted: number;\n\t\tslicesCreated: number;\n\t\tslicesModified: number;\n\t\tslicesDeleted: number;\n\t\tmissingScreenshots: number;\n\t\ttotal: number;\n\t\tduration: number;\n\t\thasDeletedDocuments: boolean;\n\t}\n>;\n\ntype ChangesGroupPushedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_groupPushed,\n\t{\n\t\tisInStaticZone: boolean;\n\t\tisInSlice: boolean;\n\t} & {\n\t\t[key in FieldType]?: number;\n\t}\n>;\n\ntype ChangesLimitReachSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.changes_limitReach,\n\t{ limitType: PushChangesLimitType }\n>;\n\ntype EditorWidgetUsedSegmentEvent = SegmentEvent<\n\ttypeof SegmentEventType.editor_widgetUsed,\n\t{ sliceId: string }\n>;\n\ntype DevCollabJoinBetaClicked = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_joinBetaClicked\n>;\n\ntype DevCollabSetUpWorkflowOpened = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_setUpWorkflowOpened\n>;\n\ntype DevCollabWorkflowStubDisplayed = SegmentEvent<\n\ttypeof SegmentEventType.devCollab_workflowStubDisplayed\n>;\n\ntype SliceMachineStart = SegmentEvent<\n\ttypeof SegmentEventType.sliceMachine_start,\n\t{\n\t\tadapter?: string;\n\t\tadapterVersion?: string;\n\t\tisAdapterUpdateAvailable?: boolean;\n\t\tisLoggedIn?: boolean;\n\t\tisSliceMachineUpdateAvailable?: boolean;\n\t\tisTypeScriptProject?: boolean;\n\t\tnodeVersion?: string;\n\t\tnumberOfCustomTypes?: number;\n\t\tnumberOfSlices?: number;\n\t\tosPlatform?: string;\n\t\tpackageManager?: string;\n\t\tprojectPort?: string;\n\t\tsliceMachineVersion?: string;\n\t\tversionControlSystem?: string;\n\t}\n>;\n\ntype OnboardingCommonPayload = { stepId: string; stepTitle: string };\ntype SharedOnboardingProperties<T = Record<string, string>> = T & {\n\tsource: \"SliceMachine\";\n};\n\ntype SliceMachineSharedOnboardingStepOpened = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_opened,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingStepCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_step_completed,\n\tSharedOnboardingProperties<OnboardingCommonPayload>\n>;\ntype SliceMachineSharedOnboardingCompleted = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_completed,\n\tSharedOnboardingProperties\n>;\ntype SliceMachineSharedOnboardingTutorial = SegmentEvent<\n\ttypeof SegmentEventType.sharedOnboarding_tutorial,\n\tSharedOnboardingProperties\n>;\ntype SliceMachinePostPushEmptyStateCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_emptyStateCtaClicked\n>;\n\ntype SliceMachinePostPushToastCtaClicked = SegmentEvent<\n\ttypeof SegmentEventType.postPush_toastCtaClicked\n>;\n\ntype SliceMachineExperimentExposure = SegmentEvent<\n\ttypeof SegmentEventType.experiment_exposure,\n\t{\n\t\tflag_key: string;\n\t\tvariant: string;\n\t}\n>;\n\ntype SliceGenerationFeedback = SegmentEvent<\n\ttypeof SegmentEventType.sliceGenerationFeedback,\n\t{\n\t\ttype: \"model\";\n\t\tsliceId: string;\n\t\tvariationId: string;\n\t\tfeedback: \"up\" | \"down\";\n\t\tlangSmithUrl?: string;\n\t}\n>;\n\ntype SliceGenerationPastedFromFigma = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pastedFromFigma,\n\t{\n\t\tsource: \"shortcut\" | \"button\";\n\t}\n>;\n\ntype SliceGenerationStarted = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_started,\n\t{\n\t\tsource: \"figma\" | \"upload\";\n\t\tllmProxyUrl: string;\n\t}\n>;\n\ntype SliceGenerationEnded = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_ended,\n\t{\n\t\terror: boolean;\n\t\tsource: \"figma\" | \"upload\";\n\t}\n>;\n\ntype SliceGenerationPluginInstallationClicked = SegmentEvent<\n\ttypeof SegmentEventType.sliceGeneration_pluginInstallationClicked\n>;\n\ntype NavigationDocumentationLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.navigation_documentationLinkClicked,\n\t{\n\t\tframework: string;\n\t}\n>;\n\ntype SidebarLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.sidebar_link_clicked,\n\t{\n\t\tlink_name: string;\n\t\tsource: string;\n\t}\n>;\n\ntype McpPromoLinkClicked = SegmentEvent<\n\ttypeof SegmentEventType.mcp_promo_link_clicked,\n\t{\n\t\tsource: string;\n\t\ttarget: string;\n\t}\n>;\n\ntype InfoBannerDismissed = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_dismissed,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype InfoBannerButtonClicked = SegmentEvent<\n\ttypeof SegmentEventType.info_banner_button_clicked,\n\t{\n\t\tinfoBannerId: string;\n\t}\n>;\n\ntype SliceLibraryOpened = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_opened\n>;\ntype SliceLibraryProjectsListed = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_projects_listed,\n\t{\n\t\trepositories_count: number;\n\t}\n>;\ntype SliceLibrarySliceSelected = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_slice_selected,\n\t{\n\t\tslices_count: number;\n\t\tsource_project_id: string;\n\t\tdestination_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryFetchingEnded = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_fetching_ended,\n\t| {\n\t\t\terror: false;\n\t\t\tslices_count: number;\n\t\t\tsource_project_id: string;\n\t }\n\t| {\n\t\t\terror: true;\n\t\t\tslices_count?: never;\n\t\t\tsource_project_id: string;\n\t }\n>;\ntype SliceLibraryImportStarted = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_started,\n\t{\n\t\tsource_project_id: string;\n\t}\n>;\ntype SliceLibraryImportEnded = SegmentEvent<\n\ttypeof SegmentEventType.slice_library_import_ended,\n\t| {\n\t\t\terror: false;\n\t\t\tslices_count: number;\n\t\t\tsource_project_id: string;\n\t\t\tdestination_project_id: string;\n\t }\n\t| {\n\t\t\terror: true;\n\t\t\tslices_count?: never;\n\t\t\tsource_project_id: string;\n\t\t\tdestination_project_id: string;\n\t }\n>;\n\nexport type SegmentEvents =\n\t| CommandInitStartSegmentEvent\n\t| CommandInitIdentifySegmentEvent\n\t| CommandInitEndSegmentEvent\n\t| SliceSimulatorOpenSegmentEvent\n\t| SliceSimulatorIsNotRunningSegmentEvent\n\t| PageViewSegmentEvent\n\t| OpenVideoTutorialsSegmentEvent\n\t| FieldAddedSegmentEvent\n\t| FieldUpdatedSegmentEvent\n\t| FieldSettingsOpenedSegmentEvent\n\t| CustomTypeCreatedSegmentEvent\n\t| CustomTypeSliceZoneUpdatedSegmentEvent\n\t| CustomTypeOpenAddFromTemplatesEvent\n\t| CustomTypeSavedSegmentEvent\n\t| SliceCreatedSegmentEvent\n\t| LegacySliceConvertedSegmentEvent\n\t| ScreenshotTakenSegmentEvent\n\t| ChangesPushedSegmentEvent\n\t| ChangesGroupPushedSegmentEvent\n\t| ChangesLimitReachSegmentEvent\n\t| EditorWidgetUsedSegmentEvent\n\t| OpenPageSnippetSegmentEvent\n\t| CopyPageSnippetSegmentEvent\n\t| SwitchEnvironmentSegmentEvent\n\t| DevCollabJoinBetaClicked\n\t| DevCollabSetUpWorkflowOpened\n\t| DevCollabWorkflowStubDisplayed\n\t| SliceMachineStart\n\t| SliceMachineSharedOnboardingStepOpened\n\t| SliceMachineSharedOnboardingStepCompleted\n\t| SliceMachineSharedOnboardingCompleted\n\t| SliceMachineSharedOnboardingTutorial\n\t| SliceMachinePostPushEmptyStateCtaClicked\n\t| SliceMachinePostPushToastCtaClicked\n\t| SliceMachineExperimentExposure\n\t| SliceGenerationFeedback\n\t| SliceGenerationPastedFromFigma\n\t| SliceGenerationStarted\n\t| SliceGenerationEnded\n\t| SliceGenerationPluginInstallationClicked\n\t| NavigationDocumentationLinkClicked\n\t| SidebarLinkClicked\n\t| McpPromoLinkClicked\n\t| InfoBannerDismissed\n\t| InfoBannerButtonClicked\n\t| SliceLibraryOpened\n\t| SliceLibraryProjectsListed\n\t| SliceLibrarySliceSelected\n\t| SliceLibraryFetchingStarted\n\t| SliceLibraryFetchingEnded\n\t| SliceLibraryImportStarted\n\t| SliceLibraryImportEnded;\n"],"names":[],"mappings":"AAUO,MAAM,mBAAmB;AAAA,EAC/B,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB;AA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AAiB,qBAAqB,GACtC;AAAA,EACD,CAAC,iBAAiB,0BAA0B,GAC3C;AAAA,EACD,CAAC,iBAAiB,oBAAoB,GACrC;AAAA,EACD,CAAC,iBAAiB,6BAA6B,GAC9C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,8BAA8B,GAC/C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,4BAA4B,GAC7C;AAAA,EACD,CAAC,iBAAiB,0BAA0B,GAC3C;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slicemachine/manager",
3
- "version": "0.26.5-alpha.jp-import-slices-tracking.1",
3
+ "version": "0.26.5-alpha.jp-import-slices-tracking.3",
4
4
  "description": "Manage all aspects of a Slice Machine project.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,7 +71,7 @@
71
71
  "@prismicio/mocks": "2.14.0",
72
72
  "@prismicio/types-internal": "3.11.2",
73
73
  "@segment/analytics-node": "^2.1.2",
74
- "@slicemachine/plugin-kit": "0.4.90-alpha.jp-import-slices-tracking.1",
74
+ "@slicemachine/plugin-kit": "0.4.90-alpha.jp-import-slices-tracking.3",
75
75
  "cookie": "^1.0.1",
76
76
  "cors": "^2.8.5",
77
77
  "execa": "^7.1.1",
@@ -60,10 +60,8 @@ export const SegmentEventType = {
60
60
  slice_library_slice_selected: "slice-library:slice-selected",
61
61
  slice_library_fetching_started: "slice-library:fetching-started",
62
62
  slice_library_fetching_ended: "slice-library:fetching-ended",
63
- slice_library_fetching_failed: "slice-library:fetching-failed",
64
63
  slice_library_import_started: "slice-library:import-started",
65
- slice_library_import_complete: "slice-library:import-completed",
66
- slice_library_import_failed: "slice-library:import-failed",
64
+ slice_library_import_ended: "slice-library:import-ended",
67
65
  } as const;
68
66
  type SegmentEventTypes =
69
67
  (typeof SegmentEventType)[keyof typeof SegmentEventType];
@@ -146,14 +144,10 @@ export const HumanSegmentEventType = {
146
144
  "SliceMachine Slice Library - Slice Fetching Started",
147
145
  [SegmentEventType.slice_library_fetching_ended]:
148
146
  "SliceMachine Slice Library - Slice Fetching Ended",
149
- [SegmentEventType.slice_library_fetching_failed]:
150
- "SliceMachine Slice Library - Slice Fetching Failed",
151
147
  [SegmentEventType.slice_library_import_started]:
152
148
  "SliceMachine Slice Library - Slice Import Started",
153
- [SegmentEventType.slice_library_import_complete]:
154
- "SliceMachine Slice Library - Slice Import Complete",
155
- [SegmentEventType.slice_library_import_failed]:
156
- "SliceMachine Slice Library - Slice Import Failed",
149
+ [SegmentEventType.slice_library_import_ended]:
150
+ "SliceMachine Slice Library - Slice Import Ended",
157
151
  } as const;
158
152
 
159
153
  export type HumanSegmentEventTypes =
@@ -558,16 +552,16 @@ type SliceLibraryFetchingStarted = SegmentEvent<
558
552
  >;
559
553
  type SliceLibraryFetchingEnded = SegmentEvent<
560
554
  typeof SegmentEventType.slice_library_fetching_ended,
561
- {
562
- slices_count: number;
563
- source_project_id: string;
564
- }
565
- >;
566
- type SliceLibraryFetchingFailed = SegmentEvent<
567
- typeof SegmentEventType.slice_library_fetching_failed,
568
- {
569
- source_project_id: string;
570
- }
555
+ | {
556
+ error: false;
557
+ slices_count: number;
558
+ source_project_id: string;
559
+ }
560
+ | {
561
+ error: true;
562
+ slices_count?: never;
563
+ source_project_id: string;
564
+ }
571
565
  >;
572
566
  type SliceLibraryImportStarted = SegmentEvent<
573
567
  typeof SegmentEventType.slice_library_import_started,
@@ -575,19 +569,20 @@ type SliceLibraryImportStarted = SegmentEvent<
575
569
  source_project_id: string;
576
570
  }
577
571
  >;
578
- type SliceLibraryImportComplete = SegmentEvent<
579
- typeof SegmentEventType.slice_library_import_complete,
580
- {
581
- slices_count: number;
582
- source_project_id: string;
583
- destination_project_id: string;
584
- }
585
- >;
586
- type SliceLibraryImportFailed = SegmentEvent<
587
- typeof SegmentEventType.slice_library_import_failed,
588
- {
589
- source_project_id: string;
590
- }
572
+ type SliceLibraryImportEnded = SegmentEvent<
573
+ typeof SegmentEventType.slice_library_import_ended,
574
+ | {
575
+ error: false;
576
+ slices_count: number;
577
+ source_project_id: string;
578
+ destination_project_id: string;
579
+ }
580
+ | {
581
+ error: true;
582
+ slices_count?: never;
583
+ source_project_id: string;
584
+ destination_project_id: string;
585
+ }
591
586
  >;
592
587
 
593
588
  export type SegmentEvents =
@@ -641,7 +636,5 @@ export type SegmentEvents =
641
636
  | SliceLibrarySliceSelected
642
637
  | SliceLibraryFetchingStarted
643
638
  | SliceLibraryFetchingEnded
644
- | SliceLibraryFetchingFailed
645
639
  | SliceLibraryImportStarted
646
- | SliceLibraryImportComplete
647
- | SliceLibraryImportFailed;
640
+ | SliceLibraryImportEnded;