@budibase/shared-core 2.9.30-alpha.0 → 2.9.30-alpha.2
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/index.js +19 -26
- package/dist/index.js.map +2 -2
- package/dist/index.js.meta.json +1 -1
- package/package.json +13 -3
package/dist/index.js
CHANGED
|
@@ -253,12 +253,11 @@ var deepGet = (obj, key) => {
|
|
|
253
253
|
}
|
|
254
254
|
const split = key.split(".");
|
|
255
255
|
for (let i = 0; i < split.length; i++) {
|
|
256
|
-
obj = obj
|
|
256
|
+
obj = obj?.[split[i]];
|
|
257
257
|
}
|
|
258
258
|
return obj;
|
|
259
259
|
};
|
|
260
260
|
var getUserInitials = (user) => {
|
|
261
|
-
var _a;
|
|
262
261
|
if (!user) {
|
|
263
262
|
return "?";
|
|
264
263
|
}
|
|
@@ -268,10 +267,10 @@ var getUserInitials = (user) => {
|
|
|
268
267
|
if (initials !== "") {
|
|
269
268
|
return initials;
|
|
270
269
|
}
|
|
271
|
-
return
|
|
270
|
+
return user.email?.[0] || "U";
|
|
272
271
|
};
|
|
273
272
|
var getUserColor = (user) => {
|
|
274
|
-
let id = user
|
|
273
|
+
let id = user?._id;
|
|
275
274
|
if (!id) {
|
|
276
275
|
return "var(--spectrum-global-color-blue-400)";
|
|
277
276
|
}
|
|
@@ -319,7 +318,6 @@ function isSQL(datasource) {
|
|
|
319
318
|
// src/filters.ts
|
|
320
319
|
var HBS_REGEX = /{{([^{].*?)}}/g;
|
|
321
320
|
var getValidOperatorsForType = (type, field, datasource) => {
|
|
322
|
-
var _a;
|
|
323
321
|
const Op = OperatorOptions;
|
|
324
322
|
const stringOps = [
|
|
325
323
|
Op.Equals,
|
|
@@ -357,7 +355,7 @@ var getValidOperatorsForType = (type, field, datasource) => {
|
|
|
357
355
|
} else if (type === "formula") {
|
|
358
356
|
ops = stringOps.concat([Op.MoreThan, Op.LessThan]);
|
|
359
357
|
}
|
|
360
|
-
const externalTable =
|
|
358
|
+
const externalTable = datasource?.tableId?.includes("datasource_plus");
|
|
361
359
|
if (field === "_id" && externalTable) {
|
|
362
360
|
ops = [Op.Equals, Op.NotEquals, Op.In];
|
|
363
361
|
}
|
|
@@ -412,7 +410,6 @@ var buildLuceneQuery = (filter) => {
|
|
|
412
410
|
};
|
|
413
411
|
if (Array.isArray(filter)) {
|
|
414
412
|
filter.forEach((expression) => {
|
|
415
|
-
var _a, _b, _c;
|
|
416
413
|
let { operator, field, type, value, externalType, onEmptyFilter } = expression;
|
|
417
414
|
const isHbs = typeof value === "string" && (value.match(HBS_REGEX) || []).length > 0;
|
|
418
415
|
if (operator === "allOr") {
|
|
@@ -441,14 +438,14 @@ var buildLuceneQuery = (filter) => {
|
|
|
441
438
|
}
|
|
442
439
|
}
|
|
443
440
|
if (type === "boolean") {
|
|
444
|
-
value =
|
|
441
|
+
value = `${value}`?.toLowerCase() === "true";
|
|
445
442
|
}
|
|
446
443
|
if (["contains", "notContains", "containsAny"].includes(operator) && type === "array" && typeof value === "string") {
|
|
447
444
|
value = value.split(",");
|
|
448
445
|
}
|
|
449
446
|
if (operator.startsWith("range") && query.range) {
|
|
450
|
-
const minint =
|
|
451
|
-
const maxint =
|
|
447
|
+
const minint = SqlNumberTypeRangeMap[externalType]?.min || Number.MIN_SAFE_INTEGER;
|
|
448
|
+
const maxint = SqlNumberTypeRangeMap[externalType]?.max || Number.MAX_SAFE_INTEGER;
|
|
452
449
|
if (!query.range[field]) {
|
|
453
450
|
query.range[field] = {
|
|
454
451
|
low: type === "number" ? minint : "0000-00-00T00:00:00.000Z",
|
|
@@ -501,10 +498,10 @@ var runLuceneQuery = (docs, query) => {
|
|
|
501
498
|
return true;
|
|
502
499
|
};
|
|
503
500
|
const stringMatch = match("string", (docValue, testValue) => {
|
|
504
|
-
return !docValue || !
|
|
501
|
+
return !docValue || !docValue?.toLowerCase().startsWith(testValue?.toLowerCase());
|
|
505
502
|
});
|
|
506
503
|
const fuzzyMatch = match("fuzzy", (docValue, testValue) => {
|
|
507
|
-
return !docValue || !
|
|
504
|
+
return !docValue || !docValue?.toLowerCase().startsWith(testValue?.toLowerCase());
|
|
508
505
|
});
|
|
509
506
|
const rangeMatch = match(
|
|
510
507
|
"range",
|
|
@@ -537,21 +534,21 @@ var runLuceneQuery = (docs, query) => {
|
|
|
537
534
|
testValue = testValue.map((item) => parseFloat(item));
|
|
538
535
|
}
|
|
539
536
|
}
|
|
540
|
-
return !
|
|
537
|
+
return !testValue?.includes(docValue);
|
|
541
538
|
});
|
|
542
539
|
const containsAny = match("containsAny", (docValue, testValue) => {
|
|
543
|
-
return !
|
|
540
|
+
return !docValue?.includes(...testValue);
|
|
544
541
|
});
|
|
545
542
|
const contains = match(
|
|
546
543
|
"contains",
|
|
547
544
|
(docValue, testValue) => {
|
|
548
|
-
return !
|
|
545
|
+
return !testValue?.every((item) => docValue?.includes(item));
|
|
549
546
|
}
|
|
550
547
|
);
|
|
551
548
|
const notContains = match(
|
|
552
549
|
"notContains",
|
|
553
550
|
(docValue, testValue) => {
|
|
554
|
-
return testValue
|
|
551
|
+
return testValue?.every((item) => docValue?.includes(item));
|
|
555
552
|
}
|
|
556
553
|
);
|
|
557
554
|
const docMatch = (doc) => {
|
|
@@ -686,13 +683,12 @@ __export(users_exports, {
|
|
|
686
683
|
isGlobalBuilder: () => isGlobalBuilder
|
|
687
684
|
});
|
|
688
685
|
function isBuilder(user, appId) {
|
|
689
|
-
var _a, _b, _c;
|
|
690
686
|
if (!user) {
|
|
691
687
|
return false;
|
|
692
688
|
}
|
|
693
|
-
if (
|
|
689
|
+
if (user.builder?.global) {
|
|
694
690
|
return true;
|
|
695
|
-
} else if (appId &&
|
|
691
|
+
} else if (appId && user.builder?.apps?.includes(getProdAppID(appId))) {
|
|
696
692
|
return true;
|
|
697
693
|
}
|
|
698
694
|
return false;
|
|
@@ -710,27 +706,24 @@ function isAdminOrBuilder(user, appId) {
|
|
|
710
706
|
return isBuilder(user, appId) || isAdmin(user);
|
|
711
707
|
}
|
|
712
708
|
function hasAppBuilderPermissions(user) {
|
|
713
|
-
var _a, _b, _c;
|
|
714
709
|
if (!user) {
|
|
715
710
|
return false;
|
|
716
711
|
}
|
|
717
|
-
const appLength =
|
|
718
|
-
const isGlobalBuilder2 = !!
|
|
712
|
+
const appLength = user.builder?.apps?.length;
|
|
713
|
+
const isGlobalBuilder2 = !!user.builder?.global;
|
|
719
714
|
return !isGlobalBuilder2 && appLength != null && appLength > 0;
|
|
720
715
|
}
|
|
721
716
|
function hasBuilderPermissions(user) {
|
|
722
|
-
var _a;
|
|
723
717
|
if (!user) {
|
|
724
718
|
return false;
|
|
725
719
|
}
|
|
726
|
-
return
|
|
720
|
+
return user.builder?.global || hasAppBuilderPermissions(user);
|
|
727
721
|
}
|
|
728
722
|
function hasAdminPermissions(user) {
|
|
729
|
-
var _a;
|
|
730
723
|
if (!user) {
|
|
731
724
|
return false;
|
|
732
725
|
}
|
|
733
|
-
return !!
|
|
726
|
+
return !!user.admin?.global;
|
|
734
727
|
}
|
|
735
728
|
// Annotate the CommonJS export names for ESM import in node:
|
|
736
729
|
0 && (module.exports = {
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/constants.ts", "../src/filters.ts", "../../types/src/sdk/events/event.ts", "../../types/src/sdk/cli/constants.ts", "../../types/src/documents/app/automation.ts", "../../types/src/documents/document.ts", "../../types/src/documents/global/plugin.ts", "../../types/src/documents/global/quotas.ts", "../src/helpers/index.ts", "../src/helpers/helpers.ts", "../src/helpers/integrations.ts", "../src/utils.ts", "../src/sdk/index.ts", "../src/sdk/documents/applications.ts", "../src/sdk/documents/users.ts"],
|
|
4
|
-
"sourcesContent": ["export * from \"./constants\"\nexport * as dataFilters from \"./filters\"\nexport * as helpers from \"./helpers\"\nexport * as utils from \"./utils\"\nexport * as sdk from \"./sdk\"\n", "export const OperatorOptions = {\n Equals: {\n value: \"equal\",\n label: \"Equals\",\n },\n NotEquals: {\n value: \"notEqual\",\n label: \"Not equals\",\n },\n Empty: {\n value: \"empty\",\n label: \"Is empty\",\n },\n NotEmpty: {\n value: \"notEmpty\",\n label: \"Is not empty\",\n },\n StartsWith: {\n value: \"string\",\n label: \"Starts with\",\n },\n Like: {\n value: \"fuzzy\",\n label: \"Like\",\n },\n MoreThan: {\n value: \"rangeLow\",\n label: \"More than or equal to\",\n },\n LessThan: {\n value: \"rangeHigh\",\n label: \"Less than or equal to\",\n },\n Contains: {\n value: \"contains\",\n label: \"Contains\",\n },\n NotContains: {\n value: \"notContains\",\n label: \"Does not contain\",\n },\n In: {\n value: \"oneOf\",\n label: \"Is in\",\n },\n ContainsAny: {\n value: \"containsAny\",\n label: \"Has any\",\n },\n}\n\nexport const SqlNumberTypeRangeMap = {\n integer: {\n max: 2147483647,\n min: -2147483648,\n },\n int: {\n max: 2147483647,\n min: -2147483648,\n },\n smallint: {\n max: 32767,\n min: -32768,\n },\n mediumint: {\n max: 8388607,\n min: -8388608,\n },\n}\n\nexport enum SocketEvent {\n UserUpdate = \"UserUpdate\",\n UserDisconnect = \"UserDisconnect\",\n Heartbeat = \"Heartbeat\",\n}\n\nexport enum GridSocketEvent {\n RowChange = \"RowChange\",\n TableChange = \"TableChange\",\n SelectTable = \"SelectTable\",\n SelectCell = \"SelectCell\",\n}\n\nexport enum BuilderSocketEvent {\n SelectApp = \"SelectApp\",\n TableChange = \"TableChange\",\n DatasourceChange = \"DatasourceChange\",\n LockTransfer = \"LockTransfer\",\n ScreenChange = \"ScreenChange\",\n AppMetadataChange = \"AppMetadataChange\",\n SelectResource = \"SelectResource\",\n AppPublishChange = \"AppPublishChange\",\n AutomationChange = \"AutomationChange\",\n}\n\nexport const SocketSessionTTL = 60\nexport const ValidQueryNameRegex = /^[^()]*$/\nexport const ValidColumnNameRegex = /^[_a-zA-Z0-9\\s]*$/g\n", "import {\n Datasource,\n FieldType,\n SortDirection,\n SortType,\n SearchFilter,\n SearchQuery,\n SearchQueryFields,\n} from \"@budibase/types\"\nimport { OperatorOptions, SqlNumberTypeRangeMap } from \"./constants\"\nimport { deepGet } from \"./helpers\"\n\nconst HBS_REGEX = /{{([^{].*?)}}/g\n\n/**\n * Returns the valid operator options for a certain data type\n * @param type the data type\n */\nexport const getValidOperatorsForType = (\n type: FieldType,\n field: string,\n datasource: Datasource & { tableId: any } // TODO: is this table id ever populated?\n) => {\n const Op = OperatorOptions\n const stringOps = [\n Op.Equals,\n Op.NotEquals,\n Op.StartsWith,\n Op.Like,\n Op.Empty,\n Op.NotEmpty,\n Op.In,\n ]\n const numOps = [\n Op.Equals,\n Op.NotEquals,\n Op.MoreThan,\n Op.LessThan,\n Op.Empty,\n Op.NotEmpty,\n Op.In,\n ]\n let ops: {\n value: string\n label: string\n }[] = []\n if (type === \"string\") {\n ops = stringOps\n } else if (type === \"number\" || type === \"bigint\") {\n ops = numOps\n } else if (type === \"options\") {\n ops = [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty, Op.In]\n } else if (type === \"array\") {\n ops = [Op.Contains, Op.NotContains, Op.Empty, Op.NotEmpty, Op.ContainsAny]\n } else if (type === \"boolean\") {\n ops = [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty]\n } else if (type === \"longform\") {\n ops = stringOps\n } else if (type === \"datetime\") {\n ops = numOps\n } else if (type === \"formula\") {\n ops = stringOps.concat([Op.MoreThan, Op.LessThan])\n }\n\n // Only allow equal/not equal for _id in SQL tables\n const externalTable = datasource?.tableId?.includes(\"datasource_plus\")\n if (field === \"_id\" && externalTable) {\n ops = [Op.Equals, Op.NotEquals, Op.In]\n }\n\n return ops\n}\n\n/**\n * Operators which do not support empty strings as values\n */\nexport const NoEmptyFilterStrings = [\n OperatorOptions.StartsWith.value,\n OperatorOptions.Like.value,\n OperatorOptions.Equals.value,\n OperatorOptions.NotEquals.value,\n OperatorOptions.Contains.value,\n OperatorOptions.NotContains.value,\n] as (keyof SearchQueryFields)[]\n\n/**\n * Removes any fields that contain empty strings that would cause inconsistent\n * behaviour with how backend tables are filtered (no value means no filter).\n */\nconst cleanupQuery = (query: SearchQuery) => {\n if (!query) {\n return query\n }\n for (let filterField of NoEmptyFilterStrings) {\n if (!query[filterField]) {\n continue\n }\n\n for (let [key, value] of Object.entries(query[filterField]!)) {\n if (value == null || value === \"\") {\n delete query[filterField]![key]\n }\n }\n }\n return query\n}\n\n/**\n * Removes a numeric prefix on field names designed to give fields uniqueness\n */\nconst removeKeyNumbering = (key: string) => {\n if (typeof key === \"string\" && key.match(/\\d[0-9]*:/g) != null) {\n const parts = key.split(\":\")\n parts.shift()\n return parts.join(\":\")\n } else {\n return key\n }\n}\n\n/**\n * Builds a lucene JSON query from the filter structure generated in the builder\n * @param filter the builder filter structure\n */\nexport const buildLuceneQuery = (filter: SearchFilter[]) => {\n let query: SearchQuery = {\n string: {},\n fuzzy: {},\n range: {},\n equal: {},\n notEqual: {},\n empty: {},\n notEmpty: {},\n contains: {},\n notContains: {},\n oneOf: {},\n containsAny: {},\n }\n if (Array.isArray(filter)) {\n filter.forEach(expression => {\n let { operator, field, type, value, externalType, onEmptyFilter } =\n expression\n const isHbs =\n typeof value === \"string\" && (value.match(HBS_REGEX) || []).length > 0\n // Parse all values into correct types\n if (operator === \"allOr\") {\n query.allOr = true\n return\n }\n if (onEmptyFilter) {\n query.onEmptyFilter = onEmptyFilter\n return\n }\n if (\n type === \"datetime\" &&\n !isHbs &&\n operator !== \"empty\" &&\n operator !== \"notEmpty\"\n ) {\n // Ensure date value is a valid date and parse into correct format\n if (!value) {\n return\n }\n try {\n value = new Date(value).toISOString()\n } catch (error) {\n return\n }\n }\n if (type === \"number\" && typeof value === \"string\") {\n if (operator === \"oneOf\") {\n value = value.split(\",\").map(item => parseFloat(item))\n } else if (!isHbs) {\n value = parseFloat(value)\n }\n }\n if (type === \"boolean\") {\n value = `${value}`?.toLowerCase() === \"true\"\n }\n if (\n [\"contains\", \"notContains\", \"containsAny\"].includes(operator) &&\n type === \"array\" &&\n typeof value === \"string\"\n ) {\n value = value.split(\",\")\n }\n if (operator.startsWith(\"range\") && query.range) {\n const minint =\n SqlNumberTypeRangeMap[\n externalType as keyof typeof SqlNumberTypeRangeMap\n ]?.min || Number.MIN_SAFE_INTEGER\n const maxint =\n SqlNumberTypeRangeMap[\n externalType as keyof typeof SqlNumberTypeRangeMap\n ]?.max || Number.MAX_SAFE_INTEGER\n if (!query.range[field]) {\n query.range[field] = {\n low: type === \"number\" ? minint : \"0000-00-00T00:00:00.000Z\",\n high: type === \"number\" ? maxint : \"9999-00-00T00:00:00.000Z\",\n }\n }\n if ((operator as any) === \"rangeLow\" && value != null && value !== \"\") {\n query.range[field].low = value\n } else if (\n (operator as any) === \"rangeHigh\" &&\n value != null &&\n value !== \"\"\n ) {\n query.range[field].high = value\n }\n } else if (query[operator] && operator !== \"onEmptyFilter\") {\n if (type === \"boolean\") {\n // Transform boolean filters to cope with null.\n // \"equals false\" needs to be \"not equals true\"\n // \"not equals false\" needs to be \"equals true\"\n if (operator === \"equal\" && value === false) {\n query.notEqual = query.notEqual || {}\n query.notEqual[field] = true\n } else if (operator === \"notEqual\" && value === false) {\n query.equal = query.equal || {}\n query.equal[field] = true\n } else {\n query[operator] = query[operator] || {}\n query[operator]![field] = value\n }\n } else {\n query[operator] = query[operator] || {}\n query[operator]![field] = value\n }\n }\n })\n }\n return query\n}\n\n/**\n * Performs a client-side lucene search on an array of data\n * @param docs the data\n * @param query the JSON lucene query\n */\nexport const runLuceneQuery = (docs: any[], query?: SearchQuery) => {\n if (!docs || !Array.isArray(docs)) {\n return []\n }\n if (!query) {\n return docs\n }\n\n // Make query consistent first\n query = cleanupQuery(query)\n\n // Iterates over a set of filters and evaluates a fail function against a doc\n const match =\n (\n type: keyof SearchQueryFields,\n failFn: (docValue: any, testValue: any) => boolean\n ) =>\n (doc: any) => {\n const filters = Object.entries(query![type] || {})\n for (let i = 0; i < filters.length; i++) {\n const [key, testValue] = filters[i]\n const docValue = deepGet(doc, removeKeyNumbering(key))\n if (failFn(docValue, testValue)) {\n return false\n }\n }\n return true\n }\n\n // Process a string match (fails if the value does not start with the string)\n const stringMatch = match(\"string\", (docValue: string, testValue: string) => {\n return (\n !docValue || !docValue?.toLowerCase().startsWith(testValue?.toLowerCase())\n )\n })\n\n // Process a fuzzy match (treat the same as starts with when running locally)\n const fuzzyMatch = match(\"fuzzy\", (docValue: string, testValue: string) => {\n return (\n !docValue || !docValue?.toLowerCase().startsWith(testValue?.toLowerCase())\n )\n })\n\n // Process a range match\n const rangeMatch = match(\n \"range\",\n (\n docValue: string | number | null,\n testValue: { low: number; high: number }\n ) => {\n return (\n docValue == null ||\n docValue === \"\" ||\n +docValue < testValue.low ||\n +docValue > testValue.high\n )\n }\n )\n\n // Process an equal match (fails if the value is different)\n const equalMatch = match(\n \"equal\",\n (docValue: any, testValue: string | null) => {\n return testValue != null && testValue !== \"\" && docValue !== testValue\n }\n )\n\n // Process a not-equal match (fails if the value is the same)\n const notEqualMatch = match(\n \"notEqual\",\n (docValue: any, testValue: string | null) => {\n return testValue != null && testValue !== \"\" && docValue === testValue\n }\n )\n\n // Process an empty match (fails if the value is not empty)\n const emptyMatch = match(\"empty\", (docValue: string | null) => {\n return docValue != null && docValue !== \"\"\n })\n\n // Process a not-empty match (fails is the value is empty)\n const notEmptyMatch = match(\"notEmpty\", (docValue: string | null) => {\n return docValue == null || docValue === \"\"\n })\n\n // Process an includes match (fails if the value is not included)\n const oneOf = match(\"oneOf\", (docValue: any, testValue: any) => {\n if (typeof testValue === \"string\") {\n testValue = testValue.split(\",\")\n if (typeof docValue === \"number\") {\n testValue = testValue.map((item: string) => parseFloat(item))\n }\n }\n return !testValue?.includes(docValue)\n })\n\n const containsAny = match(\"containsAny\", (docValue: any, testValue: any) => {\n return !docValue?.includes(...testValue)\n })\n\n const contains = match(\n \"contains\",\n (docValue: string | any[], testValue: any[]) => {\n return !testValue?.every((item: any) => docValue?.includes(item))\n }\n )\n\n const notContains = match(\n \"notContains\",\n (docValue: string | any[], testValue: any[]) => {\n return testValue?.every((item: any) => docValue?.includes(item))\n }\n )\n\n // Match a document against all criteria\n const docMatch = (doc: any) => {\n return (\n stringMatch(doc) &&\n fuzzyMatch(doc) &&\n rangeMatch(doc) &&\n equalMatch(doc) &&\n notEqualMatch(doc) &&\n emptyMatch(doc) &&\n notEmptyMatch(doc) &&\n oneOf(doc) &&\n contains(doc) &&\n containsAny(doc) &&\n notContains(doc)\n )\n }\n\n // Process all docs\n return docs.filter(docMatch)\n}\n\n/**\n * Performs a client-side sort from the equivalent server-side lucene sort\n * parameters.\n * @param docs the data\n * @param sort the sort column\n * @param sortOrder the sort order (\"ascending\" or \"descending\")\n * @param sortType the type of sort (\"string\" or \"number\")\n */\nexport const luceneSort = (\n docs: any[],\n sort: string,\n sortOrder: SortDirection,\n sortType = SortType.STRING\n) => {\n if (!sort || !sortOrder || !sortType) {\n return docs\n }\n const parse =\n sortType === \"string\" ? (x: any) => `${x}` : (x: string) => parseFloat(x)\n return docs\n .slice()\n .sort((a: { [x: string]: any }, b: { [x: string]: any }) => {\n const colA = parse(a[sort])\n const colB = parse(b[sort])\n if (sortOrder.toLowerCase() === \"descending\") {\n return colA > colB ? -1 : 1\n } else {\n return colA > colB ? 1 : -1\n }\n })\n}\n\n/**\n * Limits the specified docs to the specified number of rows from the equivalent\n * server-side lucene limit parameters.\n * @param docs the data\n * @param limit the number of docs to limit to\n */\nexport const luceneLimit = (docs: any[], limit: string) => {\n const numLimit = parseFloat(limit)\n if (isNaN(numLimit)) {\n return docs\n }\n return docs.slice(0, numLimit)\n}\n\nexport const hasFilters = (query?: SearchQuery) => {\n if (!query) {\n return false\n }\n const skipped = [\"allOr\", \"onEmptyFilter\"]\n for (let [key, value] of Object.entries(query)) {\n if (skipped.includes(key) || typeof value !== \"object\") {\n continue\n }\n if (Object.keys(value).length !== 0) {\n return true\n }\n }\n return false\n}\n", "import { Hosting } from \"../hosting\"\nimport { Group, Identity } from \"./identification\"\n\nexport enum Event {\n // USER\n USER_CREATED = \"user:created\",\n USER_UPDATED = \"user:updated\",\n USER_DELETED = \"user:deleted\",\n\n // USER / ONBOARDING\n USER_ONBOARDING_COMPLETE = \"user:onboarding:complete\",\n\n // USER / PERMISSIONS\n USER_PERMISSION_ADMIN_ASSIGNED = \"user:admin:assigned\",\n USER_PERMISSION_ADMIN_REMOVED = \"user:admin:removed\",\n USER_PERMISSION_BUILDER_ASSIGNED = \"user:builder:assigned\",\n USER_PERMISSION_BUILDER_REMOVED = \"user:builder:removed\",\n\n // USER / INVITE\n USER_INVITED = \"user:invited\",\n USER_INVITED_ACCEPTED = \"user:invite:accepted\",\n\n // USER / PASSWORD\n USER_PASSWORD_FORCE_RESET = \"user:password:force:reset\",\n USER_PASSWORD_UPDATED = \"user:password:updated\",\n USER_PASSWORD_RESET_REQUESTED = \"user:password:reset:requested\",\n USER_PASSWORD_RESET = \"user:password:reset\",\n\n // USER / COLLABORATION\n USER_DATA_COLLABORATION = \"user:data:collaboration\",\n\n // EMAIL\n EMAIL_SMTP_CREATED = \"email:smtp:created\",\n EMAIL_SMTP_UPDATED = \"email:smtp:updated\",\n\n // AUTH\n AUTH_SSO_CREATED = \"auth:sso:created\",\n AUTH_SSO_UPDATED = \"auth:sso:updated\",\n AUTH_SSO_ACTIVATED = \"auth:sso:activated\",\n AUTH_SSO_DEACTIVATED = \"auth:sso:deactivated\",\n AUTH_LOGIN = \"auth:login\",\n AUTH_LOGOUT = \"auth:logout\",\n\n // ORG\n ORG_NAME_UPDATED = \"org:info:name:updated\",\n ORG_LOGO_UPDATED = \"org:info:logo:updated\",\n ORG_PLATFORM_URL_UPDATED = \"org:platformurl:updated\",\n\n // INSTALLATION\n INSTALLATION_VERSION_CHECKED = \"installation:version:checked\",\n INSTALLATION_VERSION_UPGRADED = \"installation:version:upgraded\",\n INSTALLATION_VERSION_DOWNGRADED = \"installation:version:downgraded\",\n INSTALLATION_FIRST_STARTUP = \"installation:firstStartup\",\n\n // ORG / ANALYTICS\n ANALYTICS_OPT_OUT = \"analytics:opt:out\",\n ANALYTICS_OPT_IN = \"analytics:opt:in\",\n\n // APP\n APP_CREATED = \"app:created\",\n APP_UPDATED = \"app:updated\",\n APP_DELETED = \"app:deleted\",\n APP_PUBLISHED = \"app:published\",\n APP_UNPUBLISHED = \"app:unpublished\",\n APP_TEMPLATE_IMPORTED = \"app:template:imported\",\n APP_FILE_IMPORTED = \"app:file:imported\",\n APP_VERSION_UPDATED = \"app:version:updated\",\n APP_VERSION_REVERTED = \"app:version:reverted\",\n APP_REVERTED = \"app:reverted\",\n APP_EXPORTED = \"app:exported\",\n\n // ROLE\n ROLE_CREATED = \"role:created\",\n ROLE_UPDATED = \"role:updated\",\n ROLE_DELETED = \"role:deleted\",\n ROLE_ASSIGNED = \"role:assigned\",\n ROLE_UNASSIGNED = \"role:unassigned\",\n\n // SERVE\n SERVED_BUILDER = \"served:builder\",\n SERVED_APP = \"served:app\",\n SERVED_APP_PREVIEW = \"served:app:preview\",\n\n // DATASOURCE\n DATASOURCE_CREATED = \"datasource:created\",\n DATASOURCE_UPDATED = \"datasource:updated\",\n DATASOURCE_DELETED = \"datasource:deleted\",\n\n // QUERY\n QUERY_CREATED = \"query:created\",\n QUERY_UPDATED = \"query:updated\",\n QUERY_DELETED = \"query:deleted\",\n QUERY_IMPORT = \"query:import\",\n QUERIES_RUN = \"queries:run\",\n QUERY_PREVIEWED = \"query:previewed\",\n\n // TABLE\n TABLE_CREATED = \"table:created\",\n TABLE_UPDATED = \"table:updated\",\n TABLE_DELETED = \"table:deleted\",\n TABLE_EXPORTED = \"table:exported\",\n TABLE_IMPORTED = \"table:imported\",\n TABLE_DATA_IMPORTED = \"table:data:imported\",\n\n // VIEW\n VIEW_CREATED = \"view:created\",\n VIEW_UPDATED = \"view:updated\",\n VIEW_DELETED = \"view:deleted\",\n VIEW_EXPORTED = \"view:exported\",\n VIEW_FILTER_CREATED = \"view:filter:created\",\n VIEW_FILTER_UPDATED = \"view:filter:updated\",\n VIEW_FILTER_DELETED = \"view:filter:deleted\",\n VIEW_CALCULATION_CREATED = \"view:calculation:created\",\n VIEW_CALCULATION_UPDATED = \"view:calculation:updated\",\n VIEW_CALCULATION_DELETED = \"view:calculation:deleted\",\n\n // ROWS\n ROWS_CREATED = \"rows:created\",\n ROWS_IMPORTED = \"rows:imported\",\n\n // COMPONENT\n COMPONENT_CREATED = \"component:created\",\n COMPONENT_DELETED = \"component:deleted\",\n\n // SCREEN\n SCREEN_CREATED = \"screen:created\",\n SCREEN_DELETED = \"screen:deleted\",\n\n // LAYOUT\n LAYOUT_CREATED = \"layout:created\",\n LAYOUT_DELETED = \"layout:deleted\",\n\n // AUTOMATION\n AUTOMATION_CREATED = \"automation:created\",\n AUTOMATION_DELETED = \"automation:deleted\",\n AUTOMATION_TESTED = \"automation:tested\",\n AUTOMATIONS_RUN = \"automations:run\",\n AUTOMATION_STEP_CREATED = \"automation:step:created\",\n AUTOMATION_STEP_DELETED = \"automation:step:deleted\",\n AUTOMATION_TRIGGER_UPDATED = \"automation:trigger:updated\",\n\n // LICENSE\n LICENSE_PLAN_CHANGED = \"license:plan:changed\",\n LICENSE_ACTIVATED = \"license:activated\",\n LICENSE_PAYMENT_FAILED = \"license:payment:failed\",\n LICENSE_PAYMENT_RECOVERED = \"license:payment:recovered\",\n LICENSE_CHECKOUT_OPENED = \"license:checkout:opened\",\n LICENSE_CHECKOUT_SUCCESS = \"license:checkout:success\",\n LICENSE_PORTAL_OPENED = \"license:portal:opened\",\n\n // ACCOUNT\n ACCOUNT_CREATED = \"account:created\",\n ACCOUNT_DELETED = \"account:deleted\",\n ACCOUNT_VERIFIED = \"account:verified\",\n\n // BACKFILL\n APP_BACKFILL_SUCCEEDED = \"app:backfill:succeeded\",\n APP_BACKFILL_FAILED = \"app:backfill:failed\",\n TENANT_BACKFILL_SUCCEEDED = \"tenant:backfill:succeeded\",\n TENANT_BACKFILL_FAILED = \"tenant:backfill:failed\",\n INSTALLATION_BACKFILL_SUCCEEDED = \"installation:backfill:succeeded\",\n INSTALLATION_BACKFILL_FAILED = \"installation:backfill:failed\",\n\n // USER\n USER_GROUP_CREATED = \"user_group:created\",\n USER_GROUP_UPDATED = \"user_group:updated\",\n USER_GROUP_DELETED = \"user_group:deleted\",\n USER_GROUP_USERS_ADDED = \"user_group:user_added\",\n USER_GROUP_USERS_REMOVED = \"user_group:users_deleted\",\n USER_GROUP_PERMISSIONS_EDITED = \"user_group:permissions_edited\",\n USER_GROUP_ONBOARDING = \"user_group:onboarding_added\",\n\n // PLUGIN\n PLUGIN_INIT = \"plugin:init\",\n PLUGIN_IMPORTED = \"plugin:imported\",\n PLUGIN_DELETED = \"plugin:deleted\",\n\n // BACKUP\n APP_BACKUP_RESTORED = \"app:backup:restored\",\n APP_BACKUP_TRIGGERED = \"app:backup:triggered\",\n\n // ENVIRONMENT VARIABLE\n ENVIRONMENT_VARIABLE_CREATED = \"environment_variable:created\",\n ENVIRONMENT_VARIABLE_DELETED = \"environment_variable:deleted\",\n ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED = \"environment_variable:upgrade_panel_opened\",\n\n // AUDIT LOG\n AUDIT_LOGS_FILTERED = \"audit_log:filtered\",\n AUDIT_LOGS_DOWNLOADED = \"audit_log:downloaded\",\n}\n\nexport const UserGroupSyncEvents: Event[] = [\n Event.USER_CREATED,\n Event.USER_UPDATED,\n Event.USER_DELETED,\n Event.USER_PERMISSION_ADMIN_ASSIGNED,\n Event.USER_PERMISSION_ADMIN_REMOVED,\n Event.USER_PERMISSION_BUILDER_ASSIGNED,\n Event.USER_PERMISSION_BUILDER_REMOVED,\n Event.USER_GROUP_CREATED,\n Event.USER_GROUP_UPDATED,\n Event.USER_GROUP_DELETED,\n Event.USER_GROUP_USERS_ADDED,\n Event.USER_GROUP_USERS_REMOVED,\n Event.USER_GROUP_PERMISSIONS_EDITED,\n]\n\nexport const AsyncEvents: Event[] = [...UserGroupSyncEvents]\n\n// all events that are not audited have been added to this record as undefined, this means\n// that Typescript can protect us against new events being added and auditing of those\n// events not being considered. This might be a little ugly, but provides a level of\n// Typescript build protection for the audit log feature, any new event also needs to be\n// added to this map, during which the developer will need to consider if it should be\n// a user facing event or not.\nexport const AuditedEventFriendlyName: Record<Event, string | undefined> = {\n // USER\n [Event.USER_CREATED]: `User \"{{ email }}\" created{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_UPDATED]: `User \"{{ email }}\" updated{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_DELETED]: `User \"{{ email }}\" deleted{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_PERMISSION_ADMIN_ASSIGNED]: `User \"{{ email }}\" admin role assigned`,\n [Event.USER_PERMISSION_ADMIN_REMOVED]: `User \"{{ email }}\" admin role removed`,\n [Event.USER_PERMISSION_BUILDER_ASSIGNED]: `User \"{{ email }}\" builder role assigned`,\n [Event.USER_PERMISSION_BUILDER_REMOVED]: `User \"{{ email }}\" builder role removed`,\n [Event.USER_INVITED]: `User \"{{ email }}\" invited`,\n [Event.USER_INVITED_ACCEPTED]: `User \"{{ email }}\" accepted invite`,\n [Event.USER_PASSWORD_UPDATED]: `User \"{{ email }}\" password updated`,\n [Event.USER_PASSWORD_RESET_REQUESTED]: `User \"{{ email }}\" password reset requested`,\n [Event.USER_PASSWORD_RESET]: `User \"{{ email }}\" password reset`,\n [Event.USER_GROUP_CREATED]: `User group \"{{ name }}\" created{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_UPDATED]: `User group \"{{ name }}\" updated{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_DELETED]: `User group \"{{ name }}\" deleted{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_USERS_ADDED]: `User group \"{{ name }}\" {{ count }} users added{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_USERS_REMOVED]: `User group \"{{ name }}\" {{ count }} users removed{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_PERMISSIONS_EDITED]: `User group \"{{ name }}\" permissions edited`,\n [Event.USER_PASSWORD_FORCE_RESET]: undefined,\n [Event.USER_GROUP_ONBOARDING]: undefined,\n [Event.USER_ONBOARDING_COMPLETE]: undefined,\n [Event.USER_DATA_COLLABORATION]: undefined,\n\n // EMAIL\n [Event.EMAIL_SMTP_CREATED]: `Email configuration created`,\n [Event.EMAIL_SMTP_UPDATED]: `Email configuration updated`,\n\n // AUTH\n [Event.AUTH_SSO_CREATED]: `SSO configuration created`,\n [Event.AUTH_SSO_UPDATED]: `SSO configuration updated`,\n [Event.AUTH_SSO_ACTIVATED]: `SSO configuration activated`,\n [Event.AUTH_SSO_DEACTIVATED]: `SSO configuration deactivated`,\n [Event.AUTH_LOGIN]: `User \"{{ email }}\" logged in`,\n [Event.AUTH_LOGOUT]: `User \"{{ email }}\" logged out`,\n\n // ORG\n [Event.ORG_NAME_UPDATED]: `Organisation name updated`,\n [Event.ORG_LOGO_UPDATED]: `Organisation logo updated`,\n [Event.ORG_PLATFORM_URL_UPDATED]: `Organisation platform URL updated`,\n\n // APP\n [Event.APP_CREATED]: `App \"{{ name }}\" created`,\n [Event.APP_UPDATED]: `App \"{{ name }}\" updated`,\n [Event.APP_DELETED]: `App \"{{ name }}\" deleted`,\n [Event.APP_PUBLISHED]: `App \"{{ name }}\" published`,\n [Event.APP_UNPUBLISHED]: `App \"{{ name }}\" unpublished`,\n [Event.APP_TEMPLATE_IMPORTED]: `App \"{{ name }}\" template imported`,\n [Event.APP_FILE_IMPORTED]: `App \"{{ name }}\" file imported`,\n [Event.APP_VERSION_UPDATED]: `App \"{{ name }}\" version updated`,\n [Event.APP_VERSION_REVERTED]: `App \"{{ name }}\" version reverted`,\n [Event.APP_REVERTED]: `App \"{{ name }}\" reverted`,\n [Event.APP_EXPORTED]: `App \"{{ name }}\" exported`,\n [Event.APP_BACKUP_RESTORED]: `App backup \"{{ name }}\" restored`,\n [Event.APP_BACKUP_TRIGGERED]: `App backup \"{{ name }}\" triggered`,\n\n // DATASOURCE\n [Event.DATASOURCE_CREATED]: `Datasource created`,\n [Event.DATASOURCE_UPDATED]: `Datasource updated`,\n [Event.DATASOURCE_DELETED]: `Datasource deleted`,\n\n // QUERY\n [Event.QUERY_CREATED]: `Query created`,\n [Event.QUERY_UPDATED]: `Query updated`,\n [Event.QUERY_DELETED]: `Query deleted`,\n [Event.QUERY_IMPORT]: `Query import`,\n [Event.QUERIES_RUN]: undefined,\n [Event.QUERY_PREVIEWED]: undefined,\n\n // TABLE\n [Event.TABLE_CREATED]: `Table \"{{ name }}\" created`,\n [Event.TABLE_UPDATED]: `Table \"{{ name }}\" updated`,\n [Event.TABLE_DELETED]: `Table \"{{ name }}\" deleted`,\n [Event.TABLE_EXPORTED]: `Table \"{{ name }}\" exported`,\n [Event.TABLE_IMPORTED]: `Table \"{{ name }}\" imported`,\n [Event.TABLE_DATA_IMPORTED]: `Data imported to table`,\n\n // ROWS\n [Event.ROWS_CREATED]: `Rows created`,\n [Event.ROWS_IMPORTED]: `Rows imported`,\n\n // AUTOMATION\n [Event.AUTOMATION_CREATED]: `Automation \"{{ name }}\" created`,\n [Event.AUTOMATION_DELETED]: `Automation \"{{ name }}\" deleted`,\n [Event.AUTOMATION_STEP_CREATED]: `Automation \"{{ name }}\" step added`,\n [Event.AUTOMATION_STEP_DELETED]: `Automation \"{{ name }}\" step removed`,\n [Event.AUTOMATION_TESTED]: undefined,\n [Event.AUTOMATIONS_RUN]: undefined,\n [Event.AUTOMATION_TRIGGER_UPDATED]: undefined,\n\n // SCREEN\n [Event.SCREEN_CREATED]: `Screen \"{{ name }}\" created`,\n [Event.SCREEN_DELETED]: `Screen \"{{ name }}\" deleted`,\n\n // COMPONENT\n [Event.COMPONENT_CREATED]: `Component created`,\n [Event.COMPONENT_DELETED]: `Component deleted`,\n\n // ENVIRONMENT VARIABLE\n [Event.ENVIRONMENT_VARIABLE_CREATED]: `Environment variable created`,\n [Event.ENVIRONMENT_VARIABLE_DELETED]: `Environment variable deleted`,\n [Event.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED]: undefined,\n\n // PLUGIN\n [Event.PLUGIN_IMPORTED]: `Plugin imported`,\n [Event.PLUGIN_DELETED]: `Plugin deleted`,\n [Event.PLUGIN_INIT]: undefined,\n\n // ROLE - NOT AUDITED\n [Event.ROLE_CREATED]: undefined,\n [Event.ROLE_UPDATED]: undefined,\n [Event.ROLE_DELETED]: undefined,\n [Event.ROLE_ASSIGNED]: undefined,\n [Event.ROLE_UNASSIGNED]: undefined,\n\n // LICENSE - NOT AUDITED\n [Event.LICENSE_PLAN_CHANGED]: undefined,\n [Event.LICENSE_ACTIVATED]: undefined,\n [Event.LICENSE_PAYMENT_FAILED]: undefined,\n [Event.LICENSE_PAYMENT_RECOVERED]: undefined,\n [Event.LICENSE_CHECKOUT_OPENED]: undefined,\n [Event.LICENSE_CHECKOUT_SUCCESS]: undefined,\n [Event.LICENSE_PORTAL_OPENED]: undefined,\n\n // ACCOUNT - NOT AUDITED\n [Event.ACCOUNT_CREATED]: undefined,\n [Event.ACCOUNT_DELETED]: undefined,\n [Event.ACCOUNT_VERIFIED]: undefined,\n\n // BACKFILL - NOT AUDITED\n [Event.APP_BACKFILL_SUCCEEDED]: undefined,\n [Event.APP_BACKFILL_FAILED]: undefined,\n [Event.TENANT_BACKFILL_SUCCEEDED]: undefined,\n [Event.TENANT_BACKFILL_FAILED]: undefined,\n [Event.INSTALLATION_BACKFILL_SUCCEEDED]: undefined,\n [Event.INSTALLATION_BACKFILL_FAILED]: undefined,\n\n // LAYOUT - NOT AUDITED\n [Event.LAYOUT_CREATED]: undefined,\n [Event.LAYOUT_DELETED]: undefined,\n\n // VIEW - NOT AUDITED\n [Event.VIEW_CREATED]: undefined,\n [Event.VIEW_UPDATED]: undefined,\n [Event.VIEW_DELETED]: undefined,\n [Event.VIEW_EXPORTED]: undefined,\n [Event.VIEW_FILTER_CREATED]: undefined,\n [Event.VIEW_FILTER_UPDATED]: undefined,\n [Event.VIEW_FILTER_DELETED]: undefined,\n [Event.VIEW_CALCULATION_CREATED]: undefined,\n [Event.VIEW_CALCULATION_UPDATED]: undefined,\n [Event.VIEW_CALCULATION_DELETED]: undefined,\n\n // SERVED - NOT AUDITED\n [Event.SERVED_BUILDER]: undefined,\n [Event.SERVED_APP]: undefined,\n [Event.SERVED_APP_PREVIEW]: undefined,\n\n // ANALYTICS - NOT AUDITED\n [Event.ANALYTICS_OPT_OUT]: undefined,\n [Event.ANALYTICS_OPT_IN]: undefined,\n\n // INSTALLATION - NOT AUDITED\n [Event.INSTALLATION_VERSION_CHECKED]: undefined,\n [Event.INSTALLATION_VERSION_UPGRADED]: undefined,\n [Event.INSTALLATION_VERSION_DOWNGRADED]: undefined,\n [Event.INSTALLATION_FIRST_STARTUP]: undefined,\n\n // AUDIT LOG - NOT AUDITED\n [Event.AUDIT_LOGS_FILTERED]: undefined,\n [Event.AUDIT_LOGS_DOWNLOADED]: undefined,\n}\n\n// properties added at the final stage of the event pipeline\nexport interface BaseEvent {\n version?: string\n service?: string\n environment?: string\n appId?: string\n installationId?: string\n tenantId?: string\n hosting?: Hosting\n // any props in the audited section will be removed before passing events\n // up out of system (purely for use with auditing)\n audited?: {\n [key: string]: any\n }\n}\n\nexport type TableExportFormat = \"json\" | \"csv\"\n\nexport type DocUpdateEvent = {\n id: string\n tenantId: string\n appId?: string\n}\n\nexport interface EventProcessor {\n processEvent(\n event: Event,\n identity: Identity,\n properties: any,\n timestamp?: string | number\n ): Promise<void>\n identify?(identity: Identity, timestamp?: string | number): Promise<void>\n identifyGroup?(group: Group, timestamp?: string | number): Promise<void>\n shutdown?(): void\n}\n", "import { Event } from \"../events\"\n\nexport enum CommandWord {\n BACKUPS = \"backups\",\n HOSTING = \"hosting\",\n ANALYTICS = \"analytics\",\n HELP = \"help\",\n PLUGIN = \"plugins\",\n}\n\nexport enum InitType {\n QUICK = \"quick\",\n DIGITAL_OCEAN = \"do\",\n}\n\nexport const AnalyticsEvent = {\n OptOut: \"analytics:opt:out\",\n OptIn: \"analytics:opt:in\",\n SelfHostInit: \"hosting:init\",\n PluginInit: Event.PLUGIN_INIT,\n}\n", "import { Document } from \"../document\"\nimport { EventEmitter } from \"events\"\nimport { User } from \"../global\"\n\nexport enum AutomationIOType {\n OBJECT = \"object\",\n STRING = \"string\",\n BOOLEAN = \"boolean\",\n NUMBER = \"number\",\n ARRAY = \"array\",\n JSON = \"json\",\n DATE = \"date\",\n}\n\nexport enum AutomationCustomIOType {\n TABLE = \"table\",\n ROW = \"row\",\n ROWS = \"rows\",\n WIDE = \"wide\",\n QUERY = \"query\",\n QUERY_PARAMS = \"queryParams\",\n QUERY_LIMIT = \"queryLimit\",\n LOOP_OPTION = \"loopOption\",\n ITEM = \"item\",\n CODE = \"code\",\n FILTERS = \"filters\",\n COLUMN = \"column\",\n TRIGGER_SCHEMA = \"triggerSchema\",\n CRON = \"cron\",\n WEBHOOK_URL = \"webhookUrl\",\n}\n\nexport enum AutomationTriggerStepId {\n ROW_SAVED = \"ROW_SAVED\",\n ROW_UPDATED = \"ROW_UPDATED\",\n ROW_DELETED = \"ROW_DELETED\",\n WEBHOOK = \"WEBHOOK\",\n APP = \"APP\",\n CRON = \"CRON\",\n}\n\nexport enum AutomationStepType {\n LOGIC = \"LOGIC\",\n ACTION = \"ACTION\",\n TRIGGER = \"TRIGGER\",\n}\n\nexport enum AutomationActionStepId {\n SEND_EMAIL_SMTP = \"SEND_EMAIL_SMTP\",\n CREATE_ROW = \"CREATE_ROW\",\n UPDATE_ROW = \"UPDATE_ROW\",\n DELETE_ROW = \"DELETE_ROW\",\n EXECUTE_BASH = \"EXECUTE_BASH\",\n OUTGOING_WEBHOOK = \"OUTGOING_WEBHOOK\",\n EXECUTE_SCRIPT = \"EXECUTE_SCRIPT\",\n EXECUTE_QUERY = \"EXECUTE_QUERY\",\n SERVER_LOG = \"SERVER_LOG\",\n DELAY = \"DELAY\",\n FILTER = \"FILTER\",\n QUERY_ROWS = \"QUERY_ROWS\",\n LOOP = \"LOOP\",\n COLLECT = \"COLLECT\",\n OPENAI = \"OPENAI\",\n // these used to be lowercase step IDs, maintain for backwards compat\n discord = \"discord\",\n slack = \"slack\",\n zapier = \"zapier\",\n integromat = \"integromat\",\n}\n\nexport interface EmailInvite {\n startTime: Date\n endTime: Date\n summary: string\n location?: string\n url?: string\n}\n\nexport interface SendEmailOpts {\n // workspaceId If finer grain controls being used then this will lookup config for workspace.\n workspaceId?: string\n // user If sending to an existing user the object can be provided, this is used in the context.\n user: User\n // from If sending from an address that is not what is configured in the SMTP config.\n from?: string\n // contents If sending a custom email then can supply contents which will be added to it.\n contents?: string\n // subject A custom subject can be specified if the config one is not desired.\n subject?: string\n // info Pass in a structure of information to be stored alongside the invitation.\n info?: any\n cc?: boolean\n bcc?: boolean\n automation?: boolean\n invite?: EmailInvite\n}\n\nexport const AutomationStepIdArray = [\n ...Object.values(AutomationActionStepId),\n ...Object.values(AutomationTriggerStepId),\n]\n\nexport enum AutomationState {\n DISABLED = \"disabled\",\n}\n\nexport interface Automation extends Document {\n definition: {\n steps: AutomationStep[]\n trigger: AutomationTrigger\n }\n screenId?: string\n uiTree?: any\n appId: string\n live?: boolean\n name: string\n internal?: boolean\n type?: string\n state?: AutomationState\n}\n\ninterface BaseIOStructure {\n type?: AutomationIOType\n customType?: AutomationCustomIOType\n title?: string\n description?: string\n dependsOn?: string\n enum?: string[]\n pretty?: string[]\n properties?: {\n [key: string]: BaseIOStructure\n }\n required?: string[]\n}\n\ninterface InputOutputBlock {\n properties: {\n [key: string]: BaseIOStructure\n }\n required?: string[]\n}\n\nexport interface AutomationStepSchema {\n name: string\n stepTitle?: string\n tagline: string\n icon: string\n description: string\n type: AutomationStepType\n internal?: boolean\n deprecated?: boolean\n stepId: AutomationTriggerStepId | AutomationActionStepId\n blockToLoop?: string\n inputs: {\n [key: string]: any\n }\n schema: {\n inputs: InputOutputBlock\n outputs: InputOutputBlock\n }\n custom?: boolean\n features?: Partial<Record<AutomationFeature, boolean>>\n}\n\nexport enum AutomationFeature {\n LOOPING = \"LOOPING\",\n}\n\nexport interface AutomationStep extends AutomationStepSchema {\n id: string\n}\n\nexport interface AutomationTriggerSchema extends AutomationStepSchema {\n event?: string\n cronJobId?: string\n}\n\nexport interface AutomationTrigger extends AutomationTriggerSchema {\n id: string\n}\n\nexport enum AutomationStatus {\n SUCCESS = \"success\",\n ERROR = \"error\",\n STOPPED = \"stopped\",\n STOPPED_ERROR = \"stopped_error\",\n NO_ITERATIONS = \"no_iterations\",\n}\n\nexport interface AutomationResults {\n automationId?: string\n status?: AutomationStatus\n trigger?: any\n steps: {\n stepId: AutomationTriggerStepId | AutomationActionStepId\n inputs: {\n [key: string]: any\n }\n outputs: {\n [key: string]: any\n }\n }[]\n}\n\nexport interface AutomationLog extends AutomationResults, Document {\n automationName: string\n _rev?: string\n}\n\nexport interface AutomationLogPage {\n data: AutomationLog[]\n hasNextPage: boolean\n nextPage?: string\n}\n\nexport type AutomationStepInput = {\n inputs: Record<string, any>\n context: Record<string, any>\n emitter: EventEmitter\n appId: string\n apiKey?: string\n}\n\nexport interface AutomationMetadata extends Document {\n errorCount?: number\n automationChainCount?: number\n}\n", "export const SEPARATOR = \"_\"\nexport const UNICODE_MAX = \"\\ufff0\"\n\nexport const prefixed = (type: DocumentType) => `${type}${SEPARATOR}`\n\nexport enum DocumentType {\n USER = \"us\",\n GROUP = \"gr\",\n WORKSPACE = \"workspace\",\n CONFIG = \"config\",\n TEMPLATE = \"template\",\n APP = \"app\",\n DEV = \"dev\",\n APP_DEV = \"app_dev\",\n APP_METADATA = \"app_metadata\",\n ROLE = \"role\",\n MIGRATIONS = \"migrations\",\n DEV_INFO = \"devinfo\",\n AUTOMATION_LOG = \"log_au\",\n ACCOUNT_METADATA = \"acc_metadata\",\n PLUGIN = \"plg\",\n DATASOURCE = \"datasource\",\n DATASOURCE_PLUS = \"datasource_plus\",\n APP_BACKUP = \"backup\",\n TABLE = \"ta\",\n ROW = \"ro\",\n AUTOMATION = \"au\",\n LINK = \"li\",\n WEBHOOK = \"wh\",\n INSTANCE = \"inst\",\n LAYOUT = \"layout\",\n SCREEN = \"screen\",\n QUERY = \"query\",\n DEPLOYMENTS = \"deployments\",\n METADATA = \"metadata\",\n MEM_VIEW = \"view\",\n USER_FLAG = \"flag\",\n AUTOMATION_METADATA = \"meta_au\",\n AUDIT_LOG = \"al\",\n}\n\nexport interface Document {\n _id?: string\n _rev?: string\n createdAt?: string | number\n updatedAt?: string\n}\n\nexport interface AnyDocument extends Document {\n [key: string]: any\n}\n", "import { Document } from \"../document\"\n\nexport enum PluginType {\n DATASOURCE = \"datasource\",\n COMPONENT = \"component\",\n AUTOMATION = \"automation\",\n}\n\nexport enum PluginSource {\n NPM = \"NPM\",\n GITHUB = \"Github\",\n URL = \"URL\",\n FILE = \"File Upload\",\n}\nexport interface FileType {\n path: string\n name: string\n}\n\nexport interface Plugin extends Document {\n description: string\n name: string\n version: string\n source: PluginSource\n package: { [key: string]: any }\n hash: string\n schema: {\n type: PluginType\n [key: string]: any\n }\n iconFileName?: string\n // Populated on read\n jsUrl?: string\n // Populated on read\n iconUrl?: string\n}\n\nexport const PLUGIN_TYPE_ARR = Object.values(PluginType)\n", "import { MonthlyQuotaName, StaticQuotaName } from \"../../sdk\"\n\nexport enum BreakdownQuotaName {\n ROW_QUERIES = \"rowQueries\",\n DATASOURCE_QUERIES = \"datasourceQueries\",\n AUTOMATIONS = \"automations\",\n}\n\nexport const APP_QUOTA_NAMES = [\n StaticQuotaName.ROWS,\n MonthlyQuotaName.QUERIES,\n MonthlyQuotaName.AUTOMATIONS,\n]\n\nexport const BREAKDOWN_QUOTA_NAMES = [\n MonthlyQuotaName.QUERIES,\n MonthlyQuotaName.AUTOMATIONS,\n]\n\nexport interface UsageBreakdown {\n parent: MonthlyQuotaName\n values: {\n [key: string]: number\n }\n}\n\nexport type QuotaTriggers = {\n [key: string]: string | undefined\n}\n\nexport interface StaticUsage {\n [StaticQuotaName.APPS]: number\n [StaticQuotaName.PLUGINS]: number\n [StaticQuotaName.USERS]: number\n [StaticQuotaName.USER_GROUPS]: number\n [StaticQuotaName.ROWS]: number\n triggers: {\n [key in StaticQuotaName]?: QuotaTriggers\n }\n}\n\nexport interface MonthlyUsage {\n [MonthlyQuotaName.QUERIES]: number\n [MonthlyQuotaName.AUTOMATIONS]: number\n [MonthlyQuotaName.DAY_PASSES]: number\n triggers: {\n [key in MonthlyQuotaName]?: QuotaTriggers\n }\n breakdown?: {\n [key in BreakdownQuotaName]?: UsageBreakdown\n }\n}\n\nexport interface BaseQuotaUsage {\n usageQuota: StaticUsage\n monthly: {\n [key: string]: MonthlyUsage\n }\n}\n\nexport interface QuotaUsage extends BaseQuotaUsage {\n _id: string\n _rev?: string\n quotaReset: string\n apps?: {\n [key: string]: BaseQuotaUsage\n }\n}\n\nexport type SetUsageValues = {\n total: number\n app?: number\n breakdown?: number\n triggers?: QuotaTriggers\n}\n\nexport type UsageValues = {\n total: number\n app?: number\n breakdown?: number\n}\n", "export * from \"./helpers\"\nexport * from \"./integrations\"\n", "import { User } from \"@budibase/types\"\n\n/**\n * Gets a key within an object. The key supports dot syntax for retrieving deep\n * fields - e.g. \"a.b.c\".\n * Exact matches of keys with dots in them take precedence over nested keys of\n * the same path - e.g. getting \"a.b\" from { \"a.b\": \"foo\", a: { b: \"bar\" } }\n * will return \"foo\" over \"bar\".\n * @param obj the object\n * @param key the key\n * @return {*|null} the value or null if a value was not found for this key\n */\nexport const deepGet = (obj: { [x: string]: any }, key: string) => {\n if (!obj || !key) {\n return null\n }\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return obj[key]\n }\n const split = key.split(\".\")\n for (let i = 0; i < split.length; i++) {\n obj = obj?.[split[i]]\n }\n return obj\n}\n\n/**\n * Gets the initials to show in a user avatar.\n * @param user the user\n */\nexport const getUserInitials = (user: User) => {\n if (!user) {\n return \"?\"\n }\n let initials = \"\"\n initials += user.firstName ? user.firstName[0] : \"\"\n initials += user.lastName ? user.lastName[0] : \"\"\n if (initials !== \"\") {\n return initials\n }\n return user.email?.[0] || \"U\"\n}\n\n/**\n * Gets a deterministic colour for a particular user\n * @param user the user\n */\nexport const getUserColor = (user: User) => {\n let id = user?._id\n if (!id) {\n return \"var(--spectrum-global-color-blue-400)\"\n }\n\n // In order to generate the same color for global users as app users, we need\n // to remove the app-specific table prefix\n id = id.replace(\"ro_ta_users_\", \"\")\n\n // Generate a hue based on the ID\n let hue = 1\n for (let i = 0; i < id.length; i++) {\n hue += id.charCodeAt(i)\n hue = hue % 36\n }\n return `hsl(${hue * 10}, 50%, 40%)`\n}\n\n/**\n * Gets a friendly label to describe who a user is.\n * @param user the user\n */\nexport const getUserLabel = (user: User) => {\n if (!user) {\n return \"\"\n }\n const { firstName, lastName, email } = user\n if (firstName && lastName) {\n return `${firstName} ${lastName}`\n } else if (firstName) {\n return firstName\n } else if (lastName) {\n return lastName\n } else {\n return email\n }\n}\n", "import { Datasource, SourceName } from \"@budibase/types\"\n\nexport function isGoogleSheets(type: SourceName) {\n return type === SourceName.GOOGLE_SHEETS\n}\n\nexport function isSQL(datasource: Datasource): boolean {\n if (!datasource || !datasource.source) {\n return false\n }\n const SQL = [\n SourceName.POSTGRES,\n SourceName.SQL_SERVER,\n SourceName.MYSQL,\n SourceName.ORACLE,\n ]\n return SQL.indexOf(datasource.source) !== -1\n}\n", "export function unreachable(\n value: never,\n message = `No such case in exhaustive switch: ${value}`\n) {\n throw new Error(message)\n}\n\nexport async function parallelForeach<T>(\n items: T[],\n task: (item: T) => Promise<void>,\n maxConcurrency: number\n): Promise<void> {\n const promises: Promise<void>[] = []\n let index = 0\n\n const processItem = async (item: T) => {\n try {\n await task(item)\n } finally {\n processNext()\n }\n }\n\n const processNext = () => {\n if (index >= items.length) {\n // No more items to process\n return\n }\n\n const item = items[index]\n index++\n\n const promise = processItem(item)\n promises.push(promise)\n\n if (promises.length >= maxConcurrency) {\n Promise.race(promises).then(processNext)\n } else {\n processNext()\n }\n }\n processNext()\n\n await Promise.all(promises)\n}\n", "export * from \"./documents\"\n", "import { DocumentType, prefixed } from \"@budibase/types\"\n\nconst APP_PREFIX = prefixed(DocumentType.APP)\nconst APP_DEV_PREFIX = prefixed(DocumentType.APP_DEV)\n\nexport function getDevAppID(appId: string) {\n if (!appId) {\n throw new Error(\"No app ID provided\")\n }\n if (appId.startsWith(APP_DEV_PREFIX)) {\n return appId\n }\n // split to take off the app_ element, then join it together incase any other app_ exist\n const split = appId.split(APP_PREFIX)\n split.shift()\n const rest = split.join(APP_PREFIX)\n return `${APP_DEV_PREFIX}${rest}`\n}\n\n/**\n * Convert a development app ID to a deployed app ID.\n */\nexport function getProdAppID(appId: string) {\n if (!appId) {\n throw new Error(\"No app ID provided\")\n }\n if (!appId.startsWith(APP_DEV_PREFIX)) {\n return appId\n }\n // split to take off the app_dev element, then join it together incase any other app_ exist\n const split = appId.split(APP_DEV_PREFIX)\n split.shift()\n const rest = split.join(APP_DEV_PREFIX)\n return `${APP_PREFIX}${rest}`\n}\n", "import { ContextUser, User } from \"@budibase/types\"\nimport { getProdAppID } from \"./applications\"\n\n// checks if a user is specifically a builder, given an app ID\nexport function isBuilder(user: User | ContextUser, appId?: string): boolean {\n if (!user) {\n return false\n }\n if (user.builder?.global) {\n return true\n } else if (appId && user.builder?.apps?.includes(getProdAppID(appId))) {\n return true\n }\n return false\n}\n\nexport function isGlobalBuilder(user: User | ContextUser): boolean {\n return (isBuilder(user) && !hasAppBuilderPermissions(user)) || isAdmin(user)\n}\n\n// alias for hasAdminPermission, currently do the same thing\n// in future whether someone has admin permissions and whether they are\n// an admin for a specific resource could be separated\nexport function isAdmin(user: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n return hasAdminPermissions(user)\n}\n\nexport function isAdminOrBuilder(\n user: User | ContextUser,\n appId?: string\n): boolean {\n return isBuilder(user, appId) || isAdmin(user)\n}\n\n// check if they are a builder within an app (not necessarily a global builder)\nexport function hasAppBuilderPermissions(user?: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n const appLength = user.builder?.apps?.length\n const isGlobalBuilder = !!user.builder?.global\n return !isGlobalBuilder && appLength != null && appLength > 0\n}\n\n// checks if a user is capable of building any app\nexport function hasBuilderPermissions(user?: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n return user.builder?.global || hasAppBuilderPermissions(user)\n}\n\n// checks if a user is capable of being an admin\nexport function hasAdminPermissions(user?: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n return !!user.admin?.global\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,kBAAkB;AAAA,EAC7B,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,WAAW;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,OAAO;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,YAAY;AAAA,IACV,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,aAAa;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,aAAa;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEO,IAAM,wBAAwB;AAAA,E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AAO,oBAAoB,IAAI;AACjC;AAEO,SAAS,iBACd,MACA,OACS;AACT,SAAO,UAAU,MAAM,KAAK,KAAK,QAAQ,IAAI;AAC/C;AAGO,SAAS,yBAAyB,MAAoC;AAtC7E;AAuCE,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,QAAM,aAAY,gBAAK,YAAL,mBAAc,SAAd,mBAAoB;AACtC,QAAMC,mBAAkB,CAAC,GAAC,UAAK,YAAL,mBAAc;AACxC,SAAO,CAACA,oBAAmB,aAAa,QAAQ,YAAY;AAC9D;AAGO,SAAS,sBAAsB,MAAoC;AAhD1E;AAiDE,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,WAAO,UAAK,YAAL,mBAAc,WAAU,yBAAyB,IAAI;AAC9D;AAGO,SAAS,oBAAoB,MAAoC;AAxDxE;AAyDE,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SAAO,CAAC,GAAC,UAAK,UAAL,mBAAY;AACvB;",
|
|
4
|
+
"sourcesContent": ["export * from \"./constants\"\nexport * as dataFilters from \"./filters\"\nexport * as helpers from \"./helpers\"\nexport * as utils from \"./utils\"\nexport * as sdk from \"./sdk\"\n", "export const OperatorOptions = {\n Equals: {\n value: \"equal\",\n label: \"Equals\",\n },\n NotEquals: {\n value: \"notEqual\",\n label: \"Not equals\",\n },\n Empty: {\n value: \"empty\",\n label: \"Is empty\",\n },\n NotEmpty: {\n value: \"notEmpty\",\n label: \"Is not empty\",\n },\n StartsWith: {\n value: \"string\",\n label: \"Starts with\",\n },\n Like: {\n value: \"fuzzy\",\n label: \"Like\",\n },\n MoreThan: {\n value: \"rangeLow\",\n label: \"More than or equal to\",\n },\n LessThan: {\n value: \"rangeHigh\",\n label: \"Less than or equal to\",\n },\n Contains: {\n value: \"contains\",\n label: \"Contains\",\n },\n NotContains: {\n value: \"notContains\",\n label: \"Does not contain\",\n },\n In: {\n value: \"oneOf\",\n label: \"Is in\",\n },\n ContainsAny: {\n value: \"containsAny\",\n label: \"Has any\",\n },\n}\n\nexport const SqlNumberTypeRangeMap = {\n integer: {\n max: 2147483647,\n min: -2147483648,\n },\n int: {\n max: 2147483647,\n min: -2147483648,\n },\n smallint: {\n max: 32767,\n min: -32768,\n },\n mediumint: {\n max: 8388607,\n min: -8388608,\n },\n}\n\nexport enum SocketEvent {\n UserUpdate = \"UserUpdate\",\n UserDisconnect = \"UserDisconnect\",\n Heartbeat = \"Heartbeat\",\n}\n\nexport enum GridSocketEvent {\n RowChange = \"RowChange\",\n TableChange = \"TableChange\",\n SelectTable = \"SelectTable\",\n SelectCell = \"SelectCell\",\n}\n\nexport enum BuilderSocketEvent {\n SelectApp = \"SelectApp\",\n TableChange = \"TableChange\",\n DatasourceChange = \"DatasourceChange\",\n LockTransfer = \"LockTransfer\",\n ScreenChange = \"ScreenChange\",\n AppMetadataChange = \"AppMetadataChange\",\n SelectResource = \"SelectResource\",\n AppPublishChange = \"AppPublishChange\",\n AutomationChange = \"AutomationChange\",\n}\n\nexport const SocketSessionTTL = 60\nexport const ValidQueryNameRegex = /^[^()]*$/\nexport const ValidColumnNameRegex = /^[_a-zA-Z0-9\\s]*$/g\n", "import {\n Datasource,\n FieldType,\n SortDirection,\n SortType,\n SearchFilter,\n SearchQuery,\n SearchQueryFields,\n} from \"@budibase/types\"\nimport { OperatorOptions, SqlNumberTypeRangeMap } from \"./constants\"\nimport { deepGet } from \"./helpers\"\n\nconst HBS_REGEX = /{{([^{].*?)}}/g\n\n/**\n * Returns the valid operator options for a certain data type\n * @param type the data type\n */\nexport const getValidOperatorsForType = (\n type: FieldType,\n field: string,\n datasource: Datasource & { tableId: any } // TODO: is this table id ever populated?\n) => {\n const Op = OperatorOptions\n const stringOps = [\n Op.Equals,\n Op.NotEquals,\n Op.StartsWith,\n Op.Like,\n Op.Empty,\n Op.NotEmpty,\n Op.In,\n ]\n const numOps = [\n Op.Equals,\n Op.NotEquals,\n Op.MoreThan,\n Op.LessThan,\n Op.Empty,\n Op.NotEmpty,\n Op.In,\n ]\n let ops: {\n value: string\n label: string\n }[] = []\n if (type === \"string\") {\n ops = stringOps\n } else if (type === \"number\" || type === \"bigint\") {\n ops = numOps\n } else if (type === \"options\") {\n ops = [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty, Op.In]\n } else if (type === \"array\") {\n ops = [Op.Contains, Op.NotContains, Op.Empty, Op.NotEmpty, Op.ContainsAny]\n } else if (type === \"boolean\") {\n ops = [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty]\n } else if (type === \"longform\") {\n ops = stringOps\n } else if (type === \"datetime\") {\n ops = numOps\n } else if (type === \"formula\") {\n ops = stringOps.concat([Op.MoreThan, Op.LessThan])\n }\n\n // Only allow equal/not equal for _id in SQL tables\n const externalTable = datasource?.tableId?.includes(\"datasource_plus\")\n if (field === \"_id\" && externalTable) {\n ops = [Op.Equals, Op.NotEquals, Op.In]\n }\n\n return ops\n}\n\n/**\n * Operators which do not support empty strings as values\n */\nexport const NoEmptyFilterStrings = [\n OperatorOptions.StartsWith.value,\n OperatorOptions.Like.value,\n OperatorOptions.Equals.value,\n OperatorOptions.NotEquals.value,\n OperatorOptions.Contains.value,\n OperatorOptions.NotContains.value,\n] as (keyof SearchQueryFields)[]\n\n/**\n * Removes any fields that contain empty strings that would cause inconsistent\n * behaviour with how backend tables are filtered (no value means no filter).\n */\nconst cleanupQuery = (query: SearchQuery) => {\n if (!query) {\n return query\n }\n for (let filterField of NoEmptyFilterStrings) {\n if (!query[filterField]) {\n continue\n }\n\n for (let [key, value] of Object.entries(query[filterField]!)) {\n if (value == null || value === \"\") {\n delete query[filterField]![key]\n }\n }\n }\n return query\n}\n\n/**\n * Removes a numeric prefix on field names designed to give fields uniqueness\n */\nconst removeKeyNumbering = (key: string) => {\n if (typeof key === \"string\" && key.match(/\\d[0-9]*:/g) != null) {\n const parts = key.split(\":\")\n parts.shift()\n return parts.join(\":\")\n } else {\n return key\n }\n}\n\n/**\n * Builds a lucene JSON query from the filter structure generated in the builder\n * @param filter the builder filter structure\n */\nexport const buildLuceneQuery = (filter: SearchFilter[]) => {\n let query: SearchQuery = {\n string: {},\n fuzzy: {},\n range: {},\n equal: {},\n notEqual: {},\n empty: {},\n notEmpty: {},\n contains: {},\n notContains: {},\n oneOf: {},\n containsAny: {},\n }\n if (Array.isArray(filter)) {\n filter.forEach(expression => {\n let { operator, field, type, value, externalType, onEmptyFilter } =\n expression\n const isHbs =\n typeof value === \"string\" && (value.match(HBS_REGEX) || []).length > 0\n // Parse all values into correct types\n if (operator === \"allOr\") {\n query.allOr = true\n return\n }\n if (onEmptyFilter) {\n query.onEmptyFilter = onEmptyFilter\n return\n }\n if (\n type === \"datetime\" &&\n !isHbs &&\n operator !== \"empty\" &&\n operator !== \"notEmpty\"\n ) {\n // Ensure date value is a valid date and parse into correct format\n if (!value) {\n return\n }\n try {\n value = new Date(value).toISOString()\n } catch (error) {\n return\n }\n }\n if (type === \"number\" && typeof value === \"string\") {\n if (operator === \"oneOf\") {\n value = value.split(\",\").map(item => parseFloat(item))\n } else if (!isHbs) {\n value = parseFloat(value)\n }\n }\n if (type === \"boolean\") {\n value = `${value}`?.toLowerCase() === \"true\"\n }\n if (\n [\"contains\", \"notContains\", \"containsAny\"].includes(operator) &&\n type === \"array\" &&\n typeof value === \"string\"\n ) {\n value = value.split(\",\")\n }\n if (operator.startsWith(\"range\") && query.range) {\n const minint =\n SqlNumberTypeRangeMap[\n externalType as keyof typeof SqlNumberTypeRangeMap\n ]?.min || Number.MIN_SAFE_INTEGER\n const maxint =\n SqlNumberTypeRangeMap[\n externalType as keyof typeof SqlNumberTypeRangeMap\n ]?.max || Number.MAX_SAFE_INTEGER\n if (!query.range[field]) {\n query.range[field] = {\n low: type === \"number\" ? minint : \"0000-00-00T00:00:00.000Z\",\n high: type === \"number\" ? maxint : \"9999-00-00T00:00:00.000Z\",\n }\n }\n if ((operator as any) === \"rangeLow\" && value != null && value !== \"\") {\n query.range[field].low = value\n } else if (\n (operator as any) === \"rangeHigh\" &&\n value != null &&\n value !== \"\"\n ) {\n query.range[field].high = value\n }\n } else if (query[operator] && operator !== \"onEmptyFilter\") {\n if (type === \"boolean\") {\n // Transform boolean filters to cope with null.\n // \"equals false\" needs to be \"not equals true\"\n // \"not equals false\" needs to be \"equals true\"\n if (operator === \"equal\" && value === false) {\n query.notEqual = query.notEqual || {}\n query.notEqual[field] = true\n } else if (operator === \"notEqual\" && value === false) {\n query.equal = query.equal || {}\n query.equal[field] = true\n } else {\n query[operator] = query[operator] || {}\n query[operator]![field] = value\n }\n } else {\n query[operator] = query[operator] || {}\n query[operator]![field] = value\n }\n }\n })\n }\n return query\n}\n\n/**\n * Performs a client-side lucene search on an array of data\n * @param docs the data\n * @param query the JSON lucene query\n */\nexport const runLuceneQuery = (docs: any[], query?: SearchQuery) => {\n if (!docs || !Array.isArray(docs)) {\n return []\n }\n if (!query) {\n return docs\n }\n\n // Make query consistent first\n query = cleanupQuery(query)\n\n // Iterates over a set of filters and evaluates a fail function against a doc\n const match =\n (\n type: keyof SearchQueryFields,\n failFn: (docValue: any, testValue: any) => boolean\n ) =>\n (doc: any) => {\n const filters = Object.entries(query![type] || {})\n for (let i = 0; i < filters.length; i++) {\n const [key, testValue] = filters[i]\n const docValue = deepGet(doc, removeKeyNumbering(key))\n if (failFn(docValue, testValue)) {\n return false\n }\n }\n return true\n }\n\n // Process a string match (fails if the value does not start with the string)\n const stringMatch = match(\"string\", (docValue: string, testValue: string) => {\n return (\n !docValue || !docValue?.toLowerCase().startsWith(testValue?.toLowerCase())\n )\n })\n\n // Process a fuzzy match (treat the same as starts with when running locally)\n const fuzzyMatch = match(\"fuzzy\", (docValue: string, testValue: string) => {\n return (\n !docValue || !docValue?.toLowerCase().startsWith(testValue?.toLowerCase())\n )\n })\n\n // Process a range match\n const rangeMatch = match(\n \"range\",\n (\n docValue: string | number | null,\n testValue: { low: number; high: number }\n ) => {\n return (\n docValue == null ||\n docValue === \"\" ||\n +docValue < testValue.low ||\n +docValue > testValue.high\n )\n }\n )\n\n // Process an equal match (fails if the value is different)\n const equalMatch = match(\n \"equal\",\n (docValue: any, testValue: string | null) => {\n return testValue != null && testValue !== \"\" && docValue !== testValue\n }\n )\n\n // Process a not-equal match (fails if the value is the same)\n const notEqualMatch = match(\n \"notEqual\",\n (docValue: any, testValue: string | null) => {\n return testValue != null && testValue !== \"\" && docValue === testValue\n }\n )\n\n // Process an empty match (fails if the value is not empty)\n const emptyMatch = match(\"empty\", (docValue: string | null) => {\n return docValue != null && docValue !== \"\"\n })\n\n // Process a not-empty match (fails is the value is empty)\n const notEmptyMatch = match(\"notEmpty\", (docValue: string | null) => {\n return docValue == null || docValue === \"\"\n })\n\n // Process an includes match (fails if the value is not included)\n const oneOf = match(\"oneOf\", (docValue: any, testValue: any) => {\n if (typeof testValue === \"string\") {\n testValue = testValue.split(\",\")\n if (typeof docValue === \"number\") {\n testValue = testValue.map((item: string) => parseFloat(item))\n }\n }\n return !testValue?.includes(docValue)\n })\n\n const containsAny = match(\"containsAny\", (docValue: any, testValue: any) => {\n return !docValue?.includes(...testValue)\n })\n\n const contains = match(\n \"contains\",\n (docValue: string | any[], testValue: any[]) => {\n return !testValue?.every((item: any) => docValue?.includes(item))\n }\n )\n\n const notContains = match(\n \"notContains\",\n (docValue: string | any[], testValue: any[]) => {\n return testValue?.every((item: any) => docValue?.includes(item))\n }\n )\n\n // Match a document against all criteria\n const docMatch = (doc: any) => {\n return (\n stringMatch(doc) &&\n fuzzyMatch(doc) &&\n rangeMatch(doc) &&\n equalMatch(doc) &&\n notEqualMatch(doc) &&\n emptyMatch(doc) &&\n notEmptyMatch(doc) &&\n oneOf(doc) &&\n contains(doc) &&\n containsAny(doc) &&\n notContains(doc)\n )\n }\n\n // Process all docs\n return docs.filter(docMatch)\n}\n\n/**\n * Performs a client-side sort from the equivalent server-side lucene sort\n * parameters.\n * @param docs the data\n * @param sort the sort column\n * @param sortOrder the sort order (\"ascending\" or \"descending\")\n * @param sortType the type of sort (\"string\" or \"number\")\n */\nexport const luceneSort = (\n docs: any[],\n sort: string,\n sortOrder: SortDirection,\n sortType = SortType.STRING\n) => {\n if (!sort || !sortOrder || !sortType) {\n return docs\n }\n const parse =\n sortType === \"string\" ? (x: any) => `${x}` : (x: string) => parseFloat(x)\n return docs\n .slice()\n .sort((a: { [x: string]: any }, b: { [x: string]: any }) => {\n const colA = parse(a[sort])\n const colB = parse(b[sort])\n if (sortOrder.toLowerCase() === \"descending\") {\n return colA > colB ? -1 : 1\n } else {\n return colA > colB ? 1 : -1\n }\n })\n}\n\n/**\n * Limits the specified docs to the specified number of rows from the equivalent\n * server-side lucene limit parameters.\n * @param docs the data\n * @param limit the number of docs to limit to\n */\nexport const luceneLimit = (docs: any[], limit: string) => {\n const numLimit = parseFloat(limit)\n if (isNaN(numLimit)) {\n return docs\n }\n return docs.slice(0, numLimit)\n}\n\nexport const hasFilters = (query?: SearchQuery) => {\n if (!query) {\n return false\n }\n const skipped = [\"allOr\", \"onEmptyFilter\"]\n for (let [key, value] of Object.entries(query)) {\n if (skipped.includes(key) || typeof value !== \"object\") {\n continue\n }\n if (Object.keys(value).length !== 0) {\n return true\n }\n }\n return false\n}\n\n", "import { Hosting } from \"../hosting\"\nimport { Group, Identity } from \"./identification\"\n\nexport enum Event {\n // USER\n USER_CREATED = \"user:created\",\n USER_UPDATED = \"user:updated\",\n USER_DELETED = \"user:deleted\",\n\n // USER / ONBOARDING\n USER_ONBOARDING_COMPLETE = \"user:onboarding:complete\",\n\n // USER / PERMISSIONS\n USER_PERMISSION_ADMIN_ASSIGNED = \"user:admin:assigned\",\n USER_PERMISSION_ADMIN_REMOVED = \"user:admin:removed\",\n USER_PERMISSION_BUILDER_ASSIGNED = \"user:builder:assigned\",\n USER_PERMISSION_BUILDER_REMOVED = \"user:builder:removed\",\n\n // USER / INVITE\n USER_INVITED = \"user:invited\",\n USER_INVITED_ACCEPTED = \"user:invite:accepted\",\n\n // USER / PASSWORD\n USER_PASSWORD_FORCE_RESET = \"user:password:force:reset\",\n USER_PASSWORD_UPDATED = \"user:password:updated\",\n USER_PASSWORD_RESET_REQUESTED = \"user:password:reset:requested\",\n USER_PASSWORD_RESET = \"user:password:reset\",\n\n // USER / COLLABORATION\n USER_DATA_COLLABORATION = \"user:data:collaboration\",\n\n // EMAIL\n EMAIL_SMTP_CREATED = \"email:smtp:created\",\n EMAIL_SMTP_UPDATED = \"email:smtp:updated\",\n\n // AUTH\n AUTH_SSO_CREATED = \"auth:sso:created\",\n AUTH_SSO_UPDATED = \"auth:sso:updated\",\n AUTH_SSO_ACTIVATED = \"auth:sso:activated\",\n AUTH_SSO_DEACTIVATED = \"auth:sso:deactivated\",\n AUTH_LOGIN = \"auth:login\",\n AUTH_LOGOUT = \"auth:logout\",\n\n // ORG\n ORG_NAME_UPDATED = \"org:info:name:updated\",\n ORG_LOGO_UPDATED = \"org:info:logo:updated\",\n ORG_PLATFORM_URL_UPDATED = \"org:platformurl:updated\",\n\n // INSTALLATION\n INSTALLATION_VERSION_CHECKED = \"installation:version:checked\",\n INSTALLATION_VERSION_UPGRADED = \"installation:version:upgraded\",\n INSTALLATION_VERSION_DOWNGRADED = \"installation:version:downgraded\",\n INSTALLATION_FIRST_STARTUP = \"installation:firstStartup\",\n\n // ORG / ANALYTICS\n ANALYTICS_OPT_OUT = \"analytics:opt:out\",\n ANALYTICS_OPT_IN = \"analytics:opt:in\",\n\n // APP\n APP_CREATED = \"app:created\",\n APP_UPDATED = \"app:updated\",\n APP_DELETED = \"app:deleted\",\n APP_PUBLISHED = \"app:published\",\n APP_UNPUBLISHED = \"app:unpublished\",\n APP_TEMPLATE_IMPORTED = \"app:template:imported\",\n APP_FILE_IMPORTED = \"app:file:imported\",\n APP_VERSION_UPDATED = \"app:version:updated\",\n APP_VERSION_REVERTED = \"app:version:reverted\",\n APP_REVERTED = \"app:reverted\",\n APP_EXPORTED = \"app:exported\",\n\n // ROLE\n ROLE_CREATED = \"role:created\",\n ROLE_UPDATED = \"role:updated\",\n ROLE_DELETED = \"role:deleted\",\n ROLE_ASSIGNED = \"role:assigned\",\n ROLE_UNASSIGNED = \"role:unassigned\",\n\n // SERVE\n SERVED_BUILDER = \"served:builder\",\n SERVED_APP = \"served:app\",\n SERVED_APP_PREVIEW = \"served:app:preview\",\n\n // DATASOURCE\n DATASOURCE_CREATED = \"datasource:created\",\n DATASOURCE_UPDATED = \"datasource:updated\",\n DATASOURCE_DELETED = \"datasource:deleted\",\n\n // QUERY\n QUERY_CREATED = \"query:created\",\n QUERY_UPDATED = \"query:updated\",\n QUERY_DELETED = \"query:deleted\",\n QUERY_IMPORT = \"query:import\",\n QUERIES_RUN = \"queries:run\",\n QUERY_PREVIEWED = \"query:previewed\",\n\n // TABLE\n TABLE_CREATED = \"table:created\",\n TABLE_UPDATED = \"table:updated\",\n TABLE_DELETED = \"table:deleted\",\n TABLE_EXPORTED = \"table:exported\",\n TABLE_IMPORTED = \"table:imported\",\n TABLE_DATA_IMPORTED = \"table:data:imported\",\n\n // VIEW\n VIEW_CREATED = \"view:created\",\n VIEW_UPDATED = \"view:updated\",\n VIEW_DELETED = \"view:deleted\",\n VIEW_EXPORTED = \"view:exported\",\n VIEW_FILTER_CREATED = \"view:filter:created\",\n VIEW_FILTER_UPDATED = \"view:filter:updated\",\n VIEW_FILTER_DELETED = \"view:filter:deleted\",\n VIEW_CALCULATION_CREATED = \"view:calculation:created\",\n VIEW_CALCULATION_UPDATED = \"view:calculation:updated\",\n VIEW_CALCULATION_DELETED = \"view:calculation:deleted\",\n\n // ROWS\n ROWS_CREATED = \"rows:created\",\n ROWS_IMPORTED = \"rows:imported\",\n\n // COMPONENT\n COMPONENT_CREATED = \"component:created\",\n COMPONENT_DELETED = \"component:deleted\",\n\n // SCREEN\n SCREEN_CREATED = \"screen:created\",\n SCREEN_DELETED = \"screen:deleted\",\n\n // LAYOUT\n LAYOUT_CREATED = \"layout:created\",\n LAYOUT_DELETED = \"layout:deleted\",\n\n // AUTOMATION\n AUTOMATION_CREATED = \"automation:created\",\n AUTOMATION_DELETED = \"automation:deleted\",\n AUTOMATION_TESTED = \"automation:tested\",\n AUTOMATIONS_RUN = \"automations:run\",\n AUTOMATION_STEP_CREATED = \"automation:step:created\",\n AUTOMATION_STEP_DELETED = \"automation:step:deleted\",\n AUTOMATION_TRIGGER_UPDATED = \"automation:trigger:updated\",\n\n // LICENSE\n LICENSE_PLAN_CHANGED = \"license:plan:changed\",\n LICENSE_ACTIVATED = \"license:activated\",\n LICENSE_PAYMENT_FAILED = \"license:payment:failed\",\n LICENSE_PAYMENT_RECOVERED = \"license:payment:recovered\",\n LICENSE_CHECKOUT_OPENED = \"license:checkout:opened\",\n LICENSE_CHECKOUT_SUCCESS = \"license:checkout:success\",\n LICENSE_PORTAL_OPENED = \"license:portal:opened\",\n\n // ACCOUNT\n ACCOUNT_CREATED = \"account:created\",\n ACCOUNT_DELETED = \"account:deleted\",\n ACCOUNT_VERIFIED = \"account:verified\",\n\n // BACKFILL\n APP_BACKFILL_SUCCEEDED = \"app:backfill:succeeded\",\n APP_BACKFILL_FAILED = \"app:backfill:failed\",\n TENANT_BACKFILL_SUCCEEDED = \"tenant:backfill:succeeded\",\n TENANT_BACKFILL_FAILED = \"tenant:backfill:failed\",\n INSTALLATION_BACKFILL_SUCCEEDED = \"installation:backfill:succeeded\",\n INSTALLATION_BACKFILL_FAILED = \"installation:backfill:failed\",\n\n // USER\n USER_GROUP_CREATED = \"user_group:created\",\n USER_GROUP_UPDATED = \"user_group:updated\",\n USER_GROUP_DELETED = \"user_group:deleted\",\n USER_GROUP_USERS_ADDED = \"user_group:user_added\",\n USER_GROUP_USERS_REMOVED = \"user_group:users_deleted\",\n USER_GROUP_PERMISSIONS_EDITED = \"user_group:permissions_edited\",\n USER_GROUP_ONBOARDING = \"user_group:onboarding_added\",\n\n // PLUGIN\n PLUGIN_INIT = \"plugin:init\",\n PLUGIN_IMPORTED = \"plugin:imported\",\n PLUGIN_DELETED = \"plugin:deleted\",\n\n // BACKUP\n APP_BACKUP_RESTORED = \"app:backup:restored\",\n APP_BACKUP_TRIGGERED = \"app:backup:triggered\",\n\n // ENVIRONMENT VARIABLE\n ENVIRONMENT_VARIABLE_CREATED = \"environment_variable:created\",\n ENVIRONMENT_VARIABLE_DELETED = \"environment_variable:deleted\",\n ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED = \"environment_variable:upgrade_panel_opened\",\n\n // AUDIT LOG\n AUDIT_LOGS_FILTERED = \"audit_log:filtered\",\n AUDIT_LOGS_DOWNLOADED = \"audit_log:downloaded\",\n}\n\nexport const UserGroupSyncEvents: Event[] = [\n Event.USER_CREATED,\n Event.USER_UPDATED,\n Event.USER_DELETED,\n Event.USER_PERMISSION_ADMIN_ASSIGNED,\n Event.USER_PERMISSION_ADMIN_REMOVED,\n Event.USER_PERMISSION_BUILDER_ASSIGNED,\n Event.USER_PERMISSION_BUILDER_REMOVED,\n Event.USER_GROUP_CREATED,\n Event.USER_GROUP_UPDATED,\n Event.USER_GROUP_DELETED,\n Event.USER_GROUP_USERS_ADDED,\n Event.USER_GROUP_USERS_REMOVED,\n Event.USER_GROUP_PERMISSIONS_EDITED,\n]\n\nexport const AsyncEvents: Event[] = [...UserGroupSyncEvents]\n\n// all events that are not audited have been added to this record as undefined, this means\n// that Typescript can protect us against new events being added and auditing of those\n// events not being considered. This might be a little ugly, but provides a level of\n// Typescript build protection for the audit log feature, any new event also needs to be\n// added to this map, during which the developer will need to consider if it should be\n// a user facing event or not.\nexport const AuditedEventFriendlyName: Record<Event, string | undefined> = {\n // USER\n [Event.USER_CREATED]: `User \"{{ email }}\" created{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_UPDATED]: `User \"{{ email }}\" updated{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_DELETED]: `User \"{{ email }}\" deleted{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_PERMISSION_ADMIN_ASSIGNED]: `User \"{{ email }}\" admin role assigned`,\n [Event.USER_PERMISSION_ADMIN_REMOVED]: `User \"{{ email }}\" admin role removed`,\n [Event.USER_PERMISSION_BUILDER_ASSIGNED]: `User \"{{ email }}\" builder role assigned`,\n [Event.USER_PERMISSION_BUILDER_REMOVED]: `User \"{{ email }}\" builder role removed`,\n [Event.USER_INVITED]: `User \"{{ email }}\" invited`,\n [Event.USER_INVITED_ACCEPTED]: `User \"{{ email }}\" accepted invite`,\n [Event.USER_PASSWORD_UPDATED]: `User \"{{ email }}\" password updated`,\n [Event.USER_PASSWORD_RESET_REQUESTED]: `User \"{{ email }}\" password reset requested`,\n [Event.USER_PASSWORD_RESET]: `User \"{{ email }}\" password reset`,\n [Event.USER_GROUP_CREATED]: `User group \"{{ name }}\" created{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_UPDATED]: `User group \"{{ name }}\" updated{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_DELETED]: `User group \"{{ name }}\" deleted{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_USERS_ADDED]: `User group \"{{ name }}\" {{ count }} users added{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_USERS_REMOVED]: `User group \"{{ name }}\" {{ count }} users removed{{#if viaScim}} via SCIM{{/if}}`,\n [Event.USER_GROUP_PERMISSIONS_EDITED]: `User group \"{{ name }}\" permissions edited`,\n [Event.USER_PASSWORD_FORCE_RESET]: undefined,\n [Event.USER_GROUP_ONBOARDING]: undefined,\n [Event.USER_ONBOARDING_COMPLETE]: undefined,\n [Event.USER_DATA_COLLABORATION]: undefined,\n\n // EMAIL\n [Event.EMAIL_SMTP_CREATED]: `Email configuration created`,\n [Event.EMAIL_SMTP_UPDATED]: `Email configuration updated`,\n\n // AUTH\n [Event.AUTH_SSO_CREATED]: `SSO configuration created`,\n [Event.AUTH_SSO_UPDATED]: `SSO configuration updated`,\n [Event.AUTH_SSO_ACTIVATED]: `SSO configuration activated`,\n [Event.AUTH_SSO_DEACTIVATED]: `SSO configuration deactivated`,\n [Event.AUTH_LOGIN]: `User \"{{ email }}\" logged in`,\n [Event.AUTH_LOGOUT]: `User \"{{ email }}\" logged out`,\n\n // ORG\n [Event.ORG_NAME_UPDATED]: `Organisation name updated`,\n [Event.ORG_LOGO_UPDATED]: `Organisation logo updated`,\n [Event.ORG_PLATFORM_URL_UPDATED]: `Organisation platform URL updated`,\n\n // APP\n [Event.APP_CREATED]: `App \"{{ name }}\" created`,\n [Event.APP_UPDATED]: `App \"{{ name }}\" updated`,\n [Event.APP_DELETED]: `App \"{{ name }}\" deleted`,\n [Event.APP_PUBLISHED]: `App \"{{ name }}\" published`,\n [Event.APP_UNPUBLISHED]: `App \"{{ name }}\" unpublished`,\n [Event.APP_TEMPLATE_IMPORTED]: `App \"{{ name }}\" template imported`,\n [Event.APP_FILE_IMPORTED]: `App \"{{ name }}\" file imported`,\n [Event.APP_VERSION_UPDATED]: `App \"{{ name }}\" version updated`,\n [Event.APP_VERSION_REVERTED]: `App \"{{ name }}\" version reverted`,\n [Event.APP_REVERTED]: `App \"{{ name }}\" reverted`,\n [Event.APP_EXPORTED]: `App \"{{ name }}\" exported`,\n [Event.APP_BACKUP_RESTORED]: `App backup \"{{ name }}\" restored`,\n [Event.APP_BACKUP_TRIGGERED]: `App backup \"{{ name }}\" triggered`,\n\n // DATASOURCE\n [Event.DATASOURCE_CREATED]: `Datasource created`,\n [Event.DATASOURCE_UPDATED]: `Datasource updated`,\n [Event.DATASOURCE_DELETED]: `Datasource deleted`,\n\n // QUERY\n [Event.QUERY_CREATED]: `Query created`,\n [Event.QUERY_UPDATED]: `Query updated`,\n [Event.QUERY_DELETED]: `Query deleted`,\n [Event.QUERY_IMPORT]: `Query import`,\n [Event.QUERIES_RUN]: undefined,\n [Event.QUERY_PREVIEWED]: undefined,\n\n // TABLE\n [Event.TABLE_CREATED]: `Table \"{{ name }}\" created`,\n [Event.TABLE_UPDATED]: `Table \"{{ name }}\" updated`,\n [Event.TABLE_DELETED]: `Table \"{{ name }}\" deleted`,\n [Event.TABLE_EXPORTED]: `Table \"{{ name }}\" exported`,\n [Event.TABLE_IMPORTED]: `Table \"{{ name }}\" imported`,\n [Event.TABLE_DATA_IMPORTED]: `Data imported to table`,\n\n // ROWS\n [Event.ROWS_CREATED]: `Rows created`,\n [Event.ROWS_IMPORTED]: `Rows imported`,\n\n // AUTOMATION\n [Event.AUTOMATION_CREATED]: `Automation \"{{ name }}\" created`,\n [Event.AUTOMATION_DELETED]: `Automation \"{{ name }}\" deleted`,\n [Event.AUTOMATION_STEP_CREATED]: `Automation \"{{ name }}\" step added`,\n [Event.AUTOMATION_STEP_DELETED]: `Automation \"{{ name }}\" step removed`,\n [Event.AUTOMATION_TESTED]: undefined,\n [Event.AUTOMATIONS_RUN]: undefined,\n [Event.AUTOMATION_TRIGGER_UPDATED]: undefined,\n\n // SCREEN\n [Event.SCREEN_CREATED]: `Screen \"{{ name }}\" created`,\n [Event.SCREEN_DELETED]: `Screen \"{{ name }}\" deleted`,\n\n // COMPONENT\n [Event.COMPONENT_CREATED]: `Component created`,\n [Event.COMPONENT_DELETED]: `Component deleted`,\n\n // ENVIRONMENT VARIABLE\n [Event.ENVIRONMENT_VARIABLE_CREATED]: `Environment variable created`,\n [Event.ENVIRONMENT_VARIABLE_DELETED]: `Environment variable deleted`,\n [Event.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED]: undefined,\n\n // PLUGIN\n [Event.PLUGIN_IMPORTED]: `Plugin imported`,\n [Event.PLUGIN_DELETED]: `Plugin deleted`,\n [Event.PLUGIN_INIT]: undefined,\n\n // ROLE - NOT AUDITED\n [Event.ROLE_CREATED]: undefined,\n [Event.ROLE_UPDATED]: undefined,\n [Event.ROLE_DELETED]: undefined,\n [Event.ROLE_ASSIGNED]: undefined,\n [Event.ROLE_UNASSIGNED]: undefined,\n\n // LICENSE - NOT AUDITED\n [Event.LICENSE_PLAN_CHANGED]: undefined,\n [Event.LICENSE_ACTIVATED]: undefined,\n [Event.LICENSE_PAYMENT_FAILED]: undefined,\n [Event.LICENSE_PAYMENT_RECOVERED]: undefined,\n [Event.LICENSE_CHECKOUT_OPENED]: undefined,\n [Event.LICENSE_CHECKOUT_SUCCESS]: undefined,\n [Event.LICENSE_PORTAL_OPENED]: undefined,\n\n // ACCOUNT - NOT AUDITED\n [Event.ACCOUNT_CREATED]: undefined,\n [Event.ACCOUNT_DELETED]: undefined,\n [Event.ACCOUNT_VERIFIED]: undefined,\n\n // BACKFILL - NOT AUDITED\n [Event.APP_BACKFILL_SUCCEEDED]: undefined,\n [Event.APP_BACKFILL_FAILED]: undefined,\n [Event.TENANT_BACKFILL_SUCCEEDED]: undefined,\n [Event.TENANT_BACKFILL_FAILED]: undefined,\n [Event.INSTALLATION_BACKFILL_SUCCEEDED]: undefined,\n [Event.INSTALLATION_BACKFILL_FAILED]: undefined,\n\n // LAYOUT - NOT AUDITED\n [Event.LAYOUT_CREATED]: undefined,\n [Event.LAYOUT_DELETED]: undefined,\n\n // VIEW - NOT AUDITED\n [Event.VIEW_CREATED]: undefined,\n [Event.VIEW_UPDATED]: undefined,\n [Event.VIEW_DELETED]: undefined,\n [Event.VIEW_EXPORTED]: undefined,\n [Event.VIEW_FILTER_CREATED]: undefined,\n [Event.VIEW_FILTER_UPDATED]: undefined,\n [Event.VIEW_FILTER_DELETED]: undefined,\n [Event.VIEW_CALCULATION_CREATED]: undefined,\n [Event.VIEW_CALCULATION_UPDATED]: undefined,\n [Event.VIEW_CALCULATION_DELETED]: undefined,\n\n // SERVED - NOT AUDITED\n [Event.SERVED_BUILDER]: undefined,\n [Event.SERVED_APP]: undefined,\n [Event.SERVED_APP_PREVIEW]: undefined,\n\n // ANALYTICS - NOT AUDITED\n [Event.ANALYTICS_OPT_OUT]: undefined,\n [Event.ANALYTICS_OPT_IN]: undefined,\n\n // INSTALLATION - NOT AUDITED\n [Event.INSTALLATION_VERSION_CHECKED]: undefined,\n [Event.INSTALLATION_VERSION_UPGRADED]: undefined,\n [Event.INSTALLATION_VERSION_DOWNGRADED]: undefined,\n [Event.INSTALLATION_FIRST_STARTUP]: undefined,\n\n // AUDIT LOG - NOT AUDITED\n [Event.AUDIT_LOGS_FILTERED]: undefined,\n [Event.AUDIT_LOGS_DOWNLOADED]: undefined,\n}\n\n// properties added at the final stage of the event pipeline\nexport interface BaseEvent {\n version?: string\n service?: string\n environment?: string\n appId?: string\n installationId?: string\n tenantId?: string\n hosting?: Hosting\n // any props in the audited section will be removed before passing events\n // up out of system (purely for use with auditing)\n audited?: {\n [key: string]: any\n }\n}\n\nexport type TableExportFormat = \"json\" | \"csv\"\n\nexport type DocUpdateEvent = {\n id: string\n tenantId: string\n appId?: string\n}\n\nexport interface EventProcessor {\n processEvent(\n event: Event,\n identity: Identity,\n properties: any,\n timestamp?: string | number\n ): Promise<void>\n identify?(identity: Identity, timestamp?: string | number): Promise<void>\n identifyGroup?(group: Group, timestamp?: string | number): Promise<void>\n shutdown?(): void\n}\n", "import { Event } from \"../events\"\n\nexport enum CommandWord {\n BACKUPS = \"backups\",\n HOSTING = \"hosting\",\n ANALYTICS = \"analytics\",\n HELP = \"help\",\n PLUGIN = \"plugins\",\n}\n\nexport enum InitType {\n QUICK = \"quick\",\n DIGITAL_OCEAN = \"do\",\n}\n\nexport const AnalyticsEvent = {\n OptOut: \"analytics:opt:out\",\n OptIn: \"analytics:opt:in\",\n SelfHostInit: \"hosting:init\",\n PluginInit: Event.PLUGIN_INIT,\n}\n", "import { Document } from \"../document\"\nimport { EventEmitter } from \"events\"\nimport { User } from \"../global\"\n\nexport enum AutomationIOType {\n OBJECT = \"object\",\n STRING = \"string\",\n BOOLEAN = \"boolean\",\n NUMBER = \"number\",\n ARRAY = \"array\",\n JSON = \"json\",\n DATE = \"date\",\n}\n\nexport enum AutomationCustomIOType {\n TABLE = \"table\",\n ROW = \"row\",\n ROWS = \"rows\",\n WIDE = \"wide\",\n QUERY = \"query\",\n QUERY_PARAMS = \"queryParams\",\n QUERY_LIMIT = \"queryLimit\",\n LOOP_OPTION = \"loopOption\",\n ITEM = \"item\",\n CODE = \"code\",\n FILTERS = \"filters\",\n COLUMN = \"column\",\n TRIGGER_SCHEMA = \"triggerSchema\",\n CRON = \"cron\",\n WEBHOOK_URL = \"webhookUrl\",\n}\n\nexport enum AutomationTriggerStepId {\n ROW_SAVED = \"ROW_SAVED\",\n ROW_UPDATED = \"ROW_UPDATED\",\n ROW_DELETED = \"ROW_DELETED\",\n WEBHOOK = \"WEBHOOK\",\n APP = \"APP\",\n CRON = \"CRON\",\n}\n\nexport enum AutomationStepType {\n LOGIC = \"LOGIC\",\n ACTION = \"ACTION\",\n TRIGGER = \"TRIGGER\",\n}\n\nexport enum AutomationActionStepId {\n SEND_EMAIL_SMTP = \"SEND_EMAIL_SMTP\",\n CREATE_ROW = \"CREATE_ROW\",\n UPDATE_ROW = \"UPDATE_ROW\",\n DELETE_ROW = \"DELETE_ROW\",\n EXECUTE_BASH = \"EXECUTE_BASH\",\n OUTGOING_WEBHOOK = \"OUTGOING_WEBHOOK\",\n EXECUTE_SCRIPT = \"EXECUTE_SCRIPT\",\n EXECUTE_QUERY = \"EXECUTE_QUERY\",\n SERVER_LOG = \"SERVER_LOG\",\n DELAY = \"DELAY\",\n FILTER = \"FILTER\",\n QUERY_ROWS = \"QUERY_ROWS\",\n LOOP = \"LOOP\",\n COLLECT = \"COLLECT\",\n OPENAI = \"OPENAI\",\n // these used to be lowercase step IDs, maintain for backwards compat\n discord = \"discord\",\n slack = \"slack\",\n zapier = \"zapier\",\n integromat = \"integromat\",\n}\n\nexport interface EmailInvite {\n startTime: Date\n endTime: Date\n summary: string\n location?: string\n url?: string\n}\n\nexport interface SendEmailOpts {\n // workspaceId If finer grain controls being used then this will lookup config for workspace.\n workspaceId?: string\n // user If sending to an existing user the object can be provided, this is used in the context.\n user: User\n // from If sending from an address that is not what is configured in the SMTP config.\n from?: string\n // contents If sending a custom email then can supply contents which will be added to it.\n contents?: string\n // subject A custom subject can be specified if the config one is not desired.\n subject?: string\n // info Pass in a structure of information to be stored alongside the invitation.\n info?: any\n cc?: boolean\n bcc?: boolean\n automation?: boolean\n invite?: EmailInvite\n}\n\nexport const AutomationStepIdArray = [\n ...Object.values(AutomationActionStepId),\n ...Object.values(AutomationTriggerStepId),\n]\n\nexport enum AutomationState {\n DISABLED = \"disabled\",\n}\n\nexport interface Automation extends Document {\n definition: {\n steps: AutomationStep[]\n trigger: AutomationTrigger\n }\n screenId?: string\n uiTree?: any\n appId: string\n live?: boolean\n name: string\n internal?: boolean\n type?: string\n state?: AutomationState\n}\n\ninterface BaseIOStructure {\n type?: AutomationIOType\n customType?: AutomationCustomIOType\n title?: string\n description?: string\n dependsOn?: string\n enum?: string[]\n pretty?: string[]\n properties?: {\n [key: string]: BaseIOStructure\n }\n required?: string[]\n}\n\ninterface InputOutputBlock {\n properties: {\n [key: string]: BaseIOStructure\n }\n required?: string[]\n}\n\nexport interface AutomationStepSchema {\n name: string\n stepTitle?: string\n tagline: string\n icon: string\n description: string\n type: AutomationStepType\n internal?: boolean\n deprecated?: boolean\n stepId: AutomationTriggerStepId | AutomationActionStepId\n blockToLoop?: string\n inputs: {\n [key: string]: any\n }\n schema: {\n inputs: InputOutputBlock\n outputs: InputOutputBlock\n }\n custom?: boolean\n features?: Partial<Record<AutomationFeature, boolean>>\n}\n\nexport enum AutomationFeature {\n LOOPING = \"LOOPING\",\n}\n\nexport interface AutomationStep extends AutomationStepSchema {\n id: string\n}\n\nexport interface AutomationTriggerSchema extends AutomationStepSchema {\n event?: string\n cronJobId?: string\n}\n\nexport interface AutomationTrigger extends AutomationTriggerSchema {\n id: string\n}\n\nexport enum AutomationStepStatus {\n NO_ITERATIONS = \"no_iterations\",\n}\n\nexport enum AutomationStatus {\n SUCCESS = \"success\",\n ERROR = \"error\",\n STOPPED = \"stopped\",\n STOPPED_ERROR = \"stopped_error\",\n}\n\nexport interface AutomationResults {\n automationId?: string\n status?: AutomationStatus\n trigger?: any\n steps: {\n stepId: AutomationTriggerStepId | AutomationActionStepId\n inputs: {\n [key: string]: any\n }\n outputs: {\n [key: string]: any\n }\n }[]\n}\n\nexport interface AutomationLog extends AutomationResults, Document {\n automationName: string\n _rev?: string\n}\n\nexport interface AutomationLogPage {\n data: AutomationLog[]\n hasNextPage: boolean\n nextPage?: string\n}\n\nexport type AutomationStepInput = {\n inputs: Record<string, any>\n context: Record<string, any>\n emitter: EventEmitter\n appId: string\n apiKey?: string\n}\n\nexport interface AutomationMetadata extends Document {\n errorCount?: number\n automationChainCount?: number\n}\n", "export const SEPARATOR = \"_\"\nexport const UNICODE_MAX = \"\\ufff0\"\n\nexport const prefixed = (type: DocumentType) => `${type}${SEPARATOR}`\n\nexport enum DocumentType {\n USER = \"us\",\n GROUP = \"gr\",\n WORKSPACE = \"workspace\",\n CONFIG = \"config\",\n TEMPLATE = \"template\",\n APP = \"app\",\n DEV = \"dev\",\n APP_DEV = \"app_dev\",\n APP_METADATA = \"app_metadata\",\n ROLE = \"role\",\n MIGRATIONS = \"migrations\",\n DEV_INFO = \"devinfo\",\n AUTOMATION_LOG = \"log_au\",\n ACCOUNT_METADATA = \"acc_metadata\",\n PLUGIN = \"plg\",\n DATASOURCE = \"datasource\",\n DATASOURCE_PLUS = \"datasource_plus\",\n APP_BACKUP = \"backup\",\n TABLE = \"ta\",\n ROW = \"ro\",\n AUTOMATION = \"au\",\n LINK = \"li\",\n WEBHOOK = \"wh\",\n INSTANCE = \"inst\",\n LAYOUT = \"layout\",\n SCREEN = \"screen\",\n QUERY = \"query\",\n DEPLOYMENTS = \"deployments\",\n METADATA = \"metadata\",\n MEM_VIEW = \"view\",\n USER_FLAG = \"flag\",\n AUTOMATION_METADATA = \"meta_au\",\n AUDIT_LOG = \"al\",\n}\n\n// these documents don't really exist, they are part of other\n// documents or enriched into existence as part of get requests\nexport enum VirtualDocumentType {\n VIEW = \"view\",\n}\n\nexport interface Document {\n _id?: string\n _rev?: string\n createdAt?: string | number\n updatedAt?: string\n}\n\nexport interface AnyDocument extends Document {\n [key: string]: any\n}\n", "import { Document } from \"../document\"\n\nexport enum PluginType {\n DATASOURCE = \"datasource\",\n COMPONENT = \"component\",\n AUTOMATION = \"automation\",\n}\n\nexport enum PluginSource {\n NPM = \"NPM\",\n GITHUB = \"Github\",\n URL = \"URL\",\n FILE = \"File Upload\",\n}\nexport interface FileType {\n path: string\n name: string\n}\n\nexport interface Plugin extends Document {\n description: string\n name: string\n version: string\n source: PluginSource\n package: { [key: string]: any }\n hash: string\n schema: {\n type: PluginType\n [key: string]: any\n }\n iconFileName?: string\n // Populated on read\n jsUrl?: string\n // Populated on read\n iconUrl?: string\n}\n\nexport const PLUGIN_TYPE_ARR = Object.values(PluginType)\n", "import { MonthlyQuotaName, StaticQuotaName } from \"../../sdk\"\n\nexport enum BreakdownQuotaName {\n ROW_QUERIES = \"rowQueries\",\n DATASOURCE_QUERIES = \"datasourceQueries\",\n AUTOMATIONS = \"automations\",\n}\n\nexport const APP_QUOTA_NAMES = [\n StaticQuotaName.ROWS,\n MonthlyQuotaName.QUERIES,\n MonthlyQuotaName.AUTOMATIONS,\n]\n\nexport const BREAKDOWN_QUOTA_NAMES = [\n MonthlyQuotaName.QUERIES,\n MonthlyQuotaName.AUTOMATIONS,\n]\n\nexport interface UsageBreakdown {\n parent: MonthlyQuotaName\n values: {\n [key: string]: number\n }\n}\n\nexport type QuotaTriggers = {\n [key: string]: string | undefined\n}\n\nexport interface StaticUsage {\n [StaticQuotaName.APPS]: number\n [StaticQuotaName.PLUGINS]: number\n [StaticQuotaName.USERS]: number\n [StaticQuotaName.USER_GROUPS]: number\n [StaticQuotaName.ROWS]: number\n triggers: {\n [key in StaticQuotaName]?: QuotaTriggers\n }\n}\n\nexport interface MonthlyUsage {\n [MonthlyQuotaName.QUERIES]: number\n [MonthlyQuotaName.AUTOMATIONS]: number\n [MonthlyQuotaName.DAY_PASSES]: number\n triggers: {\n [key in MonthlyQuotaName]?: QuotaTriggers\n }\n breakdown?: {\n [key in BreakdownQuotaName]?: UsageBreakdown\n }\n}\n\nexport interface BaseQuotaUsage {\n usageQuota: StaticUsage\n monthly: {\n [key: string]: MonthlyUsage\n }\n}\n\nexport interface QuotaUsage extends BaseQuotaUsage {\n _id: string\n _rev?: string\n quotaReset: string\n apps?: {\n [key: string]: BaseQuotaUsage\n }\n}\n\nexport type SetUsageValues = {\n total: number\n app?: number\n breakdown?: number\n triggers?: QuotaTriggers\n}\n\nexport type UsageValues = {\n total: number\n app?: number\n breakdown?: number\n}\n", "export * from \"./helpers\"\nexport * from \"./integrations\"\n", "import { User } from \"@budibase/types\"\n\n/**\n * Gets a key within an object. The key supports dot syntax for retrieving deep\n * fields - e.g. \"a.b.c\".\n * Exact matches of keys with dots in them take precedence over nested keys of\n * the same path - e.g. getting \"a.b\" from { \"a.b\": \"foo\", a: { b: \"bar\" } }\n * will return \"foo\" over \"bar\".\n * @param obj the object\n * @param key the key\n * @return {*|null} the value or null if a value was not found for this key\n */\nexport const deepGet = (obj: { [x: string]: any }, key: string) => {\n if (!obj || !key) {\n return null\n }\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return obj[key]\n }\n const split = key.split(\".\")\n for (let i = 0; i < split.length; i++) {\n obj = obj?.[split[i]]\n }\n return obj\n}\n\n/**\n * Gets the initials to show in a user avatar.\n * @param user the user\n */\nexport const getUserInitials = (user: User) => {\n if (!user) {\n return \"?\"\n }\n let initials = \"\"\n initials += user.firstName ? user.firstName[0] : \"\"\n initials += user.lastName ? user.lastName[0] : \"\"\n if (initials !== \"\") {\n return initials\n }\n return user.email?.[0] || \"U\"\n}\n\n/**\n * Gets a deterministic colour for a particular user\n * @param user the user\n */\nexport const getUserColor = (user: User) => {\n let id = user?._id\n if (!id) {\n return \"var(--spectrum-global-color-blue-400)\"\n }\n\n // In order to generate the same color for global users as app users, we need\n // to remove the app-specific table prefix\n id = id.replace(\"ro_ta_users_\", \"\")\n\n // Generate a hue based on the ID\n let hue = 1\n for (let i = 0; i < id.length; i++) {\n hue += id.charCodeAt(i)\n hue = hue % 36\n }\n return `hsl(${hue * 10}, 50%, 40%)`\n}\n\n/**\n * Gets a friendly label to describe who a user is.\n * @param user the user\n */\nexport const getUserLabel = (user: User) => {\n if (!user) {\n return \"\"\n }\n const { firstName, lastName, email } = user\n if (firstName && lastName) {\n return `${firstName} ${lastName}`\n } else if (firstName) {\n return firstName\n } else if (lastName) {\n return lastName\n } else {\n return email\n }\n}\n", "import { Datasource, SourceName } from \"@budibase/types\"\n\nexport function isGoogleSheets(type: SourceName) {\n return type === SourceName.GOOGLE_SHEETS\n}\n\nexport function isSQL(datasource: Datasource): boolean {\n if (!datasource || !datasource.source) {\n return false\n }\n const SQL = [\n SourceName.POSTGRES,\n SourceName.SQL_SERVER,\n SourceName.MYSQL,\n SourceName.ORACLE,\n ]\n return SQL.indexOf(datasource.source) !== -1\n}\n", "export function unreachable(\n value: never,\n message = `No such case in exhaustive switch: ${value}`\n) {\n throw new Error(message)\n}\n\nexport async function parallelForeach<T>(\n items: T[],\n task: (item: T) => Promise<void>,\n maxConcurrency: number\n): Promise<void> {\n const promises: Promise<void>[] = []\n let index = 0\n\n const processItem = async (item: T) => {\n try {\n await task(item)\n } finally {\n processNext()\n }\n }\n\n const processNext = () => {\n if (index >= items.length) {\n // No more items to process\n return\n }\n\n const item = items[index]\n index++\n\n const promise = processItem(item)\n promises.push(promise)\n\n if (promises.length >= maxConcurrency) {\n Promise.race(promises).then(processNext)\n } else {\n processNext()\n }\n }\n processNext()\n\n await Promise.all(promises)\n}\n", "export * from \"./documents\"\n", "import { DocumentType, prefixed } from \"@budibase/types\"\n\nconst APP_PREFIX = prefixed(DocumentType.APP)\nconst APP_DEV_PREFIX = prefixed(DocumentType.APP_DEV)\n\nexport function getDevAppID(appId: string) {\n if (!appId) {\n throw new Error(\"No app ID provided\")\n }\n if (appId.startsWith(APP_DEV_PREFIX)) {\n return appId\n }\n // split to take off the app_ element, then join it together incase any other app_ exist\n const split = appId.split(APP_PREFIX)\n split.shift()\n const rest = split.join(APP_PREFIX)\n return `${APP_DEV_PREFIX}${rest}`\n}\n\n/**\n * Convert a development app ID to a deployed app ID.\n */\nexport function getProdAppID(appId: string) {\n if (!appId) {\n throw new Error(\"No app ID provided\")\n }\n if (!appId.startsWith(APP_DEV_PREFIX)) {\n return appId\n }\n // split to take off the app_dev element, then join it together incase any other app_ exist\n const split = appId.split(APP_DEV_PREFIX)\n split.shift()\n const rest = split.join(APP_DEV_PREFIX)\n return `${APP_PREFIX}${rest}`\n}\n", "import { ContextUser, User } from \"@budibase/types\"\nimport { getProdAppID } from \"./applications\"\n\n// checks if a user is specifically a builder, given an app ID\nexport function isBuilder(user: User | ContextUser, appId?: string): boolean {\n if (!user) {\n return false\n }\n if (user.builder?.global) {\n return true\n } else if (appId && user.builder?.apps?.includes(getProdAppID(appId))) {\n return true\n }\n return false\n}\n\nexport function isGlobalBuilder(user: User | ContextUser): boolean {\n return (isBuilder(user) && !hasAppBuilderPermissions(user)) || isAdmin(user)\n}\n\n// alias for hasAdminPermission, currently do the same thing\n// in future whether someone has admin permissions and whether they are\n// an admin for a specific resource could be separated\nexport function isAdmin(user: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n return hasAdminPermissions(user)\n}\n\nexport function isAdminOrBuilder(\n user: User | ContextUser,\n appId?: string\n): boolean {\n return isBuilder(user, appId) || isAdmin(user)\n}\n\n// check if they are a builder within an app (not necessarily a global builder)\nexport function hasAppBuilderPermissions(user?: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n const appLength = user.builder?.apps?.length\n const isGlobalBuilder = !!user.builder?.global\n return !isGlobalBuilder && appLength != null && appLength > 0\n}\n\n// checks if a user is capable of building any app\nexport function hasBuilderPermissions(user?: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n return user.builder?.global || hasAppBuilderPermissions(user)\n}\n\n// checks if a user is capable of being an admin\nexport function hasAdminPermissions(user?: User | ContextUser): boolean {\n if (!user) {\n return false\n }\n return !!user.admin?.global\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;A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AAM;AACT,WAAO;AAAA,EACT;AACA,SAAO,KAAK,SAAS,UAAU,yBAAyB,IAAI;AAC9D;AAGO,SAAS,oBAAoB,MAAoC;AACtE,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SAAO,CAAC,CAAC,KAAK,OAAO;AACvB;",
|
|
6
6
|
"names": ["SocketEvent", "GridSocketEvent", "BuilderSocketEvent", "AutomationTriggerStepId", "AutomationActionStepId", "PluginType", "isGlobalBuilder"]
|
|
7
7
|
}
|
package/dist/index.js.meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/constants.ts":{"bytes":1879,"imports":[],"format":"esm"},"../types/src/sdk/automations/index.ts":{"bytes":368,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"bull","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/hosting.ts":{"bytes":60,"imports":[],"format":"esm"},"../types/src/sdk/context.ts":{"bytes":495,"imports":[{"path":"../documents","kind":"import-statement","external":true},{"path":"./events","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/app.ts":{"bytes":1402,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/auth.ts":{"bytes":738,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/automation.ts":{"bytes":1198,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/email.ts":{"bytes":148,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/datasource.ts":{"bytes":399,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/event.ts":{"bytes":15483,"imports":[{"path":"../hosting","kind":"import-statement","external":true},{"path":"./identification","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/layout.ts":{"bytes":192,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/license.ts":{"bytes":749,"imports":[{"path":"../licensing","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/version.ts":{"bytes":208,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/query.ts":{"bytes":793,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/role.ts":{"bytes":573,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/rows.ts":{"bytes":201,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/screen.ts":{"bytes":334,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/serve.ts":{"bytes":329,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/table.ts":{"bytes":635,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/user.ts":{"bytes":1557,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/view.ts":{"bytes":1028,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/account.ts":{"bytes":330,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/backfill.ts":{"bytes":945,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/identification.ts":{"bytes":1157,"imports":[{"path":"..","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/userGroup.ts":{"bytes":990,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/plugin.ts":{"bytes":544,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/backup.ts":{"bytes":405,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/environmentVariable.ts":{"bytes":335,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/auditLog.ts":{"bytes":275,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../api","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/index.ts":{"bytes":646,"imports":[{"path":"../types/src/sdk/events/app.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/sdk/events/auth.ts","kind":"import-statement","original":"./auth"},{"path":"../types/src/sdk/events/automation.ts","kind":"import-statement","original":"./automation"},{"path":"../types/src/sdk/events/email.ts","kind":"import-statement","original":"./email"},{"path":"../types/src/sdk/events/datasource.ts","kind":"import-statement","original":"./datasource"},{"path":"../types/src/sdk/events/event.ts","kind":"import-statement","original":"./event"},{"path":"../types/src/sdk/events/layout.ts","kind":"import-statement","original":"./layout"},{"path":"../types/src/sdk/events/license.ts","kind":"import-statement","original":"./license"},{"path":"../types/src/sdk/events/version.ts","kind":"import-statement","original":"./version"},{"path":"../types/src/sdk/events/query.ts","kind":"import-statement","original":"./query"},{"path":"../types/src/sdk/events/role.ts","kind":"import-statement","original":"./role"},{"path":"../types/src/sdk/events/rows.ts","kind":"import-statement","original":"./rows"},{"path":"../types/src/sdk/events/screen.ts","kind":"import-statement","original":"./screen"},{"path":"../types/src/sdk/events/serve.ts","kind":"import-statement","original":"./serve"},{"path":"../types/src/sdk/events/table.ts","kind":"import-statement","original":"./table"},{"path":"../types/src/sdk/events/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/sdk/events/view.ts","kind":"import-statement","original":"./view"},{"path":"../types/src/sdk/events/account.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/sdk/events/backfill.ts","kind":"import-statement","original":"./backfill"},{"path":"../types/src/sdk/events/identification.ts","kind":"import-statement","original":"./identification"},{"path":"../types/src/sdk/events/userGroup.ts","kind":"import-statement","original":"./userGroup"},{"path":"../types/src/sdk/events/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"../types/src/sdk/events/backup.ts","kind":"import-statement","original":"./backup"},{"path":"../types/src/sdk/events/environmentVariable.ts","kind":"import-statement","original":"./environmentVariable"},{"path":"../types/src/sdk/events/auditLog.ts","kind":"import-statement","original":"./auditLog"}],"format":"esm"},"../types/src/sdk/licensing/license.ts":{"bytes":417,"imports":[{"path":".","kind":"import-statement","external":true},{"path":"../../shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/plan.ts":{"bytes":873,"imports":[],"format":"esm"},"../types/src/sdk/licensing/quota.ts":{"bytes":2503,"imports":[{"path":".","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/feature.ts":{"bytes":445,"imports":[{"path":"./plan","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/billing.ts":{"bytes":504,"imports":[{"path":"./plan","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/index.ts":{"bytes":125,"imports":[{"path":"../types/src/sdk/licensing/license.ts","kind":"import-statement","original":"./license"},{"path":"../types/src/sdk/licensing/plan.ts","kind":"import-statement","original":"./plan"},{"path":"../types/src/sdk/licensing/quota.ts","kind":"import-statement","original":"./quota"},{"path":"../types/src/sdk/licensing/feature.ts","kind":"import-statement","original":"./feature"},{"path":"../types/src/sdk/licensing/billing.ts","kind":"import-statement","original":"./billing"}],"format":"esm"},"../types/src/sdk/migrations.ts":{"bytes":1388,"imports":[],"format":"esm"},"../types/src/sdk/datasources.ts":{"bytes":3966,"imports":[{"path":"../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/search.ts":{"bytes":1787,"imports":[{"path":"./datasources","kind":"import-statement","external":true},{"path":"../documents","kind":"import-statement","external":true},{"path":"../api","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/koa.ts":{"bytes":1114,"imports":[{"path":"koa","kind":"import-statement","external":true},{"path":"../documents","kind":"import-statement","external":true},{"path":"../sdk","kind":"import-statement","external":true},{"path":"formidable","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/auth.ts":{"bytes":653,"imports":[{"path":"./koa","kind":"import-statement","external":true},{"path":"./hosting","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/locks.ts":{"bytes":1313,"imports":[{"path":"redlock","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/db.ts":{"bytes":2792,"imports":[{"path":"@budibase/nano","kind":"import-statement","external":true},{"path":"../","kind":"import-statement","external":true},{"path":"stream","kind":"import-statement","external":true},{"path":"pouchdb","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/middleware/matchers.ts":{"bytes":417,"imports":[],"format":"esm"},"../types/src/sdk/middleware/tenancy.ts":{"bytes":307,"imports":[],"format":"esm"},"../types/src/sdk/middleware/index.ts":{"bytes":53,"imports":[{"path":"../types/src/sdk/middleware/matchers.ts","kind":"import-statement","original":"./matchers"},{"path":"../types/src/sdk/middleware/tenancy.ts","kind":"import-statement","original":"./tenancy"}],"format":"esm"},"../types/src/sdk/featureFlag.ts":{"bytes":127,"imports":[],"format":"esm"},"../types/src/sdk/environmentVariables.ts":{"bytes":91,"imports":[],"format":"esm"},"../types/src/sdk/auditLogs.ts":{"bytes":442,"imports":[{"path":"./events","kind":"import-statement","external":true},{"path":"../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/sso.ts":{"bytes":622,"imports":[{"path":"../documents","kind":"import-statement","external":true},{"path":"./user","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/user.ts":{"bytes":112,"imports":[],"format":"esm"},"../types/src/sdk/cli/constants.ts":{"bytes":404,"imports":[{"path":"../types/src/sdk/events/index.ts","kind":"import-statement","original":"../events"}],"format":"esm"},"../types/src/sdk/cli/index.ts":{"bytes":28,"imports":[{"path":"../types/src/sdk/cli/constants.ts","kind":"import-statement","original":"./constants"}],"format":"esm"},"../types/src/sdk/websocket.ts":{"bytes":164,"imports":[],"format":"esm"},"../types/src/sdk/permissions.ts":{"bytes":416,"imports":[],"format":"esm"},"../types/src/sdk/index.ts":{"bytes":560,"imports":[{"path":"../types/src/sdk/automations/index.ts","kind":"import-statement","original":"./automations"},{"path":"../types/src/sdk/hosting.ts","kind":"import-statement","original":"./hosting"},{"path":"../types/src/sdk/context.ts","kind":"import-statement","original":"./context"},{"path":"../types/src/sdk/events/index.ts","kind":"import-statement","original":"./events"},{"path":"../types/src/sdk/licensing/index.ts","kind":"import-statement","original":"./licensing"},{"path":"../types/src/sdk/migrations.ts","kind":"import-statement","original":"./migrations"},{"path":"../types/src/sdk/datasources.ts","kind":"import-statement","original":"./datasources"},{"path":"../types/src/sdk/search.ts","kind":"import-statement","original":"./search"},{"path":"../types/src/sdk/koa.ts","kind":"import-statement","original":"./koa"},{"path":"../types/src/sdk/auth.ts","kind":"import-statement","original":"./auth"},{"path":"../types/src/sdk/locks.ts","kind":"import-statement","original":"./locks"},{"path":"../types/src/sdk/db.ts","kind":"import-statement","original":"./db"},{"path":"../types/src/sdk/middleware/index.ts","kind":"import-statement","original":"./middleware"},{"path":"../types/src/sdk/featureFlag.ts","kind":"import-statement","original":"./featureFlag"},{"path":"../types/src/sdk/environmentVariables.ts","kind":"import-statement","original":"./environmentVariables"},{"path":"../types/src/sdk/auditLogs.ts","kind":"import-statement","original":"./auditLogs"},{"path":"../types/src/sdk/sso.ts","kind":"import-statement","original":"./sso"},{"path":"../types/src/sdk/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/sdk/cli/index.ts","kind":"import-statement","original":"./cli"},{"path":"../types/src/sdk/websocket.ts","kind":"import-statement","original":"./websocket"},{"path":"../types/src/sdk/permissions.ts","kind":"import-statement","original":"./permissions"}],"format":"esm"},"../types/src/documents/account/account.ts":{"bytes":2589,"imports":[{"path":"../types/src/sdk/index.ts","kind":"import-statement","original":"../../sdk"},{"path":"../../shared","kind":"import-statement","external":true},{"path":"../global","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/account/user.ts":{"bytes":206,"imports":[],"format":"esm"},"../types/src/documents/account/index.ts":{"bytes":49,"imports":[{"path":"../types/src/documents/account/account.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/documents/account/user.ts","kind":"import-statement","original":"./user"}],"format":"esm"},"../types/src/documents/app/app.ts":{"bytes":1367,"imports":[{"path":"../","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/automation.ts":{"bytes":5052,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"events","kind":"import-statement","external":true},{"path":"../global","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/datasource.ts":{"bytes":1028,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true},{"path":"./table","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/layout.ts":{"bytes":98,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/query.ts":{"bytes":1040,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/role.ts":{"bytes":188,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/table/table.ts":{"bytes":712,"imports":[{"path":"../../document","kind":"import-statement","external":true},{"path":"../view","kind":"import-statement","external":true},{"path":"../../../sdk","kind":"import-statement","external":true},{"path":"./schema","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/table/schema.ts":{"bytes":2264,"imports":[{"path":"../row","kind":"import-statement","external":true},{"path":"./constants","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/table/constants.ts":{"bytes":187,"imports":[],"format":"esm"},"../types/src/documents/app/table/index.ts":{"bytes":77,"imports":[{"path":"../types/src/documents/app/table/table.ts","kind":"import-statement","original":"./table"},{"path":"../types/src/documents/app/table/schema.ts","kind":"import-statement","original":"./schema"},{"path":"../types/src/documents/app/table/constants.ts","kind":"import-statement","original":"./constants"}],"format":"esm"},"../types/src/documents/app/screen.ts":{"bytes":483,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"./component","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/view.ts":{"bytes":1147,"imports":[{"path":"../../api","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true},{"path":"./table","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/document.ts":{"bytes":1108,"imports":[],"format":"esm"},"../types/src/documents/app/row.ts":{"bytes":655,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/user.ts":{"bytes":125,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/backup.ts":{"bytes":1331,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"../../","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/webhook.ts":{"bytes":263,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/links.ts":{"bytes":344,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/component.ts":{"bytes":214,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/index.ts":{"bytes":400,"imports":[{"path":"../types/src/documents/app/app.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/documents/app/automation.ts","kind":"import-statement","original":"./automation"},{"path":"../types/src/documents/app/datasource.ts","kind":"import-statement","original":"./datasource"},{"path":"../types/src/documents/app/layout.ts","kind":"import-statement","original":"./layout"},{"path":"../types/src/documents/app/query.ts","kind":"import-statement","original":"./query"},{"path":"../types/src/documents/app/role.ts","kind":"import-statement","original":"./role"},{"path":"../types/src/documents/app/table/index.ts","kind":"import-statement","original":"./table"},{"path":"../types/src/documents/app/screen.ts","kind":"import-statement","original":"./screen"},{"path":"../types/src/documents/app/view.ts","kind":"import-statement","original":"./view"},{"path":"../types/src/documents/document.ts","kind":"import-statement","original":"../document"},{"path":"../types/src/documents/app/row.ts","kind":"import-statement","original":"./row"},{"path":"../types/src/documents/app/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/documents/app/backup.ts","kind":"import-statement","original":"./backup"},{"path":"../types/src/documents/app/webhook.ts","kind":"import-statement","original":"./webhook"},{"path":"../types/src/documents/app/links.ts","kind":"import-statement","original":"./links"},{"path":"../types/src/documents/app/component.ts","kind":"import-statement","original":"./component"}],"format":"esm"},"../types/src/documents/global/config.ts":{"bytes":3014,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/user.ts":{"bytes":1733,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/userGroup.ts":{"bytes":653,"imports":[{"path":"../../api","kind":"import-statement","external":true},{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/plugin.ts":{"bytes":714,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/quotas.ts":{"bytes":1623,"imports":[{"path":"../types/src/sdk/index.ts","kind":"import-statement","original":"../../sdk"}],"format":"esm"},"../types/src/documents/global/schedule.ts":{"bytes":665,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/templates.ts":{"bytes":175,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/environmentVariables.ts":{"bytes":474,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/auditLogs.ts":{"bytes":362,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/index.ts":{"bytes":248,"imports":[{"path":"../types/src/documents/global/config.ts","kind":"import-statement","original":"./config"},{"path":"../types/src/documents/global/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/documents/global/userGroup.ts","kind":"import-statement","original":"./userGroup"},{"path":"../types/src/documents/global/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"../types/src/documents/global/quotas.ts","kind":"import-statement","original":"./quotas"},{"path":"../types/src/documents/global/schedule.ts","kind":"import-statement","original":"./schedule"},{"path":"../types/src/documents/global/templates.ts","kind":"import-statement","original":"./templates"},{"path":"../types/src/documents/global/environmentVariables.ts","kind":"import-statement","original":"./environmentVariables"},{"path":"../types/src/documents/global/auditLogs.ts","kind":"import-statement","original":"./auditLogs"}],"format":"esm"},"../types/src/documents/platform/info.ts":{"bytes":175,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/users.ts":{"bytes":336,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/accounts.ts":{"bytes":110,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/tenants.ts":{"bytes":108,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/index.ts":{"bytes":100,"imports":[{"path":"../types/src/documents/platform/info.ts","kind":"import-statement","original":"./info"},{"path":"../types/src/documents/platform/users.ts","kind":"import-statement","original":"./users"},{"path":"../types/src/documents/platform/accounts.ts","kind":"import-statement","original":"./accounts"},{"path":"../types/src/documents/platform/tenants.ts","kind":"import-statement","original":"./tenants"}],"format":"esm"},"../types/src/documents/pouch.ts":{"bytes":482,"imports":[],"format":"esm"},"../types/src/documents/index.ts":{"bytes":151,"imports":[{"path":"../types/src/documents/account/index.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/documents/app/index.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/documents/global/index.ts","kind":"import-statement","original":"./global"},{"path":"../types/src/documents/platform/index.ts","kind":"import-statement","original":"./platform"},{"path":"../types/src/documents/document.ts","kind":"import-statement","original":"./document"},{"path":"../types/src/documents/pouch.ts","kind":"import-statement","original":"./pouch"}],"format":"esm"},"../types/src/api/account/accounts.ts":{"bytes":451,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/account/user.ts":{"bytes":156,"imports":[],"format":"esm"},"../types/src/api/account/license.ts":{"bytes":860,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true},{"path":"../../shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/account/status.ts":{"bytes":116,"imports":[],"format":"esm"},"../types/src/api/account/index.ts":{"bytes":101,"imports":[{"path":"../types/src/api/account/accounts.ts","kind":"import-statement","original":"./accounts"},{"path":"../types/src/api/account/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/api/account/license.ts","kind":"import-statement","original":"./license"},{"path":"../types/src/api/account/status.ts","kind":"import-statement","original":"./status"}],"format":"esm"},"../types/src/api/web/analytics.ts":{"bytes":169,"imports":[],"format":"esm"},"../types/src/api/web/auth.ts":{"bytes":444,"imports":[],"format":"esm"},"../types/src/api/web/user.ts":{"bytes":1532,"imports":[{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/errors.ts":{"bytes":104,"imports":[],"format":"esm"},"../types/src/api/web/debug.ts":{"bytes":223,"imports":[],"format":"esm"},"../types/src/api/web/schedule.ts":{"bytes":327,"imports":[{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/system/environment.ts":{"bytes":179,"imports":[],"format":"esm"},"../types/src/api/web/system/index.ts":{"bytes":30,"imports":[{"path":"../types/src/api/web/system/environment.ts","kind":"import-statement","original":"./environment"}],"format":"esm"},"../types/src/api/web/app/backup.ts":{"bytes":422,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/datasource.ts":{"bytes":719,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/row.ts":{"bytes":208,"imports":[{"path":"../../../documents/app/row","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/view.ts":{"bytes":390,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/rows.ts":{"bytes":239,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/table.ts":{"bytes":342,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/index.ts":{"bytes":146,"imports":[{"path":"../types/src/api/web/app/backup.ts","kind":"import-statement","original":"./backup"},{"path":"../types/src/api/web/app/datasource.ts","kind":"import-statement","original":"./datasource"},{"path":"../types/src/api/web/app/row.ts","kind":"import-statement","original":"./row"},{"path":"../types/src/api/web/app/view.ts","kind":"import-statement","original":"./view"},{"path":"../types/src/api/web/app/rows.ts","kind":"import-statement","original":"./rows"},{"path":"../types/src/api/web/app/table.ts","kind":"import-statement","original":"./table"}],"format":"esm"},"../types/src/api/web/global/environmentVariables.ts":{"bytes":376,"imports":[],"format":"esm"},"../types/src/api/web/global/auditLogs.ts":{"bytes":1095,"imports":[{"path":"../../../sdk","kind":"import-statement","external":true},{"path":"../","kind":"import-statement","external":true},{"path":"../../../","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/events.ts":{"bytes":195,"imports":[],"format":"esm"},"../types/src/api/web/global/configs.ts":{"bytes":609,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/users.ts":{"bytes":1127,"imports":[{"path":"scim-patch","kind":"import-statement","external":true},{"path":"./shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/groups.ts":{"bytes":736,"imports":[{"path":"scim-patch","kind":"import-statement","external":true},{"path":"./shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/shared.ts":{"bytes":376,"imports":[{"path":"scim-patch","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/index.ts":{"bytes":74,"imports":[{"path":"../types/src/api/web/global/scim/users.ts","kind":"import-statement","original":"./users"},{"path":"../types/src/api/web/global/scim/groups.ts","kind":"import-statement","original":"./groups"},{"path":"../types/src/api/web/global/scim/shared.ts","kind":"import-statement","original":"./shared"}],"format":"esm"},"../types/src/api/web/global/license.ts":{"bytes":432,"imports":[],"format":"esm"},"../types/src/api/web/global/index.ts":{"bytes":167,"imports":[{"path":"../types/src/api/web/global/environmentVariables.ts","kind":"import-statement","original":"./environmentVariables"},{"path":"../types/src/api/web/global/auditLogs.ts","kind":"import-statement","original":"./auditLogs"},{"path":"../types/src/api/web/global/events.ts","kind":"import-statement","original":"./events"},{"path":"../types/src/api/web/global/configs.ts","kind":"import-statement","original":"./configs"},{"path":"../types/src/api/web/global/scim/index.ts","kind":"import-statement","original":"./scim"},{"path":"../types/src/api/web/global/license.ts","kind":"import-statement","original":"./license"}],"format":"esm"},"../types/src/api/web/pagination.ts":{"bytes":472,"imports":[],"format":"esm"},"../types/src/api/web/searchFilter.ts":{"bytes":947,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/index.ts":{"bytes":282,"imports":[{"path":"../types/src/api/web/analytics.ts","kind":"import-statement","original":"./analytics"},{"path":"../types/src/api/web/auth.ts","kind":"import-statement","original":"./auth"},{"path":"../types/src/api/web/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/api/web/errors.ts","kind":"import-statement","original":"./errors"},{"path":"../types/src/api/web/debug.ts","kind":"import-statement","original":"./debug"},{"path":"../types/src/api/web/schedule.ts","kind":"import-statement","original":"./schedule"},{"path":"../types/src/api/web/system/index.ts","kind":"import-statement","original":"./system"},{"path":"../types/src/api/web/app/index.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/api/web/global/index.ts","kind":"import-statement","original":"./global"},{"path":"../types/src/api/web/pagination.ts","kind":"import-statement","original":"./pagination"},{"path":"../types/src/api/web/searchFilter.ts","kind":"import-statement","original":"./searchFilter"}],"format":"esm"},"../types/src/api/index.ts":{"bytes":48,"imports":[{"path":"../types/src/api/account/index.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/api/web/index.ts","kind":"import-statement","original":"./web"}],"format":"esm"},"../types/src/core/installation.ts":{"bytes":66,"imports":[],"format":"esm"},"../types/src/core/index.ts":{"bytes":31,"imports":[{"path":"../types/src/core/installation.ts","kind":"import-statement","original":"./installation"}],"format":"esm"},"../types/src/shared/typeUtils.ts":{"bytes":197,"imports":[],"format":"esm"},"../types/src/shared/index.ts":{"bytes":28,"imports":[{"path":"../types/src/shared/typeUtils.ts","kind":"import-statement","original":"./typeUtils"}],"format":"esm"},"../types/src/index.ts":{"bytes":120,"imports":[{"path":"../types/src/documents/index.ts","kind":"import-statement","original":"./documents"},{"path":"../types/src/sdk/index.ts","kind":"import-statement","original":"./sdk"},{"path":"../types/src/api/index.ts","kind":"import-statement","original":"./api"},{"path":"../types/src/core/index.ts","kind":"import-statement","original":"./core"},{"path":"../types/src/shared/index.ts","kind":"import-statement","original":"./shared"}],"format":"esm"},"src/helpers/helpers.ts":{"bytes":2120,"imports":[{"path":"@budibase/types","kind":"import-statement","external":true}],"format":"esm"},"src/helpers/integrations.ts":{"bytes":442,"imports":[{"path":"../types/src/index.ts","kind":"import-statement","original":"@budibase/types"}],"format":"esm"},"src/helpers/index.ts":{"bytes":57,"imports":[{"path":"src/helpers/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"src/helpers/integrations.ts","kind":"import-statement","original":"./integrations"}],"format":"esm"},"src/filters.ts":{"bytes":12117,"imports":[{"path":"../types/src/index.ts","kind":"import-statement","original":"@budibase/types"},{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"src/helpers/index.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"src/utils.ts":{"bytes":862,"imports":[],"format":"esm"},"src/sdk/documents/applications.ts":{"bytes":1017,"imports":[{"path":"../types/src/index.ts","kind":"import-statement","original":"@budibase/types"}],"format":"esm"},"src/sdk/documents/users.ts":{"bytes":1833,"imports":[{"path":"@budibase/types","kind":"import-statement","external":true},{"path":"src/sdk/documents/applications.ts","kind":"import-statement","original":"./applications"}],"format":"esm"},"src/sdk/documents/index.ts":{"bytes":80,"imports":[{"path":"src/sdk/documents/applications.ts","kind":"import-statement","original":"./applications"},{"path":"src/sdk/documents/users.ts","kind":"import-statement","original":"./users"}],"format":"esm"},"src/sdk/index.ts":{"bytes":28,"imports":[{"path":"src/sdk/documents/index.ts","kind":"import-statement","original":"./documents"}],"format":"esm"},"src/index.ts":{"bytes":168,"imports":[{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"src/filters.ts","kind":"import-statement","original":"./filters"},{"path":"src/helpers/index.ts","kind":"import-statement","original":"./helpers"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils"},{"path":"src/sdk/index.ts","kind":"import-statement","original":"./sdk"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":61193},"dist/index.js":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":587},"src/constants.ts":{"bytesInOutput":2403},"src/filters.ts":{"bytesInOutput":9292},"../types/src/sdk/index.ts":{"bytesInOutput":0},"../types/src/sdk/events/index.ts":{"bytesInOutput":0},"../types/src/sdk/events/event.ts":{"bytesInOutput":772},"../types/src/sdk/licensing/index.ts":{"bytesInOutput":0},"../types/src/sdk/middleware/index.ts":{"bytesInOutput":0},"../types/src/sdk/cli/constants.ts":{"bytesInOutput":164},"../types/src/sdk/cli/index.ts":{"bytesInOutput":0},"../types/src/documents/account/index.ts":{"bytesInOutput":0},"../types/src/documents/index.ts":{"bytesInOutput":0},"../types/src/documents/app/index.ts":{"bytesInOutput":0},"../types/src/documents/app/automation.ts":{"bytesInOutput":1763},"../types/src/documents/app/table/index.ts":{"bytesInOutput":0},"../types/src/documents/document.ts":{"bytesInOutput":69},"../types/src/documents/global/index.ts":{"bytesInOutput":0},"../types/src/documents/global/plugin.ts":{"bytesInOutput":276},"../types/src/documents/global/quotas.ts":{"bytesInOutput":203},"../types/src/documents/platform/index.ts":{"bytesInOutput":0},"../types/src/index.ts":{"bytesInOutput":0},"../types/src/api/account/index.ts":{"bytesInOutput":0},"../types/src/api/index.ts":{"bytesInOutput":0},"../types/src/api/web/index.ts":{"bytesInOutput":0},"../types/src/api/web/system/index.ts":{"bytesInOutput":0},"../types/src/api/web/app/index.ts":{"bytesInOutput":0},"../types/src/api/web/global/index.ts":{"bytesInOutput":0},"../types/src/api/web/global/scim/index.ts":{"bytesInOutput":0},"../types/src/core/index.ts":{"bytesInOutput":0},"../types/src/shared/index.ts":{"bytesInOutput":0},"src/helpers/index.ts":{"bytesInOutput":259},"src/helpers/helpers.ts":{"bytesInOutput":1267},"src/helpers/integrations.ts":{"bytesInOutput":371},"src/utils.ts":{"bytesInOutput":852},"src/sdk/index.ts":{"bytesInOutput":123},"src/sdk/documents/applications.ts":{"bytesInOutput":829},"src/sdk/documents/index.ts":{"bytesInOutput":0},"src/sdk/documents/users.ts":{"bytesInOutput":1681}},"bytes":22557}}}
|
|
1
|
+
{"inputs":{"src/constants.ts":{"bytes":1879,"imports":[],"format":"esm"},"../types/src/sdk/automations/index.ts":{"bytes":368,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"bull","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/hosting.ts":{"bytes":60,"imports":[],"format":"esm"},"../types/src/sdk/context.ts":{"bytes":495,"imports":[{"path":"../documents","kind":"import-statement","external":true},{"path":"./events","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/app.ts":{"bytes":1402,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/auth.ts":{"bytes":738,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/automation.ts":{"bytes":1198,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/email.ts":{"bytes":148,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/datasource.ts":{"bytes":399,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/event.ts":{"bytes":15483,"imports":[{"path":"../hosting","kind":"import-statement","external":true},{"path":"./identification","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/layout.ts":{"bytes":192,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/license.ts":{"bytes":749,"imports":[{"path":"../licensing","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/version.ts":{"bytes":208,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/query.ts":{"bytes":793,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/role.ts":{"bytes":573,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/rows.ts":{"bytes":201,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/screen.ts":{"bytes":334,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/serve.ts":{"bytes":329,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/table.ts":{"bytes":635,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/user.ts":{"bytes":1557,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/view.ts":{"bytes":1028,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/account.ts":{"bytes":330,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/backfill.ts":{"bytes":945,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/identification.ts":{"bytes":1157,"imports":[{"path":"..","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/userGroup.ts":{"bytes":990,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/plugin.ts":{"bytes":544,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/backup.ts":{"bytes":405,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/environmentVariable.ts":{"bytes":335,"imports":[{"path":"./event","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/auditLog.ts":{"bytes":275,"imports":[{"path":"./event","kind":"import-statement","external":true},{"path":"../../api","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/events/index.ts":{"bytes":646,"imports":[{"path":"../types/src/sdk/events/app.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/sdk/events/auth.ts","kind":"import-statement","original":"./auth"},{"path":"../types/src/sdk/events/automation.ts","kind":"import-statement","original":"./automation"},{"path":"../types/src/sdk/events/email.ts","kind":"import-statement","original":"./email"},{"path":"../types/src/sdk/events/datasource.ts","kind":"import-statement","original":"./datasource"},{"path":"../types/src/sdk/events/event.ts","kind":"import-statement","original":"./event"},{"path":"../types/src/sdk/events/layout.ts","kind":"import-statement","original":"./layout"},{"path":"../types/src/sdk/events/license.ts","kind":"import-statement","original":"./license"},{"path":"../types/src/sdk/events/version.ts","kind":"import-statement","original":"./version"},{"path":"../types/src/sdk/events/query.ts","kind":"import-statement","original":"./query"},{"path":"../types/src/sdk/events/role.ts","kind":"import-statement","original":"./role"},{"path":"../types/src/sdk/events/rows.ts","kind":"import-statement","original":"./rows"},{"path":"../types/src/sdk/events/screen.ts","kind":"import-statement","original":"./screen"},{"path":"../types/src/sdk/events/serve.ts","kind":"import-statement","original":"./serve"},{"path":"../types/src/sdk/events/table.ts","kind":"import-statement","original":"./table"},{"path":"../types/src/sdk/events/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/sdk/events/view.ts","kind":"import-statement","original":"./view"},{"path":"../types/src/sdk/events/account.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/sdk/events/backfill.ts","kind":"import-statement","original":"./backfill"},{"path":"../types/src/sdk/events/identification.ts","kind":"import-statement","original":"./identification"},{"path":"../types/src/sdk/events/userGroup.ts","kind":"import-statement","original":"./userGroup"},{"path":"../types/src/sdk/events/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"../types/src/sdk/events/backup.ts","kind":"import-statement","original":"./backup"},{"path":"../types/src/sdk/events/environmentVariable.ts","kind":"import-statement","original":"./environmentVariable"},{"path":"../types/src/sdk/events/auditLog.ts","kind":"import-statement","original":"./auditLog"}],"format":"esm"},"../types/src/sdk/licensing/license.ts":{"bytes":417,"imports":[{"path":".","kind":"import-statement","external":true},{"path":"../../shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/plan.ts":{"bytes":873,"imports":[],"format":"esm"},"../types/src/sdk/licensing/quota.ts":{"bytes":2503,"imports":[{"path":".","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/feature.ts":{"bytes":445,"imports":[{"path":"./plan","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/billing.ts":{"bytes":504,"imports":[{"path":"./plan","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/licensing/index.ts":{"bytes":125,"imports":[{"path":"../types/src/sdk/licensing/license.ts","kind":"import-statement","original":"./license"},{"path":"../types/src/sdk/licensing/plan.ts","kind":"import-statement","original":"./plan"},{"path":"../types/src/sdk/licensing/quota.ts","kind":"import-statement","original":"./quota"},{"path":"../types/src/sdk/licensing/feature.ts","kind":"import-statement","original":"./feature"},{"path":"../types/src/sdk/licensing/billing.ts","kind":"import-statement","original":"./billing"}],"format":"esm"},"../types/src/sdk/migrations.ts":{"bytes":1388,"imports":[],"format":"esm"},"../types/src/sdk/datasources.ts":{"bytes":4083,"imports":[{"path":"../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/search.ts":{"bytes":1787,"imports":[{"path":"./datasources","kind":"import-statement","external":true},{"path":"../documents","kind":"import-statement","external":true},{"path":"../api","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/koa.ts":{"bytes":1114,"imports":[{"path":"koa","kind":"import-statement","external":true},{"path":"../documents","kind":"import-statement","external":true},{"path":"../sdk","kind":"import-statement","external":true},{"path":"formidable","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/auth.ts":{"bytes":653,"imports":[{"path":"./koa","kind":"import-statement","external":true},{"path":"./hosting","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/locks.ts":{"bytes":1313,"imports":[{"path":"redlock","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/db.ts":{"bytes":2792,"imports":[{"path":"@budibase/nano","kind":"import-statement","external":true},{"path":"../","kind":"import-statement","external":true},{"path":"stream","kind":"import-statement","external":true},{"path":"pouchdb","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/middleware/matchers.ts":{"bytes":417,"imports":[],"format":"esm"},"../types/src/sdk/middleware/tenancy.ts":{"bytes":307,"imports":[],"format":"esm"},"../types/src/sdk/middleware/index.ts":{"bytes":53,"imports":[{"path":"../types/src/sdk/middleware/matchers.ts","kind":"import-statement","original":"./matchers"},{"path":"../types/src/sdk/middleware/tenancy.ts","kind":"import-statement","original":"./tenancy"}],"format":"esm"},"../types/src/sdk/featureFlag.ts":{"bytes":127,"imports":[],"format":"esm"},"../types/src/sdk/environmentVariables.ts":{"bytes":91,"imports":[],"format":"esm"},"../types/src/sdk/auditLogs.ts":{"bytes":442,"imports":[{"path":"./events","kind":"import-statement","external":true},{"path":"../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/sso.ts":{"bytes":622,"imports":[{"path":"../documents","kind":"import-statement","external":true},{"path":"./user","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/user.ts":{"bytes":112,"imports":[],"format":"esm"},"../types/src/sdk/cli/constants.ts":{"bytes":404,"imports":[{"path":"../types/src/sdk/events/index.ts","kind":"import-statement","original":"../events"}],"format":"esm"},"../types/src/sdk/cli/index.ts":{"bytes":28,"imports":[{"path":"../types/src/sdk/cli/constants.ts","kind":"import-statement","original":"./constants"}],"format":"esm"},"../types/src/sdk/websocket.ts":{"bytes":164,"imports":[],"format":"esm"},"../types/src/sdk/permissions.ts":{"bytes":399,"imports":[],"format":"esm"},"../types/src/sdk/row.ts":{"bytes":349,"imports":[{"path":"../api","kind":"import-statement","external":true},{"path":"./search","kind":"import-statement","external":true}],"format":"esm"},"../types/src/sdk/index.ts":{"bytes":582,"imports":[{"path":"../types/src/sdk/automations/index.ts","kind":"import-statement","original":"./automations"},{"path":"../types/src/sdk/hosting.ts","kind":"import-statement","original":"./hosting"},{"path":"../types/src/sdk/context.ts","kind":"import-statement","original":"./context"},{"path":"../types/src/sdk/events/index.ts","kind":"import-statement","original":"./events"},{"path":"../types/src/sdk/licensing/index.ts","kind":"import-statement","original":"./licensing"},{"path":"../types/src/sdk/migrations.ts","kind":"import-statement","original":"./migrations"},{"path":"../types/src/sdk/datasources.ts","kind":"import-statement","original":"./datasources"},{"path":"../types/src/sdk/search.ts","kind":"import-statement","original":"./search"},{"path":"../types/src/sdk/koa.ts","kind":"import-statement","original":"./koa"},{"path":"../types/src/sdk/auth.ts","kind":"import-statement","original":"./auth"},{"path":"../types/src/sdk/locks.ts","kind":"import-statement","original":"./locks"},{"path":"../types/src/sdk/db.ts","kind":"import-statement","original":"./db"},{"path":"../types/src/sdk/middleware/index.ts","kind":"import-statement","original":"./middleware"},{"path":"../types/src/sdk/featureFlag.ts","kind":"import-statement","original":"./featureFlag"},{"path":"../types/src/sdk/environmentVariables.ts","kind":"import-statement","original":"./environmentVariables"},{"path":"../types/src/sdk/auditLogs.ts","kind":"import-statement","original":"./auditLogs"},{"path":"../types/src/sdk/sso.ts","kind":"import-statement","original":"./sso"},{"path":"../types/src/sdk/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/sdk/cli/index.ts","kind":"import-statement","original":"./cli"},{"path":"../types/src/sdk/websocket.ts","kind":"import-statement","original":"./websocket"},{"path":"../types/src/sdk/permissions.ts","kind":"import-statement","original":"./permissions"},{"path":"../types/src/sdk/row.ts","kind":"import-statement","original":"./row"}],"format":"esm"},"../types/src/documents/account/account.ts":{"bytes":2589,"imports":[{"path":"../types/src/sdk/index.ts","kind":"import-statement","original":"../../sdk"},{"path":"../../shared","kind":"import-statement","external":true},{"path":"../global","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/account/user.ts":{"bytes":206,"imports":[],"format":"esm"},"../types/src/documents/account/index.ts":{"bytes":49,"imports":[{"path":"../types/src/documents/account/account.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/documents/account/user.ts","kind":"import-statement","original":"./user"}],"format":"esm"},"../types/src/documents/app/app.ts":{"bytes":1367,"imports":[{"path":"../","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/automation.ts":{"bytes":5090,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"events","kind":"import-statement","external":true},{"path":"../global","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/datasource.ts":{"bytes":1028,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true},{"path":"./table","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/layout.ts":{"bytes":98,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/query.ts":{"bytes":1040,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/role.ts":{"bytes":188,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/table/table.ts":{"bytes":712,"imports":[{"path":"../../document","kind":"import-statement","external":true},{"path":"../view","kind":"import-statement","external":true},{"path":"../../../sdk","kind":"import-statement","external":true},{"path":"./schema","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/table/schema.ts":{"bytes":2264,"imports":[{"path":"../row","kind":"import-statement","external":true},{"path":"./constants","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/table/constants.ts":{"bytes":187,"imports":[],"format":"esm"},"../types/src/documents/app/table/index.ts":{"bytes":77,"imports":[{"path":"../types/src/documents/app/table/table.ts","kind":"import-statement","original":"./table"},{"path":"../types/src/documents/app/table/schema.ts","kind":"import-statement","original":"./schema"},{"path":"../types/src/documents/app/table/constants.ts","kind":"import-statement","original":"./constants"}],"format":"esm"},"../types/src/documents/app/screen.ts":{"bytes":483,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"./component","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/view.ts":{"bytes":1107,"imports":[{"path":"../../api","kind":"import-statement","external":true},{"path":"./table","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/document.ts":{"bytes":1288,"imports":[],"format":"esm"},"../types/src/documents/app/row.ts":{"bytes":655,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/user.ts":{"bytes":125,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/backup.ts":{"bytes":1331,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"../../","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/webhook.ts":{"bytes":263,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/links.ts":{"bytes":344,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/component.ts":{"bytes":214,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/app/index.ts":{"bytes":400,"imports":[{"path":"../types/src/documents/app/app.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/documents/app/automation.ts","kind":"import-statement","original":"./automation"},{"path":"../types/src/documents/app/datasource.ts","kind":"import-statement","original":"./datasource"},{"path":"../types/src/documents/app/layout.ts","kind":"import-statement","original":"./layout"},{"path":"../types/src/documents/app/query.ts","kind":"import-statement","original":"./query"},{"path":"../types/src/documents/app/role.ts","kind":"import-statement","original":"./role"},{"path":"../types/src/documents/app/table/index.ts","kind":"import-statement","original":"./table"},{"path":"../types/src/documents/app/screen.ts","kind":"import-statement","original":"./screen"},{"path":"../types/src/documents/app/view.ts","kind":"import-statement","original":"./view"},{"path":"../types/src/documents/document.ts","kind":"import-statement","original":"../document"},{"path":"../types/src/documents/app/row.ts","kind":"import-statement","original":"./row"},{"path":"../types/src/documents/app/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/documents/app/backup.ts","kind":"import-statement","original":"./backup"},{"path":"../types/src/documents/app/webhook.ts","kind":"import-statement","original":"./webhook"},{"path":"../types/src/documents/app/links.ts","kind":"import-statement","original":"./links"},{"path":"../types/src/documents/app/component.ts","kind":"import-statement","original":"./component"}],"format":"esm"},"../types/src/documents/global/config.ts":{"bytes":3014,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/user.ts":{"bytes":1733,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/userGroup.ts":{"bytes":653,"imports":[{"path":"../../api","kind":"import-statement","external":true},{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/plugin.ts":{"bytes":714,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/quotas.ts":{"bytes":1623,"imports":[{"path":"../types/src/sdk/index.ts","kind":"import-statement","original":"../../sdk"}],"format":"esm"},"../types/src/documents/global/schedule.ts":{"bytes":665,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/templates.ts":{"bytes":175,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/environmentVariables.ts":{"bytes":474,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/auditLogs.ts":{"bytes":362,"imports":[{"path":"../document","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/global/index.ts":{"bytes":248,"imports":[{"path":"../types/src/documents/global/config.ts","kind":"import-statement","original":"./config"},{"path":"../types/src/documents/global/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/documents/global/userGroup.ts","kind":"import-statement","original":"./userGroup"},{"path":"../types/src/documents/global/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"../types/src/documents/global/quotas.ts","kind":"import-statement","original":"./quotas"},{"path":"../types/src/documents/global/schedule.ts","kind":"import-statement","original":"./schedule"},{"path":"../types/src/documents/global/templates.ts","kind":"import-statement","original":"./templates"},{"path":"../types/src/documents/global/environmentVariables.ts","kind":"import-statement","original":"./environmentVariables"},{"path":"../types/src/documents/global/auditLogs.ts","kind":"import-statement","original":"./auditLogs"}],"format":"esm"},"../types/src/documents/platform/info.ts":{"bytes":175,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/users.ts":{"bytes":336,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/accounts.ts":{"bytes":110,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/tenants.ts":{"bytes":108,"imports":[{"path":"../document","kind":"import-statement","external":true}],"format":"esm"},"../types/src/documents/platform/index.ts":{"bytes":100,"imports":[{"path":"../types/src/documents/platform/info.ts","kind":"import-statement","original":"./info"},{"path":"../types/src/documents/platform/users.ts","kind":"import-statement","original":"./users"},{"path":"../types/src/documents/platform/accounts.ts","kind":"import-statement","original":"./accounts"},{"path":"../types/src/documents/platform/tenants.ts","kind":"import-statement","original":"./tenants"}],"format":"esm"},"../types/src/documents/pouch.ts":{"bytes":482,"imports":[],"format":"esm"},"../types/src/documents/index.ts":{"bytes":151,"imports":[{"path":"../types/src/documents/account/index.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/documents/app/index.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/documents/global/index.ts","kind":"import-statement","original":"./global"},{"path":"../types/src/documents/platform/index.ts","kind":"import-statement","original":"./platform"},{"path":"../types/src/documents/document.ts","kind":"import-statement","original":"./document"},{"path":"../types/src/documents/pouch.ts","kind":"import-statement","original":"./pouch"}],"format":"esm"},"../types/src/api/account/accounts.ts":{"bytes":451,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/account/user.ts":{"bytes":156,"imports":[],"format":"esm"},"../types/src/api/account/license.ts":{"bytes":860,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true},{"path":"../../shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/account/status.ts":{"bytes":116,"imports":[],"format":"esm"},"../types/src/api/account/index.ts":{"bytes":101,"imports":[{"path":"../types/src/api/account/accounts.ts","kind":"import-statement","original":"./accounts"},{"path":"../types/src/api/account/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/api/account/license.ts","kind":"import-statement","original":"./license"},{"path":"../types/src/api/account/status.ts","kind":"import-statement","original":"./status"}],"format":"esm"},"../types/src/api/web/analytics.ts":{"bytes":169,"imports":[],"format":"esm"},"../types/src/api/web/auth.ts":{"bytes":444,"imports":[],"format":"esm"},"../types/src/api/web/user.ts":{"bytes":1532,"imports":[{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/errors.ts":{"bytes":104,"imports":[],"format":"esm"},"../types/src/api/web/debug.ts":{"bytes":223,"imports":[],"format":"esm"},"../types/src/api/web/schedule.ts":{"bytes":327,"imports":[{"path":"../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/system/environment.ts":{"bytes":179,"imports":[],"format":"esm"},"../types/src/api/web/system/index.ts":{"bytes":30,"imports":[{"path":"../types/src/api/web/system/environment.ts","kind":"import-statement","original":"./environment"}],"format":"esm"},"../types/src/api/web/app/backup.ts":{"bytes":422,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/datasource.ts":{"bytes":719,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/row.ts":{"bytes":208,"imports":[{"path":"../../../documents/app/row","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/view.ts":{"bytes":390,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/rows.ts":{"bytes":568,"imports":[{"path":"../../../sdk","kind":"import-statement","external":true},{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/table.ts":{"bytes":465,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/app/index.ts":{"bytes":146,"imports":[{"path":"../types/src/api/web/app/backup.ts","kind":"import-statement","original":"./backup"},{"path":"../types/src/api/web/app/datasource.ts","kind":"import-statement","original":"./datasource"},{"path":"../types/src/api/web/app/row.ts","kind":"import-statement","original":"./row"},{"path":"../types/src/api/web/app/view.ts","kind":"import-statement","original":"./view"},{"path":"../types/src/api/web/app/rows.ts","kind":"import-statement","original":"./rows"},{"path":"../types/src/api/web/app/table.ts","kind":"import-statement","original":"./table"}],"format":"esm"},"../types/src/api/web/global/environmentVariables.ts":{"bytes":376,"imports":[],"format":"esm"},"../types/src/api/web/global/auditLogs.ts":{"bytes":1095,"imports":[{"path":"../../../sdk","kind":"import-statement","external":true},{"path":"../","kind":"import-statement","external":true},{"path":"../../../","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/events.ts":{"bytes":195,"imports":[],"format":"esm"},"../types/src/api/web/global/configs.ts":{"bytes":609,"imports":[{"path":"../../../documents","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/users.ts":{"bytes":1127,"imports":[{"path":"scim-patch","kind":"import-statement","external":true},{"path":"./shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/groups.ts":{"bytes":736,"imports":[{"path":"scim-patch","kind":"import-statement","external":true},{"path":"./shared","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/shared.ts":{"bytes":376,"imports":[{"path":"scim-patch","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/global/scim/index.ts":{"bytes":74,"imports":[{"path":"../types/src/api/web/global/scim/users.ts","kind":"import-statement","original":"./users"},{"path":"../types/src/api/web/global/scim/groups.ts","kind":"import-statement","original":"./groups"},{"path":"../types/src/api/web/global/scim/shared.ts","kind":"import-statement","original":"./shared"}],"format":"esm"},"../types/src/api/web/global/license.ts":{"bytes":432,"imports":[],"format":"esm"},"../types/src/api/web/global/index.ts":{"bytes":167,"imports":[{"path":"../types/src/api/web/global/environmentVariables.ts","kind":"import-statement","original":"./environmentVariables"},{"path":"../types/src/api/web/global/auditLogs.ts","kind":"import-statement","original":"./auditLogs"},{"path":"../types/src/api/web/global/events.ts","kind":"import-statement","original":"./events"},{"path":"../types/src/api/web/global/configs.ts","kind":"import-statement","original":"./configs"},{"path":"../types/src/api/web/global/scim/index.ts","kind":"import-statement","original":"./scim"},{"path":"../types/src/api/web/global/license.ts","kind":"import-statement","original":"./license"}],"format":"esm"},"../types/src/api/web/pagination.ts":{"bytes":472,"imports":[],"format":"esm"},"../types/src/api/web/searchFilter.ts":{"bytes":946,"imports":[{"path":"../../documents","kind":"import-statement","external":true},{"path":"../../sdk","kind":"import-statement","external":true}],"format":"esm"},"../types/src/api/web/index.ts":{"bytes":282,"imports":[{"path":"../types/src/api/web/analytics.ts","kind":"import-statement","original":"./analytics"},{"path":"../types/src/api/web/auth.ts","kind":"import-statement","original":"./auth"},{"path":"../types/src/api/web/user.ts","kind":"import-statement","original":"./user"},{"path":"../types/src/api/web/errors.ts","kind":"import-statement","original":"./errors"},{"path":"../types/src/api/web/debug.ts","kind":"import-statement","original":"./debug"},{"path":"../types/src/api/web/schedule.ts","kind":"import-statement","original":"./schedule"},{"path":"../types/src/api/web/system/index.ts","kind":"import-statement","original":"./system"},{"path":"../types/src/api/web/app/index.ts","kind":"import-statement","original":"./app"},{"path":"../types/src/api/web/global/index.ts","kind":"import-statement","original":"./global"},{"path":"../types/src/api/web/pagination.ts","kind":"import-statement","original":"./pagination"},{"path":"../types/src/api/web/searchFilter.ts","kind":"import-statement","original":"./searchFilter"}],"format":"esm"},"../types/src/api/index.ts":{"bytes":48,"imports":[{"path":"../types/src/api/account/index.ts","kind":"import-statement","original":"./account"},{"path":"../types/src/api/web/index.ts","kind":"import-statement","original":"./web"}],"format":"esm"},"../types/src/core/installation.ts":{"bytes":66,"imports":[],"format":"esm"},"../types/src/core/index.ts":{"bytes":31,"imports":[{"path":"../types/src/core/installation.ts","kind":"import-statement","original":"./installation"}],"format":"esm"},"../types/src/shared/typeUtils.ts":{"bytes":197,"imports":[],"format":"esm"},"../types/src/shared/index.ts":{"bytes":28,"imports":[{"path":"../types/src/shared/typeUtils.ts","kind":"import-statement","original":"./typeUtils"}],"format":"esm"},"../types/src/index.ts":{"bytes":120,"imports":[{"path":"../types/src/documents/index.ts","kind":"import-statement","original":"./documents"},{"path":"../types/src/sdk/index.ts","kind":"import-statement","original":"./sdk"},{"path":"../types/src/api/index.ts","kind":"import-statement","original":"./api"},{"path":"../types/src/core/index.ts","kind":"import-statement","original":"./core"},{"path":"../types/src/shared/index.ts","kind":"import-statement","original":"./shared"}],"format":"esm"},"src/helpers/helpers.ts":{"bytes":2120,"imports":[{"path":"@budibase/types","kind":"import-statement","external":true}],"format":"esm"},"src/helpers/integrations.ts":{"bytes":442,"imports":[{"path":"../types/src/index.ts","kind":"import-statement","original":"@budibase/types"}],"format":"esm"},"src/helpers/index.ts":{"bytes":57,"imports":[{"path":"src/helpers/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"src/helpers/integrations.ts","kind":"import-statement","original":"./integrations"}],"format":"esm"},"src/filters.ts":{"bytes":12118,"imports":[{"path":"../types/src/index.ts","kind":"import-statement","original":"@budibase/types"},{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"src/helpers/index.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"src/utils.ts":{"bytes":862,"imports":[],"format":"esm"},"src/sdk/documents/applications.ts":{"bytes":1017,"imports":[{"path":"../types/src/index.ts","kind":"import-statement","original":"@budibase/types"}],"format":"esm"},"src/sdk/documents/users.ts":{"bytes":1833,"imports":[{"path":"@budibase/types","kind":"import-statement","external":true},{"path":"src/sdk/documents/applications.ts","kind":"import-statement","original":"./applications"}],"format":"esm"},"src/sdk/documents/index.ts":{"bytes":80,"imports":[{"path":"src/sdk/documents/applications.ts","kind":"import-statement","original":"./applications"},{"path":"src/sdk/documents/users.ts","kind":"import-statement","original":"./users"}],"format":"esm"},"src/sdk/index.ts":{"bytes":28,"imports":[{"path":"src/sdk/documents/index.ts","kind":"import-statement","original":"./documents"}],"format":"esm"},"src/index.ts":{"bytes":168,"imports":[{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"src/filters.ts","kind":"import-statement","original":"./filters"},{"path":"src/helpers/index.ts","kind":"import-statement","original":"./helpers"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils"},{"path":"src/sdk/index.ts","kind":"import-statement","original":"./sdk"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":61366},"dist/index.js":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":587},"src/constants.ts":{"bytesInOutput":2403},"src/filters.ts":{"bytesInOutput":8828},"../types/src/sdk/index.ts":{"bytesInOutput":0},"../types/src/sdk/events/index.ts":{"bytesInOutput":0},"../types/src/sdk/events/event.ts":{"bytesInOutput":772},"../types/src/sdk/licensing/index.ts":{"bytesInOutput":0},"../types/src/sdk/middleware/index.ts":{"bytesInOutput":0},"../types/src/sdk/cli/constants.ts":{"bytesInOutput":164},"../types/src/sdk/cli/index.ts":{"bytesInOutput":0},"../types/src/documents/account/index.ts":{"bytesInOutput":0},"../types/src/documents/index.ts":{"bytesInOutput":0},"../types/src/documents/app/index.ts":{"bytesInOutput":0},"../types/src/documents/app/automation.ts":{"bytesInOutput":1763},"../types/src/documents/app/table/index.ts":{"bytesInOutput":0},"../types/src/documents/document.ts":{"bytesInOutput":69},"../types/src/documents/global/index.ts":{"bytesInOutput":0},"../types/src/documents/global/plugin.ts":{"bytesInOutput":276},"../types/src/documents/global/quotas.ts":{"bytesInOutput":203},"../types/src/documents/platform/index.ts":{"bytesInOutput":0},"../types/src/index.ts":{"bytesInOutput":0},"../types/src/api/account/index.ts":{"bytesInOutput":0},"../types/src/api/index.ts":{"bytesInOutput":0},"../types/src/api/web/index.ts":{"bytesInOutput":0},"../types/src/api/web/system/index.ts":{"bytesInOutput":0},"../types/src/api/web/app/index.ts":{"bytesInOutput":0},"../types/src/api/web/global/index.ts":{"bytesInOutput":0},"../types/src/api/web/global/scim/index.ts":{"bytesInOutput":0},"../types/src/core/index.ts":{"bytesInOutput":0},"../types/src/shared/index.ts":{"bytesInOutput":0},"src/helpers/index.ts":{"bytesInOutput":259},"src/helpers/helpers.ts":{"bytesInOutput":1184},"src/helpers/integrations.ts":{"bytesInOutput":371},"src/utils.ts":{"bytesInOutput":852},"src/sdk/index.ts":{"bytesInOutput":123},"src/sdk/documents/applications.ts":{"bytesInOutput":829},"src/sdk/documents/index.ts":{"bytesInOutput":0},"src/sdk/documents/users.ts":{"bytesInOutput":1393}},"bytes":21722}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/shared-core",
|
|
3
|
-
"version": "2.9.30-alpha.
|
|
3
|
+
"version": "2.9.30-alpha.2",
|
|
4
4
|
"description": "Shared data utils",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"check:types": "tsc -p tsconfig.json --noEmit --paths null"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@budibase/types": "2.9.30-alpha.
|
|
17
|
+
"@budibase/types": "2.9.30-alpha.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"concurrently": "^7.6.0",
|
|
@@ -32,8 +32,18 @@
|
|
|
32
32
|
"target": "build"
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
|
+
},
|
|
36
|
+
"dev:builder": {
|
|
37
|
+
"dependsOn": [
|
|
38
|
+
{
|
|
39
|
+
"projects": [
|
|
40
|
+
"@budibase/types"
|
|
41
|
+
],
|
|
42
|
+
"target": "build"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
35
45
|
}
|
|
36
46
|
}
|
|
37
47
|
},
|
|
38
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e05e6be535914a1163e31937e847752cbb1bdd41"
|
|
39
49
|
}
|