@memberjunction/graphql-dataprovider 0.9.46 → 0.9.47

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/config.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { GraphQLDataProvider, GraphQLProviderConfigData } from "./graphQLDataProvider";
2
- export declare function setupGraphQLClient(config: GraphQLProviderConfigData): Promise<GraphQLDataProvider>;
1
+ import { GraphQLDataProvider, GraphQLProviderConfigData } from "./graphQLDataProvider";
2
+ export declare function setupGraphQLClient(config: GraphQLProviderConfigData): Promise<GraphQLDataProvider>;
@@ -1,110 +1,110 @@
1
- /**************************************************************************************************************
2
- * The graphQLDataProvider provides a data provider for the entities framework that uses GraphQL to communicate
3
- * with the server.
4
- * In practice - this FILE will NOT exist in the entities library, we need to move to its own separate project
5
- * so it is only included by the consumer of the entities library if they want to use it.
6
- **************************************************************************************************************/
7
- import { BaseEntity, IEntityDataProvider, IMetadataProvider, IRunViewProvider, ProviderConfigDataBase, RunViewResult, EntityInfo, RunViewParams, ProviderBase, EntityDataProviderType, UserInfo, RecordChange, ILocalStorageProvider, EntitySaveOptions, TransactionGroupBase, DatasetItemFilterType, DatasetResultType, DatasetStatusResultType, EntityRecordNameInput, EntityRecordNameResult, IRunReportProvider, RunReportResult, RunReportParams, RecordDependency, RecordMergeRequest, RecordMergeResult } from "@memberjunction/core";
8
- import { UserViewEntityExtended } from '@memberjunction/core-entities';
9
- import { Observable } from 'rxjs';
10
- export declare class GraphQLProviderConfigData extends ProviderConfigDataBase {
11
- get Token(): string;
12
- get URL(): string;
13
- get WSURL(): string;
14
- /**
15
- * wsurl is the URL to the GraphQL websocket endpoint. This is used for subscriptions, if you are not using subscriptions, pass in a blank string for this
16
- */
17
- constructor(token: string, url: string, wsurl: string, MJCoreSchemaName?: string, includeSchemas?: string[], excludeSchemas?: string[]);
18
- }
19
- export declare class GraphQLDataProvider extends ProviderBase implements IEntityDataProvider, IMetadataProvider, IRunViewProvider, IRunReportProvider {
20
- private _url;
21
- private _token;
22
- private static _client;
23
- private _sessionId;
24
- get ConfigData(): GraphQLProviderConfigData;
25
- GenerateUUID(): string;
26
- Config(configData: GraphQLProviderConfigData): Promise<boolean>;
27
- get sessionId(): string;
28
- protected AllowRefresh(): boolean;
29
- protected GetCurrentUser(): Promise<UserInfo>;
30
- /**************************************************************************/
31
- /**************************************************************************/
32
- RunReport(params: RunReportParams, contextUser?: UserInfo): Promise<RunReportResult>;
33
- /**************************************************************************/
34
- /**************************************************************************/
35
- /**************************************************************************/
36
- /**************************************************************************/
37
- RunView(params: RunViewParams, contextUser?: UserInfo): Promise<RunViewResult>;
38
- protected getEntityNameAndUserView(params: RunViewParams, contextUser?: UserInfo): Promise<{
39
- entityName: string;
40
- v: UserViewEntityExtended;
41
- }>;
42
- protected getViewRunTimeFieldList(e: EntityInfo, v: UserViewEntityExtended, params: RunViewParams, dynamicView: boolean): string[];
43
- /**************************************************************************/
44
- /**************************************************************************/
45
- /**************************************************************************/
46
- /**************************************************************************/
47
- get ProviderType(): EntityDataProviderType;
48
- GetRecordChanges(entityName: string, recordId: number): Promise<RecordChange[]>;
49
- /**
50
- * Returns a list of dependencies - records that are linked to the specified Entity/RecordID combination. A dependency is as defined by the relationships in the database. The MemberJunction metadata that is used
51
- * 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
52
- * 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
53
- * 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.
54
- * @param entityName the name of the entity to check
55
- * @param recordId the recordId to check
56
- */
57
- GetRecordDependencies(entityName: string, recordId: number): Promise<RecordDependency[]>;
58
- MergeRecords(request: RecordMergeRequest): Promise<RecordMergeResult>;
59
- Save(entity: BaseEntity, user: UserInfo, options: EntitySaveOptions): Promise<{}>;
60
- Load(entity: BaseEntity, RecordID: number, EntityRelationshipsToLoad: string[], user: UserInfo): Promise<{}>;
61
- protected getRelatedEntityString(entityInfo: EntityInfo, EntityRelationshipsToLoad: string[]): string;
62
- Delete(entity: BaseEntity, user: UserInfo): Promise<boolean>;
63
- /**************************************************************************/
64
- /**************************************************************************/
65
- /**************************************************************************/
66
- /**************************************************************************/
67
- GetDatasetByName(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<DatasetResultType>;
68
- GetDatasetStatusByName(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<DatasetStatusResultType>;
69
- CreateTransactionGroup(): Promise<TransactionGroupBase>;
70
- GetRecordFavoriteStatus(userId: number, entityName: string, recordId: number): Promise<boolean>;
71
- SetRecordFavoriteStatus(userId: number, entityName: string, recordId: number, isFavorite: boolean, contextUser: UserInfo): Promise<void>;
72
- GetEntityRecordName(entityName: string, recordId: number): Promise<string>;
73
- GetEntityRecordNames(info: EntityRecordNameInput[]): Promise<EntityRecordNameResult[]>;
74
- static ExecuteGQL(query: string, variables: any): Promise<any>;
75
- private _allLatestMetadataUpdatesQuery;
76
- private _innerAllEntitiesQueryString;
77
- private _innerAllEntityFieldsQueryString;
78
- private _innerAllEntityRelationshipsQueryString;
79
- private _innerAllEntityPermissionsQueryString;
80
- private _innerAllApplicationsQueryString;
81
- private _innerCurrentUserQueryString;
82
- private _allApplicationsQuery;
83
- private _innerAllRolesQueryString;
84
- private _innerAllRowLevelSecurityFiltersQueryString;
85
- private _innerAllAuditLogTypesQueryString;
86
- private _innerAllAuthorizationsQueryString;
87
- private _allMetaDataQuery;
88
- private _currentUserQuery;
89
- private roleInfoString;
90
- private userInfoString;
91
- private userRoleInfoString;
92
- private rowLevelSecurityFilterInfoString;
93
- private auditLogTypeInfoString;
94
- private authorizationInfoString;
95
- private applicationInfoString;
96
- private applicationEntityInfoString;
97
- private entityInfoString;
98
- private entityFieldInfoString;
99
- private entityRelationshipInfoString;
100
- private entityPermissionInfoString;
101
- private infoString;
102
- private _localStorageProvider;
103
- get LocalStorageProvider(): ILocalStorageProvider;
104
- /**************************************************************************/
105
- /**************************************************************************/
106
- protected get Metadata(): IMetadataProvider;
107
- private _wsClient;
108
- private _pushStatusRequests;
109
- PushStatusUpdates(sessionId?: string): Observable<string>;
110
- }
1
+ /**************************************************************************************************************
2
+ * The graphQLDataProvider provides a data provider for the entities framework that uses GraphQL to communicate
3
+ * with the server.
4
+ * In practice - this FILE will NOT exist in the entities library, we need to move to its own separate project
5
+ * so it is only included by the consumer of the entities library if they want to use it.
6
+ **************************************************************************************************************/
7
+ import { BaseEntity, IEntityDataProvider, IMetadataProvider, IRunViewProvider, ProviderConfigDataBase, RunViewResult, EntityInfo, RunViewParams, ProviderBase, EntityDataProviderType, UserInfo, RecordChange, ILocalStorageProvider, EntitySaveOptions, TransactionGroupBase, DatasetItemFilterType, DatasetResultType, DatasetStatusResultType, EntityRecordNameInput, EntityRecordNameResult, IRunReportProvider, RunReportResult, RunReportParams, RecordDependency, RecordMergeRequest, RecordMergeResult } from "@memberjunction/core";
8
+ import { UserViewEntityExtended } from '@memberjunction/core-entities';
9
+ import { Observable } from 'rxjs';
10
+ export declare class GraphQLProviderConfigData extends ProviderConfigDataBase {
11
+ get Token(): string;
12
+ get URL(): string;
13
+ get WSURL(): string;
14
+ /**
15
+ * wsurl is the URL to the GraphQL websocket endpoint. This is used for subscriptions, if you are not using subscriptions, pass in a blank string for this
16
+ */
17
+ constructor(token: string, url: string, wsurl: string, MJCoreSchemaName?: string, includeSchemas?: string[], excludeSchemas?: string[]);
18
+ }
19
+ export declare class GraphQLDataProvider extends ProviderBase implements IEntityDataProvider, IMetadataProvider, IRunViewProvider, IRunReportProvider {
20
+ private _url;
21
+ private _token;
22
+ private static _client;
23
+ private _sessionId;
24
+ get ConfigData(): GraphQLProviderConfigData;
25
+ GenerateUUID(): string;
26
+ Config(configData: GraphQLProviderConfigData): Promise<boolean>;
27
+ get sessionId(): string;
28
+ protected AllowRefresh(): boolean;
29
+ protected GetCurrentUser(): Promise<UserInfo>;
30
+ /**************************************************************************/
31
+ /**************************************************************************/
32
+ RunReport(params: RunReportParams, contextUser?: UserInfo): Promise<RunReportResult>;
33
+ /**************************************************************************/
34
+ /**************************************************************************/
35
+ /**************************************************************************/
36
+ /**************************************************************************/
37
+ RunView(params: RunViewParams, contextUser?: UserInfo): Promise<RunViewResult>;
38
+ protected getEntityNameAndUserView(params: RunViewParams, contextUser?: UserInfo): Promise<{
39
+ entityName: string;
40
+ v: UserViewEntityExtended;
41
+ }>;
42
+ protected getViewRunTimeFieldList(e: EntityInfo, v: UserViewEntityExtended, params: RunViewParams, dynamicView: boolean): string[];
43
+ /**************************************************************************/
44
+ /**************************************************************************/
45
+ /**************************************************************************/
46
+ /**************************************************************************/
47
+ get ProviderType(): EntityDataProviderType;
48
+ GetRecordChanges(entityName: string, recordId: number): Promise<RecordChange[]>;
49
+ /**
50
+ * Returns a list of dependencies - records that are linked to the specified Entity/RecordID combination. A dependency is as defined by the relationships in the database. The MemberJunction metadata that is used
51
+ * 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
52
+ * 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
53
+ * 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.
54
+ * @param entityName the name of the entity to check
55
+ * @param recordId the recordId to check
56
+ */
57
+ GetRecordDependencies(entityName: string, recordId: number): Promise<RecordDependency[]>;
58
+ MergeRecords(request: RecordMergeRequest): Promise<RecordMergeResult>;
59
+ Save(entity: BaseEntity, user: UserInfo, options: EntitySaveOptions): Promise<{}>;
60
+ Load(entity: BaseEntity, RecordID: number, EntityRelationshipsToLoad: string[], user: UserInfo): Promise<{}>;
61
+ protected getRelatedEntityString(entityInfo: EntityInfo, EntityRelationshipsToLoad: string[]): string;
62
+ Delete(entity: BaseEntity, user: UserInfo): Promise<boolean>;
63
+ /**************************************************************************/
64
+ /**************************************************************************/
65
+ /**************************************************************************/
66
+ /**************************************************************************/
67
+ GetDatasetByName(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<DatasetResultType>;
68
+ GetDatasetStatusByName(datasetName: string, itemFilters?: DatasetItemFilterType[]): Promise<DatasetStatusResultType>;
69
+ CreateTransactionGroup(): Promise<TransactionGroupBase>;
70
+ GetRecordFavoriteStatus(userId: number, entityName: string, recordId: number): Promise<boolean>;
71
+ SetRecordFavoriteStatus(userId: number, entityName: string, recordId: number, isFavorite: boolean, contextUser: UserInfo): Promise<void>;
72
+ GetEntityRecordName(entityName: string, recordId: number): Promise<string>;
73
+ GetEntityRecordNames(info: EntityRecordNameInput[]): Promise<EntityRecordNameResult[]>;
74
+ static ExecuteGQL(query: string, variables: any): Promise<any>;
75
+ private _allLatestMetadataUpdatesQuery;
76
+ private _innerAllEntitiesQueryString;
77
+ private _innerAllEntityFieldsQueryString;
78
+ private _innerAllEntityRelationshipsQueryString;
79
+ private _innerAllEntityPermissionsQueryString;
80
+ private _innerAllApplicationsQueryString;
81
+ private _innerCurrentUserQueryString;
82
+ private _allApplicationsQuery;
83
+ private _innerAllRolesQueryString;
84
+ private _innerAllRowLevelSecurityFiltersQueryString;
85
+ private _innerAllAuditLogTypesQueryString;
86
+ private _innerAllAuthorizationsQueryString;
87
+ private _allMetaDataQuery;
88
+ private _currentUserQuery;
89
+ private roleInfoString;
90
+ private userInfoString;
91
+ private userRoleInfoString;
92
+ private rowLevelSecurityFilterInfoString;
93
+ private auditLogTypeInfoString;
94
+ private authorizationInfoString;
95
+ private applicationInfoString;
96
+ private applicationEntityInfoString;
97
+ private entityInfoString;
98
+ private entityFieldInfoString;
99
+ private entityRelationshipInfoString;
100
+ private entityPermissionInfoString;
101
+ private infoString;
102
+ private _localStorageProvider;
103
+ get LocalStorageProvider(): ILocalStorageProvider;
104
+ /**************************************************************************/
105
+ /**************************************************************************/
106
+ protected get Metadata(): IMetadataProvider;
107
+ private _wsClient;
108
+ private _pushStatusRequests;
109
+ PushStatusUpdates(sessionId?: string): Observable<string>;
110
+ }
@@ -1,4 +1,4 @@
1
- import { TransactionGroupBase, TransactionItem, TransactionResult } from "@memberjunction/core";
2
- export declare class GraphQLTransactionGroup extends TransactionGroupBase {
3
- protected HandleSubmit(items: TransactionItem[]): Promise<TransactionResult[]>;
4
- }
1
+ import { TransactionGroupBase, TransactionItem, TransactionResult } from "@memberjunction/core";
2
+ export declare class GraphQLTransactionGroup extends TransactionGroupBase {
3
+ protected HandleSubmit(items: TransactionItem[]): Promise<TransactionResult[]>;
4
+ }
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { setupGraphQLClient } from "./config";
2
- export { GraphQLDataProvider, GraphQLProviderConfigData } from "./graphQLDataProvider";
1
+ export { setupGraphQLClient } from "./config";
2
+ export { GraphQLDataProvider, GraphQLProviderConfigData } from "./graphQLDataProvider";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/graphql-dataprovider",
3
- "version": "0.9.46",
3
+ "version": "0.9.47",
4
4
  "description": "MemberJunction: GraphQL Client Data Provider",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,9 +24,9 @@
24
24
  "webpack-cli": "^5.1.4"
25
25
  },
26
26
  "dependencies": {
27
- "@memberjunction/core": "^0.9.50",
28
- "@memberjunction/core-entities": "^0.9.24",
29
- "@memberjunction/global": "^0.9.52",
27
+ "@memberjunction/core": "^0.9.52",
28
+ "@memberjunction/core-entities": "^0.9.25",
29
+ "@memberjunction/global": "^0.9.55",
30
30
  "graphql": "^16.6.0",
31
31
  "graphql-request": "^5.2.0",
32
32
  "graphql-ws": "^5.14.0",