@encodeagent/platform-helper-util 1.2508.1241505

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.
Files changed (122) hide show
  1. package/README.md +121 -0
  2. package/dist/__tests__/core.test.d.ts +5 -0
  3. package/dist/__tests__/core.test.d.ts.map +1 -0
  4. package/dist/__tests__/core.test.js +128 -0
  5. package/dist/__tests__/core.test.js.map +1 -0
  6. package/dist/__tests__/shortid.test.d.ts +5 -0
  7. package/dist/__tests__/shortid.test.d.ts.map +1 -0
  8. package/dist/__tests__/shortid.test.js +72 -0
  9. package/dist/__tests__/shortid.test.js.map +1 -0
  10. package/dist/__tests__/slug.test.d.ts +5 -0
  11. package/dist/__tests__/slug.test.d.ts.map +1 -0
  12. package/dist/__tests__/slug.test.js +31 -0
  13. package/dist/__tests__/slug.test.js.map +1 -0
  14. package/dist/__tests__/token.test.d.ts +5 -0
  15. package/dist/__tests__/token.test.d.ts.map +1 -0
  16. package/dist/__tests__/token.test.js +49 -0
  17. package/dist/__tests__/token.test.js.map +1 -0
  18. package/dist/__tests__/uuid.test.d.ts +5 -0
  19. package/dist/__tests__/uuid.test.d.ts.map +1 -0
  20. package/dist/__tests__/uuid.test.js +42 -0
  21. package/dist/__tests__/uuid.test.js.map +1 -0
  22. package/dist/__tests__/value-of-object.test.d.ts +5 -0
  23. package/dist/__tests__/value-of-object.test.d.ts.map +1 -0
  24. package/dist/__tests__/value-of-object.test.js +49 -0
  25. package/dist/__tests__/value-of-object.test.js.map +1 -0
  26. package/dist/ai/llm.d.ts +90 -0
  27. package/dist/ai/llm.d.ts.map +1 -0
  28. package/dist/ai/llm.js +524 -0
  29. package/dist/ai/llm.js.map +1 -0
  30. package/dist/ai/model.d.ts +14 -0
  31. package/dist/ai/model.d.ts.map +1 -0
  32. package/dist/ai/model.js +120 -0
  33. package/dist/ai/model.js.map +1 -0
  34. package/dist/ai/types.d.ts +85 -0
  35. package/dist/ai/types.d.ts.map +1 -0
  36. package/dist/ai/types.js +15 -0
  37. package/dist/ai/types.js.map +1 -0
  38. package/dist/ai/util.d.ts +28 -0
  39. package/dist/ai/util.d.ts.map +1 -0
  40. package/dist/ai/util.js +43 -0
  41. package/dist/ai/util.js.map +1 -0
  42. package/dist/auth.d.ts +34 -0
  43. package/dist/auth.d.ts.map +1 -0
  44. package/dist/auth.js +568 -0
  45. package/dist/auth.js.map +1 -0
  46. package/dist/colors.d.ts +79 -0
  47. package/dist/colors.d.ts.map +1 -0
  48. package/dist/colors.js +492 -0
  49. package/dist/colors.js.map +1 -0
  50. package/dist/constants.d.ts +86 -0
  51. package/dist/constants.d.ts.map +1 -0
  52. package/dist/constants.js +2578 -0
  53. package/dist/constants.js.map +1 -0
  54. package/dist/core.d.ts +337 -0
  55. package/dist/core.d.ts.map +1 -0
  56. package/dist/core.js +1165 -0
  57. package/dist/core.js.map +1 -0
  58. package/dist/cost.d.ts +35 -0
  59. package/dist/cost.d.ts.map +1 -0
  60. package/dist/cost.js +143 -0
  61. package/dist/cost.js.map +1 -0
  62. package/dist/file.d.ts +55 -0
  63. package/dist/file.d.ts.map +1 -0
  64. package/dist/file.js +273 -0
  65. package/dist/file.js.map +1 -0
  66. package/dist/html.d.ts +44 -0
  67. package/dist/html.d.ts.map +1 -0
  68. package/dist/html.js +420 -0
  69. package/dist/html.js.map +1 -0
  70. package/dist/index.d.ts +53 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.js +313 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/markdown.d.ts +20 -0
  75. package/dist/markdown.d.ts.map +1 -0
  76. package/dist/markdown.js +38 -0
  77. package/dist/markdown.js.map +1 -0
  78. package/dist/metadata.d.ts +39 -0
  79. package/dist/metadata.d.ts.map +1 -0
  80. package/dist/metadata.js +110 -0
  81. package/dist/metadata.js.map +1 -0
  82. package/dist/record.d.ts +67 -0
  83. package/dist/record.d.ts.map +1 -0
  84. package/dist/record.js +404 -0
  85. package/dist/record.js.map +1 -0
  86. package/dist/shortid.d.ts +42 -0
  87. package/dist/shortid.d.ts.map +1 -0
  88. package/dist/shortid.js +42 -0
  89. package/dist/shortid.js.map +1 -0
  90. package/dist/slug.d.ts +24 -0
  91. package/dist/slug.d.ts.map +1 -0
  92. package/dist/slug.js +43 -0
  93. package/dist/slug.js.map +1 -0
  94. package/dist/token.d.ts +34 -0
  95. package/dist/token.d.ts.map +1 -0
  96. package/dist/token.js +20 -0
  97. package/dist/token.js.map +1 -0
  98. package/dist/tree.d.ts +27 -0
  99. package/dist/tree.d.ts.map +1 -0
  100. package/dist/tree.js +193 -0
  101. package/dist/tree.js.map +1 -0
  102. package/dist/types.d.ts +270 -0
  103. package/dist/types.d.ts.map +1 -0
  104. package/dist/types.js +29 -0
  105. package/dist/types.js.map +1 -0
  106. package/dist/uuid.d.ts +25 -0
  107. package/dist/uuid.d.ts.map +1 -0
  108. package/dist/uuid.js +32 -0
  109. package/dist/uuid.js.map +1 -0
  110. package/dist/value-of-object.d.ts +25 -0
  111. package/dist/value-of-object.d.ts.map +1 -0
  112. package/dist/value-of-object.js +123 -0
  113. package/dist/value-of-object.js.map +1 -0
  114. package/dist/web-content.d.ts +54 -0
  115. package/dist/web-content.d.ts.map +1 -0
  116. package/dist/web-content.js +268 -0
  117. package/dist/web-content.js.map +1 -0
  118. package/dist/web.d.ts +36 -0
  119. package/dist/web.d.ts.map +1 -0
  120. package/dist/web.js +162 -0
  121. package/dist/web.js.map +1 -0
  122. package/package.json +68 -0
