@feedmepos/mf-miniprogram-v2 0.1.0-dev.1 → 0.1.0-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ControlPlaneView-4ax3O5Nf.js → ControlPlaneView-DzyTnzK9.js} +3634 -3077
- package/dist/app.js +1 -1
- package/dist/package.json +1 -1
- package/dist/src/api/controlPlane.d.ts +6 -0
- package/dist/src/components/AnnotationMessage.vue.d.ts +7 -0
- package/dist/src/components/ChatTextPart.vue.d.ts +6 -0
- package/dist/src/components/MarkdownContent.vue.d.ts +6 -0
- package/dist/src/components/StatusBadge.vue.d.ts +21 -0
- package/dist/src/composables/previewAnnotations.d.ts +9 -0
- package/dist/src/composables/status.d.ts +10 -0
- package/dist/src/composables/types.d.ts +34 -1
- package/dist/src/composables/useChat.d.ts +2 -0
- package/dist/src/composables/useProject.d.ts +29 -9
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/app.js
CHANGED
package/dist/package.json
CHANGED
|
@@ -3,6 +3,9 @@ type MaybeBusiness = {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
slug?: string;
|
|
5
5
|
name?: string;
|
|
6
|
+
country?: string;
|
|
7
|
+
countryCode?: string;
|
|
8
|
+
country_code?: string;
|
|
6
9
|
};
|
|
7
10
|
export declare const DEFAULT_BUSINESS_ID = "69cde0740c0106001ca83dff";
|
|
8
11
|
export declare function controlPlaneBaseUrl(): string;
|
|
@@ -11,6 +14,9 @@ export declare function currentBusiness(): MaybeBusiness | undefined;
|
|
|
11
14
|
export declare function currentBusinessId(): string;
|
|
12
15
|
export declare function currentBusinessLabel(): string;
|
|
13
16
|
export declare function currentBusinessSlug(): string | undefined;
|
|
17
|
+
export declare function currentBusinessName(): string;
|
|
18
|
+
export declare function currentBusinessCountry(): string | undefined;
|
|
19
|
+
export declare function currentBusinessLiveUrl(): string;
|
|
14
20
|
export declare function controlPlaneAuthorizationHeader(): Promise<string | null>;
|
|
15
21
|
export declare function authorizedFetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
16
22
|
export declare function controlPlaneFetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PreviewAnnotationItem } from '../composables/previewAnnotations';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: PreviewAnnotationItem[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
text: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
text: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BadgeVariant } from '../composables/status';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
variant?: BadgeVariant;
|
|
4
|
+
size?: 'sm' | 'md';
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
size: "sm" | "md";
|
|
12
|
+
variant: BadgeVariant;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PreviewAnnotationItem {
|
|
2
|
+
id: number;
|
|
3
|
+
note: string;
|
|
4
|
+
label: string;
|
|
5
|
+
route?: string;
|
|
6
|
+
device?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function wrapAnnotationPayload(items: PreviewAnnotationItem[]): string;
|
|
9
|
+
export declare function parseAnnotationMessage(text: string): PreviewAnnotationItem[] | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentSessionSummary, ConnectionStatus, ReleaseSummary } from './types';
|
|
2
|
+
export type BadgeVariant = 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'primary';
|
|
3
|
+
export declare function sessionStatusVariant(status: AgentSessionSummary['status']): BadgeVariant;
|
|
4
|
+
export declare function sessionStatusLabel(status: AgentSessionSummary['status']): string;
|
|
5
|
+
export declare function buildStatusVariant(status: string | null): BadgeVariant;
|
|
6
|
+
export declare function buildStatusLabel(status: string | null): string;
|
|
7
|
+
export declare function provisioningStatusLabel(status: string | null | undefined): string;
|
|
8
|
+
export declare function releaseDisplayStatus(release: ReleaseSummary): string;
|
|
9
|
+
export declare function releaseDisplayVariant(release: ReleaseSummary): BadgeVariant;
|
|
10
|
+
export declare function connectionStatusVariant(status: ConnectionStatus): BadgeVariant;
|
|
@@ -26,7 +26,26 @@ export interface ChatMessage {
|
|
|
26
26
|
busy: boolean;
|
|
27
27
|
errorText?: string;
|
|
28
28
|
}
|
|
29
|
-
export type ConnectionStatus = 'starting' | 'ready' | 'error';
|
|
29
|
+
export type ConnectionStatus = 'idle' | 'starting' | 'ready' | 'error';
|
|
30
|
+
export type ProjectProvisioningStatus = 'not_started' | 'provisioning' | 'ready' | 'failed';
|
|
31
|
+
export type ArchiveCodeAction = 'save' | 'discard';
|
|
32
|
+
export interface ProjectSummary {
|
|
33
|
+
businessId: string;
|
|
34
|
+
businessSlug: string | null;
|
|
35
|
+
repoName: string;
|
|
36
|
+
repoUrl: string;
|
|
37
|
+
v2Enabled: 0 | 1;
|
|
38
|
+
activeSessionId: string | null;
|
|
39
|
+
currentPublishedReleaseId: string | null;
|
|
40
|
+
rolloutStatus: 'disabled' | 'preview' | 'live' | 'rolled_back';
|
|
41
|
+
fallbackVersion: 'v1';
|
|
42
|
+
provisioningStatus: ProjectProvisioningStatus;
|
|
43
|
+
provisioningError: string | null;
|
|
44
|
+
provisionedAt: string | null;
|
|
45
|
+
repoInitialCommitSha: string | null;
|
|
46
|
+
createdAt: string | null;
|
|
47
|
+
updatedAt: string | null;
|
|
48
|
+
}
|
|
30
49
|
export interface AgentSessionSummary {
|
|
31
50
|
id: string;
|
|
32
51
|
title: string | null;
|
|
@@ -45,6 +64,20 @@ export interface AgentSessionSummary {
|
|
|
45
64
|
created_at: string;
|
|
46
65
|
updated_at: string;
|
|
47
66
|
}
|
|
67
|
+
export interface SessionChangesSummary {
|
|
68
|
+
businessId: string;
|
|
69
|
+
sessionId: string;
|
|
70
|
+
workspaceExists: boolean;
|
|
71
|
+
dirty: boolean;
|
|
72
|
+
hasUncommittedChanges: boolean;
|
|
73
|
+
hasUnpushedCommits: boolean;
|
|
74
|
+
headDiffersFromOrigin: boolean;
|
|
75
|
+
statusCount: number;
|
|
76
|
+
commitsAheadOrigin: number;
|
|
77
|
+
commitsBehindOrigin: number;
|
|
78
|
+
headSha: string | null;
|
|
79
|
+
originSha: string | null;
|
|
80
|
+
}
|
|
48
81
|
export interface ReleaseSummary {
|
|
49
82
|
id: string;
|
|
50
83
|
source_commit_sha: string;
|
|
@@ -16,6 +16,8 @@ export declare function useChat(): {
|
|
|
16
16
|
sessionId?: string;
|
|
17
17
|
readOnly?: boolean;
|
|
18
18
|
}) => Promise<void>;
|
|
19
|
+
reset: (message?: string) => void;
|
|
19
20
|
sendMessage: (text: string) => Promise<void>;
|
|
21
|
+
abort: () => Promise<void>;
|
|
20
22
|
};
|
|
21
23
|
export type ChatStore = ReturnType<typeof useChat>;
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
import type { ReleaseSummary } from './types';
|
|
1
|
+
import type { ArchiveCodeAction, ProjectSummary, ReleaseSummary, SessionChangesSummary } from './types';
|
|
2
2
|
export declare function useProject(): {
|
|
3
3
|
businessId: string;
|
|
4
|
+
project: {
|
|
5
|
+
businessId: string;
|
|
6
|
+
businessSlug: string | null;
|
|
7
|
+
repoName: string;
|
|
8
|
+
repoUrl: string;
|
|
9
|
+
v2Enabled: 0 | 1;
|
|
10
|
+
activeSessionId: string | null;
|
|
11
|
+
currentPublishedReleaseId: string | null;
|
|
12
|
+
rolloutStatus: "disabled" | "preview" | "live" | "rolled_back";
|
|
13
|
+
fallbackVersion: "v1";
|
|
14
|
+
provisioningStatus: import("./types").ProjectProvisioningStatus;
|
|
15
|
+
provisioningError: string | null;
|
|
16
|
+
provisionedAt: string | null;
|
|
17
|
+
repoInitialCommitSha: string | null;
|
|
18
|
+
createdAt: string | null;
|
|
19
|
+
updatedAt: string | null;
|
|
20
|
+
} | null;
|
|
4
21
|
sessions: {
|
|
5
22
|
id: string;
|
|
6
23
|
title: string | null;
|
|
@@ -72,29 +89,32 @@ export declare function useProject(): {
|
|
|
72
89
|
build_created_at: string | null;
|
|
73
90
|
build_completed_at: string | null;
|
|
74
91
|
} | null;
|
|
75
|
-
activeBuildStatus: "
|
|
92
|
+
activeBuildStatus: "failed" | "queued" | "running" | "succeeded" | null;
|
|
76
93
|
activeBuildLogsUrl: string | null;
|
|
94
|
+
isProvisioned: boolean;
|
|
95
|
+
isProvisioning: boolean;
|
|
96
|
+
provisioningFailed: boolean;
|
|
77
97
|
syncBusiness: () => void;
|
|
98
|
+
refreshProject: () => Promise<ProjectSummary>;
|
|
99
|
+
provisionProject: () => Promise<ProjectSummary>;
|
|
78
100
|
refreshSessions: () => Promise<void>;
|
|
79
101
|
refreshReleases: () => Promise<{
|
|
80
102
|
releases: ReleaseSummary[];
|
|
81
103
|
}>;
|
|
82
104
|
selectRelease: (releaseId: string) => Promise<void>;
|
|
83
|
-
createSession: (
|
|
105
|
+
createSession: (options?: {
|
|
106
|
+
archiveCodeAction?: ArchiveCodeAction;
|
|
107
|
+
}) => Promise<{
|
|
84
108
|
sessionId: string;
|
|
85
109
|
previewUrl: string;
|
|
86
110
|
}>;
|
|
111
|
+
sessionChanges: (sessionId: string) => Promise<SessionChangesSummary>;
|
|
87
112
|
resumeSession: (sessionId: string) => Promise<{
|
|
88
113
|
sessionId: string;
|
|
89
114
|
previewUrl: string;
|
|
90
115
|
}>;
|
|
91
116
|
renameSession: (sessionId: string, title: string) => Promise<void>;
|
|
92
|
-
|
|
93
|
-
sessionId: string;
|
|
94
|
-
previewUrl: string;
|
|
95
|
-
forkedFrom: string;
|
|
96
|
-
}>;
|
|
97
|
-
archive: (sessionId: string) => Promise<void>;
|
|
117
|
+
archive: (sessionId: string, codeAction?: ArchiveCodeAction) => Promise<void>;
|
|
98
118
|
commitSession: (sessionId: string) => Promise<{
|
|
99
119
|
sourceCommitSha: string;
|
|
100
120
|
}>;
|