@navieo/types 1.0.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.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @navieo/types
2
+
3
+ Shared TypeScript interfaces for Navieo.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @navieo/types
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import type { SitemapData, GuideRequest, GuideResponse } from "@navieo/types";
15
+ ```
16
+
17
+ ## Exported Types
18
+
19
+ | Interface | Description |
20
+ |-----------|-------------|
21
+ | `ElementSelector` | CSS selector, aria label, text, or test ID for targeting UI elements |
22
+ | `SitemapElement` | An interactive element on a page (button, link, input, etc.) |
23
+ | `SitemapRoute` | A route/page with its path, title, description, and elements |
24
+ | `SitemapFlow` | A multi-step user flow across routes |
25
+ | `SitemapDoc` | A documentation page with sections |
26
+ | `SitemapData` | The complete sitemap containing routes, flows, and docs |
27
+ | `TourStep` | A single step in a guided tour |
28
+ | `GuideRequest` | Request payload for generating a guide |
29
+ | `GuideResponse` | Response containing tour steps and an answer |
30
+ | `SyncRequest` | Payload for syncing sitemap + docs to the backend |
31
+ | `DocFile` | A documentation file with path and content |
32
+
33
+ ## License
34
+
35
+ MIT
@@ -0,0 +1,77 @@
1
+ interface ElementSelector {
2
+ cssSelector?: string;
3
+ ariaLabel?: string;
4
+ text?: string;
5
+ testId?: string;
6
+ }
7
+ interface SitemapElement {
8
+ id: string;
9
+ type: "button" | "link" | "input" | "select" | "text";
10
+ text: string;
11
+ selector: ElementSelector;
12
+ description: string;
13
+ relatedDocs?: string[];
14
+ }
15
+ interface SitemapRoute {
16
+ path: string;
17
+ title: string;
18
+ description: string;
19
+ elements: SitemapElement[];
20
+ }
21
+ interface SitemapFlow {
22
+ name: string;
23
+ description: string;
24
+ steps: {
25
+ route: string;
26
+ elementId: string;
27
+ action: string;
28
+ }[];
29
+ source?: string;
30
+ }
31
+ interface SitemapDoc {
32
+ path: string;
33
+ title: string;
34
+ sections: {
35
+ heading: string;
36
+ content: string;
37
+ }[];
38
+ }
39
+ interface SitemapData {
40
+ appId: string;
41
+ framework?: string;
42
+ generatedAt?: string;
43
+ routes: SitemapRoute[];
44
+ flows?: SitemapFlow[];
45
+ docs?: SitemapDoc[];
46
+ }
47
+ interface TourStep {
48
+ step: number;
49
+ route: string;
50
+ elementId: string;
51
+ selector: ElementSelector;
52
+ tooltipTitle: string;
53
+ tooltipText: string;
54
+ action: "highlight" | "click" | "navigate" | "input";
55
+ }
56
+ interface GuideRequest {
57
+ query: string;
58
+ currentRoute: string;
59
+ appId?: string;
60
+ apiKey?: string;
61
+ }
62
+ interface GuideResponse {
63
+ steps: TourStep[];
64
+ answer?: string;
65
+ error?: string;
66
+ }
67
+ interface SyncRequest {
68
+ apiKey: string;
69
+ sitemap: SitemapData;
70
+ docs?: DocFile[];
71
+ }
72
+ interface DocFile {
73
+ path: string;
74
+ content: string;
75
+ }
76
+
77
+ export type { DocFile, ElementSelector, GuideRequest, GuideResponse, SitemapData, SitemapDoc, SitemapElement, SitemapFlow, SitemapRoute, SyncRequest, TourStep };
@@ -0,0 +1,77 @@
1
+ interface ElementSelector {
2
+ cssSelector?: string;
3
+ ariaLabel?: string;
4
+ text?: string;
5
+ testId?: string;
6
+ }
7
+ interface SitemapElement {
8
+ id: string;
9
+ type: "button" | "link" | "input" | "select" | "text";
10
+ text: string;
11
+ selector: ElementSelector;
12
+ description: string;
13
+ relatedDocs?: string[];
14
+ }
15
+ interface SitemapRoute {
16
+ path: string;
17
+ title: string;
18
+ description: string;
19
+ elements: SitemapElement[];
20
+ }
21
+ interface SitemapFlow {
22
+ name: string;
23
+ description: string;
24
+ steps: {
25
+ route: string;
26
+ elementId: string;
27
+ action: string;
28
+ }[];
29
+ source?: string;
30
+ }
31
+ interface SitemapDoc {
32
+ path: string;
33
+ title: string;
34
+ sections: {
35
+ heading: string;
36
+ content: string;
37
+ }[];
38
+ }
39
+ interface SitemapData {
40
+ appId: string;
41
+ framework?: string;
42
+ generatedAt?: string;
43
+ routes: SitemapRoute[];
44
+ flows?: SitemapFlow[];
45
+ docs?: SitemapDoc[];
46
+ }
47
+ interface TourStep {
48
+ step: number;
49
+ route: string;
50
+ elementId: string;
51
+ selector: ElementSelector;
52
+ tooltipTitle: string;
53
+ tooltipText: string;
54
+ action: "highlight" | "click" | "navigate" | "input";
55
+ }
56
+ interface GuideRequest {
57
+ query: string;
58
+ currentRoute: string;
59
+ appId?: string;
60
+ apiKey?: string;
61
+ }
62
+ interface GuideResponse {
63
+ steps: TourStep[];
64
+ answer?: string;
65
+ error?: string;
66
+ }
67
+ interface SyncRequest {
68
+ apiKey: string;
69
+ sitemap: SitemapData;
70
+ docs?: DocFile[];
71
+ }
72
+ interface DocFile {
73
+ path: string;
74
+ content: string;
75
+ }
76
+
77
+ export type { DocFile, ElementSelector, GuideRequest, GuideResponse, SitemapData, SitemapDoc, SitemapElement, SitemapFlow, SitemapRoute, SyncRequest, TourStep };
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/index.ts
17
+ var index_exports = {};
18
+ module.exports = __toCommonJS(index_exports);
package/dist/index.mjs ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@navieo/types",
3
+ "version": "1.0.0",
4
+ "description": "Shared TypeScript interfaces for Navieo",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "scripts": {
16
+ "build": "tsup src/index.ts --format cjs,esm --dts",
17
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
18
+ "prepublishOnly": "tsup src/index.ts --format cjs,esm --dts"
19
+ },
20
+ "devDependencies": {
21
+ "tsup": "^8",
22
+ "typescript": "^5"
23
+ },
24
+ "files": ["dist"],
25
+ "license": "MIT",
26
+ "engines": {
27
+ "node": ">=18"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/Navieo-org/navieo-sdk.git",
35
+ "directory": "packages/types"
36
+ },
37
+ "homepage": "https://github.com/Navieo-org/navieo-sdk/tree/main/packages/types#readme",
38
+ "bugs": {
39
+ "url": "https://github.com/Navieo-org/navieo-sdk/issues"
40
+ },
41
+ "keywords": ["navieo", "types", "typescript", "sitemap", "onboarding"]
42
+ }