|
17 | 17 | * along with this program. If not, see <https://www.gnu.org/licenses/>.
|
18 | 18 | */
|
19 | 19 | const { AdvancedBase } = require("@heyputer/puter-js-common");
|
| 20 | +const { NotificationES } = require("./om/entitystorage/NotificationES"); |
20 | 21 | const { Context } = require('./util/context');
|
21 | 22 |
|
22 | 23 |
|
@@ -89,6 +90,8 @@ const install = async ({ services, app, useapi }) => {
|
89 | 90 | const SubdomainES = require('./om/entitystorage/SubdomainES');
|
90 | 91 | const { MaxLimitES } = require('./om/entitystorage/MaxLimitES');
|
91 | 92 | const { AppLimitedES } = require('./om/entitystorage/AppLimitedES');
|
| 93 | + const { ReadOnlyES } = require('./om/entitystorage/ReadOnlyES'); |
| 94 | + const { OwnerLimitedES } = require('./om/entitystorage/OwnerLimitedES'); |
92 | 95 | const { ESBuilder } = require('./om/entitystorage/ESBuilder');
|
93 | 96 | const { Eq, Or } = require('./om/query/query');
|
94 | 97 | const { TrackSpendingService } = require('./services/TrackSpendingService');
|
@@ -165,6 +168,17 @@ const install = async ({ services, app, useapi }) => {
|
165 | 168 | MaxLimitES, { max: 5000 },
|
166 | 169 | ]),
|
167 | 170 | });
|
| 171 | + services.registerService('es:notification', EntityStoreService, { |
| 172 | + entity: 'notification', |
| 173 | + upstream: ESBuilder.create([ |
| 174 | + SQLES, { table: 'notification', debug: true }, |
| 175 | + NotificationES, |
| 176 | + OwnerLimitedES, |
| 177 | + ReadOnlyES, |
| 178 | + SetOwnerES, |
| 179 | + MaxLimitES, { max: 50 }, |
| 180 | + ]), |
| 181 | + }) |
168 | 182 | services.registerService('rate-limit', RateLimitService);
|
169 | 183 | services.registerService('monthly-usage', MonthlyUsageService);
|
170 | 184 | services.registerService('auth', AuthService);
|
|
0 commit comments