1 | const { SquidexClientManager } = require('squidex-client-manager');
|
2 | require('dotenv').config();
|
3 |
|
4 | const main = async () => {
|
5 | const clientSecret = process.env.SQUIDEX_CLIENT_SECRET;
|
6 | const clientId = process.env.SQUIDEX_CLIENT_ID;
|
7 | const url = process.env.SQUIDEX_CONNECT_URL;
|
8 | const appName = process.env.APP_NAME;
|
9 |
|
10 | const client = new SquidexClientManager(url, appName, clientId, clientSecret);
|
11 | const input = { data: { title: { iv: 'Hello Squidex' } }, publish: true };
|
12 | const filter = await client.FilterRecordsAsync('Articles', input, 'title');
|
13 | console.log(JSON.stringify(filter, null, 2));
|
14 | };
|
15 |
|
16 | main();
|