@memberjunction/core 2.72.0 → 2.74.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.
- package/dist/generic/applicationInfo.d.ts +92 -1
- package/dist/generic/applicationInfo.d.ts.map +1 -1
- package/dist/generic/applicationInfo.js +92 -1
- package/dist/generic/applicationInfo.js.map +1 -1
- package/dist/generic/baseInfo.d.ts +15 -0
- package/dist/generic/baseInfo.d.ts.map +1 -1
- package/dist/generic/baseInfo.js +15 -0
- package/dist/generic/baseInfo.js.map +1 -1
- package/dist/generic/entityInfo.d.ts +184 -3
- package/dist/generic/entityInfo.d.ts.map +1 -1
- package/dist/generic/entityInfo.js +184 -3
- package/dist/generic/entityInfo.js.map +1 -1
- package/dist/generic/interfaces.d.ts +119 -4
- package/dist/generic/interfaces.d.ts.map +1 -1
- package/dist/generic/interfaces.js +44 -3
- package/dist/generic/interfaces.js.map +1 -1
- package/dist/generic/providerBase.d.ts +248 -8
- package/dist/generic/providerBase.d.ts.map +1 -1
- package/dist/generic/providerBase.js +185 -2
- package/dist/generic/providerBase.js.map +1 -1
- package/dist/generic/queryInfo.d.ts +312 -1
- package/dist/generic/queryInfo.d.ts.map +1 -1
- package/dist/generic/queryInfo.js +371 -2
- package/dist/generic/queryInfo.js.map +1 -1
- package/dist/generic/querySQLFilters.d.ts +54 -0
- package/dist/generic/querySQLFilters.d.ts.map +1 -0
- package/dist/generic/querySQLFilters.js +84 -0
- package/dist/generic/querySQLFilters.js.map +1 -0
- package/dist/generic/runQuery.d.ts +42 -0
- package/dist/generic/runQuery.d.ts.map +1 -1
- package/dist/generic/runQuery.js +26 -0
- package/dist/generic/runQuery.js.map +1 -1
- package/dist/generic/runQuerySQLFilterImplementations.d.ts +51 -0
- package/dist/generic/runQuerySQLFilterImplementations.d.ts.map +1 -0
- package/dist/generic/runQuerySQLFilterImplementations.js +238 -0
- package/dist/generic/runQuerySQLFilterImplementations.js.map +1 -0
- package/dist/generic/securityInfo.d.ts +212 -13
- package/dist/generic/securityInfo.d.ts.map +1 -1
- package/dist/generic/securityInfo.js +200 -14
- package/dist/generic/securityInfo.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/readme.md +550 -1
|
@@ -4,12 +4,14 @@ import { IMetadataProvider, ProviderConfigDataBase, MetadataInfo, ILocalStorageP
|
|
|
4
4
|
import { ApplicationInfo } from "../generic/applicationInfo";
|
|
5
5
|
import { AuditLogTypeInfo, AuthorizationInfo, RoleInfo, RowLevelSecurityFilterInfo, UserInfo } from "./securityInfo";
|
|
6
6
|
import { TransactionGroupBase } from "./transactionGroup";
|
|
7
|
-
import { QueryCategoryInfo, QueryFieldInfo, QueryInfo, QueryPermissionInfo } from "./queryInfo";
|
|
7
|
+
import { QueryCategoryInfo, QueryFieldInfo, QueryInfo, QueryPermissionInfo, QueryEntityInfo, QueryParameterInfo } from "./queryInfo";
|
|
8
8
|
import { LibraryInfo } from "./libraryInfo";
|
|
9
9
|
import { CompositeKey } from "./compositeKey";
|
|
10
10
|
import { ExplorerNavigationItem } from "./explorerNavigationItem";
|
|
11
11
|
/**
|
|
12
12
|
* AllMetadata is used to pass all metadata around in a single object for convenience and type safety.
|
|
13
|
+
* Contains all system metadata collections including entities, applications, security, and queries.
|
|
14
|
+
* This class provides a centralized way to access all MemberJunction metadata.
|
|
13
15
|
*/
|
|
14
16
|
export declare class AllMetadata {
|
|
15
17
|
CurrentUser: UserInfo;
|
|
@@ -23,13 +25,25 @@ export declare class AllMetadata {
|
|
|
23
25
|
AllQueries: QueryInfo[];
|
|
24
26
|
AllQueryFields: QueryFieldInfo[];
|
|
25
27
|
AllQueryPermissions: QueryPermissionInfo[];
|
|
28
|
+
AllQueryEntities: QueryEntityInfo[];
|
|
29
|
+
AllQueryParameters: QueryParameterInfo[];
|
|
26
30
|
AllEntityDocumentTypes: EntityDocumentTypeInfo[];
|
|
27
31
|
AllLibraries: LibraryInfo[];
|
|
28
32
|
AllExplorerNavigationItems: ExplorerNavigationItem[];
|
|
29
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates a new instance of AllMetadata from a simple object.
|
|
36
|
+
* Handles deserialization and proper instantiation of all metadata classes.
|
|
37
|
+
* @param data - The raw metadata object to convert
|
|
38
|
+
* @param md - The metadata provider for context
|
|
39
|
+
* @returns A fully populated AllMetadata instance with proper type instances
|
|
40
|
+
*/
|
|
30
41
|
export declare function MetadataFromSimpleObject(data: any, md: IMetadataProvider): AllMetadata;
|
|
31
42
|
/**
|
|
32
|
-
* This is a list of all metadata classes that are used in the AllMetadata class.
|
|
43
|
+
* This is a list of all metadata classes that are used in the AllMetadata class.
|
|
44
|
+
* Used to automatically determine the class type when deserializing the metadata and
|
|
45
|
+
* for iterating through all metadata collections.
|
|
46
|
+
* Each entry maps a property key to its corresponding class constructor.
|
|
33
47
|
*/
|
|
34
48
|
export declare const AllMetadataArrays: ({
|
|
35
49
|
key: string;
|
|
@@ -43,10 +57,21 @@ export declare const AllMetadataArrays: ({
|
|
|
43
57
|
} | {
|
|
44
58
|
key: string;
|
|
45
59
|
class: typeof QueryPermissionInfo;
|
|
60
|
+
} | {
|
|
61
|
+
key: string;
|
|
62
|
+
class: typeof QueryEntityInfo;
|
|
63
|
+
} | {
|
|
64
|
+
key: string;
|
|
65
|
+
class: typeof QueryParameterInfo;
|
|
46
66
|
} | {
|
|
47
67
|
key: string;
|
|
48
68
|
class: typeof EntityDocumentTypeInfo;
|
|
49
69
|
})[];
|
|
70
|
+
/**
|
|
71
|
+
* Base class for all metadata providers in MemberJunction.
|
|
72
|
+
* Implements common functionality for metadata caching, refresh, and dataset management.
|
|
73
|
+
* Subclasses must implement abstract methods for provider-specific operations.
|
|
74
|
+
*/
|
|
50
75
|
export declare abstract class ProviderBase implements IMetadataProvider {
|
|
51
76
|
private _ConfigData;
|
|
52
77
|
private _latestLocalMetadataTimestamps;
|
|
@@ -55,47 +80,200 @@ export declare abstract class ProviderBase implements IMetadataProvider {
|
|
|
55
80
|
private _refresh;
|
|
56
81
|
/******** ABSTRACT SECTION ****************************************************************** */
|
|
57
82
|
/**
|
|
58
|
-
* Determines if a refresh is currently allowed or not
|
|
83
|
+
* Determines if a refresh is currently allowed or not.
|
|
84
|
+
* Subclasses should return FALSE if they are performing operations that should prevent refreshes.
|
|
85
|
+
* This helps avoid metadata refreshes during critical operations.
|
|
59
86
|
*/
|
|
60
87
|
protected abstract get AllowRefresh(): boolean;
|
|
61
88
|
/**
|
|
62
|
-
* Returns the provider type for the instance
|
|
89
|
+
* Returns the provider type for the instance.
|
|
90
|
+
* Identifies whether this is a Database or Network provider.
|
|
63
91
|
*/
|
|
64
92
|
abstract get ProviderType(): ProviderType;
|
|
65
93
|
/**
|
|
66
|
-
* For providers that have ProviderType==='Database', this property will return an object that represents the underlying database connection.
|
|
67
|
-
* ProviderType==='Network' this property will throw an exception.
|
|
94
|
+
* For providers that have ProviderType==='Database', this property will return an object that represents the underlying database connection.
|
|
95
|
+
* For providers where ProviderType==='Network' this property will throw an exception.
|
|
96
|
+
* The type of object returned is provider-specific (e.g., SQL connection pool).
|
|
68
97
|
*/
|
|
69
98
|
abstract get DatabaseConnection(): any;
|
|
99
|
+
/**
|
|
100
|
+
* Gets the display name for a single entity record.
|
|
101
|
+
* Uses the entity's IsNameField or falls back to 'Name' field if available.
|
|
102
|
+
* @param entityName - The name of the entity
|
|
103
|
+
* @param compositeKey - The primary key value(s) for the record
|
|
104
|
+
* @param contextUser - Optional user context for permissions
|
|
105
|
+
* @returns The display name of the record or null if not found
|
|
106
|
+
*/
|
|
70
107
|
abstract GetEntityRecordName(entityName: string, compositeKey: CompositeKey, contextUser?: UserInfo): Promise<string>;
|
|
108
|
+
/**
|
|
109
|
+
* Gets display names for multiple entity records in a single operation.
|
|
110
|
+
* More efficient than multiple GetEntityRecordName calls.
|
|
111
|
+
* @param info - Array of entity/key pairs to lookup
|
|
112
|
+
* @param contextUser - Optional user context for permissions
|
|
113
|
+
* @returns Array of results with names and status for each requested record
|
|
114
|
+
*/
|
|
71
115
|
abstract GetEntityRecordNames(info: EntityRecordNameInput[], contextUser?: UserInfo): Promise<EntityRecordNameResult[]>;
|
|
116
|
+
/**
|
|
117
|
+
* Checks if a specific record is marked as a favorite by the user.
|
|
118
|
+
* @param userId - The ID of the user to check
|
|
119
|
+
* @param entityName - The name of the entity
|
|
120
|
+
* @param CompositeKey - The primary key value(s) for the record
|
|
121
|
+
* @param contextUser - Optional user context for permissions
|
|
122
|
+
* @returns True if the record is a favorite, false otherwise
|
|
123
|
+
*/
|
|
72
124
|
abstract GetRecordFavoriteStatus(userId: string, entityName: string, CompositeKey: CompositeKey, contextUser?: UserInfo): Promise<boolean>;
|
|
125
|
+
/**
|
|
126
|
+
* Sets or removes a record's favorite status for a user.
|
|
127
|
+
* @param userId - The ID of the user
|
|
128
|
+
* @param entityName - The name of the entity
|
|
129
|
+
* @param CompositeKey - The primary key value(s) for the record
|
|
130
|
+
* @param isFavorite - True to mark as favorite, false to remove
|
|
131
|
+
* @param contextUser - User context for permissions (required)
|
|
132
|
+
*/
|
|
73
133
|
abstract SetRecordFavoriteStatus(userId: string, entityName: string, CompositeKey: CompositeKey, isFavorite: boolean, contextUser: UserInfo): Promise<void>;
|
|
74
134
|
/******** END - ABSTRACT SECTION ****************************************************************** */
|
|
135
|
+
/**
|
|
136
|
+
* Configures the provider with the specified configuration data.
|
|
137
|
+
* Handles metadata refresh if needed and initializes the provider.
|
|
138
|
+
* @param data - Configuration including schema filters and connection info
|
|
139
|
+
* @returns True if configuration was successful
|
|
140
|
+
*/
|
|
75
141
|
Config(data: ProviderConfigDataBase): Promise<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* Builds dataset filters based on the provider configuration.
|
|
144
|
+
* Ensures MJ Core schema is always included and never excluded.
|
|
145
|
+
* @returns Array of filters to apply when loading metadata
|
|
146
|
+
*/
|
|
76
147
|
protected BuildDatasetFilterFromConfig(): DatasetItemFilterType[];
|
|
77
148
|
protected static _mjMetadataDatasetName: string;
|
|
149
|
+
/**
|
|
150
|
+
* Retrieves all metadata from the server and constructs typed instances.
|
|
151
|
+
* Uses the MJ_Metadata dataset for efficient bulk loading.
|
|
152
|
+
* @returns Complete metadata collection with all relationships
|
|
153
|
+
*/
|
|
78
154
|
protected GetAllMetadata(): Promise<AllMetadata>;
|
|
155
|
+
/**
|
|
156
|
+
* Gets the current user information from the provider.
|
|
157
|
+
* Must be implemented by subclasses to return user-specific data.
|
|
158
|
+
* @returns Current user information including roles and permissions
|
|
159
|
+
*/
|
|
79
160
|
protected abstract GetCurrentUser(): Promise<UserInfo>;
|
|
161
|
+
/**
|
|
162
|
+
* Post-processes entity metadata to establish relationships between entities and their child objects.
|
|
163
|
+
* Links fields, permissions, relationships, and settings to their parent entities.
|
|
164
|
+
* @param entities - Array of entity metadata
|
|
165
|
+
* @param fields - Array of entity field metadata
|
|
166
|
+
* @param fieldValues - Array of entity field value metadata
|
|
167
|
+
* @param permissions - Array of entity permission metadata
|
|
168
|
+
* @param relationships - Array of entity relationship metadata
|
|
169
|
+
* @param settings - Array of entity settings metadata
|
|
170
|
+
* @returns Processed array of EntityInfo instances with all relationships established
|
|
171
|
+
*/
|
|
80
172
|
protected PostProcessEntityMetadata(entities: any[], fields: any[], fieldValues: any[], permissions: any[], relationships: any[], settings: any[]): any[];
|
|
173
|
+
/**
|
|
174
|
+
* Gets the configuration data that was provided to the provider.
|
|
175
|
+
* @returns The provider configuration including schema filters
|
|
176
|
+
*/
|
|
81
177
|
get ConfigData(): ProviderConfigDataBase;
|
|
178
|
+
/**
|
|
179
|
+
* Gets all entity metadata in the system.
|
|
180
|
+
* @returns Array of EntityInfo objects representing all entities
|
|
181
|
+
*/
|
|
82
182
|
get Entities(): EntityInfo[];
|
|
183
|
+
/**
|
|
184
|
+
* Gets all application metadata in the system.
|
|
185
|
+
* @returns Array of ApplicationInfo objects representing all applications
|
|
186
|
+
*/
|
|
83
187
|
get Applications(): ApplicationInfo[];
|
|
188
|
+
/**
|
|
189
|
+
* Gets the current user's information including roles and permissions.
|
|
190
|
+
* @returns UserInfo object for the authenticated user
|
|
191
|
+
*/
|
|
84
192
|
get CurrentUser(): UserInfo;
|
|
193
|
+
/**
|
|
194
|
+
* Gets all security roles defined in the system.
|
|
195
|
+
* @returns Array of RoleInfo objects representing all roles
|
|
196
|
+
*/
|
|
85
197
|
get Roles(): RoleInfo[];
|
|
198
|
+
/**
|
|
199
|
+
* Gets all row-level security filters defined in the system.
|
|
200
|
+
* @returns Array of RowLevelSecurityFilterInfo objects for data access control
|
|
201
|
+
*/
|
|
86
202
|
get RowLevelSecurityFilters(): RowLevelSecurityFilterInfo[];
|
|
203
|
+
/**
|
|
204
|
+
* Gets all audit log types defined for tracking system activities.
|
|
205
|
+
* @returns Array of AuditLogTypeInfo objects
|
|
206
|
+
*/
|
|
87
207
|
get AuditLogTypes(): AuditLogTypeInfo[];
|
|
208
|
+
/**
|
|
209
|
+
* Gets all authorization definitions in the system.
|
|
210
|
+
* @returns Array of AuthorizationInfo objects defining permissions
|
|
211
|
+
*/
|
|
88
212
|
get Authorizations(): AuthorizationInfo[];
|
|
213
|
+
/**
|
|
214
|
+
* Gets all saved queries in the system.
|
|
215
|
+
* @returns Array of QueryInfo objects representing stored queries
|
|
216
|
+
*/
|
|
89
217
|
get Queries(): QueryInfo[];
|
|
218
|
+
/**
|
|
219
|
+
* Gets all query category definitions.
|
|
220
|
+
* @returns Array of QueryCategoryInfo objects for query organization
|
|
221
|
+
*/
|
|
90
222
|
get QueryCategories(): QueryCategoryInfo[];
|
|
223
|
+
/**
|
|
224
|
+
* Gets all query field definitions.
|
|
225
|
+
* @returns Array of QueryFieldInfo objects defining query result columns
|
|
226
|
+
*/
|
|
91
227
|
get QueryFields(): QueryFieldInfo[];
|
|
228
|
+
/**
|
|
229
|
+
* Gets all query permission assignments.
|
|
230
|
+
* @returns Array of QueryPermissionInfo objects defining query access
|
|
231
|
+
*/
|
|
92
232
|
get QueryPermissions(): QueryPermissionInfo[];
|
|
233
|
+
/**
|
|
234
|
+
* Gets all query entity associations.
|
|
235
|
+
* @returns Array of QueryEntityInfo objects linking queries to entities
|
|
236
|
+
*/
|
|
237
|
+
get QueryEntities(): QueryEntityInfo[];
|
|
238
|
+
/**
|
|
239
|
+
* Gets all query parameter definitions.
|
|
240
|
+
* @returns Array of QueryParameterInfo objects for parameterized queries
|
|
241
|
+
*/
|
|
242
|
+
get QueryParameters(): QueryParameterInfo[];
|
|
243
|
+
/**
|
|
244
|
+
* Gets all library definitions in the system.
|
|
245
|
+
* @returns Array of LibraryInfo objects representing code libraries
|
|
246
|
+
*/
|
|
93
247
|
get Libraries(): LibraryInfo[];
|
|
248
|
+
/**
|
|
249
|
+
* Gets all explorer navigation items including inactive ones.
|
|
250
|
+
* @returns Array of all ExplorerNavigationItem objects
|
|
251
|
+
*/
|
|
94
252
|
get AllExplorerNavigationItems(): ExplorerNavigationItem[];
|
|
95
253
|
private _cachedVisibleExplorerNavigationItems;
|
|
254
|
+
/**
|
|
255
|
+
* Gets only active explorer navigation items sorted by sequence.
|
|
256
|
+
* Results are cached for performance.
|
|
257
|
+
* @returns Array of active ExplorerNavigationItem objects
|
|
258
|
+
*/
|
|
96
259
|
get VisibleExplorerNavigationItems(): ExplorerNavigationItem[];
|
|
260
|
+
/**
|
|
261
|
+
* Refreshes all metadata from the server.
|
|
262
|
+
* Respects the AllowRefresh flag from subclasses.
|
|
263
|
+
* @returns True if refresh was initiated or allowed
|
|
264
|
+
*/
|
|
97
265
|
Refresh(): Promise<boolean>;
|
|
266
|
+
/**
|
|
267
|
+
* Checks if local metadata is out of date and needs refreshing.
|
|
268
|
+
* Compares local timestamps with server timestamps.
|
|
269
|
+
* @returns True if refresh is needed, false otherwise
|
|
270
|
+
*/
|
|
98
271
|
CheckToSeeIfRefreshNeeded(): Promise<boolean>;
|
|
272
|
+
/**
|
|
273
|
+
* Refreshes metadata only if needed based on timestamp comparison.
|
|
274
|
+
* Combines check and refresh into a single operation.
|
|
275
|
+
* @returns True if refresh was successful or not needed
|
|
276
|
+
*/
|
|
99
277
|
RefreshIfNeeded(): Promise<boolean>;
|
|
100
278
|
/**
|
|
101
279
|
* Creates a new instance of a BaseEntity subclass for the specified entity and automatically calls NewRecord() to initialize it.
|
|
@@ -215,10 +393,16 @@ export declare abstract class ProviderBase implements IMetadataProvider {
|
|
|
215
393
|
*/
|
|
216
394
|
GetDatasetCacheKey(datasetName: string, itemFilters?: DatasetItemFilterType[]): string;
|
|
217
395
|
/**
|
|
218
|
-
* This property is implemented by each sub-class of ProviderBase and is intended to return a unique string that identifies the instance of the provider for the connection it is making.
|
|
219
|
-
* for network connections, the URL including a TCP port would be a good connection string, whereas on database connections the database host url/instance/port would be a good connection string.
|
|
396
|
+
* This property is implemented by each sub-class of ProviderBase and is intended to return a unique string that identifies the instance of the provider for the connection it is making.
|
|
397
|
+
* For example: for network connections, the URL including a TCP port would be a good connection string, whereas on database connections the database host url/instance/port would be a good connection string.
|
|
398
|
+
* This is used as part of cache keys to ensure different connections don't share cached data.
|
|
220
399
|
*/
|
|
221
400
|
abstract get InstanceConnectionString(): string;
|
|
401
|
+
/**
|
|
402
|
+
* Converts dataset item filters into a unique string key for caching.
|
|
403
|
+
* @param itemFilters - Array of filters to convert
|
|
404
|
+
* @returns JSON-formatted string representing the filters
|
|
405
|
+
*/
|
|
222
406
|
protected ConvertItemFiltersToUniqueKey(itemFilters: DatasetItemFilterType[]): string;
|
|
223
407
|
/**
|
|
224
408
|
* If the specified datasetName is cached, this method will clear the cache. If itemFilters are provided, the combination of datasetName and the filters are used to determine a match in the cache
|
|
@@ -226,14 +410,57 @@ export declare abstract class ProviderBase implements IMetadataProvider {
|
|
|
226
410
|
* @param itemFilters
|
|
227
411
|
*/
|
|
228
412
|
ClearDatasetCache(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<void>;
|
|
413
|
+
/**
|
|
414
|
+
* Creates a new transaction group for managing database transactions.
|
|
415
|
+
* Must be implemented by subclasses to provide transaction support.
|
|
416
|
+
* @returns A new transaction group instance
|
|
417
|
+
*/
|
|
229
418
|
abstract CreateTransactionGroup(): Promise<TransactionGroupBase>;
|
|
419
|
+
/**
|
|
420
|
+
* Gets the latest metadata timestamps from the remote server.
|
|
421
|
+
* Used to determine if local cache is out of date.
|
|
422
|
+
* @returns Array of metadata timestamp information
|
|
423
|
+
*/
|
|
230
424
|
get LatestRemoteMetadata(): MetadataInfo[];
|
|
425
|
+
/**
|
|
426
|
+
* Gets the latest metadata timestamps from local cache.
|
|
427
|
+
* Used for comparison with remote timestamps.
|
|
428
|
+
* @returns Array of locally cached metadata timestamps
|
|
429
|
+
*/
|
|
231
430
|
get LatestLocalMetadata(): MetadataInfo[];
|
|
431
|
+
/**
|
|
432
|
+
* Retrieves the latest metadata update timestamps from the server.
|
|
433
|
+
* @returns Array of metadata update information
|
|
434
|
+
*/
|
|
232
435
|
protected GetLatestMetadataUpdates(): Promise<MetadataInfo[]>;
|
|
436
|
+
/**
|
|
437
|
+
* Refreshes the remote metadata timestamps from the server.
|
|
438
|
+
* Updates the internal cache of remote timestamps.
|
|
439
|
+
* @returns True if timestamps were successfully refreshed
|
|
440
|
+
*/
|
|
233
441
|
RefreshRemoteMetadataTimestamps(): Promise<boolean>;
|
|
442
|
+
/**
|
|
443
|
+
* Checks if local metadata is obsolete compared to remote metadata.
|
|
444
|
+
* Compares timestamps and row counts to detect changes.
|
|
445
|
+
* @param type - Optional specific metadata type to check
|
|
446
|
+
* @returns True if local metadata is out of date
|
|
447
|
+
*/
|
|
234
448
|
LocalMetadataObsolete(type?: string): boolean;
|
|
449
|
+
/**
|
|
450
|
+
* Updates the local metadata cache with new data.
|
|
451
|
+
* @param res - The new metadata to store locally
|
|
452
|
+
*/
|
|
235
453
|
protected UpdateLocalMetadata(res: AllMetadata): void;
|
|
454
|
+
/**
|
|
455
|
+
* Gets the local storage provider implementation.
|
|
456
|
+
* Must be implemented by subclasses to provide environment-specific storage.
|
|
457
|
+
* @returns Local storage provider instance
|
|
458
|
+
*/
|
|
236
459
|
abstract get LocalStorageProvider(): ILocalStorageProvider;
|
|
460
|
+
/**
|
|
461
|
+
* Loads metadata from local storage if available.
|
|
462
|
+
* Deserializes and reconstructs typed metadata objects.
|
|
463
|
+
*/
|
|
237
464
|
protected LoadLocalMetadataFromStorage(): Promise<void>;
|
|
238
465
|
private static localStorageRootKey;
|
|
239
466
|
private static localStorageTimestampsKey;
|
|
@@ -245,8 +472,21 @@ export declare abstract class ProviderBase implements IMetadataProvider {
|
|
|
245
472
|
* based on the connection or other distinct identifier.
|
|
246
473
|
*/
|
|
247
474
|
protected get LocalStoragePrefix(): string;
|
|
475
|
+
/**
|
|
476
|
+
* Saves current metadata to local storage for caching.
|
|
477
|
+
* Serializes both timestamps and full metadata collections.
|
|
478
|
+
*/
|
|
248
479
|
SaveLocalMetadataToStorage(): Promise<void>;
|
|
480
|
+
/**
|
|
481
|
+
* Removes all cached metadata from local storage.
|
|
482
|
+
* Clears both timestamps and metadata collections.
|
|
483
|
+
*/
|
|
249
484
|
RemoveLocalMetadataFromStorage(): Promise<void>;
|
|
485
|
+
/**
|
|
486
|
+
* Gets the metadata provider instance.
|
|
487
|
+
* Must be implemented by subclasses to provide access to metadata.
|
|
488
|
+
* @returns The metadata provider instance
|
|
489
|
+
*/
|
|
250
490
|
protected abstract get Metadata(): IMetadataProvider;
|
|
251
491
|
}
|
|
252
492
|
//# sourceMappingURL=providerBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerBase.d.ts","sourceRoot":"","sources":["../../src/generic/providerBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7I,OAAO,EAAE,i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