@memberjunction/global 2.111.0 → 2.112.0

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 (117) hide show
  1. package/dist/Core.d.ts +29 -0
  2. package/dist/Core.d.ts.map +1 -0
  3. package/dist/Core.js +58 -0
  4. package/dist/Core.js.map +1 -0
  5. package/dist/generic/QueryCache.d.ts +85 -0
  6. package/dist/generic/QueryCache.d.ts.map +1 -0
  7. package/dist/generic/QueryCache.js +198 -0
  8. package/dist/generic/QueryCache.js.map +1 -0
  9. package/dist/generic/QueryCacheConfig.d.ts +72 -0
  10. package/dist/generic/QueryCacheConfig.d.ts.map +1 -0
  11. package/dist/generic/QueryCacheConfig.js +3 -0
  12. package/dist/generic/QueryCacheConfig.js.map +1 -0
  13. package/dist/generic/applicationInfo.d.ts +138 -0
  14. package/dist/generic/applicationInfo.d.ts.map +1 -0
  15. package/dist/generic/applicationInfo.js +177 -0
  16. package/dist/generic/applicationInfo.js.map +1 -0
  17. package/dist/generic/authEvaluator.d.ts +25 -0
  18. package/dist/generic/authEvaluator.d.ts.map +1 -0
  19. package/dist/generic/authEvaluator.js +49 -0
  20. package/dist/generic/authEvaluator.js.map +1 -0
  21. package/dist/generic/authTypes.d.ts +193 -0
  22. package/dist/generic/authTypes.d.ts.map +1 -0
  23. package/dist/generic/authTypes.js +19 -0
  24. package/dist/generic/authTypes.js.map +1 -0
  25. package/dist/generic/baseEngine.d.ts +260 -0
  26. package/dist/generic/baseEngine.d.ts.map +1 -0
  27. package/dist/generic/baseEngine.js +510 -0
  28. package/dist/generic/baseEngine.js.map +1 -0
  29. package/dist/generic/baseEntity.d.ts +691 -0
  30. package/dist/generic/baseEntity.d.ts.map +1 -0
  31. package/dist/generic/baseEntity.js +1688 -0
  32. package/dist/generic/baseEntity.js.map +1 -0
  33. package/dist/generic/baseInfo.d.ts +24 -0
  34. package/dist/generic/baseInfo.d.ts.map +1 -0
  35. package/dist/generic/baseInfo.js +53 -0
  36. package/dist/generic/baseInfo.js.map +1 -0
  37. package/dist/generic/compositeKey.d.ts +206 -0
  38. package/dist/generic/compositeKey.d.ts.map +1 -0
  39. package/dist/generic/compositeKey.js +412 -0
  40. package/dist/generic/compositeKey.js.map +1 -0
  41. package/dist/generic/databaseProviderBase.d.ts +46 -0
  42. package/dist/generic/databaseProviderBase.d.ts.map +1 -0
  43. package/dist/generic/databaseProviderBase.js +14 -0
  44. package/dist/generic/databaseProviderBase.js.map +1 -0
  45. package/dist/generic/entityInfo.d.ts +983 -0
  46. package/dist/generic/entityInfo.d.ts.map +1 -0
  47. package/dist/generic/entityInfo.js +1401 -0
  48. package/dist/generic/entityInfo.js.map +1 -0
  49. package/dist/generic/explorerNavigationItem.d.ts +20 -0
  50. package/dist/generic/explorerNavigationItem.d.ts.map +1 -0
  51. package/dist/generic/explorerNavigationItem.js +29 -0
  52. package/dist/generic/explorerNavigationItem.js.map +1 -0
  53. package/dist/generic/interfaces.d.ts +610 -0
  54. package/dist/generic/interfaces.d.ts.map +1 -0
  55. package/dist/generic/interfaces.js +211 -0
  56. package/dist/generic/interfaces.js.map +1 -0
  57. package/dist/generic/libraryInfo.d.ts +40 -0
  58. package/dist/generic/libraryInfo.d.ts.map +1 -0
  59. package/dist/generic/libraryInfo.js +56 -0
  60. package/dist/generic/libraryInfo.js.map +1 -0
  61. package/dist/generic/logging.d.ts +179 -0
  62. package/dist/generic/logging.d.ts.map +1 -0
  63. package/dist/generic/logging.js +382 -0
  64. package/dist/generic/logging.js.map +1 -0
  65. package/dist/generic/metadata.d.ts +305 -0
  66. package/dist/generic/metadata.d.ts.map +1 -0
  67. package/dist/generic/metadata.js +454 -0
  68. package/dist/generic/metadata.js.map +1 -0
  69. package/dist/generic/metadataUtil.d.ts +8 -0
  70. package/dist/generic/metadataUtil.d.ts.map +1 -0
  71. package/dist/generic/metadataUtil.js +36 -0
  72. package/dist/generic/metadataUtil.js.map +1 -0
  73. package/dist/generic/providerBase.d.ts +546 -0
  74. package/dist/generic/providerBase.d.ts.map +1 -0
  75. package/dist/generic/providerBase.js +999 -0
  76. package/dist/generic/providerBase.js.map +1 -0
  77. package/dist/generic/queryInfo.d.ts +460 -0
  78. package/dist/generic/queryInfo.d.ts.map +1 -0
  79. package/dist/generic/queryInfo.js +633 -0
  80. package/dist/generic/queryInfo.js.map +1 -0
  81. package/dist/generic/querySQLFilters.d.ts +54 -0
  82. package/dist/generic/querySQLFilters.d.ts.map +1 -0
  83. package/dist/generic/querySQLFilters.js +84 -0
  84. package/dist/generic/querySQLFilters.js.map +1 -0
  85. package/dist/generic/runQuery.d.ts +96 -0
  86. package/dist/generic/runQuery.d.ts.map +1 -0
  87. package/dist/generic/runQuery.js +66 -0
  88. package/dist/generic/runQuery.js.map +1 -0
  89. package/dist/generic/runQuerySQLFilterImplementations.d.ts +51 -0
  90. package/dist/generic/runQuerySQLFilterImplementations.d.ts.map +1 -0
  91. package/dist/generic/runQuerySQLFilterImplementations.js +238 -0
  92. package/dist/generic/runQuerySQLFilterImplementations.js.map +1 -0
  93. package/dist/generic/runReport.d.ts +25 -0
  94. package/dist/generic/runReport.d.ts.map +1 -0
  95. package/dist/generic/runReport.js +42 -0
  96. package/dist/generic/runReport.js.map +1 -0
  97. package/dist/generic/securityInfo.d.ts +355 -0
  98. package/dist/generic/securityInfo.d.ts.map +1 -0
  99. package/dist/generic/securityInfo.js +425 -0
  100. package/dist/generic/securityInfo.js.map +1 -0
  101. package/dist/generic/transactionGroup.d.ts +184 -0
  102. package/dist/generic/transactionGroup.d.ts.map +1 -0
  103. package/dist/generic/transactionGroup.js +357 -0
  104. package/dist/generic/transactionGroup.js.map +1 -0
  105. package/dist/generic/util.d.ts +81 -0
  106. package/dist/generic/util.d.ts.map +1 -0
  107. package/dist/generic/util.js +301 -0
  108. package/dist/generic/util.js.map +1 -0
  109. package/dist/views/runView.d.ts +150 -0
  110. package/dist/views/runView.d.ts.map +1 -0
  111. package/dist/views/runView.js +100 -0
  112. package/dist/views/runView.js.map +1 -0
  113. package/dist/views/viewInfo.d.ts +121 -0
  114. package/dist/views/viewInfo.d.ts.map +1 -0
  115. package/dist/views/viewInfo.js +182 -0
  116. package/dist/views/viewInfo.js.map +1 -0
  117. package/package.json +1 -1
