@memberjunction/server 1.2.0 → 1.2.1
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/CHANGELOG.json +100 -1
- package/CHANGELOG.md +24 -2
- package/dist/generated/generated.d.ts +289 -2
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1593 -9
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts +3 -0
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +21 -0
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +7 -5
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/package.json +13 -13
- package/src/generated/generated.ts +1215 -8
- package/src/generic/RunViewResolver.ts +21 -0
- package/src/resolvers/AskSkipResolver.ts +7 -5
|
@@ -72,6 +72,13 @@ export class RunViewByIDInput {
|
|
|
72
72
|
})
|
|
73
73
|
IgnoreMaxRows?: boolean;
|
|
74
74
|
|
|
75
|
+
@Field(() => Int, {
|
|
76
|
+
nullable: true,
|
|
77
|
+
description:
|
|
78
|
+
'if a value > 0 is provided, and IgnoreMaxRows is set to false, this value is used for the max rows to be returned by the view.',
|
|
79
|
+
})
|
|
80
|
+
MaxRows?: number
|
|
81
|
+
|
|
75
82
|
@Field(() => Boolean, {
|
|
76
83
|
nullable: true,
|
|
77
84
|
description:
|
|
@@ -147,6 +154,13 @@ export class RunViewByNameInput {
|
|
|
147
154
|
})
|
|
148
155
|
IgnoreMaxRows?: boolean;
|
|
149
156
|
|
|
157
|
+
@Field(() => Int, {
|
|
158
|
+
nullable: true,
|
|
159
|
+
description:
|
|
160
|
+
'if a value > 0 is provided, and IgnoreMaxRows is set to false, this value is used for the max rows to be returned by the view.',
|
|
161
|
+
})
|
|
162
|
+
MaxRows?: number
|
|
163
|
+
|
|
150
164
|
@Field(() => Boolean, {
|
|
151
165
|
nullable: true,
|
|
152
166
|
description:
|
|
@@ -207,6 +221,13 @@ export class RunDynamicViewInput {
|
|
|
207
221
|
})
|
|
208
222
|
IgnoreMaxRows?: boolean;
|
|
209
223
|
|
|
224
|
+
@Field(() => Int, {
|
|
225
|
+
nullable: true,
|
|
226
|
+
description:
|
|
227
|
+
'if a value > 0 is provided, and IgnoreMaxRows is set to false, this value is used for the max rows to be returned by the view.',
|
|
228
|
+
})
|
|
229
|
+
MaxRows?: number
|
|
230
|
+
|
|
210
231
|
@Field(() => Boolean, {
|
|
211
232
|
nullable: true,
|
|
212
233
|
description:
|
|
@@ -99,11 +99,13 @@ export class AskSkipResolver {
|
|
|
99
99
|
dci.RecordID = PrimaryKeys.map((pk) => pk.Value).join(',');
|
|
100
100
|
await dci.Save();
|
|
101
101
|
|
|
102
|
-
await dataContext.Load(dataContext.ID, dataSource, false, true, user); // load again because we added a new data context item
|
|
102
|
+
await dataContext.Load(dataContext.ID, dataSource, false, true, 10, user); // load again because we added a new data context item
|
|
103
|
+
await dataContext.SaveItems(); // persist
|
|
103
104
|
|
|
104
105
|
// also, in the situation for a new convo, we need to update the Conversation ID to have a LinkedEntity and LinkedRecord
|
|
105
106
|
convoEntity.LinkedEntityID = dci.EntityID;
|
|
106
107
|
convoEntity.LinkedRecordID = PrimaryKeys.map((pk) => pk.Value).join(',');
|
|
108
|
+
convoEntity.DataContextID = dataContext.ID;
|
|
107
109
|
await convoEntity.Save();
|
|
108
110
|
}
|
|
109
111
|
|
|
@@ -197,7 +199,7 @@ export class AskSkipResolver {
|
|
|
197
199
|
const user = UserCache.Instance.Users.find((u) => u.Email.trim().toLowerCase() === userPayload.email.trim().toLowerCase());
|
|
198
200
|
if (!user) throw new Error(`User ${userPayload.email} not found in UserCache`);
|
|
199
201
|
const dataContext: DataContext = new DataContext();
|
|
200
|
-
await dataContext.Load(DataContextId, dataSource, true,
|
|
202
|
+
await dataContext.Load(DataContextId, dataSource, true, false, 0, user);
|
|
201
203
|
const input = this.buildSkipAPIRequest([], 0, dataContext, 'run_existing_script', false, false);
|
|
202
204
|
return this.handleSimpleSkipPostRequest(input);
|
|
203
205
|
}
|
|
@@ -426,7 +428,7 @@ export class AskSkipResolver {
|
|
|
426
428
|
await convoDetailEntity.Save();
|
|
427
429
|
|
|
428
430
|
const dataContext = MJGlobal.Instance.ClassFactory.CreateInstance<DataContext>(DataContext); // await this.LoadDataContext(md, dataSource, dataContextEntity, user, false);
|
|
429
|
-
await dataContext.Load(dataContextEntity.ID, dataSource, false,
|
|
431
|
+
await dataContext.Load(dataContextEntity.ID, dataSource, false, false, 0, user);
|
|
430
432
|
return {dataContext, convoEntity, dataContextEntity, convoDetailEntity};
|
|
431
433
|
}
|
|
432
434
|
|
|
@@ -713,7 +715,7 @@ export class AskSkipResolver {
|
|
|
713
715
|
item.Type = 'sql';
|
|
714
716
|
item.SQL = dr.text;
|
|
715
717
|
item.AdditionalDescription = dr.description;
|
|
716
|
-
if (!await item.LoadData(dataSource, false,
|
|
718
|
+
if (!await item.LoadData(dataSource, false, false, 0, user))
|
|
717
719
|
throw new Error(`SQL data request failed: ${item.DataLoadingError}`);
|
|
718
720
|
break;
|
|
719
721
|
case "stored_query":
|
|
@@ -724,7 +726,7 @@ export class AskSkipResolver {
|
|
|
724
726
|
item.QueryID = query.ID;
|
|
725
727
|
item.RecordName = query.Name;
|
|
726
728
|
item.AdditionalDescription = dr.description;
|
|
727
|
-
if (!await item.LoadData(dataSource, false,
|
|
729
|
+
if (!await item.LoadData(dataSource, false, false, 0, user))
|
|
728
730
|
throw new Error(`SQL data request failed: ${item.DataLoadingError}`);
|
|
729
731
|
}
|
|
730
732
|
else
|