@lowdefy/server-dev 0.0.0-experimental-20250926130521 → 0.0.0-experimental-20251015143743
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/LICENSE +183 -183
- package/manager/getContext.mjs +0 -5
- package/manager/processes/lowdefyBuild.mjs +1 -2
- package/package.json +29 -33
- package/package.original.json +29 -33
- package/pages/api/auth/[...nextauth].js +10 -10
- package/app/api/ai/[transport]/helpers/createContext.js +0 -60
- package/app/api/ai/[transport]/helpers/loadDocsAsArray.js +0 -32
- package/app/api/ai/[transport]/helpers/loadIndividualDoc.js +0 -32
- package/app/api/ai/[transport]/route.js +0 -63
- package/app/api/ai/[transport]/tools/executeRequest.js +0 -63
- package/app/api/ai/[transport]/tools/getAction.js +0 -51
- package/app/api/ai/[transport]/tools/getBlock.js +0 -51
- package/app/api/ai/[transport]/tools/getConnection.js +0 -51
- package/app/api/ai/[transport]/tools/getOperator.js +0 -51
- package/app/api/ai/[transport]/tools/getRequest.js +0 -56
- package/app/api/ai/[transport]/tools/listActions.js +0 -39
- package/app/api/ai/[transport]/tools/listBlocks.js +0 -39
- package/app/api/ai/[transport]/tools/listConnections.js +0 -39
- package/app/api/ai/[transport]/tools/listOperators.js +0 -39
- package/app/api/ai/[transport]/tools/listRequests.js +0 -44
- package/lib/server/validateLicense.js +0 -40
- package/pages/api/license.js +0 -22
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2024 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { z } from 'zod';
|
|
18
|
-
import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
|
|
19
|
-
|
|
20
|
-
export default [
|
|
21
|
-
'list_requests',
|
|
22
|
-
'Returns a list of all available Lowdefy requests for a specific connection type',
|
|
23
|
-
{
|
|
24
|
-
connectionType: z
|
|
25
|
-
.string()
|
|
26
|
-
.describe('The connection type to get requests for (e.g., "AxiosHttp", "MongoDBCollection")'),
|
|
27
|
-
},
|
|
28
|
-
async ({ connectionType }) => {
|
|
29
|
-
const requestList = loadDocsAsArray(`requests/${connectionType}`);
|
|
30
|
-
|
|
31
|
-
const formattedList = requestList
|
|
32
|
-
.map((request) => `- ${request.title}: ${request.description}`)
|
|
33
|
-
.join('\n');
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
content: [
|
|
37
|
-
{
|
|
38
|
-
type: 'text',
|
|
39
|
-
text: `Available requests for ${connectionType}:\n${formattedList}`,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
];
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (C) 2023 Lowdefy, Inc
|
|
3
|
-
Use of this software is governed by the Business Source License included in the LICENSE file and at www.mariadb.com/bsl11.
|
|
4
|
-
|
|
5
|
-
Change Date: 2027-10-09
|
|
6
|
-
|
|
7
|
-
On the date above, in accordance with the Business Source License, use
|
|
8
|
-
of this software will be governed by the Apache License, Version 2.0.
|
|
9
|
-
*/
|
|
10
|
-
import { keygenValidateLicense } from '@lowdefy/node-utils';
|
|
11
|
-
|
|
12
|
-
const config = {
|
|
13
|
-
dev: {
|
|
14
|
-
accountId: 'bf35f4ae-53a8-45c6-9eed-2d1fc9f53bd6',
|
|
15
|
-
productId: '4254760d-e760-4932-bb96-ba767e6ae780',
|
|
16
|
-
publicKey: 'MCowBQYDK2VwAyEAN27y1DiHiEDYFbNGjgfFdWygxrVSetq6rApWq3psJZI=',
|
|
17
|
-
},
|
|
18
|
-
prod: {
|
|
19
|
-
accountId: '63b3d4e4-39e1-4ccc-8c58-6b8f97ddf4fa',
|
|
20
|
-
productId: 'd19a5af0-4147-4a65-8b6d-0706d7804bc1',
|
|
21
|
-
publicKey: 'MCowBQYDK2VwAyEAFPoseE3gi+YsJziigc1kFKOkdUIBiUMd9RZujTh23Fc=',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
let license;
|
|
26
|
-
|
|
27
|
-
async function validateLicense() {
|
|
28
|
-
if (license) {
|
|
29
|
-
// Check cached license every 24 hours
|
|
30
|
-
if (license?.timestamp?.valueOf?.() > Date.now() - 1000 * 60 * 60 * 24) {
|
|
31
|
-
return license;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
license = await keygenValidateLicense({
|
|
35
|
-
config: config[process.env.LOWDEFY_LICENSE_ENV ?? 'prod'],
|
|
36
|
-
});
|
|
37
|
-
return license;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export default validateLicense;
|
package/pages/api/license.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (C) 2023 Lowdefy, Inc
|
|
3
|
-
Use of this software is governed by the Business Source License included in the LICENSE file and at www.mariadb.com/bsl11.
|
|
4
|
-
|
|
5
|
-
Change Date: 2027-10-09
|
|
6
|
-
|
|
7
|
-
On the date above, in accordance with the Business Source License, use
|
|
8
|
-
of this software will be governed by the Apache License, Version 2.0.
|
|
9
|
-
*/
|
|
10
|
-
import apiWrapper from '../../lib/server/apiWrapper.js';
|
|
11
|
-
import validateLicense from '../../lib/server/validateLicense.js';
|
|
12
|
-
|
|
13
|
-
async function handler({ req, res }) {
|
|
14
|
-
if (req.method !== 'GET') {
|
|
15
|
-
throw new Error('Only GET requests are supported.');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const { code, entitlements } = await validateLicense();
|
|
19
|
-
return res.status(200).json({ code, entitlements });
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default apiWrapper(handler);
|