@slicemachine/manager 0.1.1-dev-plugins.14 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs +1 -2
  2. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs.map +1 -1
  3. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js +1 -2
  4. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js.map +1 -1
  5. package/dist/auth/PrismicAuthManager.d.ts +58 -58
  6. package/dist/auth/createPrismicAuthManager.d.ts +4 -4
  7. package/dist/auth/createPrismicAuthManagerMiddleware.d.ts +14 -14
  8. package/dist/client/index.d.ts +6 -6
  9. package/dist/constants/API_ENDPOINTS.d.ts +8 -8
  10. package/dist/constants/API_TOKENS.d.ts +5 -5
  11. package/dist/constants/APPLICATION_MODE.d.ts +5 -5
  12. package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.d.ts +5 -5
  13. package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.d.ts +1 -1
  14. package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.d.ts +1 -1
  15. package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.d.ts +1 -1
  16. package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.d.ts +1 -1
  17. package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.d.ts +1 -1
  18. package/dist/constants/SLICE_MACHINE_USER_AGENT.d.ts +1 -1
  19. package/dist/constants/TS_CONFIG_FILENAME.d.ts +1 -1
  20. package/dist/constants/VERSION_KIND.d.ts +6 -6
  21. package/dist/errors.d.ts +34 -34
  22. package/dist/index.d.ts +11 -11
  23. package/dist/lib/DecodeError.d.ts +12 -12
  24. package/dist/lib/addTrailingSlash.d.ts +1 -1
  25. package/dist/lib/assertPluginsInitialized.d.ts +2 -2
  26. package/dist/lib/bufferCodec.d.ts +4 -4
  27. package/dist/lib/buildPrismicRepositoryAPIEndpoint.d.ts +4 -4
  28. package/dist/lib/castArray.d.ts +1 -1
  29. package/dist/lib/checkIsURLAccessible.d.ts +1 -1
  30. package/dist/lib/createContentDigest.d.ts +9 -9
  31. package/dist/lib/decode.d.ts +10 -10
  32. package/dist/lib/decodeHookResult.d.ts +10 -10
  33. package/dist/lib/decodePackageJSON.d.ts +12 -12
  34. package/dist/lib/decodeSliceMachineConfig.d.ts +3 -3
  35. package/dist/lib/fetchGitHubReleaseBodyForRelease.d.ts +21 -21
  36. package/dist/lib/fetchNPMPackageVersions.d.ts +5 -5
  37. package/dist/lib/format.d.ts +12 -12
  38. package/dist/lib/functionCodec.d.ts +2 -2
  39. package/dist/lib/installDependencies.d.ts +13 -13
  40. package/dist/lib/locateFileUpward.d.ts +10 -10
  41. package/dist/lib/markdownToHTML.d.ts +1 -1
  42. package/dist/lib/mockSlice.d.ts +9 -9
  43. package/dist/lib/prismicrc.d.ts +10 -10
  44. package/dist/lib/serializeCookies.d.ts +6 -6
  45. package/dist/managers/BaseManager.d.ts +33 -33
  46. package/dist/managers/SliceMachineManager.d.ts +95 -95
  47. package/dist/managers/createSliceMachineManager.d.ts +5 -5
  48. package/dist/managers/createSliceMachineManagerClient.d.ts +8 -8
  49. package/dist/managers/createSliceMachineManagerMiddleware.d.ts +15 -15
  50. package/dist/managers/customTypes/CustomTypesManager.d.ts +56 -56
  51. package/dist/managers/plugins/PluginsManager.d.ts +13 -13
  52. package/dist/managers/prismicRepository/PrismicRepositoryManager.d.ts +30 -30
  53. package/dist/managers/prismicRepository/types.d.ts +123 -123
  54. package/dist/managers/project/ProjectManager.d.ts +49 -49
  55. package/dist/managers/screenshots/ScreenshotsManager.d.ts +34 -34
  56. package/dist/managers/simulator/SimulatorManager.d.ts +38 -38
  57. package/dist/managers/slices/SlicesManager.d.ts +128 -128
  58. package/dist/managers/snippets/SnippetsManager.d.ts +11 -11
  59. package/dist/managers/telemetry/TelemetryManager.d.ts +30 -30
  60. package/dist/managers/telemetry/types.d.ts +143 -143
  61. package/dist/managers/user/UserManager.d.ts +40 -40
  62. package/dist/managers/versions/VersionsManager.d.ts +19 -19
  63. package/dist/managers/versions/types.d.ts +5 -5
  64. package/dist/test/createSliceMachineManagerMSWHandler.d.ts +7 -7
  65. package/dist/test/index.d.ts +2 -2
  66. package/dist/types.d.ts +45 -45
  67. package/package.json +3 -3
