Skip to content

Commit

Permalink
Merge branch 'dev' into sandrosov/BL-9/Add-a-way-to-create-deployment…
Browse files Browse the repository at this point in the history
…-model-from-coding-page--dev
  • Loading branch information
macbookpro committed Mar 27, 2024
2 parents 9e2b18a + c3428eb commit 80d5715
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backendless-console-sdk",
"version": "2.27.0",
"version": "2.28.0",
"description": "Backendless Console SDK for Node.js and browser",
"browser": "dist/backendless-console-sdk.js",
"main": "lib/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import projectTemplate from './project-template'
import security from './security'
import devPermissions, { DevPermissions } from './dev-permissions'
import openAI from './open-ai'
import integrations from './integrations'
import settings from './settings'
import status from './status'
import tables from './tables'
Expand All @@ -44,6 +45,7 @@ import uiBuilder from './ui-builder'
import chartBuilder from './chart-builder'
import visualizations from './visualizations'
import consolePreview from './console-preview'
import quickApps from './quick-apps'

import { community } from './community'
import { marketplace } from './marketplace'
Expand Down Expand Up @@ -208,6 +210,8 @@ const createClient = (serverUrl, authKey, options) => {
visualizations : visualizations(request),
initialQuestionnaire: initialQuestionnaire(request),
consolePreview : consolePreview(request),
quickApps : quickApps(request),
integrations : integrations(request),
}
}

Expand Down
15 changes: 15 additions & 0 deletions src/integrations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import urls from './urls'

export default req => ({
loadOpenAIData(appId) {
return req.get(urls.integrations(appId))
},

saveOpenAIData(appId, aiData) {
return req.post(urls.integrations(appId), aiData)
},

deleteOpenAIData(appId) {
return req.delete(urls.integrations(appId))
},
})
32 changes: 32 additions & 0 deletions src/quick-apps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* eslint-disable max-len */
import { prepareRoutes } from './utils/routes'

const routes = prepareRoutes({
containers: '/api/app/:appId/quick-apps/containers',
container : '/api/app/:appId/quick-apps/containers/:containerId',
deploy : '/api/app/:appId/quick-apps/deploy/:containerId',
})

export default req => ({

loadContainers(appId) {
return req.get(routes.containers(appId))
},

loadContainer(appId, containerId) {
return req.get(routes.container(appId, containerId))
},

createContainer(appId, data) {
return req.post(routes.containers(appId), data)
},

deleteContainer(appId, containerId) {
return req.delete(routes.containers(appId, containerId))
},

deployContainer(appId, containerId, data) {
return req.post(routes.deploy(appId, containerId), data)
},

})
3 changes: 3 additions & 0 deletions src/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ export const emailTemplates = (appId, templateName) => `${appConsole(appId)}/ema

export const installEmailTemplate = (appId, productId) => `${appConsole(appId)}/email-templates/install/${productId}`

export const integrations = appId => `${appConsole(appId)}/integrations/openAI`

export const apiDocs = appId => `${appConsole(appId)}/api-docs`
export const apiDocsDataTable = (appId, tableName) => `${apiDocs(appId)}/data/table/${tableName}`
export const apiDocsMessagingChannel = (appId, channelName) => `${apiDocs(appId)}/messaging/channel/${channelName}`
Expand Down Expand Up @@ -236,6 +238,7 @@ export default {
directoryView,
geo,
installEmailTemplate,
integrations,
landingPage,
mailSettings,
marketplace,
Expand Down

0 comments on commit 80d5715

Please sign in to comment.