@memberjunction/global 2.112.0 → 2.113.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/package.json +1 -1
- package/dist/Core.d.ts +0 -29
- package/dist/Core.d.ts.map +0 -1
- package/dist/Core.js +0 -58
- package/dist/Core.js.map +0 -1
- package/dist/generic/QueryCache.d.ts +0 -85
- package/dist/generic/QueryCache.d.ts.map +0 -1
- package/dist/generic/QueryCache.js +0 -198
- package/dist/generic/QueryCache.js.map +0 -1
- package/dist/generic/QueryCacheConfig.d.ts +0 -72
- package/dist/generic/QueryCacheConfig.d.ts.map +0 -1
- package/dist/generic/QueryCacheConfig.js +0 -3
- package/dist/generic/QueryCacheConfig.js.map +0 -1
- package/dist/generic/applicationInfo.d.ts +0 -138
- package/dist/generic/applicationInfo.d.ts.map +0 -1
- package/dist/generic/applicationInfo.js +0 -177
- package/dist/generic/applicationInfo.js.map +0 -1
- package/dist/generic/authEvaluator.d.ts +0 -25
- package/dist/generic/authEvaluator.d.ts.map +0 -1
- package/dist/generic/authEvaluator.js +0 -49
- package/dist/generic/authEvaluator.js.map +0 -1
- package/dist/generic/authTypes.d.ts +0 -193
- package/dist/generic/authTypes.d.ts.map +0 -1
- package/dist/generic/authTypes.js +0 -19
- package/dist/generic/authTypes.js.map +0 -1
- package/dist/generic/baseEngine.d.ts +0 -260
- package/dist/generic/baseEngine.d.ts.map +0 -1
- package/dist/generic/baseEngine.js +0 -510
- package/dist/generic/baseEngine.js.map +0 -1
- package/dist/generic/baseEntity.d.ts +0 -691
- package/dist/generic/baseEntity.d.ts.map +0 -1
- package/dist/generic/baseEntity.js +0 -1688
- package/dist/generic/baseEntity.js.map +0 -1
- package/dist/generic/baseInfo.d.ts +0 -24
- package/dist/generic/baseInfo.d.ts.map +0 -1
- package/dist/generic/baseInfo.js +0 -53
- package/dist/generic/baseInfo.js.map +0 -1
- package/dist/generic/compositeKey.d.ts +0 -206
- package/dist/generic/compositeKey.d.ts.map +0 -1
- package/dist/generic/compositeKey.js +0 -412
- package/dist/generic/compositeKey.js.map +0 -1
- package/dist/generic/databaseProviderBase.d.ts +0 -46
- package/dist/generic/databaseProviderBase.d.ts.map +0 -1
- package/dist/generic/databaseProviderBase.js +0 -14
- package/dist/generic/databaseProviderBase.js.map +0 -1
- package/dist/generic/entityInfo.d.ts +0 -983
- package/dist/generic/entityInfo.d.ts.map +0 -1
- package/dist/generic/entityInfo.js +0 -1401
- package/dist/generic/entityInfo.js.map +0 -1
- package/dist/generic/explorerNavigationItem.d.ts +0 -20
- package/dist/generic/explorerNavigationItem.d.ts.map +0 -1
- package/dist/generic/explorerNavigationItem.js +0 -29
- package/dist/generic/explorerNavigationItem.js.map +0 -1
- package/dist/generic/interfaces.d.ts +0 -610
- package/dist/generic/interfaces.d.ts.map +0 -1
- package/dist/generic/interfaces.js +0 -211
- package/dist/generic/interfaces.js.map +0 -1
- package/dist/generic/libraryInfo.d.ts +0 -40
- package/dist/generic/libraryInfo.d.ts.map +0 -1
- package/dist/generic/libraryInfo.js +0 -56
- package/dist/generic/libraryInfo.js.map +0 -1
- package/dist/generic/logging.d.ts +0 -179
- package/dist/generic/logging.d.ts.map +0 -1
- package/dist/generic/logging.js +0 -382
- package/dist/generic/logging.js.map +0 -1
- package/dist/generic/metadata.d.ts +0 -305
- package/dist/generic/metadata.d.ts.map +0 -1
- package/dist/generic/metadata.js +0 -454
- package/dist/generic/metadata.js.map +0 -1
- package/dist/generic/metadataUtil.d.ts +0 -8
- package/dist/generic/metadataUtil.d.ts.map +0 -1
- package/dist/generic/metadataUtil.js +0 -36
- package/dist/generic/metadataUtil.js.map +0 -1
- package/dist/generic/providerBase.d.ts +0 -546
- package/dist/generic/providerBase.d.ts.map +0 -1
- package/dist/generic/providerBase.js +0 -999
- package/dist/generic/providerBase.js.map +0 -1
- package/dist/generic/queryInfo.d.ts +0 -460
- package/dist/generic/queryInfo.d.ts.map +0 -1
- package/dist/generic/queryInfo.js +0 -633
- package/dist/generic/queryInfo.js.map +0 -1
- package/dist/generic/querySQLFilters.d.ts +0 -54
- package/dist/generic/querySQLFilters.d.ts.map +0 -1
- package/dist/generic/querySQLFilters.js +0 -84
- package/dist/generic/querySQLFilters.js.map +0 -1
- package/dist/generic/runQuery.d.ts +0 -96
- package/dist/generic/runQuery.d.ts.map +0 -1
- package/dist/generic/runQuery.js +0 -66
- package/dist/generic/runQuery.js.map +0 -1
- package/dist/generic/runQuerySQLFilterImplementations.d.ts +0 -51
- package/dist/generic/runQuerySQLFilterImplementations.d.ts.map +0 -1
- package/dist/generic/runQuerySQLFilterImplementations.js +0 -238
- package/dist/generic/runQuerySQLFilterImplementations.js.map +0 -1
- package/dist/generic/runReport.d.ts +0 -25
- package/dist/generic/runReport.d.ts.map +0 -1
- package/dist/generic/runReport.js +0 -42
- package/dist/generic/runReport.js.map +0 -1
- package/dist/generic/securityInfo.d.ts +0 -355
- package/dist/generic/securityInfo.d.ts.map +0 -1
- package/dist/generic/securityInfo.js +0 -425
- package/dist/generic/securityInfo.js.map +0 -1
- package/dist/generic/transactionGroup.d.ts +0 -184
- package/dist/generic/transactionGroup.d.ts.map +0 -1
- package/dist/generic/transactionGroup.js +0 -357
- package/dist/generic/transactionGroup.js.map +0 -1
- package/dist/generic/util.d.ts +0 -81
- package/dist/generic/util.d.ts.map +0 -1
- package/dist/generic/util.js +0 -301
- package/dist/generic/util.js.map +0 -1
- package/dist/views/runView.d.ts +0 -150
- package/dist/views/runView.d.ts.map +0 -1
- package/dist/views/runView.js +0 -100
- package/dist/views/runView.js.map +0 -1
- package/dist/views/viewInfo.d.ts +0 -121
- package/dist/views/viewInfo.d.ts.map +0 -1
- package/dist/views/viewInfo.js +0 -182
- package/dist/views/viewInfo.js.map +0 -1
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { DatasetItemFilterType, DatasetResultType, DatasetStatusResultType, EntityRecordNameInput, EntityRecordNameResult, EntityMergeOptions, ILocalStorageProvider, IMetadataProvider, PotentialDuplicateRequest, PotentialDuplicateResponse, ProviderConfigDataBase, ProviderType } from './interfaces';
|
|
2
|
-
import { EntityDependency, EntityInfo, RecordDependency, RecordMergeRequest, RecordMergeResult } from './entityInfo';
|
|
3
|
-
import { ApplicationInfo } from './applicationInfo';
|
|
4
|
-
import { BaseEntity } from './baseEntity';
|
|
5
|
-
import { AuditLogTypeInfo, AuthorizationInfo, RoleInfo, UserInfo } from './securityInfo';
|
|
6
|
-
import { TransactionGroupBase } from './transactionGroup';
|
|
7
|
-
import { QueryCategoryInfo, QueryFieldInfo, QueryInfo, QueryPermissionInfo } from './queryInfo';
|
|
8
|
-
import { LibraryInfo } from './libraryInfo';
|
|
9
|
-
import { CompositeKey } from './compositeKey';
|
|
10
|
-
import { ExplorerNavigationItem } from './explorerNavigationItem';
|
|
11
|
-
/**
|
|
12
|
-
* Class used to access a wide array of MemberJunction metadata, to instantiate derived classes of BaseEntity for record access and manipulation and more. This class uses a provider model where different providers transparently plug-in to implement the functionality needed based on where the code is running. The provider in use is generally not of any importance to users of the class and code can be written indepdenent of tier/provider.
|
|
13
|
-
*/
|
|
14
|
-
export declare class Metadata {
|
|
15
|
-
private static _globalProviderKey;
|
|
16
|
-
/**
|
|
17
|
-
* When an application initializes, the Provider package that is being used for that application will handle setting the provider globally via this static property.
|
|
18
|
-
* This is done so that the provider can be accessed from anywhere in the application without having to pass it around. This pattern is used sparingly in MJ.
|
|
19
|
-
*/
|
|
20
|
-
static get Provider(): IMetadataProvider;
|
|
21
|
-
static set Provider(value: IMetadataProvider);
|
|
22
|
-
/**
|
|
23
|
-
* Forces a refresh of all cached metadata.
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
Refresh(providerToUse?: IMetadataProvider): Promise<boolean>;
|
|
27
|
-
get ProviderType(): ProviderType;
|
|
28
|
-
get Applications(): ApplicationInfo[];
|
|
29
|
-
get Entities(): EntityInfo[];
|
|
30
|
-
/**
|
|
31
|
-
* Helper method to find an entity by name in a case insensitive manner.
|
|
32
|
-
* @param entityName
|
|
33
|
-
*/
|
|
34
|
-
EntityByName(entityName: string): EntityInfo;
|
|
35
|
-
/**
|
|
36
|
-
* Helper method to find an entity by ID
|
|
37
|
-
* @param entityID
|
|
38
|
-
* @returns
|
|
39
|
-
*/
|
|
40
|
-
EntityByID(entityID: string): EntityInfo;
|
|
41
|
-
get Queries(): QueryInfo[];
|
|
42
|
-
get QueryFields(): QueryFieldInfo[];
|
|
43
|
-
get QueryCategories(): QueryCategoryInfo[];
|
|
44
|
-
get QueryPermissions(): QueryPermissionInfo[];
|
|
45
|
-
/**
|
|
46
|
-
* Returns the current user, if known. In some execution environments, mainly on server tiers like in a node.js environment, there won't be a "current user" known to Metadata since the Metadata instance is shared across all requests. In this situation you should determine the current user from the server context where you get the user payload and find the user from the UserCache.
|
|
47
|
-
*/
|
|
48
|
-
get CurrentUser(): UserInfo;
|
|
49
|
-
get Roles(): RoleInfo[];
|
|
50
|
-
get AuditLogTypes(): AuditLogTypeInfo[];
|
|
51
|
-
get Authorizations(): AuthorizationInfo[];
|
|
52
|
-
get Libraries(): LibraryInfo[];
|
|
53
|
-
/**
|
|
54
|
-
* Returns all of the ExplorerNavigationItems that are visible to the user, sorted by Sequence. Filtered by the IsActive bit.
|
|
55
|
-
*/
|
|
56
|
-
get VisibleExplorerNavigationItems(): ExplorerNavigationItem[];
|
|
57
|
-
/**
|
|
58
|
-
* Returns all of the ExplorerNavigationItems, including those that are not visible. This is useful for admin tools and other places where you need to see all of the navigation items, not just the ones that are visible to the user.
|
|
59
|
-
*/
|
|
60
|
-
get AllExplorerNavigationItems(): ExplorerNavigationItem[];
|
|
61
|
-
/**
|
|
62
|
-
* Helper function to return an Entity Name from a given Entity ID.
|
|
63
|
-
* @param entityName
|
|
64
|
-
* @returns
|
|
65
|
-
*/
|
|
66
|
-
EntityIDFromName(entityName: string): string;
|
|
67
|
-
/**
|
|
68
|
-
* Helper function to return an Entity Name from an Entity ID
|
|
69
|
-
* @param entityID
|
|
70
|
-
* @returns
|
|
71
|
-
*/
|
|
72
|
-
EntityNameFromID(entityID: string): string;
|
|
73
|
-
/**
|
|
74
|
-
* Helper function to return an EntityInfo from an Entity ID
|
|
75
|
-
* @param entityID
|
|
76
|
-
*/
|
|
77
|
-
EntityFromEntityID(entityID: string): EntityInfo | null;
|
|
78
|
-
/**
|
|
79
|
-
* Returns true if the combination of userId/entityName/KeyValuePairs has a favorite status on (meaning the user has marked the record as a "favorite" for easy access)
|
|
80
|
-
* @param userId
|
|
81
|
-
* @param entityName
|
|
82
|
-
* @param primaryKey
|
|
83
|
-
* @returns
|
|
84
|
-
*/
|
|
85
|
-
GetRecordFavoriteStatus(userId: string, entityName: string, primaryKey: CompositeKey, contextUser?: UserInfo): Promise<boolean>;
|
|
86
|
-
/**
|
|
87
|
-
* Returns an array of records representing the list of changes made to a record. This functionality only works
|
|
88
|
-
* if an entity has TrackRecordChanges = 1, which is the default for most entities. If TrackRecordChanges = 0, this method will return an empty array.
|
|
89
|
-
*
|
|
90
|
-
* This method is defined in the @memberjunction/global package, which is lower level in the dependency
|
|
91
|
-
* hierarchy than the @memberjunction/core-entities package where the RecordChangeEntity class is defined.
|
|
92
|
-
* For this reason, we are not using the RecordChangeEntity class here, but rather returning a generic type T.
|
|
93
|
-
* When you call this method, you can specify the type T to be the RecordChangeEntity class or any other class that matches the structure of the record changes.
|
|
94
|
-
* For example:
|
|
95
|
-
* ```typescript
|
|
96
|
-
* const md = new Metadata();
|
|
97
|
-
* const changes: RecordChangeEntity[] = await md.GetRecordChanges<RecordChangeEntity>('MyEntity', myPrimaryKey);
|
|
98
|
-
* ```
|
|
99
|
-
* @param entityName
|
|
100
|
-
* @param primaryKey
|
|
101
|
-
* @param contextUser
|
|
102
|
-
* @returns
|
|
103
|
-
*/
|
|
104
|
-
GetRecordChanges<T>(entityName: string, primaryKey: CompositeKey, contextUser?: UserInfo): Promise<Array<T>>;
|
|
105
|
-
/**
|
|
106
|
-
* Sets the favorite status for a given user for a specific entityName/KeyValuePairs
|
|
107
|
-
* @param userId
|
|
108
|
-
* @param entityName
|
|
109
|
-
* @param primaryKey
|
|
110
|
-
* @param isFavorite
|
|
111
|
-
* @param contextUser
|
|
112
|
-
*/
|
|
113
|
-
SetRecordFavoriteStatus(userId: string, entityName: string, primaryKey: CompositeKey, isFavorite: boolean, contextUser?: UserInfo): Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* Returns a list of dependencies - records that are linked to the specified Entity/Primary Key Value combination. A dependency is as defined by the relationships in the database. The MemberJunction metadata that is used
|
|
116
|
-
* for this simply reflects the foreign key relationships that exist in the database. The CodeGen tool is what detects all of the relationships and generates the metadata that is used by MemberJunction. The metadata in question
|
|
117
|
-
* is within the EntityField table and specifically the RelatedEntity and RelatedEntityField columns. In turn, this method uses that metadata and queries the database to determine the dependencies. To get the list of entity dependencies
|
|
118
|
-
* you can use the utility method GetEntityDependencies(), which doesn't check for dependencies on a specific record, but rather gets the metadata in one shot that can be used for dependency checking.
|
|
119
|
-
* @param entityName the name of the entity to check
|
|
120
|
-
* @param primaryKey the primary key value to check
|
|
121
|
-
*/
|
|
122
|
-
GetRecordDependencies(entityName: string, primaryKey: CompositeKey): Promise<RecordDependency[]>;
|
|
123
|
-
/**
|
|
124
|
-
* Returns a list of record IDs that are possible duplicates of the specified record.
|
|
125
|
-
*
|
|
126
|
-
* @param params object containing many properties used in fetching records and determining which ones to return
|
|
127
|
-
*/
|
|
128
|
-
GetRecordDuplicates(params: PotentialDuplicateRequest, contextUser?: UserInfo): Promise<PotentialDuplicateResponse>;
|
|
129
|
-
/**
|
|
130
|
-
* Returns a list of entity dependencies, basically metadata that tells you the links to this entity from all other entities.
|
|
131
|
-
* @param entityName
|
|
132
|
-
* @returns
|
|
133
|
-
*/
|
|
134
|
-
GetEntityDependencies(entityName: string): Promise<EntityDependency[]>;
|
|
135
|
-
/**
|
|
136
|
-
* This method will merge two or more records based on the request provided. The RecordMergeRequest type you pass in specifies the record that will survive the merge, the records to merge into the surviving record, and an optional field map that can update values in the surviving record, if desired. The process followed is:
|
|
137
|
-
* 1. The surviving record is loaded and fields are updated from the field map, if provided, and the record is saved. If a FieldMap not provided within the request object, this step is skipped.
|
|
138
|
-
* 2. For each of the records that will be merged INTO the surviving record, we call the GetEntityDependencies() method and get a list of all other records in the database are linked to the record to be deleted. We then go through each of those dependencies and update the link to point to the SurvivingRecordKeyValuePair and save the record.
|
|
139
|
-
* 3. The record to be deleted is then deleted.
|
|
140
|
-
*
|
|
141
|
-
* The return value from this method contains detailed information about the execution of the process. In addition, all attempted merges are logged in the RecordMergeLog and RecordMergeDeletionLog tables.
|
|
142
|
-
*
|
|
143
|
-
* IMPORTANT NOTE: This functionality ASSUMES that you are calling BEGIN TRANS and COMMIT TRANS/ROLLBACK TRANS outside of the work being done inside if you are on the database server side (not on the client side). The reason is that many API servers that use this object infrastructure have transaction wrappers for each individual API request
|
|
144
|
-
* so we are not doing BEGIN/COMMIT/ROLLBACK within this functionality. If you are using this on the client side, you don't need to do anything extra, the server side, however, must wrap this with begin/commit/rollback statements to the database server.
|
|
145
|
-
* If you're using MJAPI/MJServer this is done for you automatically.
|
|
146
|
-
*
|
|
147
|
-
* @param request
|
|
148
|
-
* @returns
|
|
149
|
-
*/
|
|
150
|
-
MergeRecords(request: RecordMergeRequest, contextUser?: UserInfo, options?: EntityMergeOptions): Promise<RecordMergeResult>;
|
|
151
|
-
/**
|
|
152
|
-
* Creates a new instance of a BaseEntity subclass for the specified entity and automatically calls NewRecord() to initialize it.
|
|
153
|
-
* This method uses the MJGlobal ClassFactory to instantiate the correct subclass based on registered entity types.
|
|
154
|
-
* For entities with non-auto-increment uniqueidentifier primary keys, a UUID will be automatically generated.
|
|
155
|
-
*
|
|
156
|
-
* @param entityName - The name of the entity to create (e.g., "Users", "Customers", "Orders")
|
|
157
|
-
* @param contextUser - Optional user context for server-side operations. Client-side code can typically omit this.
|
|
158
|
-
* Can be a UserInfo instance or an object with matching shape (ID, Name, Email, UserRoles)
|
|
159
|
-
* @returns Promise resolving to a strongly-typed entity instance ready for data entry
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* // Create a new customer record
|
|
163
|
-
* const customer = await metadata.GetEntityObject<CustomerEntity>('Customers');
|
|
164
|
-
* customer.Name = 'Acme Corp';
|
|
165
|
-
* await customer.Save();
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* // Server-side with context user
|
|
169
|
-
* const order = await metadata.GetEntityObject<OrderEntity>('Orders', contextUser);
|
|
170
|
-
* order.CustomerID = customerId;
|
|
171
|
-
* await order.Save();
|
|
172
|
-
*/
|
|
173
|
-
GetEntityObject<T extends BaseEntity>(entityName: string, contextUser?: UserInfo): Promise<T>;
|
|
174
|
-
/**
|
|
175
|
-
* Creates a new instance of a BaseEntity subclass and loads an existing record using the provided composite key.
|
|
176
|
-
* This overload combines entity instantiation with record loading in a single call for convenience.
|
|
177
|
-
*
|
|
178
|
-
* @param entityName - The name of the entity to create (e.g., "Users", "Customers", "Orders")
|
|
179
|
-
* @param loadKey - CompositeKey containing the primary key value(s) to load. Use static helper methods:
|
|
180
|
-
* - CompositeKey.FromID(id) for single "ID" primary keys
|
|
181
|
-
* - CompositeKey.FromKeyValuePair(field, value) for single named primary keys
|
|
182
|
-
* - CompositeKey.FromKeyValuePairs([...]) for composite primary keys
|
|
183
|
-
* @param contextUser - Optional user context for server-side operations
|
|
184
|
-
* @returns Promise resolving to the entity instance with the specified record loaded
|
|
185
|
-
* @throws Error if the entity name is invalid or the record cannot be found
|
|
186
|
-
*
|
|
187
|
-
* @example
|
|
188
|
-
* // Load by ID (most common case)
|
|
189
|
-
* const customer = await metadata.GetEntityObject<CustomerEntity>('Customers', CompositeKey.FromID(customerId));
|
|
190
|
-
*
|
|
191
|
-
* @example
|
|
192
|
-
* // Load by named field
|
|
193
|
-
* const user = await metadata.GetEntityObject<UserEntity>('Users', CompositeKey.FromKeyValuePair('Email', 'user@example.com'));
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* // Load with composite key
|
|
197
|
-
* const orderItem = await metadata.GetEntityObject<OrderItemEntity>('OrderItems',
|
|
198
|
-
* CompositeKey.FromKeyValuePairs([
|
|
199
|
-
* { FieldName: 'OrderID', Value: orderId },
|
|
200
|
-
* { FieldName: 'ProductID', Value: productId }
|
|
201
|
-
* ])
|
|
202
|
-
* );
|
|
203
|
-
*/
|
|
204
|
-
GetEntityObject<T extends BaseEntity>(entityName: string, loadKey: CompositeKey, contextUser?: UserInfo): Promise<T>;
|
|
205
|
-
/**
|
|
206
|
-
* Returns the Name of the specific KeyValuePairs for a given entityName. This is done by
|
|
207
|
-
* looking for the IsNameField within the EntityFields collection for a given entity.
|
|
208
|
-
* If no IsNameField is found, but a field called "Name" exists, that value is returned. Otherwise null returned
|
|
209
|
-
* @param entityName
|
|
210
|
-
* @param primaryKey
|
|
211
|
-
* @returns the name of the record
|
|
212
|
-
*/
|
|
213
|
-
GetEntityRecordName(entityName: string, primaryKey: CompositeKey, contextUser?: UserInfo): Promise<string>;
|
|
214
|
-
/**
|
|
215
|
-
* Returns one or more record names using the same logic as GetEntityRecordName, but for multiple records at once - more efficient to use this method if you need to get multiple record names at once
|
|
216
|
-
* @param info
|
|
217
|
-
* @returns an array of EntityRecordNameResult objects
|
|
218
|
-
*/
|
|
219
|
-
GetEntityRecordNames(info: EntityRecordNameInput[], contextUser?: UserInfo): Promise<EntityRecordNameResult[]>;
|
|
220
|
-
/**
|
|
221
|
-
* Creates a new TransactionGroup which can be used to bundle multiple database changes for BaseEntity derived classes to be processed as a single database transaction
|
|
222
|
-
* @returns
|
|
223
|
-
*/
|
|
224
|
-
CreateTransactionGroup(): Promise<TransactionGroupBase>;
|
|
225
|
-
/**
|
|
226
|
-
* Saves all the in-memory metadata to be updated in the local persistent storage method (which varies by provider). This generally shouldn't need to be called externally but is available to force an update to local storage as desired.
|
|
227
|
-
*/
|
|
228
|
-
SaveLocalMetadataToStorage(): Promise<void>;
|
|
229
|
-
/**
|
|
230
|
-
* Removes all the metadata from the local persistent storage method (which varies by provider). This generally shouldn't need to be called externally but is available to force an complete removal of local metadata in storage.
|
|
231
|
-
* NOTE: this does not remove Datasets, for removing datasets, use ClearDatasetCache()
|
|
232
|
-
*/
|
|
233
|
-
RemoveLocalMetadataFromStorage(): Promise<void>;
|
|
234
|
-
/**
|
|
235
|
-
* Returns the local storage provider. This is used to store metadata locally on the client.
|
|
236
|
-
* @returns - the local storage provider
|
|
237
|
-
* @remarks - Use this for storing any type of data on the client. The Provider implements the storage mechanism which is persistent whenever possible, but in some cases purely in memory if local persistence is not available. Keep in mind that you must ensure that keys are unique so prefix all of your keys with something unique to avoid collisions.
|
|
238
|
-
*/
|
|
239
|
-
get LocalStorageProvider(): ILocalStorageProvider;
|
|
240
|
-
/**
|
|
241
|
-
* Retrieves the date status information for a dataset and all its items from the server. This method will match the datasetName and itemFilters to the server's dataset and item filters to determine a match
|
|
242
|
-
* @param datasetName
|
|
243
|
-
* @param itemFilters
|
|
244
|
-
*/
|
|
245
|
-
GetDatasetStatusByName(datasetName: string, itemFilters?: DatasetItemFilterType[], contextUser?: UserInfo, providerToUse?: IMetadataProvider): Promise<DatasetStatusResultType>;
|
|
246
|
-
/**
|
|
247
|
-
* Always retrieves data from the server - this method does NOT check cache. To use cached local values if available, call GetAndCacheDatasetByName() instead
|
|
248
|
-
* @param datasetName
|
|
249
|
-
* @param itemFilters
|
|
250
|
-
*/
|
|
251
|
-
GetDatasetByName(datasetName: string, itemFilters?: DatasetItemFilterType[], contextUser?: UserInfo, providerToUse?: IMetadataProvider): Promise<DatasetResultType>;
|
|
252
|
-
/**
|
|
253
|
-
* Gets a dataset by name, if required, and caches it in a format available to the client (e.g. IndexedDB, LocalStorage, File, etc). The cache method is Provider specific
|
|
254
|
-
* If itemFilters are provided, the combination of datasetName and the filters are used to determine a match in the cache
|
|
255
|
-
* @param datasetName
|
|
256
|
-
* @param itemFilters
|
|
257
|
-
*/
|
|
258
|
-
GetAndCacheDatasetByName(datasetName: string, itemFilters?: DatasetItemFilterType[], contextUser?: UserInfo): Promise<DatasetResultType>;
|
|
259
|
-
/**
|
|
260
|
-
* This routine checks to see if the local cache version of a given datasetName/itemFilters combination is up to date with the server or not
|
|
261
|
-
* @param datasetName
|
|
262
|
-
* @param itemFilters
|
|
263
|
-
* @returns
|
|
264
|
-
*/
|
|
265
|
-
IsDatasetCacheUpToDate(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<boolean>;
|
|
266
|
-
/**
|
|
267
|
-
* This routine gets the local cached version of a given datasetName/itemFilters combination, it does NOT check the server status first.
|
|
268
|
-
* @param datasetName
|
|
269
|
-
* @param itemFilters
|
|
270
|
-
* @returns
|
|
271
|
-
*/
|
|
272
|
-
GetCachedDataset(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<DatasetResultType>;
|
|
273
|
-
/**
|
|
274
|
-
* Stores a dataset in the local cache. If itemFilters are provided, the combination of datasetName and the filters are used to build a key and determine a match in the cache
|
|
275
|
-
* @param datasetName
|
|
276
|
-
* @param itemFilters
|
|
277
|
-
* @param dataset
|
|
278
|
-
*/
|
|
279
|
-
CacheDataset(datasetName: string, itemFilters: DatasetItemFilterType[], dataset: DatasetResultType): Promise<void>;
|
|
280
|
-
/**
|
|
281
|
-
* Determines if a given datasetName/itemFilters combination is cached locally or not
|
|
282
|
-
* @param datasetName
|
|
283
|
-
* @param itemFilters
|
|
284
|
-
* @returns
|
|
285
|
-
*/
|
|
286
|
-
IsDatasetCached(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<boolean>;
|
|
287
|
-
/**
|
|
288
|
-
* Creates a key for the given datasetName and itemFilters combination
|
|
289
|
-
* @param datasetName
|
|
290
|
-
* @param itemFilters
|
|
291
|
-
* @returns
|
|
292
|
-
*/
|
|
293
|
-
GetDatasetCacheKey(datasetName: string, itemFilters?: DatasetItemFilterType[]): string;
|
|
294
|
-
/**
|
|
295
|
-
* 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
|
|
296
|
-
* @param datasetName
|
|
297
|
-
* @param itemFilters
|
|
298
|
-
*/
|
|
299
|
-
ClearDatasetCache(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<void>;
|
|
300
|
-
/**
|
|
301
|
-
* Provides access the configuration object that was initially provided to configure the provider
|
|
302
|
-
*/
|
|
303
|
-
get ConfigData(): ProviderConfigDataBase;
|
|
304
|
-
}
|
|
305
|
-
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/generic/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,YAAY,EACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;GAEG;AAC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