@feedmepos/mf-miniprogram-v2 0.1.0-dev.1 → 0.1.0-dev.10

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/app.js CHANGED
@@ -3,7 +3,7 @@ const n = [
3
3
  {
4
4
  path: "/",
5
5
  name: "miniprogram-v2-control",
6
- component: () => import("./ControlPlaneView-4ax3O5Nf.js")
6
+ component: () => import("./ControlPlaneView-Bb24vi7u.js")
7
7
  },
8
8
  {
9
9
  path: "/:pathMatch(.*)*",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-miniprogram-v2",
3
- "version": "0.1.0-dev.1",
3
+ "version": "0.1.0-dev.10",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -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>;
@@ -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,7 @@ 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>;
20
21
  };
21
22
  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: "queued" | "running" | "succeeded" | "failed" | null;
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: () => Promise<{
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
- forkSession: (sessionId: string) => Promise<{
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
  }>;