@budibase/backend-core 3.2.41 → 3.2.43
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/dist/package.json +3 -3
- package/dist/src/accounts/accounts.js +83 -0
- package/dist/src/accounts/accounts.js.map +1 -0
- package/dist/src/accounts/api.js +102 -0
- package/dist/src/accounts/api.js.map +1 -0
- package/dist/src/accounts/index.js +18 -0
- package/dist/src/accounts/index.js.map +1 -0
- package/dist/src/cache/appMetadata.js +96 -0
- package/dist/src/cache/appMetadata.js.map +1 -0
- package/dist/src/cache/base/index.js +189 -0
- package/dist/src/cache/base/index.js.map +1 -0
- package/dist/src/cache/docWritethrough.js +123 -0
- package/dist/src/cache/docWritethrough.js.map +1 -0
- package/dist/src/cache/generic.js +37 -0
- package/dist/src/cache/generic.js.map +1 -0
- package/dist/src/cache/index.js +48 -0
- package/dist/src/cache/index.js.map +1 -0
- package/dist/src/cache/invite.js +128 -0
- package/dist/src/cache/invite.js.map +1 -0
- package/dist/src/cache/passwordReset.js +92 -0
- package/dist/src/cache/passwordReset.js.map +1 -0
- package/dist/src/cache/user.js +183 -0
- package/dist/src/cache/user.js.map +1 -0
- package/dist/src/cache/writethrough.js +170 -0
- package/dist/src/cache/writethrough.js.map +1 -0
- package/dist/src/configs/configs.js +294 -0
- package/dist/src/configs/configs.js.map +1 -0
- package/dist/src/configs/index.js +18 -0
- package/dist/src/configs/index.js.map +1 -0
- package/dist/src/constants/db.js +75 -0
- package/dist/src/constants/db.js.map +1 -0
- package/dist/src/constants/index.js +19 -0
- package/dist/src/constants/index.js.map +1 -0
- package/dist/src/constants/misc.js +40 -0
- package/dist/src/constants/misc.js.map +1 -0
- package/dist/src/context/Context.js +14 -0
- package/dist/src/context/Context.js.map +1 -0
- package/dist/src/context/identity.js +81 -0
- package/dist/src/context/identity.js.map +1 -0
- package/dist/src/context/index.js +44 -0
- package/dist/src/context/index.js.map +1 -0
- package/dist/src/context/mainContext.js +446 -0
- package/dist/src/context/mainContext.js.map +1 -0
- package/dist/src/context/types.js +3 -0
- package/dist/src/context/types.js.map +1 -0
- package/dist/src/db/Replication.js +90 -0
- package/dist/src/db/Replication.js.map +1 -0
- package/dist/src/db/couch/DatabaseImpl.js +475 -0
- package/dist/src/db/couch/DatabaseImpl.js.map +1 -0
- package/dist/src/db/couch/connections.js +101 -0
- package/dist/src/db/couch/connections.js.map +1 -0
- package/dist/src/db/couch/index.js +26 -0
- package/dist/src/db/couch/index.js.map +1 -0
- package/dist/src/db/couch/pouchDB.js +108 -0
- package/dist/src/db/couch/pouchDB.js.map +1 -0
- package/dist/src/db/couch/utils.js +60 -0
- package/dist/src/db/couch/utils.js.map +1 -0
- package/dist/src/db/db.js +47 -0
- package/dist/src/db/db.js.map +1 -0
- package/dist/src/db/errors.js +21 -0
- package/dist/src/db/errors.js.map +1 -0
- package/dist/src/db/index.js +58 -0
- package/dist/src/db/index.js.map +1 -0
- package/dist/src/db/instrumentation.js +202 -0
- package/dist/src/db/instrumentation.js.map +1 -0
- package/dist/src/db/lucene.js +638 -0
- package/dist/src/db/lucene.js.map +1 -0
- package/dist/src/db/searchIndexes/index.js +18 -0
- package/dist/src/db/searchIndexes/index.js.map +1 -0
- package/dist/src/db/searchIndexes/searchIndexes.js +76 -0
- package/dist/src/db/searchIndexes/searchIndexes.js.map +1 -0
- package/dist/src/db/utils.js +212 -0
- package/dist/src/db/utils.js.map +1 -0
- package/dist/src/db/views.js +224 -0
- package/dist/src/db/views.js.map +1 -0
- package/dist/src/docIds/conversions.js +62 -0
- package/dist/src/docIds/conversions.js.map +1 -0
- package/dist/src/docIds/ids.js +125 -0
- package/dist/src/docIds/ids.js.map +1 -0
- package/dist/src/docIds/index.js +19 -0
- package/dist/src/docIds/index.js.map +1 -0
- package/dist/src/docIds/newid.js +8 -0
- package/dist/src/docIds/newid.js.map +1 -0
- package/dist/src/docIds/params.js +141 -0
- package/dist/src/docIds/params.js.map +1 -0
- package/dist/src/environment.js +182 -0
- package/dist/src/environment.js.map +1 -0
- package/dist/src/errors/errors.js +97 -0
- package/dist/src/errors/errors.js.map +1 -0
- package/dist/src/errors/index.js +18 -0
- package/dist/src/errors/index.js.map +1 -0
- package/dist/src/events/analytics.js +52 -0
- package/dist/src/events/analytics.js.map +1 -0
- package/dist/src/events/asyncEvents/index.js +19 -0
- package/dist/src/events/asyncEvents/index.js.map +1 -0
- package/dist/src/events/asyncEvents/publisher.js +26 -0
- package/dist/src/events/asyncEvents/publisher.js.map +1 -0
- package/dist/src/events/asyncEvents/queue.js +26 -0
- package/dist/src/events/asyncEvents/queue.js.map +1 -0
- package/dist/src/events/backfill.js +189 -0
- package/dist/src/events/backfill.js.map +1 -0
- package/dist/src/events/events.js +87 -0
- package/dist/src/events/events.js.map +1 -0
- package/dist/src/events/identification.js +299 -0
- package/dist/src/events/identification.js.map +1 -0
- package/dist/src/events/index.js +59 -0
- package/dist/src/events/index.js.map +1 -0
- package/dist/src/events/processors/AnalyticsProcessor.js +103 -0
- package/dist/src/events/processors/AnalyticsProcessor.js.map +1 -0
- package/dist/src/events/processors/AuditLogsProcessor.js +86 -0
- package/dist/src/events/processors/AuditLogsProcessor.js.map +1 -0
- package/dist/src/events/processors/LoggingProcessor.js +47 -0
- package/dist/src/events/processors/LoggingProcessor.js.map +1 -0
- package/dist/src/events/processors/Processors.js +52 -0
- package/dist/src/events/processors/Processors.js.map +1 -0
- package/dist/src/events/processors/index.js +23 -0
- package/dist/src/events/processors/index.js.map +1 -0
- package/dist/src/events/processors/posthog/PosthogProcessor.js +147 -0
- package/dist/src/events/processors/posthog/PosthogProcessor.js.map +1 -0
- package/dist/src/events/processors/posthog/index.js +8 -0
- package/dist/src/events/processors/posthog/index.js.map +1 -0
- package/dist/src/events/processors/posthog/rateLimiting.js +129 -0
- package/dist/src/events/processors/posthog/rateLimiting.js.map +1 -0
- package/dist/src/events/processors/types.js +3 -0
- package/dist/src/events/processors/types.js.map +1 -0
- package/dist/src/events/publishers/account.js +43 -0
- package/dist/src/events/publishers/account.js.map +1 -0
- package/dist/src/events/publishers/ai.js +30 -0
- package/dist/src/events/publishers/ai.js.map +1 -0
- package/dist/src/events/publishers/app.js +166 -0
- package/dist/src/events/publishers/app.js.map +1 -0
- package/dist/src/events/publishers/auditLog.js +34 -0
- package/dist/src/events/publishers/auditLog.js.map +1 -0
- package/dist/src/events/publishers/auth.js +80 -0
- package/dist/src/events/publishers/auth.js.map +1 -0
- package/dist/src/events/publishers/automation.js +117 -0
- package/dist/src/events/publishers/automation.js.map +1 -0
- package/dist/src/events/publishers/backfill.js +85 -0
- package/dist/src/events/publishers/backfill.js.map +1 -0
- package/dist/src/events/publishers/backup.js +41 -0
- package/dist/src/events/publishers/backup.js.map +1 -0
- package/dist/src/events/publishers/datasource.js +54 -0
- package/dist/src/events/publishers/datasource.js.map +1 -0
- package/dist/src/events/publishers/email.js +30 -0
- package/dist/src/events/publishers/email.js.map +1 -0
- package/dist/src/events/publishers/environmentVariable.js +44 -0
- package/dist/src/events/publishers/environmentVariable.js.map +1 -0
- package/dist/src/events/publishers/group.js +107 -0
- package/dist/src/events/publishers/group.js.map +1 -0
- package/dist/src/events/publishers/index.js +59 -0
- package/dist/src/events/publishers/index.js.map +1 -0
- package/dist/src/events/publishers/installation.js +52 -0
- package/dist/src/events/publishers/installation.js.map +1 -0
- package/dist/src/events/publishers/layout.js +34 -0
- package/dist/src/events/publishers/layout.js.map +1 -0
- package/dist/src/events/publishers/license.js +77 -0
- package/dist/src/events/publishers/license.js.map +1 -0
- package/dist/src/events/publishers/org.js +52 -0
- package/dist/src/events/publishers/org.js.map +1 -0
- package/dist/src/events/publishers/plugin.js +55 -0
- package/dist/src/events/publishers/plugin.js.map +1 -0
- package/dist/src/events/publishers/query.js +73 -0
- package/dist/src/events/publishers/query.js.map +1 -0
- package/dist/src/events/publishers/role.js +69 -0
- package/dist/src/events/publishers/role.js.map +1 -0
- package/dist/src/events/publishers/rowAction.js +22 -0
- package/dist/src/events/publishers/rowAction.js.map +1 -0
- package/dist/src/events/publishers/rows.js +31 -0
- package/dist/src/events/publishers/rows.js.map +1 -0
- package/dist/src/events/publishers/screen.js +46 -0
- package/dist/src/events/publishers/screen.js.map +1 -0
- package/dist/src/events/publishers/serve.js +47 -0
- package/dist/src/events/publishers/serve.js.map +1 -0
- package/dist/src/events/publishers/table.js +95 -0
- package/dist/src/events/publishers/table.js.map +1 -0
- package/dist/src/events/publishers/user.js +201 -0
- package/dist/src/events/publishers/user.js.map +1 -0
- package/dist/src/events/publishers/view.js +123 -0
- package/dist/src/events/publishers/view.js.map +1 -0
- package/dist/src/helpers.js +13 -0
- package/dist/src/helpers.js.map +1 -0
- package/dist/src/installation.js +159 -0
- package/dist/src/installation.js.map +1 -0
- package/dist/src/logging/alerts.js +23 -0
- package/dist/src/logging/alerts.js.map +1 -0
- package/dist/src/logging/correlation/correlation.js +18 -0
- package/dist/src/logging/correlation/correlation.js.map +1 -0
- package/dist/src/logging/correlation/index.js +18 -0
- package/dist/src/logging/correlation/index.js.map +1 -0
- package/dist/src/logging/index.js +45 -0
- package/dist/src/logging/index.js.map +1 -0
- package/dist/src/logging/pino/logger.js +234 -0
- package/dist/src/logging/pino/logger.js.map +1 -0
- package/dist/src/logging/system.js +110 -0
- package/dist/src/logging/system.js.map +1 -0
- package/dist/src/objectStore/buckets/app.js +95 -0
- package/dist/src/objectStore/buckets/app.js.map +1 -0
- package/dist/src/objectStore/buckets/global.js +68 -0
- package/dist/src/objectStore/buckets/global.js.map +1 -0
- package/dist/src/objectStore/buckets/index.js +20 -0
- package/dist/src/objectStore/buckets/index.js.map +1 -0
- package/dist/src/objectStore/buckets/plugins.js +104 -0
- package/dist/src/objectStore/buckets/plugins.js.map +1 -0
- package/dist/src/objectStore/cloudfront.js +73 -0
- package/dist/src/objectStore/cloudfront.js.map +1 -0
- package/dist/src/objectStore/index.js +20 -0
- package/dist/src/objectStore/index.js.map +1 -0
- package/dist/src/objectStore/objectStore.js +509 -0
- package/dist/src/objectStore/objectStore.js.map +1 -0
- package/dist/src/objectStore/utils.js +148 -0
- package/dist/src/objectStore/utils.js.map +1 -0
- package/dist/src/platform/index.js +43 -0
- package/dist/src/platform/index.js.map +1 -0
- package/dist/src/platform/platformDb.js +9 -0
- package/dist/src/platform/platformDb.js.map +1 -0
- package/dist/src/platform/tenants.js +149 -0
- package/dist/src/platform/tenants.js.map +1 -0
- package/dist/src/platform/users.js +118 -0
- package/dist/src/platform/users.js.map +1 -0
- package/dist/src/queue/constants.js +13 -0
- package/dist/src/queue/constants.js.map +1 -0
- package/dist/src/queue/inMemoryQueue.js +192 -0
- package/dist/src/queue/inMemoryQueue.js.map +1 -0
- package/dist/src/queue/index.js +19 -0
- package/dist/src/queue/index.js.map +1 -0
- package/dist/src/queue/listeners.js +199 -0
- package/dist/src/queue/listeners.js.map +1 -0
- package/dist/src/queue/queue.js +124 -0
- package/dist/src/queue/queue.js.map +1 -0
- package/dist/src/redis/index.js +47 -0
- package/dist/src/redis/index.js.map +1 -0
- package/dist/src/redis/init.js +184 -0
- package/dist/src/redis/init.js.map +1 -0
- package/dist/src/redis/redis.js +396 -0
- package/dist/src/redis/redis.js.map +1 -0
- package/dist/src/redis/redlockImpl.js +181 -0
- package/dist/src/redis/redlockImpl.js.map +1 -0
- package/dist/src/redis/utils.js +131 -0
- package/dist/src/redis/utils.js.map +1 -0
- package/dist/src/security/auth.js +26 -0
- package/dist/src/security/auth.js.map +1 -0
- package/dist/src/security/index.js +18 -0
- package/dist/src/security/index.js.map +1 -0
- package/dist/src/security/roles.js +566 -0
- package/dist/src/security/roles.js.map +1 -0
- package/dist/src/security/sessions.js +156 -0
- package/dist/src/security/sessions.js.map +1 -0
- package/dist/src/sql/utils.js +180 -0
- package/dist/src/sql/utils.js.map +1 -0
- package/dist/src/tenancy/db.js +9 -0
- package/dist/src/tenancy/db.js.map +1 -0
- package/dist/src/tenancy/index.js +19 -0
- package/dist/src/tenancy/index.js.map +1 -0
- package/dist/src/tenancy/tenancy.js +125 -0
- package/dist/src/tenancy/tenancy.js.map +1 -0
- package/dist/src/timers/index.js +18 -0
- package/dist/src/timers/index.js.map +1 -0
- package/dist/src/timers/timers.js +25 -0
- package/dist/src/timers/timers.js.map +1 -0
- package/dist/src/users/db.js +489 -0
- package/dist/src/users/db.js.map +1 -0
- package/dist/src/users/events.js +179 -0
- package/dist/src/users/events.js.map +1 -0
- package/dist/src/users/index.js +23 -0
- package/dist/src/users/index.js.map +1 -0
- package/dist/src/users/lookup.js +126 -0
- package/dist/src/users/lookup.js.map +1 -0
- package/dist/src/users/users.js +376 -0
- package/dist/src/users/users.js.map +1 -0
- package/dist/src/users/utils.js +127 -0
- package/dist/src/users/utils.js.map +1 -0
- package/dist/src/utils/Duration.js +54 -0
- package/dist/src/utils/Duration.js.map +1 -0
- package/dist/src/utils/hashing.js +46 -0
- package/dist/src/utils/hashing.js.map +1 -0
- package/dist/src/utils/index.js +21 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/utils/stringUtils.js +8 -0
- package/dist/src/utils/stringUtils.js.map +1 -0
- package/dist/src/utils/utils.js +267 -0
- package/dist/src/utils/utils.js.map +1 -0
- package/dist/tests/core/logging.js +33 -0
- package/dist/tests/core/logging.js.map +1 -0
- package/dist/tests/core/utilities/index.js +48 -0
- package/dist/tests/core/utilities/index.js.map +1 -0
- package/dist/tests/core/utilities/jestUtils.js +21 -0
- package/dist/tests/core/utilities/jestUtils.js.map +1 -0
- package/dist/tests/core/utilities/mocks/alerts.js +40 -0
- package/dist/tests/core/utilities/mocks/alerts.js.map +1 -0
- package/dist/tests/core/utilities/mocks/date.js +6 -0
- package/dist/tests/core/utilities/mocks/date.js.map +1 -0
- package/dist/tests/core/utilities/mocks/events.js +155 -0
- package/dist/tests/core/utilities/mocks/events.js.map +1 -0
- package/dist/tests/core/utilities/mocks/index.js +47 -0
- package/dist/tests/core/utilities/mocks/index.js.map +1 -0
- package/dist/tests/core/utilities/mocks/licenses.js +109 -0
- package/dist/tests/core/utilities/mocks/licenses.js.map +1 -0
- package/dist/tests/core/utilities/queue.js +21 -0
- package/dist/tests/core/utilities/queue.js.map +1 -0
- package/dist/tests/core/utilities/structures/Chance.js +21 -0
- package/dist/tests/core/utilities/structures/Chance.js.map +1 -0
- package/dist/tests/core/utilities/structures/accounts.js +43 -0
- package/dist/tests/core/utilities/structures/accounts.js.map +1 -0
- package/dist/tests/core/utilities/structures/apps.js +23 -0
- package/dist/tests/core/utilities/structures/apps.js.map +1 -0
- package/dist/tests/core/utilities/structures/common.js +11 -0
- package/dist/tests/core/utilities/structures/common.js.map +1 -0
- package/dist/tests/core/utilities/structures/db.js +15 -0
- package/dist/tests/core/utilities/structures/db.js.map +1 -0
- package/dist/tests/core/utilities/structures/documents/index.js +18 -0
- package/dist/tests/core/utilities/structures/documents/index.js.map +1 -0
- package/dist/tests/core/utilities/structures/documents/platform/index.js +38 -0
- package/dist/tests/core/utilities/structures/documents/platform/index.js.map +1 -0
- package/dist/tests/core/utilities/structures/documents/platform/installation.js +47 -0
- package/dist/tests/core/utilities/structures/documents/platform/installation.js.map +1 -0
- package/dist/tests/core/utilities/structures/generator.js +9 -0
- package/dist/tests/core/utilities/structures/generator.js.map +1 -0
- package/dist/tests/core/utilities/structures/index.js +56 -0
- package/dist/tests/core/utilities/structures/index.js.map +1 -0
- package/dist/tests/core/utilities/structures/koa.js +10 -0
- package/dist/tests/core/utilities/structures/koa.js.map +1 -0
- package/dist/tests/core/utilities/structures/licenses.js +157 -0
- package/dist/tests/core/utilities/structures/licenses.js.map +1 -0
- package/dist/tests/core/utilities/structures/plugins.js +22 -0
- package/dist/tests/core/utilities/structures/plugins.js.map +1 -0
- package/dist/tests/core/utilities/structures/quotas.js +73 -0
- package/dist/tests/core/utilities/structures/quotas.js.map +1 -0
- package/dist/tests/core/utilities/structures/scim.js +62 -0
- package/dist/tests/core/utilities/structures/scim.js.map +1 -0
- package/dist/tests/core/utilities/structures/sso.js +140 -0
- package/dist/tests/core/utilities/structures/sso.js.map +1 -0
- package/dist/tests/core/utilities/structures/tenants.js +8 -0
- package/dist/tests/core/utilities/structures/tenants.js.map +1 -0
- package/dist/tests/core/utilities/structures/userGroups.js +12 -0
- package/dist/tests/core/utilities/structures/userGroups.js.map +1 -0
- package/dist/tests/core/utilities/structures/users.js +53 -0
- package/dist/tests/core/utilities/structures/users.js.map +1 -0
- package/dist/tests/core/utilities/testContainerUtils.js +161 -0
- package/dist/tests/core/utilities/testContainerUtils.js.map +1 -0
- package/dist/tests/core/utilities/utils/index.js +39 -0
- package/dist/tests/core/utilities/utils/index.js.map +1 -0
- package/dist/tests/core/utilities/utils/queue.js +37 -0
- package/dist/tests/core/utilities/utils/queue.js.map +1 -0
- package/dist/tests/core/utilities/utils/time.js +7 -0
- package/dist/tests/core/utilities/utils/time.js.map +1 -0
- package/dist/tests/extra/DBTestConfiguration.js +65 -0
- package/dist/tests/extra/DBTestConfiguration.js.map +1 -0
- package/dist/tests/extra/index.js +43 -0
- package/dist/tests/extra/index.js.map +1 -0
- package/dist/tests/extra/testEnv.js +136 -0
- package/dist/tests/extra/testEnv.js.map +1 -0
- package/dist/tests/index.js +19 -0
- package/dist/tests/index.js.map +1 -0
- package/dist/tests/jestEnv.js +12 -0
- package/dist/tests/jestEnv.js.map +1 -0
- package/dist/tests/jestSetup.js +33 -0
- package/dist/tests/jestSetup.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// BASE
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.EmailUnavailableError = exports.InvalidAPIKeyError = exports.FeatureDisabledError = exports.UsageLimitError = exports.BadRequestError = exports.NotFoundError = exports.HTTPError = exports.getPublicError = exports.ErrorCode = exports.BudibaseError = void 0;
|
|
5
|
+
class BudibaseError extends Error {
|
|
6
|
+
constructor(message, code) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.code = code;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.BudibaseError = BudibaseError;
|
|
12
|
+
// ERROR HANDLING
|
|
13
|
+
var ErrorCode;
|
|
14
|
+
(function (ErrorCode) {
|
|
15
|
+
ErrorCode["USAGE_LIMIT_EXCEEDED"] = "usage_limit_exceeded";
|
|
16
|
+
ErrorCode["FEATURE_DISABLED"] = "feature_disabled";
|
|
17
|
+
ErrorCode["INVALID_API_KEY"] = "invalid_api_key";
|
|
18
|
+
ErrorCode["HTTP"] = "http";
|
|
19
|
+
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
20
|
+
/**
|
|
21
|
+
* For the given error, build the public representation that is safe
|
|
22
|
+
* to be exposed over an api.
|
|
23
|
+
*/
|
|
24
|
+
const getPublicError = (err) => {
|
|
25
|
+
let error;
|
|
26
|
+
if (err.code) {
|
|
27
|
+
// add generic error information
|
|
28
|
+
error = {
|
|
29
|
+
code: err.code,
|
|
30
|
+
};
|
|
31
|
+
if (err.getPublicError) {
|
|
32
|
+
error = Object.assign(Object.assign({}, error), err.getPublicError());
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return error;
|
|
36
|
+
};
|
|
37
|
+
exports.getPublicError = getPublicError;
|
|
38
|
+
// HTTP
|
|
39
|
+
class HTTPError extends BudibaseError {
|
|
40
|
+
constructor(message, httpStatus, code = ErrorCode.HTTP) {
|
|
41
|
+
super(message, code);
|
|
42
|
+
this.status = httpStatus;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.HTTPError = HTTPError;
|
|
46
|
+
class NotFoundError extends HTTPError {
|
|
47
|
+
constructor(message) {
|
|
48
|
+
super(message, 404);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.NotFoundError = NotFoundError;
|
|
52
|
+
class BadRequestError extends HTTPError {
|
|
53
|
+
constructor(message) {
|
|
54
|
+
super(message, 400);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.BadRequestError = BadRequestError;
|
|
58
|
+
// LICENSING
|
|
59
|
+
class UsageLimitError extends HTTPError {
|
|
60
|
+
constructor(message, limitName) {
|
|
61
|
+
super(message, 400, ErrorCode.USAGE_LIMIT_EXCEEDED);
|
|
62
|
+
this.limitName = limitName;
|
|
63
|
+
}
|
|
64
|
+
getPublicError() {
|
|
65
|
+
return {
|
|
66
|
+
limitName: this.limitName,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.UsageLimitError = UsageLimitError;
|
|
71
|
+
class FeatureDisabledError extends HTTPError {
|
|
72
|
+
constructor(message, featureName) {
|
|
73
|
+
super(message, 400, ErrorCode.FEATURE_DISABLED);
|
|
74
|
+
this.featureName = featureName;
|
|
75
|
+
}
|
|
76
|
+
getPublicError() {
|
|
77
|
+
return {
|
|
78
|
+
featureName: this.featureName,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.FeatureDisabledError = FeatureDisabledError;
|
|
83
|
+
// AUTH
|
|
84
|
+
class InvalidAPIKeyError extends BudibaseError {
|
|
85
|
+
constructor() {
|
|
86
|
+
super("Invalid API key - may need re-generated, or user doesn't exist", ErrorCode.INVALID_API_KEY);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.InvalidAPIKeyError = InvalidAPIKeyError;
|
|
90
|
+
// USERS
|
|
91
|
+
class EmailUnavailableError extends Error {
|
|
92
|
+
constructor(email) {
|
|
93
|
+
super(`Email already in use: '${email}'`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.EmailUnavailableError = EmailUnavailableError;
|
|
97
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/errors/errors.ts"],"names":[],"mappings":";AAAA,OAAO;;;AAEP,MAAsB,aAAc,SAAQ,KAAK;IAG/C,YAAY,OAAe,EAAE,IAAe;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI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AAS,CAAC,oBAAoB,CAAC,CAAA;QACnD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,cAAc;QACZ,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAA;IACH,CAAC;CACF;AAbD,0CAaC;AAED,MAAa,oBAAqB,SAAQ,SAAS;IAGjD,YAAY,OAAe,EAAE,WAAmB;QAC9C,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAA;QAC/C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;IAED,cAAc;QACZ,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;CACF;AAbD,oDAaC;AAED,OAAO;AAEP,MAAa,kBAAmB,SAAQ,aAAa;IACnD;QACE,KAAK,CACH,gEAAgE,EAChE,SAAS,CAAC,eAAe,CAC1B,CAAA;IACH,CAAC;CACF;AAPD,gDAOC;AAED,QAAQ;AAER,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,KAAa;QACvB,KAAK,CAAC,0BAA0B,KAAK,GAAG,CAAC,CAAA;IAC3C,CAAC;CACF;AAJD,sDAIC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./errors"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.enabled = void 0;
|
|
46
|
+
const configs = __importStar(require("../configs"));
|
|
47
|
+
// wrapper utility function
|
|
48
|
+
const enabled = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
return configs.analyticsEnabled();
|
|
50
|
+
});
|
|
51
|
+
exports.enabled = enabled;
|
|
52
|
+
//# sourceMappingURL=analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../../src/events/analytics.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AAErC,2BAA2B;AACpB,MAAM,OAAO,GAAG,GAAS,EAAE;IAChC,OAAO,OAAO,CAAC,gBAAgB,EAAE,CAAA;AACnC,CAAC,CAAA,CAAA;AAFY,QAAA,OAAO,WAEnB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./queue"), exports);
|
|
18
|
+
__exportStar(require("./publisher"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/asyncEvents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,8CAA2B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.publishAsyncEvent = publishAsyncEvent;
|
|
13
|
+
const types_1 = require("@budibase/types");
|
|
14
|
+
const queue_1 = require("./queue");
|
|
15
|
+
function publishAsyncEvent(payload) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
if (!queue_1.asyncEventQueue) {
|
|
18
|
+
(0, queue_1.init)();
|
|
19
|
+
}
|
|
20
|
+
const { event, identity } = payload;
|
|
21
|
+
if (types_1.AsyncEvents.indexOf(event) !== -1 && identity.tenantId) {
|
|
22
|
+
yield queue_1.asyncEventQueue.add(payload);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=publisher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../../../src/events/asyncEvents/publisher.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,8CAQC;AAXD,2CAA6C;AAC7C,mCAA6D;AAE7D,SAAsB,iBAAiB,CAAC,OAAqB;;QAC3D,IAAI,CAAC,uBAAe,EAAE,CAAC;YACrB,IAAA,YAAI,GAAE,CAAA;QACR,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;QACnC,IAAI,mBAAW,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAC3D,MAAM,uBAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACpC,CAAC;IACH,CAAC;CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.asyncEventQueue = void 0;
|
|
13
|
+
exports.init = init;
|
|
14
|
+
exports.shutdown = shutdown;
|
|
15
|
+
const queue_1 = require("../../queue");
|
|
16
|
+
function init() {
|
|
17
|
+
exports.asyncEventQueue = (0, queue_1.createQueue)(queue_1.JobQueue.SYSTEM_EVENT_QUEUE);
|
|
18
|
+
}
|
|
19
|
+
function shutdown() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
if (exports.asyncEventQueue) {
|
|
22
|
+
yield exports.asyncEventQueue.close();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/events/asyncEvents/queue.ts"],"names":[],"mappings":";;;;;;;;;;;;AAaA,oBAEC;AAED,4BAIC;AApBD,uCAAmD;AAYnD,SAAgB,IAAI;IAClB,uBAAe,GAAG,IAAA,mBAAW,EAAe,gBAAQ,CAAC,kBAAkB,CAAC,CAAA;AAC1E,CAAC;AAED,SAAsB,QAAQ;;QAC5B,IAAI,uBAAe,EAAE,CAAC;YACpB,MAAM,uBAAe,CAAC,KAAK,EAAE,CAAA;QAC/B,CAAC;IACH,CAAC;CAAA"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.isAlreadySent = exports.isBackfillingEvent = exports.end = exports.recordEvent = exports.start = void 0;
|
|
46
|
+
const types_1 = require("@budibase/types");
|
|
47
|
+
const context = __importStar(require("../context"));
|
|
48
|
+
const generic_1 = require("../cache/generic");
|
|
49
|
+
const cache = __importStar(require("../cache/generic"));
|
|
50
|
+
// LIFECYCLE
|
|
51
|
+
const start = (events) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
|
+
const metadata = {
|
|
53
|
+
eventWhitelist: events,
|
|
54
|
+
};
|
|
55
|
+
return saveBackfillMetadata(metadata);
|
|
56
|
+
});
|
|
57
|
+
exports.start = start;
|
|
58
|
+
const recordEvent = (event, properties) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
+
const eventKey = getEventKey(event, properties);
|
|
60
|
+
// don't use a ttl - cleaned up by migration
|
|
61
|
+
// don't use tenancy - already in the key
|
|
62
|
+
yield cache.store(eventKey, properties, undefined, { useTenancy: false });
|
|
63
|
+
});
|
|
64
|
+
exports.recordEvent = recordEvent;
|
|
65
|
+
const end = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
yield deleteBackfillMetadata();
|
|
67
|
+
yield clearEvents();
|
|
68
|
+
});
|
|
69
|
+
exports.end = end;
|
|
70
|
+
// CRUD
|
|
71
|
+
const getBackfillMetadata = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
72
|
+
return cache.get(generic_1.CacheKey.BACKFILL_METADATA);
|
|
73
|
+
});
|
|
74
|
+
const saveBackfillMetadata = (backfill) => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
+
// no TTL - deleted by backfill
|
|
76
|
+
return cache.store(generic_1.CacheKey.BACKFILL_METADATA, backfill);
|
|
77
|
+
});
|
|
78
|
+
const deleteBackfillMetadata = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
79
|
+
yield cache.destroy(generic_1.CacheKey.BACKFILL_METADATA);
|
|
80
|
+
});
|
|
81
|
+
const clearEvents = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
82
|
+
// wildcard
|
|
83
|
+
const pattern = getEventKey();
|
|
84
|
+
const keys = yield cache.keys(pattern);
|
|
85
|
+
for (const key of keys) {
|
|
86
|
+
// delete each key
|
|
87
|
+
// don't use tenancy, already in the key
|
|
88
|
+
yield cache.destroy(key, { useTenancy: false });
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
// HELPERS
|
|
92
|
+
const isBackfillingEvent = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
93
|
+
const backfill = yield getBackfillMetadata();
|
|
94
|
+
const events = backfill === null || backfill === void 0 ? void 0 : backfill.eventWhitelist;
|
|
95
|
+
if (events && events.includes(event)) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
exports.isBackfillingEvent = isBackfillingEvent;
|
|
103
|
+
const isAlreadySent = (event, properties) => __awaiter(void 0, void 0, void 0, function* () {
|
|
104
|
+
const eventKey = getEventKey(event, properties);
|
|
105
|
+
const cachedEvent = yield cache.get(eventKey, {
|
|
106
|
+
useTenancy: false,
|
|
107
|
+
});
|
|
108
|
+
return !!cachedEvent;
|
|
109
|
+
});
|
|
110
|
+
exports.isAlreadySent = isAlreadySent;
|
|
111
|
+
const CUSTOM_PROPERTY_SUFFIX = {
|
|
112
|
+
// APP EVENTS
|
|
113
|
+
[types_1.Event.AUTOMATION_CREATED]: (properties) => {
|
|
114
|
+
return properties.automationId;
|
|
115
|
+
},
|
|
116
|
+
[types_1.Event.AUTOMATION_STEP_CREATED]: (properties) => {
|
|
117
|
+
return properties.stepId;
|
|
118
|
+
},
|
|
119
|
+
[types_1.Event.DATASOURCE_CREATED]: (properties) => {
|
|
120
|
+
return properties.datasourceId;
|
|
121
|
+
},
|
|
122
|
+
[types_1.Event.LAYOUT_CREATED]: (properties) => {
|
|
123
|
+
return properties.layoutId;
|
|
124
|
+
},
|
|
125
|
+
[types_1.Event.QUERY_CREATED]: (properties) => {
|
|
126
|
+
return properties.queryId;
|
|
127
|
+
},
|
|
128
|
+
[types_1.Event.ROLE_CREATED]: (properties) => {
|
|
129
|
+
return properties.roleId;
|
|
130
|
+
},
|
|
131
|
+
[types_1.Event.SCREEN_CREATED]: (properties) => {
|
|
132
|
+
return properties.screenId;
|
|
133
|
+
},
|
|
134
|
+
[types_1.Event.TABLE_CREATED]: (properties) => {
|
|
135
|
+
return properties.tableId;
|
|
136
|
+
},
|
|
137
|
+
[types_1.Event.VIEW_CREATED]: (properties) => {
|
|
138
|
+
return properties.tableId; // best uniqueness
|
|
139
|
+
},
|
|
140
|
+
[types_1.Event.VIEW_CALCULATION_CREATED]: (properties) => {
|
|
141
|
+
return properties.tableId; // best uniqueness
|
|
142
|
+
},
|
|
143
|
+
[types_1.Event.VIEW_FILTER_CREATED]: (properties) => {
|
|
144
|
+
return properties.tableId; // best uniqueness
|
|
145
|
+
},
|
|
146
|
+
[types_1.Event.APP_CREATED]: (properties) => {
|
|
147
|
+
return properties.appId; // best uniqueness
|
|
148
|
+
},
|
|
149
|
+
[types_1.Event.APP_PUBLISHED]: (properties) => {
|
|
150
|
+
return properties.appId; // best uniqueness
|
|
151
|
+
},
|
|
152
|
+
// GLOBAL EVENTS
|
|
153
|
+
[types_1.Event.AUTH_SSO_CREATED]: (properties) => {
|
|
154
|
+
return properties.type;
|
|
155
|
+
},
|
|
156
|
+
[types_1.Event.AUTH_SSO_ACTIVATED]: (properties) => {
|
|
157
|
+
return properties.type;
|
|
158
|
+
},
|
|
159
|
+
[types_1.Event.USER_CREATED]: (properties) => {
|
|
160
|
+
return properties.userId;
|
|
161
|
+
},
|
|
162
|
+
[types_1.Event.USER_PERMISSION_ADMIN_ASSIGNED]: (properties) => {
|
|
163
|
+
return properties.userId;
|
|
164
|
+
},
|
|
165
|
+
[types_1.Event.USER_PERMISSION_BUILDER_ASSIGNED]: (properties) => {
|
|
166
|
+
return properties.userId;
|
|
167
|
+
},
|
|
168
|
+
[types_1.Event.ROLE_ASSIGNED]: (properties) => {
|
|
169
|
+
return `${properties.roleId}-${properties.userId}`;
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
const getEventKey = (event, properties) => {
|
|
173
|
+
let eventKey;
|
|
174
|
+
const tenantId = context.getTenantId();
|
|
175
|
+
if (event) {
|
|
176
|
+
eventKey = `${generic_1.CacheKey.EVENTS}:${tenantId}:${event}`;
|
|
177
|
+
// use some properties to make the key more unique
|
|
178
|
+
const custom = CUSTOM_PROPERTY_SUFFIX[event];
|
|
179
|
+
const suffix = custom ? custom(properties) : undefined;
|
|
180
|
+
if (suffix) {
|
|
181
|
+
eventKey = `${eventKey}:${suffix}`;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
eventKey = `${generic_1.CacheKey.EVENTS}:${tenantId}:*`;
|
|
186
|
+
}
|
|
187
|
+
return eventKey;
|
|
188
|
+
};
|
|
189
|
+
//# sourceMappingURL=backfill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backfill.js","sourceRoot":"","sources":["../../../src/events/backfill.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAqBwB;AACxB,oDAAqC;AACrC,8CAA2C;AAC3C,wDAAyC;AAEzC,YAAY;AAEL,MAAM,KAAK,GAAG,CAAO,MAAe,EAAE,EAAE;IAC7C,MAAM,QAAQ,GAAqB;QACjC,c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AC,CAAC,SAAS,CAAA;QACtD,IAAI,MAAM,EAAE,CAAC;YACX,QAAQ,GAAG,GAAG,QAAQ,IAAI,MAAM,EAAE,CAAA;QACpC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,GAAG,kBAAQ,CAAC,MAAM,IAAI,QAAQ,IAAI,CAAA;IAC/C,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.publishEvent = void 0;
|
|
49
|
+
const processors_1 = require("./processors");
|
|
50
|
+
const identification_1 = __importDefault(require("./identification"));
|
|
51
|
+
const backfill = __importStar(require("./backfill"));
|
|
52
|
+
const asyncEvents_1 = require("./asyncEvents");
|
|
53
|
+
const publishEvent = (event, properties, timestamp, identityOverride) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
|
+
// in future this should use async events via a distributed queue.
|
|
55
|
+
const identity = identityOverride || (yield identification_1.default.getCurrentIdentity());
|
|
56
|
+
// Backfilling is get from the user cache, but when we override the identity cache is not available. Overrides are
|
|
57
|
+
// normally performed in automatic actions or operations in async flows (BPM) where the user session is not available.
|
|
58
|
+
const backfilling = identityOverride
|
|
59
|
+
? false
|
|
60
|
+
: yield backfill.isBackfillingEvent(event);
|
|
61
|
+
// no backfill - send the event and exit
|
|
62
|
+
if (!backfilling) {
|
|
63
|
+
// send off async events if required
|
|
64
|
+
yield (0, asyncEvents_1.publishAsyncEvent)({
|
|
65
|
+
event,
|
|
66
|
+
identity,
|
|
67
|
+
properties,
|
|
68
|
+
timestamp,
|
|
69
|
+
});
|
|
70
|
+
// now handle the main sync event processing pipeline
|
|
71
|
+
yield processors_1.processors.processEvent(event, identity, properties, timestamp);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// backfill active - check if the event has been sent already
|
|
75
|
+
const alreadySent = yield backfill.isAlreadySent(event, properties);
|
|
76
|
+
if (alreadySent) {
|
|
77
|
+
// do nothing
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
// send and record the event
|
|
82
|
+
yield processors_1.processors.processEvent(event, identity, properties, timestamp);
|
|
83
|
+
yield backfill.recordEvent(event, properties);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
exports.publishEvent = publishEvent;
|
|
87
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/events/events.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAyC;AACzC,sEAA6C;AAC7C,qDAAsC;AACtC,+CAAiD;AAE1C,MAAM,YAAY,GAAG,CAC1B,KAAY,EACZ,UAAe,EACf,SAA2B,EAC3B,gBAA2B,EAC3B,EAAE;IACF,kEAAkE;IAClE,MAAM,QAAQ,GACZ,gBAAgB,IAAI,CAAC,MAAM,wBAAc,CAAC,kBAAkB,EAAE,CAAC,CAAA;IAEjE,kHAAkH;IAClH,sHAAsH;IACtH,MAAM,WAAW,GAAG,gBAAgB;QAClC,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,MAAM,QAAQ,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;IAE5C,wCAAwC;IACxC,IAAI,CAAC,WAA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