feat(12): Add frontend API methods for app linking

This commit is contained in:
Juan Denis committed 2026-01-19 10:31:51 -05:00
1 parent 748577149c
commit 46f6f3a869
1 file changed
+30
+30
View File
@@ -249,6 +249,36 @@ class ApiService {
return this.request(`/apps/${id}/restart`, { method: 'POST' });
}
// App linking endpoints
async linkApp(appId, targetAppId, asEnvironment, options = {}) {
return this.request(`/apps/${appId}/link`, {
method: 'POST',
body: {
target_app_id: targetAppId,
as_environment: asEnvironment,
propagate_credentials: options.propagateCredentials !== false,
table_prefix: options.tablePrefix
}
});
}
async getLinkedApps(appId) {
return this.request(`/apps/${appId}/linked`);
}
async unlinkApp(appId) {
return this.request(`/apps/${appId}/link`, {
method: 'DELETE'
});
}
async updateAppEnvironment(appId, environmentType) {
return this.request(`/apps/${appId}/environment`, {
method: 'PUT',
body: { environment_type: environmentType }
});
}
// Domains endpoints
async getDomains() {
return this.request('/domains');