@feedmepos/mf-miniprogram-v2 0.2.2-dev.22 → 0.2.2-dev.23

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.
@@ -0,0 +1,85 @@
1
+ const r = (e, s) => `/api/businesses/${e}/projects/${s}`, i = {
2
+ projects: (e) => `/api/businesses/${e}/projects`,
3
+ portalContext: (e) => `/api/businesses/${e}/portal-context`,
4
+ project: (e, s) => r(e, s),
5
+ provision: (e, s) => `${r(e, s)}/provision`,
6
+ refreshSlug: (e, s) => `${r(e, s)}/refresh-slug`,
7
+ sessions: (e, s) => `${r(e, s)}/sessions`,
8
+ session: (e, s, a) => `${r(e, s)}/sessions/${a}`,
9
+ messages: (e, s, a) => `${i.session(e, s, a)}/messages`,
10
+ startStatus: (e, s, a) => `${i.session(e, s, a)}/start-status`,
11
+ changes: (e, s, a, t = !1) => `${i.session(e, s, a)}/changes${t ? "?refresh=1" : ""}`,
12
+ checkpoints: (e, s, a) => `${i.session(e, s, a)}/checkpoints`,
13
+ aiBillingPreflight: (e, s, a) => `${i.session(e, s, a)}/ai-billing/preflight`,
14
+ restoreCheckpoint: (e, s, a, t) => `${i.checkpoints(e, s, a)}/${t}/restore`,
15
+ previewBridgeTicket: (e, s, a) => `${i.session(e, s, a)}/preview-bridge/ticket`,
16
+ previewBridgeSocket: (e, s, a) => `${i.session(e, s, a)}/preview-bridge/socket`,
17
+ uploads: (e, s, a, t = "") => `${i.session(e, s, a)}/uploads${t ? `?${t}` : ""}`,
18
+ archive: (e, s, a) => `${i.session(e, s, a)}/archive`,
19
+ commit: (e, s, a) => `${i.session(e, s, a)}/commit`,
20
+ resume: (e, s, a) => `${i.session(e, s, a)}/resume`,
21
+ restartPreview: (e, s, a) => `${i.session(e, s, a)}/restart-preview`,
22
+ fork: (e, s, a) => `${i.session(e, s, a)}/fork`,
23
+ flushEvents: (e, s, a) => `${i.session(e, s, a)}/events/flush`,
24
+ revertTurn: (e, s, a) => `${i.session(e, s, a)}/turns/revert`,
25
+ unrevertTurn: (e, s, a) => `${i.session(e, s, a)}/turns/unrevert`,
26
+ releases: (e, s) => `${r(e, s)}/releases`,
27
+ /** Internal-admin only. Extracts a new restaurant style out of a session's
28
+ * verified checkpoint and, once confirmed, opens a PR against this repo. */
29
+ publishAsTemplate: (e, s) => `${r(e, s)}/publish-as-template`,
30
+ publishRelease: (e, s, a) => `${i.releases(e, s)}/${a}/publish`,
31
+ releasePreviewUrl: (e, s, a) => `${i.releases(e, s)}/${a}/preview-url`,
32
+ rollbackToRelease: (e, s, a) => `${r(e, s)}/rollback-to-release/${a}`,
33
+ rollbackToV1: (e, s) => `${r(e, s)}/rollback-to-v1`,
34
+ start: (e, s, a) => {
35
+ const t = new URLSearchParams();
36
+ e && t.set("businessId", e), s && t.set("projectId", s), a && t.set("sessionId", a);
37
+ const p = t.toString();
38
+ return `/api/start${p ? `?${p}` : ""}`;
39
+ },
40
+ opencode: (e = "") => `/api/opencode${e ? `/${e.replace(/^\/+/, "")}` : ""}`,
41
+ /** The shared component library's catalog. Deliberately not under a
42
+ * business/project path: the library belongs to no business, and the
43
+ * module centre is not inside a workspace. */
44
+ componentLibraryCatalog: () => "/api/component-library/catalog",
45
+ /** The self-contained preview document the module centre frames. Fetched with
46
+ * the portal's bearer and assigned to an iframe's `srcdoc`, never used as an
47
+ * `<iframe src>` — a navigation request carries no Authorization header,
48
+ * which is what a signed URL would otherwise exist to work around. */
49
+ componentLibraryPreview: () => "/api/component-library/preview",
50
+ /** The application templates this environment can provision, for the portal's
51
+ * picker. Not under a business/project path: the answer is a property of
52
+ * the environment, and it is needed BEFORE a project exists. */
53
+ appTemplates: () => "/api/app-templates",
54
+ /** Whether the caller is an internal admin — for the portal to decide whether to
55
+ * show internal-only entry points such as the Template Center. The real
56
+ * enforcement is on every admin route itself; this is a UI convenience. */
57
+ adminWhoami: () => "/api/admin/whoami",
58
+ /** Template Center: fork an existing physical template directory into a
59
+ * brand-new one, as a PR against this repo (see `template-fork.ts`). Not
60
+ * project-scoped — a physical template belongs to no business. */
61
+ forkAppTemplate: () => "/api/admin/app-templates/fork",
62
+ /** Template Center: delete an existing physical template directory, as a PR
63
+ * against this repo. Refused for the default template or one any project
64
+ * still references — see the endpoint's own doc comment. */
65
+ deleteAppTemplate: (e) => `/api/admin/app-templates/${e}/delete`,
66
+ /** Template Center: physical templates whose "create template" or "delete
67
+ * template" PR is still open — read live from GitHub, not a stored list,
68
+ * so a row disappears the moment its PR merges or is closed. */
69
+ pendingTemplateChanges: () => "/api/admin/app-templates/pending-changes",
70
+ /** Template Center: merge a pending template change's PR directly from the
71
+ * "In review" list, without leaving the portal. Refuses to act on
72
+ * anything that is not itself a pending template create/delete PR. */
73
+ mergePendingTemplateChange: (e) => `/api/admin/app-templates/pending-changes/${e}/merge`,
74
+ /** Template Center: close a pending template change's PR without merging
75
+ * and delete its branch — the "In review" list's reject action. */
76
+ rejectPendingTemplateChange: (e) => `/api/admin/app-templates/pending-changes/${e}/reject`,
77
+ /** Template Center: find-or-create the template-editing project a
78
+ * physical template edits through — the same chat/preview/checkpoint
79
+ * workspace a merchant project gets, pointed at `templates/<id>/` in this
80
+ * repo instead. Internal-admin only. */
81
+ appTemplateEditingProject: (e) => `/api/admin/app-templates/${e}/editing-project`
82
+ };
83
+ export {
84
+ i as a
85
+ };