@@ -1,128 +1,128 @@
1
- /// <reference types="node" />
2
- import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
3
- import { CallHookReturnType, HookError, SliceAssetUpdateHook, SliceCreateHook, SliceCreateHookData, SliceLibraryReadHookData, SliceReadHookData, SliceRenameHook, SliceRenameHookData, SliceUpdateHook } from "@slicemachine/plugin-kit";
4
- import { DecodeError } from "../../lib/DecodeError";
5
- import { OnlyHookErrors } from "../../types";
6
- import { BaseManager } from "../BaseManager";
7
- import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
8
- type SlicesManagerReadSliceLibraryReturnType = {
9
- sliceIDs: string[];
10
- errors: (DecodeError | HookError)[];
11
- };
12
- type SlicesManagerReadAllSliceLibrariesReturnType = {
13
- libraries: {
14
- libraryID: string;
15
- sliceIDs: string[] | undefined;
16
- }[];
17
- errors: (DecodeError | HookError)[];
18
- };
19
- type SliceMachineManagerReadAllSlicesForLibraryArgs = {
20
- libraryID: string;
21
- };
22
- type SliceMachineManagerUpdateSliceArgs = {
23
- libraryID: string;
24
- model: SharedSlice;
25
- mocks?: SharedSliceContent[];
26
- };
27
- type SliceMachineManagerReadAllSlicesForLibraryReturnType = {
28
- models: {
29
- model: SharedSlice;
30
- }[];
31
- errors: (DecodeError | HookError)[];
32
- };
33
- type SliceMachineManagerReadAllSlicesReturnType = {
34
- models: {
35
- libraryID: string;
36
- model: SharedSlice;
37
- }[];
38
- errors: (DecodeError | HookError)[];
39
- };
40
- type SliceMachineManagerReadSliceReturnType = {
41
- model: SharedSlice | undefined;
42
- errors: (DecodeError | HookError)[];
43
- };
44
- type SliceMachineManagerPushSliceArgs = {
45
- libraryID: string;
46
- sliceID: string;
47
- };
48
- export type SliceMachineManagerPushSliceReturnType = {
49
- /**
50
- * A record of Slice variation IDs mapped to uploaded screenshot URLs.
51
- */
52
- screenshotURLs: Record<string, string> | undefined;
53
- errors: (DecodeError | HookError)[];
54
- };
55
- type SliceMachineManagerReadSliceScreenshotArgs = {
56
- libraryID: string;
57
- sliceID: string;
58
- variationID: string;
59
- };
60
- type SliceMachineManagerReadSliceScreenshotReturnType = {
61
- data: Buffer | undefined;
62
- errors: (DecodeError | HookError)[];
63
- };
64
- type SliceMachineManagerUpdateSliceScreenshotArgs = {
65
- libraryID: string;
66
- sliceID: string;
67
- variationID: string;
68
- data: Buffer;
69
- };
70
- type SliceMachineManagerReadSliceMocksArgs = {
71
- libraryID: string;
72
- sliceID: string;
73
- };
74
- type SliceMachineManagerReadSliceMocksReturnType = {
75
- mocks?: SharedSliceContent[];
76
- errors: (DecodeError | HookError)[];
77
- };
78
- type SliceMachineManagerReadSliceMocksConfigArgs = {
79
- libraryID: string;
80
- sliceID: string;
81
- };
82
- type SliceMachineManagerReadSliceMocksConfigArgsReturnType = {
83
- mocksConfig?: Record<string, unknown>;
84
- errors: HookError[];
85
- };
86
- type SliceMachineManagerUpdateSliceMocksArgs = {
87
- libraryID: string;
88
- sliceID: string;
89
- mocks: SharedSliceContent[];
90
- };
91
- type SliceMachineManagerUpdateSliceMocksArgsReturnType = {
92
- errors: HookError[];
93
- };
94
- type SlicesManagerUpsertHostedSliceScrenshotsArgs = {
95
- libraryID: string;
96
- model: SharedSlice;
97
- };
98
- type SliceMachineManagerDeleteSliceArgs = {
99
- libraryID: string;
100
- sliceID: string;
101
- };
102
- type SliceMachineManagerDeleteSliceReturnType = {
103
- errors: (DecodeError | HookError)[];
104
- };
105
- export declare class SlicesManager extends BaseManager {
106
- readSliceLibrary(args: SliceLibraryReadHookData): Promise<SlicesManagerReadSliceLibraryReturnType>;
107
- readAllSliceLibraries(): Promise<SlicesManagerReadAllSliceLibrariesReturnType>;
108
- readAllSlicesForLibrary(args: SliceMachineManagerReadAllSlicesForLibraryArgs): Promise<SliceMachineManagerReadAllSlicesForLibraryReturnType>;
109
- readAllSlices(): Promise<SliceMachineManagerReadAllSlicesReturnType>;
110
- createSlice(args: SliceCreateHookData): Promise<OnlyHookErrors<CallHookReturnType<SliceCreateHook>>>;
111
- readSlice(args: SliceReadHookData): Promise<SliceMachineManagerReadSliceReturnType>;
112
- updateSlice(args: SliceMachineManagerUpdateSliceArgs): Promise<OnlyHookErrors<CallHookReturnType<SliceUpdateHook>>>;
113
- renameSlice(args: SliceRenameHookData): Promise<OnlyHookErrors<CallHookReturnType<SliceRenameHook>>>;
114
- deleteSlice(args: SliceMachineManagerDeleteSliceArgs): Promise<SliceMachineManagerDeleteSliceReturnType>;
115
- /**
116
- * @returns Record of variation IDs mapped to uploaded screenshot URLs.
117
- */
118
- pushSlice(args: SliceMachineManagerPushSliceArgs): Promise<SliceMachineManagerPushSliceReturnType>;
119
- readSliceScreenshot(args: SliceMachineManagerReadSliceScreenshotArgs): Promise<SliceMachineManagerReadSliceScreenshotReturnType>;
120
- updateSliceScreenshot(args: SliceMachineManagerUpdateSliceScreenshotArgs): Promise<OnlyHookErrors<CallHookReturnType<SliceAssetUpdateHook>>>;
121
- readSliceMocks(args: SliceMachineManagerReadSliceMocksArgs): Promise<SliceMachineManagerReadSliceMocksReturnType>;
122
- updateSliceMocks(args: SliceMachineManagerUpdateSliceMocksArgs): Promise<SliceMachineManagerUpdateSliceMocksArgsReturnType>;
123
- readSliceMocksConfig(args: SliceMachineManagerReadSliceMocksConfigArgs): Promise<SliceMachineManagerReadSliceMocksConfigArgsReturnType>;
124
- fetchRemoteSlices(): Promise<SharedSlice[]>;
125
- updateSliceModelScreenshotsInPlace(args: SlicesManagerUpsertHostedSliceScrenshotsArgs): Promise<SharedSlice>;
126
- private _removeSliceFromCustomTypes;
127
- }
128
- export {};
1
+ /// <reference types="node" />
2
+ import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
3
+ import { CallHookReturnType, HookError, SliceAssetUpdateHook, SliceCreateHook, SliceCreateHookData, SliceLibraryReadHookData, SliceReadHookData, SliceRenameHook, SliceRenameHookData, SliceUpdateHook } from "@slicemachine/plugin-kit";
4
+ import { DecodeError } from "../../lib/DecodeError";
5
+ import { OnlyHookErrors } from "../../types";
6
+ import { BaseManager } from "../BaseManager";
7
+ import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
8
+ type SlicesManagerReadSliceLibraryReturnType = {
9
+ sliceIDs: string[];
10
+ errors: (DecodeError | HookError)[];
11
+ };
12
+ type SlicesManagerReadAllSliceLibrariesReturnType = {
13
+ libraries: {
14
+ libraryID: string;
15
+ sliceIDs: string[] | undefined;
16
+ }[];
17
+ errors: (DecodeError | HookError)[];
18
+ };
19
+ type SliceMachineManagerReadAllSlicesForLibraryArgs = {
20
+ libraryID: string;
21
+ };
22
+ type SliceMachineManagerUpdateSliceArgs = {
23
+ libraryID: string;
24
+ model: SharedSlice;
25
+ mocks?: SharedSliceContent[];
26
+ };
27
+ type SliceMachineManagerReadAllSlicesForLibraryReturnType = {
28
+ models: {
29
+ model: SharedSlice;
30
+ }[];
31
+ errors: (DecodeError | HookError)[];
32
+ };
33
+ type SliceMachineManagerReadAllSlicesReturnType = {
34
+ models: {
35
+ libraryID: string;
36
+ model: SharedSlice;
37
+ }[];
38
+ errors: (DecodeError | HookError)[];
39
+ };
40
+ type SliceMachineManagerReadSliceReturnType = {
41
+ model: SharedSlice | undefined;
42
+ errors: (DecodeError | HookError)[];
43
+ };
44
+ type SliceMachineManagerPushSliceArgs = {
45
+ libraryID: string;
46
+ sliceID: string;
47
+ };
48
+ export type SliceMachineManagerPushSliceReturnType = {
49
+ /**
50
+ * A record of Slice variation IDs mapped to uploaded screenshot URLs.
51
+ */
52
+ screenshotURLs: Record<string, string> | undefined;
53
+ errors: (DecodeError | HookError)[];
54
+ };
55
+ type SliceMachineManagerReadSliceScreenshotArgs = {
56
+ libraryID: string;
57
+ sliceID: string;
58
+ variationID: string;
59
+ };
60
+ type SliceMachineManagerReadSliceScreenshotReturnType = {
61
+ data: Buffer | undefined;
62
+ errors: (DecodeError | HookError)[];
63
+ };
64
+ type SliceMachineManagerUpdateSliceScreenshotArgs = {
65
+ libraryID: string;
66
+ sliceID: string;
67
+ variationID: string;
68
+ data: Buffer;
69
+ };
70
+ type SliceMachineManagerReadSliceMocksArgs = {
71
+ libraryID: string;
72
+ sliceID: string;
73
+ };
74
+ type SliceMachineManagerReadSliceMocksReturnType = {
75
+ mocks?: SharedSliceContent[];
76
+ errors: (DecodeError | HookError)[];
77
+ };
78
+ type SliceMachineManagerReadSliceMocksConfigArgs = {
79
+ libraryID: string;
80
+ sliceID: string;
81
+ };
82
+ type SliceMachineManagerReadSliceMocksConfigArgsReturnType = {
83
+ mocksConfig?: Record<string, unknown>;
84
+ errors: HookError[];
85
+ };
86
+ type SliceMachineManagerUpdateSliceMocksArgs = {
87
+ libraryID: string;
88
+ sliceID: string;
89
+ mocks: SharedSliceContent[];
90
+ };
91
+ type SliceMachineManagerUpdateSliceMocksArgsReturnType = {
92
+ errors: HookError[];
93
+ };
94
+ type SlicesManagerUpsertHostedSliceScrenshotsArgs = {
95
+ libraryID: string;
96
+ model: SharedSlice;
97
+ };
98
+ type SliceMachineManagerDeleteSliceArgs = {
99
+ libraryID: string;
100
+ sliceID: string;
101
+ };
102
+ type SliceMachineManagerDeleteSliceReturnType = {
103
+ errors: (DecodeError | HookError)[];
104
+ };
105
+ export declare class SlicesManager extends BaseManager {
106
+ readSliceLibrary(args: SliceLibraryReadHookData): Promise<SlicesManagerReadSliceLibraryReturnType>;
107
+ readAllSliceLibraries(): Promise<SlicesManagerReadAllSliceLibrariesReturnType>;
108
+ readAllSlicesForLibrary(args: SliceMachineManagerReadAllSlicesForLibraryArgs): Promise<SliceMachineManagerReadAllSlicesForLibraryReturnType>;
109
+ readAllSlices(): Promise<SliceMachineManagerReadAllSlicesReturnType>;
110
+ createSlice(args: SliceCreateHookData): Promise<OnlyHookErrors<CallHookReturnType<SliceCreateHook>>>;
111
+ readSlice(args: SliceReadHookData): Promise<SliceMachineManagerReadSliceReturnType>;
112
+ updateSlice(args: SliceMachineManagerUpdateSliceArgs): Promise<OnlyHookErrors<CallHookReturnType<SliceUpdateHook>>>;
113
+ renameSlice(args: SliceRenameHookData): Promise<OnlyHookErrors<CallHookReturnType<SliceRenameHook>>>;
114
+ deleteSlice(args: SliceMachineManagerDeleteSliceArgs): Promise<SliceMachineManagerDeleteSliceReturnType>;
115
+ /**
116
+ * @returns Record of variation IDs mapped to uploaded screenshot URLs.
117
+ */
118
+ pushSlice(args: SliceMachineManagerPushSliceArgs): Promise<SliceMachineManagerPushSliceReturnType>;
119
+ readSliceScreenshot(args: SliceMachineManagerReadSliceScreenshotArgs): Promise<SliceMachineManagerReadSliceScreenshotReturnType>;
120
+ updateSliceScreenshot(args: SliceMachineManagerUpdateSliceScreenshotArgs): Promise<OnlyHookErrors<CallHookReturnType<SliceAssetUpdateHook>>>;
121
+ readSliceMocks(args: SliceMachineManagerReadSliceMocksArgs): Promise<SliceMachineManagerReadSliceMocksReturnType>;
122
+ updateSliceMocks(args: SliceMachineManagerUpdateSliceMocksArgs): Promise<SliceMachineManagerUpdateSliceMocksArgsReturnType>;
123
+ readSliceMocksConfig(args: SliceMachineManagerReadSliceMocksConfigArgs): Promise<SliceMachineManagerReadSliceMocksConfigArgsReturnType>;
124
+ fetchRemoteSlices(): Promise<SharedSlice[]>;
125
+ updateSliceModelScreenshotsInPlace(args: SlicesManagerUpsertHostedSliceScrenshotsArgs): Promise<SharedSlice>;
126
+ private _removeSliceFromCustomTypes;
127
+ }
128
+ export {};
@@ -1,11 +1,11 @@
1
- import { HookError, Snippet, SnippetReadHookData } from "@slicemachine/plugin-kit";
2
- import { DecodeError } from "../../lib/DecodeError";
3
- import { BaseManager } from "../BaseManager";
4
- type SnippetsMangerUpdateSliceReturnType = {
5
- snippets: Snippet[];
6
- errors: (DecodeError | HookError)[];
7
- };
8
- export declare class SnippetsManager extends BaseManager {
9
- readSnippets(args: SnippetReadHookData): Promise<SnippetsMangerUpdateSliceReturnType>;
10
- }
11
- export {};
1
+ import { HookError, Snippet, SnippetReadHookData } from "@slicemachine/plugin-kit";
2
+ import { DecodeError } from "../../lib/DecodeError";
3
+ import { BaseManager } from "../BaseManager";
4
+ type SnippetsMangerUpdateSliceReturnType = {
5
+ snippets: Snippet[];
6
+ errors: (DecodeError | HookError)[];
7
+ };
8
+ export declare class SnippetsManager extends BaseManager {
9
+ readSnippets(args: SnippetReadHookData): Promise<SnippetsMangerUpdateSliceReturnType>;
10
+ }
11
+ export {};
@@ -1,30 +1,30 @@
1
- import { BaseManager } from "../BaseManager";
2
- import { SegmentEvents } from "./types";
3
- type TelemetryManagerInitTelemetryArgs = {
4
- appName: string;
5
- appVersion: string;
6
- };
7
- type TelemetryManagerTrackArgs = SegmentEvents;
8
- type TelemetryManagerIdentifyArgs = {
9
- userID: string;
10
- intercomHash: string;
11
- };
12
- type TelemetryManagerGroupArgs = {
13
- repositoryName: string;
14
- manualLibsCount: number;
15
- downloadedLibsCount: number;
16
- npmLibsCount: number;
17
- downloadedLibs: string[];
18
- };
19
- export declare class TelemetryManager extends BaseManager {
20
- private _segmentClient;
21
- private _anonymousID;
22
- private _userID;
23
- private _context;
24
- initTelemetry(args: TelemetryManagerInitTelemetryArgs): Promise<void>;
25
- track(args: TelemetryManagerTrackArgs): Promise<void>;
26
- identify(args: TelemetryManagerIdentifyArgs): Promise<void>;
27
- group(args: TelemetryManagerGroupArgs): Promise<void>;
28
- checkIsTelemetryEnabled(): Promise<boolean>;
29
- }
30
- export {};
1
+ import { BaseManager } from "../BaseManager";
2
+ import { SegmentEvents } from "./types";
3
+ type TelemetryManagerInitTelemetryArgs = {
4
+ appName: string;
5
+ appVersion: string;
6
+ };
7
+ type TelemetryManagerTrackArgs = SegmentEvents;
8
+ type TelemetryManagerIdentifyArgs = {
9
+ userID: string;
10
+ intercomHash: string;
11
+ };
12
+ type TelemetryManagerGroupArgs = {
13
+ repositoryName: string;
14
+ manualLibsCount: number;
15
+ downloadedLibsCount: number;
16
+ npmLibsCount: number;
17
+ downloadedLibs: string[];
18
+ };
19
+ export declare class TelemetryManager extends BaseManager {
20
+ private _segmentClient;
21
+ private _anonymousID;
22
+ private _userID;
23
+ private _context;
24
+ initTelemetry(args: TelemetryManagerInitTelemetryArgs): Promise<void>;
25
+ track(args: TelemetryManagerTrackArgs): Promise<void>;
26
+ identify(args: TelemetryManagerIdentifyArgs): Promise<void>;
27
+ group(args: TelemetryManagerGroupArgs): Promise<void>;
28
+ checkIsTelemetryEnabled(): Promise<boolean>;
29
+ }
30
+ export {};
@@ -1,143 +1,143 @@
1
- import type { LimitType } from "../prismicRepository/types";
2
- export declare const SegmentEventType: {
3
- readonly command_init_start: "command:init:start";
4
- readonly command_init_identify: "command:init:identify";
5
- readonly command_init_end: "command:init:end";
6
- readonly review: "review";
7
- readonly onboarding_start: "onboarding:start";
8
- readonly onboarding_skip: "onboarding:skip";
9
- readonly onboarding_continue_screenIntro: "onboarding:continue:screen-intro";
10
- readonly onboarding_continue_screen1: "onboarding:continue:screen-1";
11
- readonly onboarding_continue_screen2: "onboarding:continue:screen-2";
12
- readonly onboarding_continue_screen3: "onboarding:continue:screen-3";
13
- readonly sliceSimulator_setup: "slice-simulator:setup";
14
- readonly sliceSimulator_open: "slice-simulator:open";
15
- readonly sliceSimulator_isNotRunning: "slice-simulator:is-not-running";
16
- readonly pageView: "page-view";
17
- readonly openVideoTutorials: "open-video-tutorials";
18
- readonly customType_created: "custom-type:created";
19
- readonly customType_fieldAdded: "custom-type:field-added";
20
- readonly customType_sliceZoneUpdated: "custom-type:slice-zone-updated";
21
- readonly customType_saved: "custom-type:saved";
22
- readonly slice_created: "slice:created";
23
- readonly screenshotTaken: "screenshot-taken";
24
- readonly changes_pushed: "changes:pushed";
25
- readonly changes_limitReach: "changes:limit-reach";
26
- readonly editor_widgetUsed: "editor:widget-used";
27
- };
28
- type SegmentEventTypes = (typeof SegmentEventType)[keyof typeof SegmentEventType];
29
- export declare const HumanSegmentEventType: {
30
- readonly "command:init:start": "SliceMachine Init Start";
31
- readonly "command:init:identify": "SliceMachine Init Identify";
32
- readonly "command:init:end": "SliceMachine Init End";
33
- readonly review: "SliceMachine Review";
34
- readonly "onboarding:start": "SliceMachine Onboarding Start";
35
- readonly "onboarding:skip": "SliceMachine Onboarding Skip";
36
- readonly "onboarding:continue:screen-intro": "SliceMachine Onboarding Continue Screen Intro";
37
- readonly "onboarding:continue:screen-1": "SliceMachine Onboarding Continue Screen 1";
38
- readonly "onboarding:continue:screen-2": "SliceMachine Onboarding Continue Screen 2";
39
- readonly "onboarding:continue:screen-3": "SliceMachine Onboarding Continue Screen 3";
40
- readonly "slice-simulator:setup": "SliceMachine Slice Simulator Setup";
41
- readonly "slice-simulator:open": "SliceMachine Slice Simulator Open";
42
- readonly "slice-simulator:is-not-running": "SliceMachine Slice Simulator is not running";
43
- readonly "page-view": "SliceMachine Page View";
44
- readonly "open-video-tutorials": "SliceMachine Open Video Tutorials";
45
- readonly "custom-type:created": "SliceMachine Custom Type Created";
46
- readonly "custom-type:field-added": "SliceMachine Custom Type Field Added";
47
- readonly "custom-type:slice-zone-updated": "SliceMachine Slicezone Updated";
48
- readonly "custom-type:saved": "SliceMachine Custom Type Saved";
49
- readonly "slice:created": "SliceMachine Slice Created";
50
- readonly "screenshot-taken": "SliceMachine Screenshot Taken";
51
- readonly "changes:pushed": "SliceMachine Changes Pushed";
52
- readonly "changes:limit-reach": "SliceMachine Changes Limit Reach";
53
- readonly "editor:widget-used": "SliceMachine Editor Widget Used";
54
- };
55
- export type HumanSegmentEventTypes = (typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];
56
- type SegmentEvent<TType extends SegmentEventTypes, TProperties extends Record<string, unknown> | void = void> = TProperties extends void ? {
57
- event: TType;
58
- repository?: string;
59
- } : {
60
- event: TType;
61
- repository?: string;
62
- } & TProperties;
63
- type CommandInitStartSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_start>;
64
- type CommandInitIdentifySegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_identify>;
65
- type CommandInitEndSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_end, {
66
- framework: string;
67
- success: boolean;
68
- error?: string;
69
- }>;
70
- type ReviewSegmentEvent = SegmentEvent<typeof SegmentEventType.review, {
71
- rating: number;
72
- comment: string;
73
- }>;
74
- type OnboardingStartSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_start>;
75
- type OnboardingSkipSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_skip, {
76
- screenSkipped: number;
77
- }>;
78
- type OnboardingContinueScreenIntroSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screenIntro>;
79
- type OnboardingContinueScreen1SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen1>;
80
- type OnboardingContinueScreen2SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen2>;
81
- type OnboardingContinueScreen3SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen3>;
82
- type SliceSimulatorSetupSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_setup>;
83
- type SliceSimulatorOpenSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_open>;
84
- type SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_isNotRunning>;
85
- type PageViewSegmentEvent = SegmentEvent<typeof SegmentEventType.pageView, {
86
- url: string;
87
- path: string;
88
- search: string;
89
- title: string;
90
- referrer: string;
91
- adapter: string;
92
- }>;
93
- type OpenVideoTutorialsSegmentEvent = SegmentEvent<typeof SegmentEventType.openVideoTutorials, {
94
- video: string;
95
- }>;
96
- type CustomTypeCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_created, {
97
- id: string;
98
- name: string;
99
- type: "repeatable" | "single";
100
- }>;
101
- type CustomTypeFieldAddedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_fieldAdded, {
102
- id: string;
103
- name: string;
104
- zone: "static" | "repeatable";
105
- type: string;
106
- }>;
107
- type CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_sliceZoneUpdated, {
108
- customTypeId: string;
109
- }>;
110
- type CustomTypeSavedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_saved, {
111
- id: string;
112
- name: string;
113
- type: "repeatable" | "single";
114
- }>;
115
- type SliceCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.slice_created, {
116
- id: string;
117
- name: string;
118
- library: string;
119
- }>;
120
- type ScreenshotTakenSegmentEvent = SegmentEvent<typeof SegmentEventType.screenshotTaken, {
121
- type: "custom" | "automatic";
122
- method: "fromSimulator" | "upload" | "dragAndDrop";
123
- }>;
124
- type ChangesPushedSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_pushed, {
125
- customTypesCreated: number;
126
- customTypesModified: number;
127
- customTypesDeleted: number;
128
- slicesCreated: number;
129
- slicesModified: number;
130
- slicesDeleted: number;
131
- missingScreenshots: number;
132
- total: number;
133
- duration: number;
134
- hasDeletedDocuments: boolean;
135
- }>;
136
- type ChangesLimitReachSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_limitReach, {
137
- limitType: LimitType;
138
- }>;
139
- type EditorWidgetUsedSegmentEvent = SegmentEvent<typeof SegmentEventType.editor_widgetUsed, {
140
- sliceId: string;
141
- }>;
142
- export type SegmentEvents = CommandInitStartSegmentEvent | CommandInitIdentifySegmentEvent | CommandInitEndSegmentEvent | ReviewSegmentEvent | OnboardingStartSegmentEvent | OnboardingSkipSegmentEvent | OnboardingContinueScreenIntroSegmentEvent | OnboardingContinueScreen1SegmentEvent | OnboardingContinueScreen2SegmentEvent | OnboardingContinueScreen3SegmentEvent | SliceSimulatorSetupSegmentEvent | SliceSimulatorOpenSegmentEvent | SliceSimulatorIsNotRunningSegmentEvent | PageViewSegmentEvent | OpenVideoTutorialsSegmentEvent | CustomTypeCreatedSegmentEvent | CustomTypeFieldAddedSegmentEvent | CustomTypeSliceZoneUpdatedSegmentEvent | CustomTypeSavedSegmentEvent | SliceCreatedSegmentEvent | ScreenshotTakenSegmentEvent | ChangesPushedSegmentEvent | ChangesLimitReachSegmentEvent | EditorWidgetUsedSegmentEvent;
143
- export {};
1
+ import type { LimitType } from "../prismicRepository/types";
2
+ export declare const SegmentEventType: {
3
+ readonly command_init_start: "command:init:start";
4
+ readonly command_init_identify: "command:init:identify";
5
+ readonly command_init_end: "command:init:end";
6
+ readonly review: "review";
7
+ readonly onboarding_start: "onboarding:start";
8
+ readonly onboarding_skip: "onboarding:skip";
9
+ readonly onboarding_continue_screenIntro: "onboarding:continue:screen-intro";
10
+ readonly onboarding_continue_screen1: "onboarding:continue:screen-1";
11
+ readonly onboarding_continue_screen2: "onboarding:continue:screen-2";
12
+ readonly onboarding_continue_screen3: "onboarding:continue:screen-3";
13
+ readonly sliceSimulator_setup: "slice-simulator:setup";
14
+ readonly sliceSimulator_open: "slice-simulator:open";
15
+ readonly sliceSimulator_isNotRunning: "slice-simulator:is-not-running";
16
+ readonly pageView: "page-view";
17
+ readonly openVideoTutorials: "open-video-tutorials";
18
+ readonly customType_created: "custom-type:created";
19
+ readonly customType_fieldAdded: "custom-type:field-added";
20
+ readonly customType_sliceZoneUpdated: "custom-type:slice-zone-updated";
21
+ readonly customType_saved: "custom-type:saved";
22
+ readonly slice_created: "slice:created";
23
+ readonly screenshotTaken: "screenshot-taken";
24
+ readonly changes_pushed: "changes:pushed";
25
+ readonly changes_limitReach: "changes:limit-reach";
26
+ readonly editor_widgetUsed: "editor:widget-used";
27
+ };
28
+ type SegmentEventTypes = (typeof SegmentEventType)[keyof typeof SegmentEventType];
29
+ export declare const HumanSegmentEventType: {
30
+ readonly "command:init:start": "SliceMachine Init Start";
31
+ readonly "command:init:identify": "SliceMachine Init Identify";
32
+ readonly "command:init:end": "SliceMachine Init End";
33
+ readonly review: "SliceMachine Review";
34
+ readonly "onboarding:start": "SliceMachine Onboarding Start";
35
+ readonly "onboarding:skip": "SliceMachine Onboarding Skip";
36
+ readonly "onboarding:continue:screen-intro": "SliceMachine Onboarding Continue Screen Intro";
37
+ readonly "onboarding:continue:screen-1": "SliceMachine Onboarding Continue Screen 1";
38
+ readonly "onboarding:continue:screen-2": "SliceMachine Onboarding Continue Screen 2";
39
+ readonly "onboarding:continue:screen-3": "SliceMachine Onboarding Continue Screen 3";
40
+ readonly "slice-simulator:setup": "SliceMachine Slice Simulator Setup";
41
+ readonly "slice-simulator:open": "SliceMachine Slice Simulator Open";
42
+ readonly "slice-simulator:is-not-running": "SliceMachine Slice Simulator is not running";
43
+ readonly "page-view": "SliceMachine Page View";
44
+ readonly "open-video-tutorials": "SliceMachine Open Video Tutorials";
45
+ readonly "custom-type:created": "SliceMachine Custom Type Created";
46
+ readonly "custom-type:field-added": "SliceMachine Custom Type Field Added";
47
+ readonly "custom-type:slice-zone-updated": "SliceMachine Slicezone Updated";
48
+ readonly "custom-type:saved": "SliceMachine Custom Type Saved";
49
+ readonly "slice:created": "SliceMachine Slice Created";
50
+ readonly "screenshot-taken": "SliceMachine Screenshot Taken";
51
+ readonly "changes:pushed": "SliceMachine Changes Pushed";
52
+ readonly "changes:limit-reach": "SliceMachine Changes Limit Reach";
53
+ readonly "editor:widget-used": "SliceMachine Editor Widget Used";
54
+ };
55
+ export type HumanSegmentEventTypes = (typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];
56
+ type SegmentEvent<TType extends SegmentEventTypes, TProperties extends Record<string, unknown> | void = void> = TProperties extends void ? {
57
+ event: TType;
58
+ repository?: string;
59
+ } : {
60
+ event: TType;
61
+ repository?: string;
62
+ } & TProperties;
63
+ type CommandInitStartSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_start>;
64
+ type CommandInitIdentifySegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_identify>;
65
+ type CommandInitEndSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_end, {
66
+ framework: string;
67
+ success: boolean;
68
+ error?: string;
69
+ }>;
70
+ type ReviewSegmentEvent = SegmentEvent<typeof SegmentEventType.review, {
71
+ rating: number;
72
+ comment: string;
73
+ }>;
74
+ type OnboardingStartSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_start>;
75
+ type OnboardingSkipSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_skip, {
76
+ screenSkipped: number;
77
+ }>;
78
+ type OnboardingContinueScreenIntroSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screenIntro>;
79
+ type OnboardingContinueScreen1SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen1>;
80
+ type OnboardingContinueScreen2SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen2>;
81
+ type OnboardingContinueScreen3SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen3>;
82
+ type SliceSimulatorSetupSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_setup>;
83
+ type SliceSimulatorOpenSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_open>;
84
+ type SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_isNotRunning>;
85
+ type PageViewSegmentEvent = SegmentEvent<typeof SegmentEventType.pageView, {
86
+ url: string;
87
+ path: string;
88
+ search: string;
89
+ title: string;
90
+ referrer: string;
91
+ adapter: string;
92
+ }>;
93
+ type OpenVideoTutorialsSegmentEvent = SegmentEvent<typeof SegmentEventType.openVideoTutorials, {
94
+ video: string;
95
+ }>;
96
+ type CustomTypeCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_created, {
97
+ id: string;
98
+ name: string;
99
+ type: "repeatable" | "single";
100
+ }>;
101
+ type CustomTypeFieldAddedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_fieldAdded, {
102
+ id: string;
103
+ name: string;
104
+ zone: "static" | "repeatable";
105
+ type: string;
106
+ }>;
107
+ type CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_sliceZoneUpdated, {
108
+ customTypeId: string;
109
+ }>;
110
+ type CustomTypeSavedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_saved, {
111
+ id: string;
112
+ name: string;
113
+ type: "repeatable" | "single";
114
+ }>;
115
+ type SliceCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.slice_created, {
116
+ id: string;
117
+ name: string;
118
+ library: string;
119
+ }>;
120
+ type ScreenshotTakenSegmentEvent = SegmentEvent<typeof SegmentEventType.screenshotTaken, {
121
+ type: "custom" | "automatic";
122
+ method: "fromSimulator" | "upload" | "dragAndDrop";
123
+ }>;
124
+ type ChangesPushedSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_pushed, {
125
+ customTypesCreated: number;
126
+ customTypesModified: number;
127
+ customTypesDeleted: number;
128
+ slicesCreated: number;
129
+ slicesModified: number;
130
+ slicesDeleted: number;
131
+ missingScreenshots: number;
132
+ total: number;
133
+ duration: number;
134
+ hasDeletedDocuments: boolean;
135
+ }>;
136
+ type ChangesLimitReachSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_limitReach, {
137
+ limitType: LimitType;
138
+ }>;
139
+ type EditorWidgetUsedSegmentEvent = SegmentEvent<typeof SegmentEventType.editor_widgetUsed, {
140
+ sliceId: string;
141
+ }>;
142
+ export type SegmentEvents = CommandInitStartSegmentEvent | CommandInitIdentifySegmentEvent | CommandInitEndSegmentEvent | ReviewSegmentEvent | OnboardingStartSegmentEvent | OnboardingSkipSegmentEvent | OnboardingContinueScreenIntroSegmentEvent | OnboardingContinueScreen1SegmentEvent | OnboardingContinueScreen2SegmentEvent | OnboardingContinueScreen3SegmentEvent | SliceSimulatorSetupSegmentEvent | SliceSimulatorOpenSegmentEvent | SliceSimulatorIsNotRunningSegmentEvent | PageViewSegmentEvent | OpenVideoTutorialsSegmentEvent | CustomTypeCreatedSegmentEvent | CustomTypeFieldAddedSegmentEvent | CustomTypeSliceZoneUpdatedSegmentEvent | CustomTypeSavedSegmentEvent | SliceCreatedSegmentEvent | ScreenshotTakenSegmentEvent | ChangesPushedSegmentEvent | ChangesLimitReachSegmentEvent | EditorWidgetUsedSegmentEvent;
143
+ export {};