@@ -0,0 +1,211 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AllMetadata = exports.EntityRecordNameResult = exports.EntityRecordNameInput = exports.EntityMergeOptions = exports.EntityDeleteOptions = exports.EntitySaveOptions = exports.PotentialDuplicateResponse = exports.PotentialDuplicateResult = exports.PotentialDuplicateRequest = exports.PotentialDuplicate = exports.ProviderType = exports.MetadataInfo = exports.ProviderConfigDataBase = void 0;
4
+ const compositeKey_1 = require("./compositeKey");
5
+ /**
6
+ * Base configuration class for data providers.
7
+ * Contains schema inclusion/exclusion rules and configuration data.
8
+ * Used to configure which database schemas should be included or excluded from metadata scanning.
9
+ */
10
+ class ProviderConfigDataBase {
11
+ get Data() {
12
+ return this._data;
13
+ }
14
+ get IncludeSchemas() {
15
+ return this._includeSchemas;
16
+ }
17
+ get MJCoreSchemaName() {
18
+ return this._MJCoreSchemaName;
19
+ }
20
+ get ExcludeSchemas() {
21
+ return this._excludeSchemas;
22
+ }
23
+ get IgnoreExistingMetadata() {
24
+ return this._ignoreExistingMetadata;
25
+ }
26
+ /**
27
+ * Constructor for ProviderConfigDataBase
28
+ * @param data
29
+ * @param MJCoreSchemaName
30
+ * @param includeSchemas
31
+ * @param excludeSchemas
32
+ * @param ignoreExistingMetadata if set to true, even if a global provider is already registered for the Metadata static Provider member, this class will still load up fresh metadata for itself. By default this is off and a class will use existing loaded metadata if it exists
33
+ */
34
+ constructor(data, MJCoreSchemaName = '__mj', includeSchemas, excludeSchemas, ignoreExistingMetadata = true) {
35
+ this._includeSchemas = [];
36
+ this._excludeSchemas = [];
37
+ this._MJCoreSchemaName = '__mj';
38
+ this._ignoreExistingMetadata = false;
39
+ this._data = data;
40
+ this._MJCoreSchemaName = MJCoreSchemaName;
41
+ if (includeSchemas)
42
+ this._includeSchemas = includeSchemas;
43
+ if (excludeSchemas)
44
+ this._excludeSchemas = excludeSchemas;
45
+ this._ignoreExistingMetadata = ignoreExistingMetadata;
46
+ }
47
+ }
48
+ exports.ProviderConfigDataBase = ProviderConfigDataBase;
49
+ /**
50
+ * Information about metadata timestamps and record counts.
51
+ * Used to track when metadata was last updated and how many records exist.
52
+ * Helps determine if local metadata cache is up-to-date with the server.
53
+ */
54
+ class MetadataInfo {
55
+ }
56
+ exports.MetadataInfo = MetadataInfo;
57
+ exports.ProviderType = {
58
+ Database: 'Database',
59
+ Network: 'Network',
60
+ };
61
+ /**
62
+ * Represents a potential duplicate record with its probability score.
63
+ * Extends CompositeKey to support multi-field primary keys.
64
+ * Used in duplicate detection and record merging operations.
65
+ */
66
+ class PotentialDuplicate extends compositeKey_1.CompositeKey {
67
+ }
68
+ exports.PotentialDuplicate = PotentialDuplicate;
69
+ /**
70
+ * Request parameters for finding potential duplicate records.
71
+ * Supports various matching strategies including list-based and document-based comparisons.
72
+ * Can use either a pre-defined list or entity document for duplicate detection.
73
+ */
74
+ class PotentialDuplicateRequest {
75
+ }
76
+ exports.PotentialDuplicateRequest = PotentialDuplicateRequest;
77
+ /**
78
+ * Result of a potential duplicate search for a single record.
79
+ * Contains the record being checked and all potential duplicates found.
80
+ * Includes match details and duplicate run information for tracking.
81
+ */
82
+ class PotentialDuplicateResult {
83
+ constructor() {
84
+ this.RecordCompositeKey = new compositeKey_1.CompositeKey();
85
+ this.Duplicates = [];
86
+ this.DuplicateRunDetailMatchRecordIDs = [];
87
+ }
88
+ }
89
+ exports.PotentialDuplicateResult = PotentialDuplicateResult;
90
+ /**
91
+ * Response wrapper for potential duplicate searches.
92
+ * Includes status information and array of results.
93
+ * Status can be 'Inprogress' for asynchronous operations, 'Success' when complete, or 'Error' on failure.
94
+ */
95
+ class PotentialDuplicateResponse {
96
+ }
97
+ exports.PotentialDuplicateResponse = PotentialDuplicateResponse;
98
+ /**
99
+ * Save options used when saving an entity record.
100
+ * Provides fine-grained control over the save operation including validation,
101
+ * action execution, and conflict detection.
102
+ */
103
+ class EntitySaveOptions {
104
+ constructor() {
105
+ /**
106
+ * If set to true, the record will be saved to the database even if nothing is detected to be "dirty" or changed since the prior load.
107
+ */
108
+ this.IgnoreDirtyState = false;
109
+ /**
110
+ * If set to true, an AI actions associated with the entity will be skipped during the save operation
111
+ */
112
+ this.SkipEntityAIActions = false;
113
+ /**
114
+ * If set to true, any Entity Actions associated with invocation types of Create or Update will be skipped during the save operation
115
+ */
116
+ this.SkipEntityActions = false;
117
+ /**
118
+ * When set to true, the save operation will BYPASS Validate() and the actual process of saving changes to the database but WILL invoke any associated actions (AI Actions, Entity Actions, etc...)
119
+ * Subclasses can also override the Save() method to provide custom logic that will be invoked when ReplayOnly is set to true
120
+ */
121
+ this.ReplayOnly = false;
122
+ /**
123
+ * Setting this to true means that the system will not look for inconsistency between the state of the record at the time it was loaded and the current database version of the record. This is normally on
124
+ * because it is a good way to prevent overwriting changes made by other users that happened after your version of the record was loaded. However, in some cases, you may want to skip this check, such as when you are
125
+ * updating a record that you know has not been changed by anyone else since you loaded it. In that case, you can set this property to true to skip the check which will be more efficient.
126
+ * * IMPORTANT: This is only used for client-side providers. On server-side providers, this check never occurs because server side operations are as up to date as this check would yield.
127
+ */
128
+ this.SkipOldValuesCheck = false;
129
+ /**
130
+ * When set to true, the entity will skip the asynchronous ValidateAsync() method during save.
131
+ * This is an advanced setting and should only be used when you are sure the async validation is not needed.
132
+ * The default behavior is to run the async validation and the default value is undefined.
133
+ * Also, you can set an Entity level default in a BaseEntity subclass by overriding the DefaultSkipAsyncValidation() getter property.
134
+ * @see BaseEntity.DefaultSkipAsyncValidation
135
+ */
136
+ this.SkipAsyncValidation = undefined;
137
+ }
138
+ }
139
+ exports.EntitySaveOptions = EntitySaveOptions;
140
+ /**
141
+ * Options used when deleting an entity record.
142
+ * Controls whether associated actions and AI operations should be executed
143
+ * during the deletion process.
144
+ */
145
+ class EntityDeleteOptions {
146
+ constructor() {
147
+ /**
148
+ * If set to true, an AI actions associated with the entity will be skipped during the delete operation
149
+ */
150
+ this.SkipEntityAIActions = false;
151
+ /**
152
+ * If set to true, any Entity Actions associated with invocation types of Delete will be skipped during the delete operation
153
+ */
154
+ this.SkipEntityActions = false;
155
+ /**
156
+ * When set to true, the save operation will BYPASS Validate() and the actual process of deleting the record from the database but WILL invoke any associated actions (AI Actions, Entity Actions, etc...)
157
+ * Subclasses can also override the Delete() method to provide custom logic that will be invoked when ReplayOnly is set to true
158
+ */
159
+ this.ReplayOnly = false;
160
+ }
161
+ }
162
+ exports.EntityDeleteOptions = EntityDeleteOptions;
163
+ /**
164
+ * Options used when merging entity records.
165
+ * Controls transaction isolation and other merge-specific behaviors.
166
+ */
167
+ class EntityMergeOptions {
168
+ }
169
+ exports.EntityMergeOptions = EntityMergeOptions;
170
+ /**
171
+ * Input parameters for retrieving entity record names.
172
+ * Used for batch operations to get display names for multiple records.
173
+ */
174
+ class EntityRecordNameInput {
175
+ }
176
+ exports.EntityRecordNameInput = EntityRecordNameInput;
177
+ /**
178
+ * Result of an entity record name lookup operation.
179
+ * Contains the display name and status information for the requested record.
180
+ */
181
+ class EntityRecordNameResult {
182
+ }
183
+ exports.EntityRecordNameResult = EntityRecordNameResult;
184
+ /**
185
+ * AllMetadata is used to pass all metadata around in a single object for convenience and type safety.
186
+ * Contains all system metadata collections including entities, applications, security, and queries.
187
+ * This class provides a centralized way to access all MemberJunction metadata.
188
+ */
189
+ class AllMetadata {
190
+ constructor() {
191
+ this.CurrentUser = null;
192
+ // Arrays of Metadata below
193
+ this.AllEntities = [];
194
+ this.AllApplications = [];
195
+ this.AllRoles = [];
196
+ this.AllRowLevelSecurityFilters = [];
197
+ this.AllAuditLogTypes = [];
198
+ this.AllAuthorizations = [];
199
+ this.AllQueryCategories = [];
200
+ this.AllQueries = [];
201
+ this.AllQueryFields = [];
202
+ this.AllQueryPermissions = [];
203
+ this.AllQueryEntities = [];
204
+ this.AllQueryParameters = [];
205
+ this.AllEntityDocumentTypes = [];
206
+ this.AllLibraries = [];
207
+ this.AllExplorerNavigationItems = [];
208
+ }
209
+ }
210
+ exports.AllMetadata = AllMetadata;
211
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/generic/interfaces.ts"],"names":[],"mappings":";;;AAUA,iDAA8C;AAG9C;;;;GAIG;AACH,MAAa,sBAAsB;IAO/B,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACD,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IACD,IAAW,gBAAgB;QACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IACD,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IACD,IAAW,sBAAsB;QAC7B,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACxC,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,IAAO,EAAE,mBAA2B,MAAM,EAAE,cAAyB,EAAE,cAAyB,EAAE,yBAAkC,IAAI;QA9B5I,oBAAe,GAAa,EAAE,CAAC;QAC/B,oBAAe,GAAa,EAAE,CAAC;QAC/B,sBAAiB,GAAW,MAAM,CAAC;QAEnC,4BAAuB,GAAY,KAAK,CAAC;QA2B7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAC1C,IAAI,cAAc;YACd,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QAC1C,IAAI,cAAc;YACd,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QAC1C,IAAI,CAAC,uBAAuB,GAAG,sBAAsB,CAAC;IAC1D,CAAC;CACJ;AAxCD,wDAwCC;AAED;;;;GAIG;AACH,MAAa,YAAY;CAKxB;AALD,oCA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,WAAW;IAAxB;QACI,gBAAW,GAAa,IAAI,CAAC;QAE7B,2BAA2B;QAC3B,gBAAW,GAAiB,EAAE,CAAC;QAC/B,oBAAe,GAAsB,EAAE,CAAC;QACxC,aAAQ,GAAe,EAAE,CAAC;QAC1B,+BAA0B,GAAiC,EAAE,CAAC;QAC9D,qBAAgB,GAAuB,EAAE,CAAC;QAC1C,sBAAiB,GAAwB,EAAE,CAAC;QAC5C,uBAAkB,GAAwB,EAAE,CAAC;QAC7C,eAAU,GAAgB,EAAE,CAAC;QAC7B,mBAAc,GAAqB,EAAE,CAAC;QACtC,wBAAmB,GAA0B,EAAE,CAAC;QAChD,qBAAgB,GAAsB,EAAE,CAAC;QACzC,uBAAkB,GAAyB,EAAE,CAAC;QAC9C,2BAAsB,GAA6B,EAAE,CAAC;QACtD,iBAAY,GAAkB,EAAE,CAAC;QACjC,+BAA0B,GAA6B,EAAE,CAAC;IAC9D,CAAC;CAAA;AAnBD,kCAmBC"}
@@ -0,0 +1,40 @@
1
+ import { BaseInfo } from "./baseInfo";
2
+ /**
3
+ * Metadata about a single library that's available for code generation or other purposes.
4
+ */
5
+ export declare class LibraryInfo extends BaseInfo {
6
+ ID: string;
7
+ /**
8
+ * Name of the library - used for import statements and within package.json
9
+ */
10
+ Name: string;
11
+ /**
12
+ * User readable/AI readable description of the library
13
+ */
14
+ Description: string;
15
+ /**
16
+ * Only Active libraries are used for new code generation but disabling a library means it won't be used for new code generation, but doesn't remove it from use from previously generated code.
17
+ */
18
+ Status: 'Pending' | 'Active' | 'Disabled';
19
+ /**
20
+ * Comma-delimted list of items that are exported from the library such as classes, functions, types, etc.
21
+ */
22
+ ExportedItems: string;
23
+ /**
24
+ * Code definitions for the types that are exported from the library
25
+ */
26
+ TypeDefinitions: string;
27
+ /**
28
+ * Sample code that demonstrates how to use the library
29
+ */
30
+ SampleCode: string;
31
+ __mj_CreatedAt: Date;
32
+ __mj_UpdatedAt: Date;
33
+ private _exportItemsArray;
34
+ /**
35
+ * Helper method to get the ExportedItems as an array of strings, parsing the comma delimited string in the ExportedItems property
36
+ */
37
+ get ExportItemsArray(): string[];
38
+ constructor(initData?: any);
39
+ }
40
+ //# sourceMappingURL=libraryInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libraryInfo.d.ts","sourceRoot":"","sources":["../../src/generic/libraryInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC;;GAEG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IAC9B,EAAE,EAAE,MAAM,CAAQ;IACzB;;OAEG;IACI,IAAI,EAAE,MAAM,CAAQ;IAC3B;;OAEG;IACI,WAAW,EAAE,MAAM,CAAQ;IAClC;;OAEG;IACI,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAQ;IACxD;;OAEG;IACI,aAAa,EAAE,MAAM,CAAQ;IACpC;;OAEG;IACI,eAAe,EAAE,MAAM,CAAQ;IACtC;;OAEG;IACI,UAAU,EAAE,MAAM,CAAQ;IACjC,cAAc,EAAE,IAAI,CAAO;IAC3B,cAAc,EAAE,IAAI,CAAO;IAE3B,OAAO,CAAC,iBAAiB,CAAkB;IAC3C;;OAEG;IACH,IAAW,gBAAgB,IAAI,MAAM,EAAE,CAQtC;gBAEW,QAAQ,GAAE,GAAU;CAMnC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LibraryInfo = void 0;
4
+ const baseInfo_1 = require("./baseInfo");
5
+ /**
6
+ * Metadata about a single library that's available for code generation or other purposes.
7
+ */
8
+ class LibraryInfo extends baseInfo_1.BaseInfo {
9
+ /**
10
+ * Helper method to get the ExportedItems as an array of strings, parsing the comma delimited string in the ExportedItems property
11
+ */
12
+ get ExportItemsArray() {
13
+ if (!this._exportItemsArray && this.ExportedItems && this.ExportedItems.length > 0) {
14
+ this._exportItemsArray = this.ExportedItems.split(',').map(item => item.trim());
15
+ }
16
+ else
17
+ this._exportItemsArray = [];
18
+ return this._exportItemsArray;
19
+ }
20
+ constructor(initData = null) {
21
+ super();
22
+ this.ID = null;
23
+ /**
24
+ * Name of the library - used for import statements and within package.json
25
+ */
26
+ this.Name = null;
27
+ /**
28
+ * User readable/AI readable description of the library
29
+ */
30
+ this.Description = null;
31
+ /**
32
+ * Only Active libraries are used for new code generation but disabling a library means it won't be used for new code generation, but doesn't remove it from use from previously generated code.
33
+ */
34
+ this.Status = null;
35
+ /**
36
+ * Comma-delimted list of items that are exported from the library such as classes, functions, types, etc.
37
+ */
38
+ this.ExportedItems = null;
39
+ /**
40
+ * Code definitions for the types that are exported from the library
41
+ */
42
+ this.TypeDefinitions = null;
43
+ /**
44
+ * Sample code that demonstrates how to use the library
45
+ */
46
+ this.SampleCode = null;
47
+ this.__mj_CreatedAt = null;
48
+ this.__mj_UpdatedAt = null;
49
+ this._exportItemsArray = null;
50
+ if (initData) {
51
+ this.copyInitData(initData);
52
+ }
53
+ }
54
+ }
55
+ exports.LibraryInfo = LibraryInfo;
56
+ //# sourceMappingURL=libraryInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libraryInfo.js","sourceRoot":"","sources":["../../src/generic/libraryInfo.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAErC;;GAEG;AACH,MAAa,WAAY,SAAQ,mBAAQ;IA8BrC;;OAEG;IACH,IAAW,gBAAgB;QACvB,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACpF,CAAC;;YAEG,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAEhC,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED,YAAY,WAAgB,IAAI;QAC5B,KAAK,EAAE,CAAC;QA3CL,OAAE,GAAW,IAAI,CAAC;QACzB;;WAEG;QACI,SAAI,GAAW,IAAI,CAAC;QAC3B;;WAEG;QACI,gBAAW,GAAW,IAAI,CAAC;QAClC;;WAEG;QACI,WAAM,GAAsC,IAAI,CAAC;QACxD;;WAEG;QACI,kBAAa,GAAW,IAAI,CAAC;QACpC;;WAEG;QACI,oBAAe,GAAW,IAAI,CAAC;QACtC;;WAEG;QACI,eAAU,GAAW,IAAI,CAAC;QACjC,mBAAc,GAAS,IAAI,CAAA;QAC3B,mBAAc,GAAS,IAAI,CAAA;QAEnB,sBAAiB,GAAa,IAAI,CAAC;QAgBvC,IAAI,QAAQ,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;IACL,CAAC;CACJ;AAjDD,kCAiDC"}
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Logs a debug message using the default 'MJGlobal' namespace logger.
3
+ *
4
+ * This function wraps the debug library's logger for the 'MJGlobal' namespace.
5
+ * It accepts any number of arguments and forwards them directly to the underlying
6
+ * debug logger. This provides a simple, out-of-the-box logging function for the MJGlobal library.
7
+ *
8
+ * @param {...any} args - The messages or objects to be logged.
9
+ *
10
+ * @example
11
+ * LogDebug('Initialization complete, version %s', '1.0.0');
12
+ */
13
+ export declare function LogDebug(...args: any[]): void;
14
+ /**
15
+ * Options for the enhanced LogErrorEx function
16
+ */
17
+ export interface LogErrorOptions {
18
+ /** The error message */
19
+ message: string;
20
+ /** Optional file name to log to */
21
+ logToFileName?: string;
22
+ /** Additional arguments to pass to console.error (varargs) */
23
+ additionalArgs?: any[];
24
+ /** Error severity level */
25
+ severity?: 'warning' | 'error' | 'critical';
26
+ /** Category for filtering logs */
27
+ category?: string;
28
+ /** The actual error object */
29
+ error?: Error;
30
+ /** Additional metadata about the error */
31
+ metadata?: Record<string, any>;
32
+ /** Whether to include stack trace */
33
+ includeStack?: boolean;
34
+ }
35
+ /**
36
+ * Enhanced error logging function with structured error information.
37
+ *
38
+ * Provides rich error logging capabilities including severity levels, categories,
39
+ * error objects with stack traces, metadata, and varargs support.
40
+ *
41
+ * @param options - Error logging options or a simple string message for backward compatibility
42
+ *
43
+ * @example
44
+ * // Simple string message
45
+ * LogErrorEx('Something went wrong');
46
+ *
47
+ * @example
48
+ * // With error object and metadata
49
+ * LogErrorEx({
50
+ * message: 'Failed to process request',
51
+ * error: new Error('Network timeout'),
52
+ * severity: 'critical',
53
+ * category: 'NetworkError',
54
+ * metadata: {
55
+ * url: 'https://api.example.com',
56
+ * timeout: 5000
57
+ * }
58
+ * });
59
+ *
60
+ * @example
61
+ * // With additional arguments (varargs)
62
+ * LogErrorEx({
63
+ * message: 'Multiple values failed',
64
+ * additionalArgs: [value1, value2, value3]
65
+ * });
66
+ */
67
+ export declare function LogErrorEx(options: LogErrorOptions | string): void;
68
+ export declare function LogError(message: any, logToFileName?: string | null, ...args: any[]): void;
69
+ /**
70
+ * Options for the enhanced LogStatusEx function
71
+ */
72
+ export interface LogStatusOptions {
73
+ /** The message to log */
74
+ message: string;
75
+ /** Optional file name to log to */
76
+ logToFileName?: string;
77
+ /** Additional arguments to pass to console.log (varargs) */
78
+ additionalArgs?: any[];
79
+ /** If true, only logs when verbose mode is enabled */
80
+ verboseOnly?: boolean;
81
+ /** Optional custom function to check if verbose logging is enabled */
82
+ isVerboseEnabled?: () => boolean;
83
+ /** Severity level for future extensibility */
84
+ severity?: SeverityType;
85
+ /** Category for filtering logs */
86
+ category?: string;
87
+ }
88
+ /**
89
+ * Enhanced status logging function with verbose control and extensibility.
90
+ *
91
+ * Provides flexible logging with verbose mode support, custom verbose checks,
92
+ * categories, severity levels, and varargs support. Messages can be conditionally
93
+ * logged based on global or custom verbose settings.
94
+ *
95
+ * @param options - Logging options or a simple string message for backward compatibility
96
+ *
97
+ * @example
98
+ * // Simple string message
99
+ * LogStatusEx('Operation completed');
100
+ *
101
+ * @example
102
+ * // Verbose-only message with global check
103
+ * LogStatusEx({
104
+ * message: 'Detailed trace information',
105
+ * verboseOnly: true
106
+ * });
107
+ *
108
+ * @example
109
+ * // With custom verbose check and additional args
110
+ * LogStatusEx({
111
+ * message: 'Processing items:',
112
+ * verboseOnly: true,
113
+ * isVerboseEnabled: () => params.verbose === true,
114
+ * additionalArgs: [item1, item2, item3]
115
+ * });
116
+ *
117
+ * @example
118
+ * // With category and file logging
119
+ * LogStatusEx({
120
+ * message: 'Batch processing complete',
121
+ * category: 'BatchJob',
122
+ * logToFileName: '/logs/batch.log'
123
+ * });
124
+ */
125
+ export declare function LogStatusEx(options: LogStatusOptions | string): void;
126
+ /**
127
+ * Checks if verbose logging is enabled globally
128
+ * Works in both Node.js and Browser environments
129
+ * @returns true if verbose logging is enabled
130
+ */
131
+ export declare function IsVerboseLoggingEnabled(): boolean;
132
+ /**
133
+ * Sets verbose logging mode in browser environments
134
+ * @param enabled Whether to enable verbose logging
135
+ */
136
+ export declare function SetVerboseLogging(enabled: boolean): void;
137
+ export declare function LogStatus(message: any, logToFileName?: string, ...args: any[]): void;
138
+ export declare function GetProductionStatus(): boolean;
139
+ export declare function SetProductionStatus(isProduction: boolean): void;
140
+ export declare function FormatConsoleMessage(message: string, serverity: SeverityType): string;
141
+ export declare function FormatFileMessage(message: string, serverity: SeverityType): string;
142
+ export declare const SeverityType: {
143
+ readonly Trace: "Trace";
144
+ readonly Debug: "Debug";
145
+ readonly Info: "Info";
146
+ readonly Warning: "Warning";
147
+ readonly Critical: "Critical";
148
+ };
149
+ export type SeverityType = typeof SeverityType[keyof typeof SeverityType];
150
+ /**
151
+ * Enum of console colors that can be used to update the console line color.
152
+ */
153
+ export declare const ConsoleColor: {
154
+ readonly black: "black";
155
+ readonly red: "red";
156
+ readonly green: "green";
157
+ readonly yellow: "yellow";
158
+ readonly blue: "blue";
159
+ readonly magenta: "magenta";
160
+ readonly cyan: "cyan";
161
+ readonly white: "white";
162
+ readonly gray: "gray";
163
+ readonly crimson: "crimson";
164
+ };
165
+ type ConsoleColor = typeof ConsoleColor[keyof typeof ConsoleColor];
166
+ /**
167
+ * Helper function to get the ANSI color code for the given console color.
168
+ * @param color
169
+ */
170
+ export declare function getAnsiColorCode(color: ConsoleColor): number;
171
+ /**
172
+ * Utility function that udpates the current console line with the provided message and color.
173
+ * @param message
174
+ * @param color
175
+ */
176
+ export declare function UpdateCurrentConsoleLine(message: string, color?: ConsoleColor): void;
177
+ export declare function UpdateCurrentConsoleProgress(message: string, current: number, total: number, color?: ConsoleColor): void;
178
+ export {};
179
+ //# sourceMappingURL=logging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/generic/logging.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAG7C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAEhB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC;IAEvB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAE5C,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE/B,qCAAqC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,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