package/dist/index.js ADDED
@@ -0,0 +1,313 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview EncodeAgent Platform Helper Utilities
4
+ * @copyright PrimeObjects Software Inc. (C) 2024 All Rights Reserved
5
+ * @author EncodeAgent Team.
6
+ * @copyright © 2024 PrimeObjects Software Inc. All rights reserved.
7
+ * @license Proprietary - Subject to PrimeObjects License Agreements
8
+ * @contact encode.agent@primeobjects.com
9
+ * @website https://www.encodeagent.com/
10
+ *
11
+ * This software contains proprietary and confidential information of
12
+ * PrimeObjects Software Inc. Any reproduction or distribution of this
13
+ * software, in whole or in part, without written permission of
14
+ * PrimeObjects Software Inc. is strictly prohibited.
15
+ *
16
+ * Unauthorized copying of this file, via any medium, is strictly prohibited.
17
+ * This file is proprietary and confidential.
18
+ */
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.sameGuid = exports.cleanGuid = exports.getGlobalObject = exports.getGlobalEnv = exports.setLibTrack = exports.libTrackIsOn = exports.setAppTrack = exports.appTrackIsOn = exports.doNothing = exports.getProcess = exports.getWindow = exports.getPropName = exports.deepFlatten = exports.formatJSONString = exports.readableFileSize = exports.formatText = exports.formatNumberBMK = exports.numberWithCommas = exports.shortenNumber = exports.groupItems = exports.isObjectString = exports.isObject = exports.removeNoValueProperty = exports.shortenString = exports.formatString = exports.getMaxTimestamp = exports.getTimestamp = exports.getUTCMaxISOString = exports.getUTCISOString = exports.isPassword = exports.isEmail = exports.checkToTrue = exports.isEmptyGuid = exports.resetCacheByGroupId = exports.removeCacheByGroupId = exports.setCacheByGroupId = exports.getCacheByGroupId = exports.removeCache = exports.setCache = exports.getCache = exports.ttl = exports.getDateTimeString = exports.serialNumber = exports.timeDiff = exports.getSubObject = exports.isEmptyString = exports.isPhoneNumber = exports.isGuid = exports.isNonEmptyString = exports.stringToColor = void 0;
21
+ exports.D100 = exports.M = exports.K = exports.SURCHARGE = exports.SURCHARGE_TYPE = exports.SURCHARGE_VALUE = exports.CREDIT_EXCHANGE_RATE = exports.GENDERS = exports.LANGUAGES = exports.COUNTRIES = exports.DEFAULT_PASSWORD_RULE = exports.GUID_EMPTY = exports.isValidUrl = exports.getRootDomainFromHost = exports.getRootDomainFromUrl = exports.getBaseDomain = exports.fixUrl = exports.getWebRootUrl = exports.getWebLocation = exports.setWebQueryValue = exports.getWebQueryValue = exports.getBooleanValueOfObject = exports.getPropValueOfObject = exports.getFloatValueOfObject = exports.getArrayPropValueOfObject = exports.getIntValueOfObject = exports.getBooleanPropValue = exports.getObjectPropValue = exports.newShortId = exports.newGuid = exports.slug = exports.getObjsDifference = exports.toTitle = exports.wait = exports.isBooleanString = exports.isGoodJSON = exports.parseString = exports.generateBatchArray = exports.calculateSurcharge = exports.convertToOneParagraph = exports.trimNewLine = exports.getLastDayOfTheWeek = exports.getFirstDayOfTheWeek = exports.findGender = exports.findCountry = exports.findLanguage = exports.isFloatString = exports.isIntegerString = exports.isNumberString = exports.convertEnumToArray = void 0;
22
+ exports.setColorTheme = exports.getColor = exports.ROSE = exports.PINK = exports.FUCHSIA = exports.PURPLE = exports.VIOLET = exports.INDIGO = exports.BLUE = exports.SKY = exports.CYAN = exports.TEAL = exports.EMERALD = exports.GREEN = exports.LIME = exports.YELLOW = exports.AMBER = exports.ORANGE = exports.RED = exports.STONE = exports.NEUTRAL = exports.ZINC = exports.GRAY = exports.SLATE = exports.COLORS = exports.ERROR_HTTP_LIST = exports.ERROR_HTTP_504 = exports.ERROR_HTTP_503 = exports.ERROR_HTTP_502 = exports.ERROR_HTTP_501 = exports.ERROR_HTTP_500 = exports.ERROR_HTTP_429 = exports.ERROR_HTTP_408 = exports.ERROR_HTTP_407 = exports.ERROR_HTTP_406 = exports.ERROR_HTTP_405 = exports.ERROR_HTTP_404 = exports.ERROR_HTTP_403 = exports.ERROR_HTTP_402 = exports.ERROR_HTTP_401 = exports.ERROR_HTTP_400 = exports.ERROR_PERMISSION_DENIED = exports.ERROR_UNEXPECTED = exports.ERROR_AUTH_FAILED = exports.ERROR_NO_ENOUGH_CREDIT = exports.ERROR_TOO_MANY_REQUESTS = exports.ERROR_PARAMETER_INVALID = exports.ERROR_PARAMETER_MISSING = exports.DM = exports.DK = void 0;
23
+ exports.htmlToMarkdown = exports.markdownToHtml = exports.getRecordFilePath = exports.getContextFromRecord = exports.convertRecordForCreate = exports.getRecordSlug = exports.applyRecordSlug = exports.getRecordPageMetadata = exports.getRecordAddress = exports.getRecordEmailAddress = exports.getRecordFullName = exports.getRecordAbstract = exports.getRecordContentByContentFields = exports.getRecordDisplayByDisplayFields = exports.getRecordContent = exports.getRecordMedia = exports.getRecordDisplay = exports.getRecordEntityFolder = exports.getEntityFolder = exports.fileExtensionInTheList = exports.getFileExtension = exports.getFileNameFromUrl = exports.getAcceptFileExtensions = exports.getAcceptMIMEs = exports.getAcceptExtension = exports.getContentType = exports.getFileType = exports.getFileList = exports.FILE_MS_OFFICE_OLD_LIST = exports.FILE_MS_OFFICE_365_LIST = exports.FILE_ZIP_LIST = exports.FILE_EPUB_LIST = exports.FILE_PDF_LIST = exports.FILE_AUDIO_LIST = exports.FILE_VIDEO_LIST = exports.FILE_IMAGE_LIST = exports.FILE_HTML_LIST = exports.FILE_TXT_LIST = exports.FILE_JSON_LIST = exports.FILE_XML_LIST = exports.FILE_SOURCE_CODE_LIST = exports.FILE_PLAINTEXT_LIST = exports.rgbToHex = exports.hexToRgbaString = exports.hexToRgbString = exports.hexToRgba = exports.hexToRgb = exports.isValidRGB = exports.isValidHex = exports.getColorTheme = void 0;
24
+ exports.getAIPlatforms = exports.getAIModels = exports.getAIModel = exports.calculateCost = exports.roundCostNumber = exports.findMainContentElement = exports.processWebPage = exports.getValueBySelector = exports.getImage = exports.getDescription = exports.getContent = exports.getTitle = exports.getCanonical = exports.lowerH = exports.processHtml_Hx = exports.fixHtmlImages = exports.removeHtmlSingleParent = exports.removeHtmlElements = exports.removeHtmlComments = exports.removeHtmlAttributes = exports.cleanHtml = exports.removeHtmlEmptyElements = exports.getTreeItemAndChildrenIds = exports.getTreeItemHavingPropValue = exports.getTreeItemPath = exports.removeTreeItem = exports.replaceTreeItem = exports.insertTreeItem = exports.updateTreeItem = exports.updateAllTreeItems = exports.getTreeItem = exports.hasPrivilege = exports.isAuthor = exports.isReader = exports.checkPrivilege = exports.checkEntityPrivilege = exports.checkPrivileges = exports.hasLicense = exports.checkLicenses = exports.recordOwnedByOrganization = exports.checkRecordPrivilege = exports.hasAnyRole = exports.hasAllRoles = exports.hasRole = exports.hasMemberRole = exports.isOwner = exports.isMember = exports.getEntityTypeFromFileName = exports.getEntity = exports.getEntityBySlug = void 0;
25
+ exports.getLLMPrompt = exports.preProcessLLMPromptParameters = exports.getLLMParameters = exports.getLLMRequest = exports.getLLMRuntime = exports.getAIContext = exports.PLAYGROUND_PROMPT = exports.convertAIModelRecordsToAIServices = exports.getAIServices = exports.getDefaultAIServiceId = exports.getDefaultAIService = exports.getAIService = exports.getAIProvider = exports.getAIProviders = exports.getAIPlatform = void 0;
26
+ var core_1 = require("./core");
27
+ Object.defineProperty(exports, "stringToColor", { enumerable: true, get: function () { return core_1.stringToColor; } });
28
+ Object.defineProperty(exports, "isNonEmptyString", { enumerable: true, get: function () { return core_1.isNonEmptyString; } });
29
+ Object.defineProperty(exports, "isGuid", { enumerable: true, get: function () { return core_1.isGuid; } });
30
+ Object.defineProperty(exports, "isPhoneNumber", { enumerable: true, get: function () { return core_1.isPhoneNumber; } });
31
+ Object.defineProperty(exports, "isEmptyString", { enumerable: true, get: function () { return core_1.isEmptyString; } });
32
+ Object.defineProperty(exports, "getSubObject", { enumerable: true, get: function () { return core_1.getSubObject; } });
33
+ Object.defineProperty(exports, "timeDiff", { enumerable: true, get: function () { return core_1.timeDiff; } });
34
+ Object.defineProperty(exports, "serialNumber", { enumerable: true, get: function () { return core_1.serialNumber; } });
35
+ Object.defineProperty(exports, "getDateTimeString", { enumerable: true, get: function () { return core_1.getDateTimeString; } });
36
+ Object.defineProperty(exports, "ttl", { enumerable: true, get: function () { return core_1.ttl; } });
37
+ Object.defineProperty(exports, "getCache", { enumerable: true, get: function () { return core_1.getCache; } });
38
+ Object.defineProperty(exports, "setCache", { enumerable: true, get: function () { return core_1.setCache; } });
39
+ Object.defineProperty(exports, "removeCache", { enumerable: true, get: function () { return core_1.removeCache; } });
40
+ Object.defineProperty(exports, "getCacheByGroupId", { enumerable: true, get: function () { return core_1.getCacheByGroupId; } });
41
+ Object.defineProperty(exports, "setCacheByGroupId", { enumerable: true, get: function () { return core_1.setCacheByGroupId; } });
42
+ Object.defineProperty(exports, "removeCacheByGroupId", { enumerable: true, get: function () { return core_1.removeCacheByGroupId; } });
43
+ Object.defineProperty(exports, "resetCacheByGroupId", { enumerable: true, get: function () { return core_1.resetCacheByGroupId; } });
44
+ Object.defineProperty(exports, "isEmptyGuid", { enumerable: true, get: function () { return core_1.isEmptyGuid; } });
45
+ Object.defineProperty(exports, "checkToTrue", { enumerable: true, get: function () { return core_1.checkToTrue; } });
46
+ Object.defineProperty(exports, "isEmail", { enumerable: true, get: function () { return core_1.isEmail; } });
47
+ Object.defineProperty(exports, "isPassword", { enumerable: true, get: function () { return core_1.isPassword; } });
48
+ Object.defineProperty(exports, "getUTCISOString", { enumerable: true, get: function () { return core_1.getUTCISOString; } });
49
+ Object.defineProperty(exports, "getUTCMaxISOString", { enumerable: true, get: function () { return core_1.getUTCMaxISOString; } });
50
+ Object.defineProperty(exports, "getTimestamp", { enumerable: true, get: function () { return core_1.getTimestamp; } });
51
+ Object.defineProperty(exports, "getMaxTimestamp", { enumerable: true, get: function () { return core_1.getMaxTimestamp; } });
52
+ Object.defineProperty(exports, "formatString", { enumerable: true, get: function () { return core_1.formatString; } });
53
+ Object.defineProperty(exports, "shortenString", { enumerable: true, get: function () { return core_1.shortenString; } });
54
+ Object.defineProperty(exports, "removeNoValueProperty", { enumerable: true, get: function () { return core_1.removeNoValueProperty; } });
55
+ Object.defineProperty(exports, "isObject", { enumerable: true, get: function () { return core_1.isObject; } });
56
+ Object.defineProperty(exports, "isObjectString", { enumerable: true, get: function () { return core_1.isObjectString; } });
57
+ Object.defineProperty(exports, "groupItems", { enumerable: true, get: function () { return core_1.groupItems; } });
58
+ Object.defineProperty(exports, "shortenNumber", { enumerable: true, get: function () { return core_1.shortenNumber; } });
59
+ Object.defineProperty(exports, "numberWithCommas", { enumerable: true, get: function () { return core_1.numberWithCommas; } });
60
+ Object.defineProperty(exports, "formatNumberBMK", { enumerable: true, get: function () { return core_1.formatNumberBMK; } });
61
+ Object.defineProperty(exports, "formatText", { enumerable: true, get: function () { return core_1.formatText; } });
62
+ Object.defineProperty(exports, "readableFileSize", { enumerable: true, get: function () { return core_1.readableFileSize; } });
63
+ Object.defineProperty(exports, "formatJSONString", { enumerable: true, get: function () { return core_1.formatJSONString; } });
64
+ Object.defineProperty(exports, "deepFlatten", { enumerable: true, get: function () { return core_1.deepFlatten; } });
65
+ Object.defineProperty(exports, "getPropName", { enumerable: true, get: function () { return core_1.getPropName; } });
66
+ Object.defineProperty(exports, "getWindow", { enumerable: true, get: function () { return core_1.getWindow; } });
67
+ Object.defineProperty(exports, "getProcess", { enumerable: true, get: function () { return core_1.getProcess; } });
68
+ Object.defineProperty(exports, "doNothing", { enumerable: true, get: function () { return core_1.doNothing; } });
69
+ Object.defineProperty(exports, "appTrackIsOn", { enumerable: true, get: function () { return core_1.appTrackIsOn; } });
70
+ Object.defineProperty(exports, "setAppTrack", { enumerable: true, get: function () { return core_1.setAppTrack; } });
71
+ Object.defineProperty(exports, "libTrackIsOn", { enumerable: true, get: function () { return core_1.libTrackIsOn; } });
72
+ Object.defineProperty(exports, "setLibTrack", { enumerable: true, get: function () { return core_1.setLibTrack; } });
73
+ Object.defineProperty(exports, "getGlobalEnv", { enumerable: true, get: function () { return core_1.getGlobalEnv; } });
74
+ Object.defineProperty(exports, "getGlobalObject", { enumerable: true, get: function () { return core_1.getGlobalObject; } });
75
+ Object.defineProperty(exports, "cleanGuid", { enumerable: true, get: function () { return core_1.cleanGuid; } });
76
+ Object.defineProperty(exports, "sameGuid", { enumerable: true, get: function () { return core_1.sameGuid; } });
77
+ Object.defineProperty(exports, "convertEnumToArray", { enumerable: true, get: function () { return core_1.convertEnumToArray; } });
78
+ Object.defineProperty(exports, "isNumberString", { enumerable: true, get: function () { return core_1.isNumberString; } });
79
+ Object.defineProperty(exports, "isIntegerString", { enumerable: true, get: function () { return core_1.isIntegerString; } });
80
+ Object.defineProperty(exports, "isFloatString", { enumerable: true, get: function () { return core_1.isFloatString; } });
81
+ Object.defineProperty(exports, "findLanguage", { enumerable: true, get: function () { return core_1.findLanguage; } });
82
+ Object.defineProperty(exports, "findCountry", { enumerable: true, get: function () { return core_1.findCountry; } });
83
+ Object.defineProperty(exports, "findGender", { enumerable: true, get: function () { return core_1.findGender; } });
84
+ Object.defineProperty(exports, "getFirstDayOfTheWeek", { enumerable: true, get: function () { return core_1.getFirstDayOfTheWeek; } });
85
+ Object.defineProperty(exports, "getLastDayOfTheWeek", { enumerable: true, get: function () { return core_1.getLastDayOfTheWeek; } });
86
+ Object.defineProperty(exports, "trimNewLine", { enumerable: true, get: function () { return core_1.trimNewLine; } });
87
+ Object.defineProperty(exports, "convertToOneParagraph", { enumerable: true, get: function () { return core_1.convertToOneParagraph; } });
88
+ Object.defineProperty(exports, "calculateSurcharge", { enumerable: true, get: function () { return core_1.calculateSurcharge; } });
89
+ Object.defineProperty(exports, "generateBatchArray", { enumerable: true, get: function () { return core_1.generateBatchArray; } });
90
+ Object.defineProperty(exports, "parseString", { enumerable: true, get: function () { return core_1.parseString; } });
91
+ Object.defineProperty(exports, "isGoodJSON", { enumerable: true, get: function () { return core_1.isGoodJSON; } });
92
+ Object.defineProperty(exports, "isBooleanString", { enumerable: true, get: function () { return core_1.isBooleanString; } });
93
+ Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return core_1.wait; } });
94
+ Object.defineProperty(exports, "toTitle", { enumerable: true, get: function () { return core_1.toTitle; } });
95
+ Object.defineProperty(exports, "getObjsDifference", { enumerable: true, get: function () { return core_1.getObjsDifference; } });
96
+ var slug_1 = require("./slug");
97
+ Object.defineProperty(exports, "slug", { enumerable: true, get: function () { return slug_1.slug; } });
98
+ var uuid_1 = require("./uuid");
99
+ Object.defineProperty(exports, "newGuid", { enumerable: true, get: function () { return uuid_1.newGuid; } });
100
+ var shortid_1 = require("./shortid");
101
+ Object.defineProperty(exports, "newShortId", { enumerable: true, get: function () { return shortid_1.newShortId; } });
102
+ // export { csvToJson } from "./csv";
103
+ var value_of_object_1 = require("./value-of-object");
104
+ Object.defineProperty(exports, "getObjectPropValue", { enumerable: true, get: function () { return value_of_object_1.getObjectPropValue; } });
105
+ Object.defineProperty(exports, "getBooleanPropValue", { enumerable: true, get: function () { return value_of_object_1.getBooleanPropValue; } });
106
+ Object.defineProperty(exports, "getIntValueOfObject", { enumerable: true, get: function () { return value_of_object_1.getIntValueOfObject; } });
107
+ Object.defineProperty(exports, "getArrayPropValueOfObject", { enumerable: true, get: function () { return value_of_object_1.getArrayPropValueOfObject; } });
108
+ Object.defineProperty(exports, "getFloatValueOfObject", { enumerable: true, get: function () { return value_of_object_1.getFloatValueOfObject; } });
109
+ Object.defineProperty(exports, "getPropValueOfObject", { enumerable: true, get: function () { return value_of_object_1.getPropValueOfObject; } });
110
+ Object.defineProperty(exports, "getBooleanValueOfObject", { enumerable: true, get: function () { return value_of_object_1.getBooleanValueOfObject; } });
111
+ var web_1 = require("./web");
112
+ Object.defineProperty(exports, "getWebQueryValue", { enumerable: true, get: function () { return web_1.getWebQueryValue; } });
113
+ Object.defineProperty(exports, "setWebQueryValue", { enumerable: true, get: function () { return web_1.setWebQueryValue; } });
114
+ Object.defineProperty(exports, "getWebLocation", { enumerable: true, get: function () { return web_1.getWebLocation; } });
115
+ Object.defineProperty(exports, "getWebRootUrl", { enumerable: true, get: function () { return web_1.getWebRootUrl; } });
116
+ Object.defineProperty(exports, "fixUrl", { enumerable: true, get: function () { return web_1.fixUrl; } });
117
+ Object.defineProperty(exports, "getBaseDomain", { enumerable: true, get: function () { return web_1.getBaseDomain; } });
118
+ Object.defineProperty(exports, "getRootDomainFromUrl", { enumerable: true, get: function () { return web_1.getRootDomainFromUrl; } });
119
+ Object.defineProperty(exports, "getRootDomainFromHost", { enumerable: true, get: function () { return web_1.getRootDomainFromHost; } });
120
+ Object.defineProperty(exports, "isValidUrl", { enumerable: true, get: function () { return web_1.isValidUrl; } });
121
+ var constants_1 = require("./constants");
122
+ Object.defineProperty(exports, "GUID_EMPTY", { enumerable: true, get: function () { return constants_1.GUID_EMPTY; } });
123
+ Object.defineProperty(exports, "DEFAULT_PASSWORD_RULE", { enumerable: true, get: function () { return constants_1.DEFAULT_PASSWORD_RULE; } });
124
+ Object.defineProperty(exports, "COUNTRIES", { enumerable: true, get: function () { return constants_1.COUNTRIES; } });
125
+ Object.defineProperty(exports, "LANGUAGES", { enumerable: true, get: function () { return constants_1.LANGUAGES; } });
126
+ Object.defineProperty(exports, "GENDERS", { enumerable: true, get: function () { return constants_1.GENDERS; } });
127
+ Object.defineProperty(exports, "CREDIT_EXCHANGE_RATE", { enumerable: true, get: function () { return constants_1.CREDIT_EXCHANGE_RATE; } });
128
+ Object.defineProperty(exports, "SURCHARGE_VALUE", { enumerable: true, get: function () { return constants_1.SURCHARGE_VALUE; } });
129
+ Object.defineProperty(exports, "SURCHARGE_TYPE", { enumerable: true, get: function () { return constants_1.SURCHARGE_TYPE; } });
130
+ Object.defineProperty(exports, "SURCHARGE", { enumerable: true, get: function () { return constants_1.SURCHARGE; } });
131
+ Object.defineProperty(exports, "K", { enumerable: true, get: function () { return constants_1.K; } });
132
+ Object.defineProperty(exports, "M", { enumerable: true, get: function () { return constants_1.M; } });
133
+ Object.defineProperty(exports, "D100", { enumerable: true, get: function () { return constants_1.D100; } });
134
+ Object.defineProperty(exports, "DK", { enumerable: true, get: function () { return constants_1.DK; } });
135
+ Object.defineProperty(exports, "DM", { enumerable: true, get: function () { return constants_1.DM; } });
136
+ Object.defineProperty(exports, "ERROR_PARAMETER_MISSING", { enumerable: true, get: function () { return constants_1.ERROR_PARAMETER_MISSING; } });
137
+ Object.defineProperty(exports, "ERROR_PARAMETER_INVALID", { enumerable: true, get: function () { return constants_1.ERROR_PARAMETER_INVALID; } });
138
+ Object.defineProperty(exports, "ERROR_TOO_MANY_REQUESTS", { enumerable: true, get: function () { return constants_1.ERROR_TOO_MANY_REQUESTS; } });
139
+ Object.defineProperty(exports, "ERROR_NO_ENOUGH_CREDIT", { enumerable: true, get: function () { return constants_1.ERROR_NO_ENOUGH_CREDIT; } });
140
+ Object.defineProperty(exports, "ERROR_AUTH_FAILED", { enumerable: true, get: function () { return constants_1.ERROR_AUTH_FAILED; } });
141
+ Object.defineProperty(exports, "ERROR_UNEXPECTED", { enumerable: true, get: function () { return constants_1.ERROR_UNEXPECTED; } });
142
+ Object.defineProperty(exports, "ERROR_PERMISSION_DENIED", { enumerable: true, get: function () { return constants_1.ERROR_PERMISSION_DENIED; } });
143
+ Object.defineProperty(exports, "ERROR_HTTP_400", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_400; } });
144
+ Object.defineProperty(exports, "ERROR_HTTP_401", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_401; } });
145
+ Object.defineProperty(exports, "ERROR_HTTP_402", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_402; } });
146
+ Object.defineProperty(exports, "ERROR_HTTP_403", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_403; } });
147
+ Object.defineProperty(exports, "ERROR_HTTP_404", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_404; } });
148
+ Object.defineProperty(exports, "ERROR_HTTP_405", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_405; } });
149
+ Object.defineProperty(exports, "ERROR_HTTP_406", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_406; } });
150
+ Object.defineProperty(exports, "ERROR_HTTP_407", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_407; } });
151
+ Object.defineProperty(exports, "ERROR_HTTP_408", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_408; } });
152
+ Object.defineProperty(exports, "ERROR_HTTP_429", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_429; } });
153
+ Object.defineProperty(exports, "ERROR_HTTP_500", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_500; } });
154
+ Object.defineProperty(exports, "ERROR_HTTP_501", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_501; } });
155
+ Object.defineProperty(exports, "ERROR_HTTP_502", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_502; } });
156
+ Object.defineProperty(exports, "ERROR_HTTP_503", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_503; } });
157
+ Object.defineProperty(exports, "ERROR_HTTP_504", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_504; } });
158
+ Object.defineProperty(exports, "ERROR_HTTP_LIST", { enumerable: true, get: function () { return constants_1.ERROR_HTTP_LIST; } });
159
+ var colors_1 = require("./colors");
160
+ Object.defineProperty(exports, "COLORS", { enumerable: true, get: function () { return colors_1.COLORS; } });
161
+ Object.defineProperty(exports, "SLATE", { enumerable: true, get: function () { return colors_1.SLATE; } });
162
+ Object.defineProperty(exports, "GRAY", { enumerable: true, get: function () { return colors_1.GRAY; } });
163
+ Object.defineProperty(exports, "ZINC", { enumerable: true, get: function () { return colors_1.ZINC; } });
164
+ Object.defineProperty(exports, "NEUTRAL", { enumerable: true, get: function () { return colors_1.NEUTRAL; } });
165
+ Object.defineProperty(exports, "STONE", { enumerable: true, get: function () { return colors_1.STONE; } });
166
+ Object.defineProperty(exports, "RED", { enumerable: true, get: function () { return colors_1.RED; } });
167
+ Object.defineProperty(exports, "ORANGE", { enumerable: true, get: function () { return colors_1.ORANGE; } });
168
+ Object.defineProperty(exports, "AMBER", { enumerable: true, get: function () { return colors_1.AMBER; } });
169
+ Object.defineProperty(exports, "YELLOW", { enumerable: true, get: function () { return colors_1.YELLOW; } });
170
+ Object.defineProperty(exports, "LIME", { enumerable: true, get: function () { return colors_1.LIME; } });
171
+ Object.defineProperty(exports, "GREEN", { enumerable: true, get: function () { return colors_1.GREEN; } });
172
+ Object.defineProperty(exports, "EMERALD", { enumerable: true, get: function () { return colors_1.EMERALD; } });
173
+ Object.defineProperty(exports, "TEAL", { enumerable: true, get: function () { return colors_1.TEAL; } });
174
+ Object.defineProperty(exports, "CYAN", { enumerable: true, get: function () { return colors_1.CYAN; } });
175
+ Object.defineProperty(exports, "SKY", { enumerable: true, get: function () { return colors_1.SKY; } });
176
+ Object.defineProperty(exports, "BLUE", { enumerable: true, get: function () { return colors_1.BLUE; } });
177
+ Object.defineProperty(exports, "INDIGO", { enumerable: true, get: function () { return colors_1.INDIGO; } });
178
+ Object.defineProperty(exports, "VIOLET", { enumerable: true, get: function () { return colors_1.VIOLET; } });
179
+ Object.defineProperty(exports, "PURPLE", { enumerable: true, get: function () { return colors_1.PURPLE; } });
180
+ Object.defineProperty(exports, "FUCHSIA", { enumerable: true, get: function () { return colors_1.FUCHSIA; } });
181
+ Object.defineProperty(exports, "PINK", { enumerable: true, get: function () { return colors_1.PINK; } });
182
+ Object.defineProperty(exports, "ROSE", { enumerable: true, get: function () { return colors_1.ROSE; } });
183
+ Object.defineProperty(exports, "getColor", { enumerable: true, get: function () { return colors_1.getColor; } });
184
+ Object.defineProperty(exports, "setColorTheme", { enumerable: true, get: function () { return colors_1.setColorTheme; } });
185
+ Object.defineProperty(exports, "getColorTheme", { enumerable: true, get: function () { return colors_1.getColorTheme; } });
186
+ Object.defineProperty(exports, "isValidHex", { enumerable: true, get: function () { return colors_1.isValidHex; } });
187
+ Object.defineProperty(exports, "isValidRGB", { enumerable: true, get: function () { return colors_1.isValidRGB; } });
188
+ Object.defineProperty(exports, "hexToRgb", { enumerable: true, get: function () { return colors_1.hexToRgb; } });
189
+ Object.defineProperty(exports, "hexToRgba", { enumerable: true, get: function () { return colors_1.hexToRgba; } });
190
+ Object.defineProperty(exports, "hexToRgbString", { enumerable: true, get: function () { return colors_1.hexToRgbString; } });
191
+ Object.defineProperty(exports, "hexToRgbaString", { enumerable: true, get: function () { return colors_1.hexToRgbaString; } });
192
+ Object.defineProperty(exports, "rgbToHex", { enumerable: true, get: function () { return colors_1.rgbToHex; } });
193
+ var file_1 = require("./file");
194
+ Object.defineProperty(exports, "FILE_PLAINTEXT_LIST", { enumerable: true, get: function () { return file_1.FILE_PLAINTEXT_LIST; } });
195
+ Object.defineProperty(exports, "FILE_SOURCE_CODE_LIST", { enumerable: true, get: function () { return file_1.FILE_SOURCE_CODE_LIST; } });
196
+ Object.defineProperty(exports, "FILE_XML_LIST", { enumerable: true, get: function () { return file_1.FILE_XML_LIST; } });
197
+ Object.defineProperty(exports, "FILE_JSON_LIST", { enumerable: true, get: function () { return file_1.FILE_JSON_LIST; } });
198
+ Object.defineProperty(exports, "FILE_TXT_LIST", { enumerable: true, get: function () { return file_1.FILE_TXT_LIST; } });
199
+ Object.defineProperty(exports, "FILE_HTML_LIST", { enumerable: true, get: function () { return file_1.FILE_HTML_LIST; } });
200
+ Object.defineProperty(exports, "FILE_IMAGE_LIST", { enumerable: true, get: function () { return file_1.FILE_IMAGE_LIST; } });
201
+ Object.defineProperty(exports, "FILE_VIDEO_LIST", { enumerable: true, get: function () { return file_1.FILE_VIDEO_LIST; } });
202
+ Object.defineProperty(exports, "FILE_AUDIO_LIST", { enumerable: true, get: function () { return file_1.FILE_AUDIO_LIST; } });
203
+ Object.defineProperty(exports, "FILE_PDF_LIST", { enumerable: true, get: function () { return file_1.FILE_PDF_LIST; } });
204
+ Object.defineProperty(exports, "FILE_EPUB_LIST", { enumerable: true, get: function () { return file_1.FILE_EPUB_LIST; } });
205
+ Object.defineProperty(exports, "FILE_ZIP_LIST", { enumerable: true, get: function () { return file_1.FILE_ZIP_LIST; } });
206
+ Object.defineProperty(exports, "FILE_MS_OFFICE_365_LIST", { enumerable: true, get: function () { return file_1.FILE_MS_OFFICE_365_LIST; } });
207
+ Object.defineProperty(exports, "FILE_MS_OFFICE_OLD_LIST", { enumerable: true, get: function () { return file_1.FILE_MS_OFFICE_OLD_LIST; } });
208
+ var file_2 = require("./file");
209
+ Object.defineProperty(exports, "getFileList", { enumerable: true, get: function () { return file_2.getFileList; } });
210
+ Object.defineProperty(exports, "getFileType", { enumerable: true, get: function () { return file_2.getFileType; } });
211
+ Object.defineProperty(exports, "getContentType", { enumerable: true, get: function () { return file_2.getContentType; } });
212
+ Object.defineProperty(exports, "getAcceptExtension", { enumerable: true, get: function () { return file_2.getAcceptExtension; } });
213
+ Object.defineProperty(exports, "getAcceptMIMEs", { enumerable: true, get: function () { return file_2.getAcceptMIMEs; } });
214
+ Object.defineProperty(exports, "getAcceptFileExtensions", { enumerable: true, get: function () { return file_2.getAcceptFileExtensions; } });
215
+ Object.defineProperty(exports, "getFileNameFromUrl", { enumerable: true, get: function () { return file_2.getFileNameFromUrl; } });
216
+ Object.defineProperty(exports, "getFileExtension", { enumerable: true, get: function () { return file_2.getFileExtension; } });
217
+ Object.defineProperty(exports, "fileExtensionInTheList", { enumerable: true, get: function () { return file_2.fileExtensionInTheList; } });
218
+ var record_1 = require("./record");
219
+ Object.defineProperty(exports, "getEntityFolder", { enumerable: true, get: function () { return record_1.getEntityFolder; } });
220
+ Object.defineProperty(exports, "getRecordEntityFolder", { enumerable: true, get: function () { return record_1.getRecordEntityFolder; } });
221
+ Object.defineProperty(exports, "getRecordDisplay", { enumerable: true, get: function () { return record_1.getRecordDisplay; } });
222
+ Object.defineProperty(exports, "getRecordMedia", { enumerable: true, get: function () { return record_1.getRecordMedia; } });
223
+ Object.defineProperty(exports, "getRecordContent", { enumerable: true, get: function () { return record_1.getRecordContent; } });
224
+ Object.defineProperty(exports, "getRecordDisplayByDisplayFields", { enumerable: true, get: function () { return record_1.getRecordDisplayByDisplayFields; } });
225
+ Object.defineProperty(exports, "getRecordContentByContentFields", { enumerable: true, get: function () { return record_1.getRecordContentByContentFields; } });
226
+ Object.defineProperty(exports, "getRecordAbstract", { enumerable: true, get: function () { return record_1.getRecordAbstract; } });
227
+ Object.defineProperty(exports, "getRecordFullName", { enumerable: true, get: function () { return record_1.getRecordFullName; } });
228
+ Object.defineProperty(exports, "getRecordEmailAddress", { enumerable: true, get: function () { return record_1.getRecordEmailAddress; } });
229
+ Object.defineProperty(exports, "getRecordAddress", { enumerable: true, get: function () { return record_1.getRecordAddress; } });
230
+ Object.defineProperty(exports, "getRecordPageMetadata", { enumerable: true, get: function () { return record_1.getRecordPageMetadata; } });
231
+ Object.defineProperty(exports, "applyRecordSlug", { enumerable: true, get: function () { return record_1.applyRecordSlug; } });
232
+ Object.defineProperty(exports, "getRecordSlug", { enumerable: true, get: function () { return record_1.getRecordSlug; } });
233
+ Object.defineProperty(exports, "convertRecordForCreate", { enumerable: true, get: function () { return record_1.convertRecordForCreate; } });
234
+ Object.defineProperty(exports, "getContextFromRecord", { enumerable: true, get: function () { return record_1.getContextFromRecord; } });
235
+ Object.defineProperty(exports, "getRecordFilePath", { enumerable: true, get: function () { return record_1.getRecordFilePath; } });
236
+ var markdown_1 = require("./markdown");
237
+ Object.defineProperty(exports, "markdownToHtml", { enumerable: true, get: function () { return markdown_1.markdownToHtml; } });
238
+ Object.defineProperty(exports, "htmlToMarkdown", { enumerable: true, get: function () { return markdown_1.htmlToMarkdown; } });
239
+ var metadata_1 = require("./metadata");
240
+ Object.defineProperty(exports, "getEntityBySlug", { enumerable: true, get: function () { return metadata_1.getEntityBySlug; } });
241
+ Object.defineProperty(exports, "getEntity", { enumerable: true, get: function () { return metadata_1.getEntity; } });
242
+ Object.defineProperty(exports, "getEntityTypeFromFileName", { enumerable: true, get: function () { return metadata_1.getEntityTypeFromFileName; } });
243
+ var auth_1 = require("./auth");
244
+ Object.defineProperty(exports, "isMember", { enumerable: true, get: function () { return auth_1.isMember; } });
245
+ Object.defineProperty(exports, "isOwner", { enumerable: true, get: function () { return auth_1.isOwner; } });
246
+ Object.defineProperty(exports, "hasMemberRole", { enumerable: true, get: function () { return auth_1.hasMemberRole; } });
247
+ Object.defineProperty(exports, "hasRole", { enumerable: true, get: function () { return auth_1.hasRole; } });
248
+ Object.defineProperty(exports, "hasAllRoles", { enumerable: true, get: function () { return auth_1.hasAllRoles; } });
249
+ Object.defineProperty(exports, "hasAnyRole", { enumerable: true, get: function () { return auth_1.hasAnyRole; } });
250
+ Object.defineProperty(exports, "checkRecordPrivilege", { enumerable: true, get: function () { return auth_1.checkRecordPrivilege; } });
251
+ Object.defineProperty(exports, "recordOwnedByOrganization", { enumerable: true, get: function () { return auth_1.recordOwnedByOrganization; } });
252
+ Object.defineProperty(exports, "checkLicenses", { enumerable: true, get: function () { return auth_1.checkLicenses; } });
253
+ Object.defineProperty(exports, "hasLicense", { enumerable: true, get: function () { return auth_1.hasLicense; } });
254
+ Object.defineProperty(exports, "checkPrivileges", { enumerable: true, get: function () { return auth_1.checkPrivileges; } });
255
+ Object.defineProperty(exports, "checkEntityPrivilege", { enumerable: true, get: function () { return auth_1.checkEntityPrivilege; } });
256
+ Object.defineProperty(exports, "checkPrivilege", { enumerable: true, get: function () { return auth_1.checkPrivilege; } });
257
+ Object.defineProperty(exports, "isReader", { enumerable: true, get: function () { return auth_1.isReader; } });
258
+ Object.defineProperty(exports, "isAuthor", { enumerable: true, get: function () { return auth_1.isAuthor; } });
259
+ Object.defineProperty(exports, "hasPrivilege", { enumerable: true, get: function () { return auth_1.hasPrivilege; } });
260
+ var tree_1 = require("./tree");
261
+ Object.defineProperty(exports, "getTreeItem", { enumerable: true, get: function () { return tree_1.getTreeItem; } });
262
+ Object.defineProperty(exports, "updateAllTreeItems", { enumerable: true, get: function () { return tree_1.updateAllTreeItems; } });
263
+ Object.defineProperty(exports, "updateTreeItem", { enumerable: true, get: function () { return tree_1.updateTreeItem; } });
264
+ Object.defineProperty(exports, "insertTreeItem", { enumerable: true, get: function () { return tree_1.insertTreeItem; } });
265
+ Object.defineProperty(exports, "replaceTreeItem", { enumerable: true, get: function () { return tree_1.replaceTreeItem; } });
266
+ Object.defineProperty(exports, "removeTreeItem", { enumerable: true, get: function () { return tree_1.removeTreeItem; } });
267
+ Object.defineProperty(exports, "getTreeItemPath", { enumerable: true, get: function () { return tree_1.getTreeItemPath; } });
268
+ Object.defineProperty(exports, "getTreeItemHavingPropValue", { enumerable: true, get: function () { return tree_1.getTreeItemHavingPropValue; } });
269
+ Object.defineProperty(exports, "getTreeItemAndChildrenIds", { enumerable: true, get: function () { return tree_1.getTreeItemAndChildrenIds; } });
270
+ var html_1 = require("./html");
271
+ Object.defineProperty(exports, "removeHtmlEmptyElements", { enumerable: true, get: function () { return html_1.removeHtmlEmptyElements; } });
272
+ Object.defineProperty(exports, "cleanHtml", { enumerable: true, get: function () { return html_1.cleanHtml; } });
273
+ Object.defineProperty(exports, "removeHtmlAttributes", { enumerable: true, get: function () { return html_1.removeHtmlAttributes; } });
274
+ Object.defineProperty(exports, "removeHtmlComments", { enumerable: true, get: function () { return html_1.removeHtmlComments; } });
275
+ Object.defineProperty(exports, "removeHtmlElements", { enumerable: true, get: function () { return html_1.removeHtmlElements; } });
276
+ Object.defineProperty(exports, "removeHtmlSingleParent", { enumerable: true, get: function () { return html_1.removeHtmlSingleParent; } });
277
+ Object.defineProperty(exports, "fixHtmlImages", { enumerable: true, get: function () { return html_1.fixHtmlImages; } });
278
+ Object.defineProperty(exports, "processHtml_Hx", { enumerable: true, get: function () { return html_1.processHtml_Hx; } });
279
+ var web_content_1 = require("./web-content");
280
+ Object.defineProperty(exports, "lowerH", { enumerable: true, get: function () { return web_content_1.lowerH; } });
281
+ Object.defineProperty(exports, "getCanonical", { enumerable: true, get: function () { return web_content_1.getCanonical; } });
282
+ Object.defineProperty(exports, "getTitle", { enumerable: true, get: function () { return web_content_1.getTitle; } });
283
+ Object.defineProperty(exports, "getContent", { enumerable: true, get: function () { return web_content_1.getContent; } });
284
+ Object.defineProperty(exports, "getDescription", { enumerable: true, get: function () { return web_content_1.getDescription; } });
285
+ Object.defineProperty(exports, "getImage", { enumerable: true, get: function () { return web_content_1.getImage; } });
286
+ Object.defineProperty(exports, "getValueBySelector", { enumerable: true, get: function () { return web_content_1.getValueBySelector; } });
287
+ Object.defineProperty(exports, "processWebPage", { enumerable: true, get: function () { return web_content_1.processWebPage; } });
288
+ Object.defineProperty(exports, "findMainContentElement", { enumerable: true, get: function () { return web_content_1.findMainContentElement; } });
289
+ var cost_1 = require("./cost");
290
+ Object.defineProperty(exports, "roundCostNumber", { enumerable: true, get: function () { return cost_1.roundCostNumber; } });
291
+ Object.defineProperty(exports, "calculateCost", { enumerable: true, get: function () { return cost_1.calculateCost; } });
292
+ var model_1 = require("./ai/model");
293
+ Object.defineProperty(exports, "getAIModel", { enumerable: true, get: function () { return model_1.getAIModel; } });
294
+ Object.defineProperty(exports, "getAIModels", { enumerable: true, get: function () { return model_1.getAIModels; } });
295
+ Object.defineProperty(exports, "getAIPlatforms", { enumerable: true, get: function () { return model_1.getAIPlatforms; } });
296
+ Object.defineProperty(exports, "getAIPlatform", { enumerable: true, get: function () { return model_1.getAIPlatform; } });
297
+ Object.defineProperty(exports, "getAIProviders", { enumerable: true, get: function () { return model_1.getAIProviders; } });
298
+ Object.defineProperty(exports, "getAIProvider", { enumerable: true, get: function () { return model_1.getAIProvider; } });
299
+ Object.defineProperty(exports, "getAIService", { enumerable: true, get: function () { return model_1.getAIService; } });
300
+ Object.defineProperty(exports, "getDefaultAIService", { enumerable: true, get: function () { return model_1.getDefaultAIService; } });
301
+ Object.defineProperty(exports, "getDefaultAIServiceId", { enumerable: true, get: function () { return model_1.getDefaultAIServiceId; } });
302
+ Object.defineProperty(exports, "getAIServices", { enumerable: true, get: function () { return model_1.getAIServices; } });
303
+ Object.defineProperty(exports, "convertAIModelRecordsToAIServices", { enumerable: true, get: function () { return model_1.convertAIModelRecordsToAIServices; } });
304
+ var util_1 = require("./ai/util");
305
+ Object.defineProperty(exports, "PLAYGROUND_PROMPT", { enumerable: true, get: function () { return util_1.PLAYGROUND_PROMPT; } });
306
+ Object.defineProperty(exports, "getAIContext", { enumerable: true, get: function () { return util_1.getAIContext; } });
307
+ var llm_1 = require("./ai/llm");
308
+ Object.defineProperty(exports, "getLLMRuntime", { enumerable: true, get: function () { return llm_1.getLLMRuntime; } });
309
+ Object.defineProperty(exports, "getLLMRequest", { enumerable: true, get: function () { return llm_1.getLLMRequest; } });
310
+ Object.defineProperty(exports, "getLLMParameters", { enumerable: true, get: function () { return llm_1.getLLMParameters; } });
311
+ Object.defineProperty(exports, "preProcessLLMPromptParameters", { enumerable: true, get: function () { return llm_1.preProcessLLMPromptParameters; } });
312
+ Object.defineProperty(exports, "getLLMPrompt", { enumerable: true, get: function () { return llm_1.getLLMPrompt; } });
313
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;AAEH,+BAsEgB;AArEZ,qGAAA,aAAa,OAAA;AACb,wGAAA,gBAAgB,OAAA;AAChB,8FAAA,MAAM,OAAA;AACN,qGAAA,aAAa,OAAA;AACb,qGAAA,aAAa,OAAA;AACb,oGAAA,YAAY,OAAA;AACZ,gGAAA,QAAQ,OAAA;AACR,oGAAA,YAAY,OAAA;AACZ,yGAAA,iBAAiB,OAAA;AACjB,2FAAA,GAAG,OAAA;AACH,gGAAA,QAAQ,OAAA;AACR,gGAAA,QAAQ,OAAA;AACR,mGAAA,WAAW,OAAA;AACX,yGAAA,iBAAiB,OAAA;AACjB,yGAAA,iBAAiB,OAAA;AACjB,4GAAA,oBAAoB,OAAA;AACpB,2GAAA,mBAAmB,OAAA;AACnB,mGAAA,WAAW,OAAA;AACX,mGAAA,WAAW,OAAA;AACX,+FAAA,OAAO,OAAA;AACP,kGAAA,UAAU,OAAA;AACV,uGAAA,eAAe,OAAA;AACf,0GAAA,kBAAkB,OAAA;AAClB,oGAAA,YAAY,OAAA;AACZ,uGAAA,eAAe,OAAA;AACf,oGAAA,YAAY,OAAA;AACZ,qGAAA,aAAa,OAAA;AACb,6GAAA,qBAAqB,OAAA;AACrB,gGAAA,QAAQ,OAAA;AACR,sGAAA,cAAc,OAAA;AACd,kGAAA,UAAU,OAAA;AACV,qGAAA,aAAa,OAAA;AACb,wGAAA,gBAAgB,OAAA;AAChB,uGAAA,eAAe,OAAA;AACf,kGAAA,UAAU,OAAA;AACV,wGAAA,gBAAgB,OAAA;AAChB,wGAAA,gBAAgB,OAAA;AAChB,mGAAA,WAAW,OAAA;AACX,mGAAA,WAAW,OAAA;AACX,iGAAA,SAAS,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OAAA;AACd,uGAAA,eAAe,OAAA;AACf,kHAAA,0BAA0B,OAAA;AAC1B,iHAAA,yBAAyB,OAAA;AAG7B,+BASgB;AARZ,+GAAA,uBAAuB,OAAA;AACvB,iGAAA,SAAS,OAAA;AACT,4GAAA,oBAAoB,OAAA;AACpB,0GAAA,kBAAkB,OAAA;AAClB,0GAAA,kBAAkB,OAAA;AAClB,8GAAA,sBAAsB,OAAA;AACtB,qGAAA,aAAa,OAAA;AACb,sGAAA,cAAc,OAAA;AAYlB,6CAUuB;AATnB,qGAAA,MAAM,OAAA;AACN,2GAAA,YAAY,OAAA;AACZ,uGAAA,QAAQ,OAAA;AACR,yGAAA,UAAU,OAAA;AACV,6GAAA,cAAc,OAAA;AACd,uGAAA,QAAQ,OAAA;AACR,iHAAA,kBAAkB,OAAA;AAClB,6GAAA,cAAc,OAAA;AACd,qHAAA,sBAAsB,OAAA;AAkB1B,+BAAwD;AAA/C,uGAAA,eAAe,OAAA;AAAE,qGAAA,aAAa,OAAA;AAiBvC,oCAYoB;AAXhB,mGAAA,UAAU,OAAA;AACV,oGAAA,WAAW,OAAA;AACX,uGAAA,cAAc,OAAA;AACd,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,sGAAA,aAAa,OAAA;AACb,qGAAA,YAAY,OAAA;AACZ,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,sGAAA,aAAa,OAAA;AACb,0HAAA,iCAAiC,OAAA;AAGrC,kCAA4D;AAAnD,yGAAA,iBAAiB,OAAA;AAAE,oGAAA,YAAY,OAAA;AAExC,gCAMkB;AALd,oGAAA,aAAa,OAAA;AACb,oGAAA,aAAa,OAAA;AACb,uGAAA,gBAAgB,OAAA;AAChB,oHAAA,6BAA6B,OAAA;AAC7B,mGAAA,YAAY,OAAA"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @fileoverview Markdown processing utilities for parsing, converting, and manipulating markdown content
3
+ * @copyright PrimeObjects Software Inc. (C) 2024 All Rights Reserved
4
+ * @author EncodeAgent Team.
5
+ * @copyright © 2024 PrimeObjects Software Inc. All rights reserved.
6
+ * @license Proprietary - Subject to PrimeObjects License Agreements
7
+ * @contact encode.agent@primeobjects.com
8
+ * @website https://www.encodeagent.com/
9
+ *
10
+ * This software contains proprietary and confidential information of
11
+ * PrimeObjects Software Inc. Any reproduction or distribution of this
12
+ * software, in whole or in part, without written permission of
13
+ * PrimeObjects Software Inc. is strictly prohibited.
14
+ *
15
+ * Unauthorized copying of this file, via any medium, is strictly prohibited.
16
+ * This file is proprietary and confidential.
17
+ */
18
+ export declare const markdownToHtml: (content: string) => string;
19
+ export declare const htmlToMarkdown: (content: string) => string;
20
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,MAEhD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,MAIhD,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Markdown processing utilities for parsing, converting, and manipulating markdown content
4
+ * @copyright PrimeObjects Software Inc. (C) 2024 All Rights Reserved
5
+ * @author EncodeAgent Team.
6
+ * @copyright © 2024 PrimeObjects Software Inc. All rights reserved.
7
+ * @license Proprietary - Subject to PrimeObjects License Agreements
8
+ * @contact encode.agent@primeobjects.com
9
+ * @website https://www.encodeagent.com/
10
+ *
11
+ * This software contains proprietary and confidential information of
12
+ * PrimeObjects Software Inc. Any reproduction or distribution of this
13
+ * software, in whole or in part, without written permission of
14
+ * PrimeObjects Software Inc. is strictly prohibited.
15
+ *
16
+ * Unauthorized copying of this file, via any medium, is strictly prohibited.
17
+ * This file is proprietary and confidential.
18
+ */
19
+ var __importDefault = (this && this.__importDefault) || function (mod) {
20
+ return (mod && mod.__esModule) ? mod : { "default": mod };
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.htmlToMarkdown = exports.markdownToHtml = void 0;
24
+ const marked_1 = require("marked");
25
+ const core_1 = require("./core");
26
+ const turndown_1 = __importDefault(require("turndown"));
27
+ const turndown = new turndown_1.default();
28
+ const markdownToHtml = (content) => {
29
+ return (0, core_1.isNonEmptyString)(content) ? (0, marked_1.marked)(content) : "";
30
+ };
31
+ exports.markdownToHtml = markdownToHtml;
32
+ const htmlToMarkdown = (content) => {
33
+ return (0, core_1.isNonEmptyString)(content)
34
+ ? turndown.turndown(content)
35
+ : "";
36
+ };
37
+ exports.htmlToMarkdown = htmlToMarkdown;
38
+ //# sourceMappingURL=markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;AAEH,mCAAgC;AAChC,iCAA0C;AAC1C,wDAAuC;AAEvC,MAAM,QAAQ,GAAG,IAAI,kBAAe,EAAE,CAAC;AAEhC,MAAM,cAAc,GAAG,CAAC,OAAe,EAAU,EAAE;IACtD,OAAO,IAAA,uBAAgB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAE,IAAA,eAAM,EAAC,OAAO,CAAY,CAAC,CAAC,CAAC,EAAE,CAAC;AACxE,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB;AAEK,MAAM,cAAc,GAAG,CAAC,OAAe,EAAU,EAAE;IACtD,OAAO,IAAA,uBAAgB,EAAC,OAAO,CAAC;QAC5B,CAAC,CAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAY;QACxC,CAAC,CAAC,EAAE,CAAC;AACb,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @fileoverview Metadata extraction and processing utilities for handling document and content metadata
3
+ * @copyright PrimeObjects Software Inc. (C) 2024 All Rights Reserved
4
+ * @author EncodeAgent Team.
5
+ * @copyright © 2024 PrimeObjects Software Inc. All rights reserved.
6
+ * @license Proprietary - Subject to PrimeObjects License Agreements
7
+ * @contact encode.agent@primeobjects.com
8
+ * @website https://www.encodeagent.com/
9
+ *
10
+ * This software contains proprietary and confidential information of
11
+ * PrimeObjects Software Inc. Any reproduction or distribution of this
12
+ * software, in whole or in part, without written permission of
13
+ * PrimeObjects Software Inc. is strictly prohibited.
14
+ *
15
+ * Unauthorized copying of this file, via any medium, is strictly prohibited.
16
+ * This file is proprietary and confidential.
17
+ */
18
+ /**
19
+ * It returns an entity from a solution object, if it exists
20
+ * @param solution - Record<string, any>
21
+ * @param {string} entityName - The name of the entity you want to get.
22
+ * @param {string} [entityType] - The type of entity you want to retrieve.
23
+ */
24
+ export declare const getEntity: (solution: Record<string, any>, entityName: string, entityType?: string) => Record<string, any> | undefined;
25
+ /**
26
+ * It takes a solution object and a slug string and returns the entity object that matches the slug or
27
+ * undefined if no match is found
28
+ * @param solution - Record<string, any>
29
+ * @param {string} slug - string
30
+ * @returns A function that takes two arguments, solution and slug.
31
+ */
32
+ export declare const getEntityBySlug: (solution: Record<string, any>, slug: string) => Record<string, any> | undefined;
33
+ /**
34
+ * It takes a file name as a string and returns a string that represents the type of file
35
+ * @param {string} fileName - string
36
+ * @returns A string or null.
37
+ */
38
+ export declare const getEntityTypeFromFileName: (fileName: string) => string | undefined;
39
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAClB,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,YAAY,MAAM,EAClB,aAAa,MAAM,KACpB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SA6BxB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GACxB,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,MAAM,MAAM,KACb,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAQxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAClC,UAAU,MAAM,KACjB,MAAM,GAAG,SAiCX,CAAC"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Metadata extraction and processing utilities for handling document and content metadata
4
+ * @copyright PrimeObjects Software Inc. (C) 2024 All Rights Reserved
5
+ * @author EncodeAgent Team.
6
+ * @copyright © 2024 PrimeObjects Software Inc. All rights reserved.
7
+ * @license Proprietary - Subject to PrimeObjects License Agreements
8
+ * @contact encode.agent@primeobjects.com
9
+ * @website https://www.encodeagent.com/
10
+ *
11
+ * This software contains proprietary and confidential information of
12
+ * PrimeObjects Software Inc. Any reproduction or distribution of this
13
+ * software, in whole or in part, without written permission of
14
+ * PrimeObjects Software Inc. is strictly prohibited.
15
+ *
16
+ * Unauthorized copying of this file, via any medium, is strictly prohibited.
17
+ * This file is proprietary and confidential.
18
+ */
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.getEntityTypeFromFileName = exports.getEntityBySlug = exports.getEntity = void 0;
21
+ const core_1 = require("./core");
22
+ const lodash_1 = require("lodash");
23
+ /**
24
+ * It returns an entity from a solution object, if it exists
25
+ * @param solution - Record<string, any>
26
+ * @param {string} entityName - The name of the entity you want to get.
27
+ * @param {string} [entityType] - The type of entity you want to retrieve.
28
+ */
29
+ const getEntity = (solution, entityName, entityType) => {
30
+ if (!(0, core_1.isNonEmptyString)(entityName))
31
+ return undefined;
32
+ //remove unexpected char that maybe used in url
33
+ entityName = entityName.replace(/-/g, "").replace(/_/g, "");
34
+ let entity = (0, lodash_1.find)(solution.entities, (entity) => {
35
+ return (entity.entityName &&
36
+ entity.entityName.toLowerCase() === entityName.toLowerCase() &&
37
+ entity.entityType &&
38
+ entityType &&
39
+ entity.entityType.toLowerCase() === entityType.toLowerCase());
40
+ });
41
+ if (!(0, core_1.isObject)(entity)) {
42
+ //we will try to use entityName only
43
+ entity = (0, lodash_1.find)(solution.entities, (entity) => {
44
+ return (entity.entityName &&
45
+ entity.entityName?.toLowerCase() ===
46
+ entityName?.toLowerCase() &&
47
+ !entity.entityType);
48
+ });
49
+ }
50
+ return (0, core_1.isObject)(entity) ? entity : undefined;
51
+ };
52
+ exports.getEntity = getEntity;
53
+ /**
54
+ * It takes a solution object and a slug string and returns the entity object that matches the slug or
55
+ * undefined if no match is found
56
+ * @param solution - Record<string, any>
57
+ * @param {string} slug - string
58
+ * @returns A function that takes two arguments, solution and slug.
59
+ */
60
+ const getEntityBySlug = (solution, slug) => {
61
+ if (!(0, core_1.isNonEmptyString)(slug))
62
+ return undefined;
63
+ let entity = (0, lodash_1.find)(solution.entities, (entity) => {
64
+ return entity.slug === slug;
65
+ });
66
+ return (0, core_1.isObject)(entity) ? entity : undefined;
67
+ };
68
+ exports.getEntityBySlug = getEntityBySlug;
69
+ /**
70
+ * It takes a file name as a string and returns a string that represents the type of file
71
+ * @param {string} fileName - string
72
+ * @returns A string or null.
73
+ */
74
+ const getEntityTypeFromFileName = (fileName) => {
75
+ if (!(0, core_1.isNonEmptyString)(fileName))
76
+ return undefined;
77
+ const fileInfo = fileName.split("?")[0];
78
+ var ext = fileInfo.split(".");
79
+ switch (ext[ext.length - 1].toLowerCase()) {
80
+ case "gif":
81
+ case "jpeg":
82
+ case "jpg":
83
+ case "png": {
84
+ return "Photo";
85
+ }
86
+ case "mp4": {
87
+ return "Video";
88
+ }
89
+ case "mp3": {
90
+ return "Audio";
91
+ }
92
+ case "doc":
93
+ case "docx":
94
+ case "xls":
95
+ case "xlsx":
96
+ case "csv":
97
+ case "txt":
98
+ case "pdf":
99
+ case "ppt":
100
+ case "pptx":
101
+ case "zip": {
102
+ return "Document";
103
+ }
104
+ default: {
105
+ return undefined;
106
+ }
107
+ }
108
+ };
109
+ exports.getEntityTypeFromFileName = getEntityTypeFromFileName;
110
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,iCAAoD;AACpD,mCAA8B;AAE9B;;;;;GAKG;AACI,MAAM,SAAS,GAAG,CACrB,QAA6B,EAC7B,UAAkB,EAClB,UAAmB,EACY,EAAE;IACjC,IAAI,CAAC,IAAA,uBAAgB,EAAC,UAAU,CAAC;QAAE,OAAO,SAAS,CAAC;IAEpD,+CAA+C;IAC/C,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAE5D,IAAI,MAAM,GAAG,IAAA,aAAI,EAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;QAC5C,OAAO,CACH,MAAM,CAAC,UAAU;YACjB,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,WAAW,EAAE;YAC5D,MAAM,CAAC,UAAU;YACjB,UAAU;YACV,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,WAAW,EAAE,CAC/D,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,IAAA,eAAQ,EAAC,MAAM,CAAC,EAAE,CAAC;QACpB,oCAAoC;QACpC,MAAM,GAAG,IAAA,aAAI,EAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YACxC,OAAO,CACH,MAAM,CAAC,UAAU;gBACjB,MAAM,CAAC,UAAU,EAAE,WAAW,EAAE;oBAC5B,UAAU,EAAE,WAAW,EAAE;gBAC7B,CAAC,MAAM,CAAC,UAAU,CACrB,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IAED,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