graphlit-client 1.0.20250521001 → 1.0.20250527001
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/client.d.ts +45 -45
- package/dist/client.js +498 -106
- package/dist/generated/graphql-types.d.ts +8 -0
- package/dist/generated/graphql-types.js +8 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
@@ -51,9 +51,10 @@ const dotenv = __importStar(require("dotenv"));
|
|
51
51
|
class Graphlit {
|
52
52
|
constructor(organizationId, environmentId, jwtSecret, ownerId, apiUri) {
|
53
53
|
this.apiUri = apiUri || "https://data-scus.graphlit.io/api/v1/graphql";
|
54
|
-
if (typeof process !==
|
54
|
+
if (typeof process !== "undefined") {
|
55
55
|
dotenv.config();
|
56
|
-
this.organizationId =
|
56
|
+
this.organizationId =
|
57
|
+
organizationId || process.env.GRAPHLIT_ORGANIZATION_ID;
|
57
58
|
this.environmentId = environmentId || process.env.GRAPHLIT_ENVIRONMENT_ID;
|
58
59
|
this.jwtSecret = jwtSecret || process.env.GRAPHLIT_JWT_SECRET;
|
59
60
|
// optional: for multi-tenant support
|
@@ -87,7 +88,7 @@ class Graphlit {
|
|
87
88
|
operation.setContext({
|
88
89
|
headers: {
|
89
90
|
Authorization: this.token ? `Bearer ${this.token}` : "",
|
90
|
-
}
|
91
|
+
},
|
91
92
|
});
|
92
93
|
return forward(operation);
|
93
94
|
});
|
@@ -96,32 +97,32 @@ class Graphlit {
|
|
96
97
|
cache: new core_1.InMemoryCache(),
|
97
98
|
defaultOptions: {
|
98
99
|
watchQuery: {
|
99
|
-
errorPolicy:
|
100
|
-
fetchPolicy:
|
100
|
+
errorPolicy: "all",
|
101
|
+
fetchPolicy: "no-cache",
|
101
102
|
},
|
102
103
|
query: {
|
103
|
-
errorPolicy:
|
104
|
-
fetchPolicy:
|
104
|
+
errorPolicy: "all",
|
105
|
+
fetchPolicy: "no-cache",
|
105
106
|
},
|
106
107
|
mutate: {
|
107
|
-
errorPolicy:
|
108
|
-
fetchPolicy:
|
109
|
-
}
|
110
|
-
}
|
108
|
+
errorPolicy: "all",
|
109
|
+
fetchPolicy: "no-cache",
|
110
|
+
},
|
111
|
+
},
|
111
112
|
});
|
112
113
|
}
|
113
114
|
generateToken() {
|
114
115
|
if (!this.jwtSecret) {
|
115
116
|
throw new Error("Graphlit environment JWT secret is required.");
|
116
117
|
}
|
117
|
-
const expiration = Math.floor(Date.now() / 1000) +
|
118
|
+
const expiration = Math.floor(Date.now() / 1000) + 24 * 60 * 60; // one day from now
|
118
119
|
const payload = {
|
119
120
|
"https://graphlit.io/jwt/claims": Object.assign(Object.assign({ "x-graphlit-organization-id": this.organizationId, "x-graphlit-environment-id": this.environmentId }, (this.ownerId && { "x-graphlit-owner-id": this.ownerId })), { "x-graphlit-role": "Owner" }),
|
120
121
|
exp: expiration,
|
121
122
|
iss: "graphlit",
|
122
123
|
aud: "https://portal.graphlit.io",
|
123
124
|
};
|
124
|
-
this.token = jwt.sign(payload, this.jwtSecret, { algorithm:
|
125
|
+
this.token = jwt.sign(payload, this.jwtSecret, { algorithm: "HS256" });
|
125
126
|
}
|
126
127
|
getProject() {
|
127
128
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -150,7 +151,14 @@ class Graphlit {
|
|
150
151
|
}
|
151
152
|
queryProjectUsage(startDate, duration, names, excludedNames, offset, limit) {
|
152
153
|
return __awaiter(this, void 0, void 0, function* () {
|
153
|
-
return this.queryAndCheckError(Documents.QueryUsage, {
|
154
|
+
return this.queryAndCheckError(Documents.QueryUsage, {
|
155
|
+
startDate: startDate,
|
156
|
+
duration: duration,
|
157
|
+
names: names,
|
158
|
+
excludedNames: excludedNames,
|
159
|
+
offset: offset,
|
160
|
+
limit: limit,
|
161
|
+
});
|
154
162
|
});
|
155
163
|
}
|
156
164
|
queryProjectCredits(startDate, duration) {
|
@@ -160,17 +168,31 @@ class Graphlit {
|
|
160
168
|
}
|
161
169
|
sendNotification(connector, text, textType) {
|
162
170
|
return __awaiter(this, void 0, void 0, function* () {
|
163
|
-
return this.mutateAndCheckError(Documents.SendNotification, {
|
171
|
+
return this.mutateAndCheckError(Documents.SendNotification, {
|
172
|
+
connector: connector,
|
173
|
+
text: text,
|
174
|
+
textType: textType,
|
175
|
+
});
|
164
176
|
});
|
165
177
|
}
|
166
178
|
mapWeb(uri, allowedPaths, excludedPaths, correlationId) {
|
167
179
|
return __awaiter(this, void 0, void 0, function* () {
|
168
|
-
return this.queryAndCheckError(Documents.MapWeb, {
|
180
|
+
return this.queryAndCheckError(Documents.MapWeb, {
|
181
|
+
uri: uri,
|
182
|
+
allowedPaths: allowedPaths,
|
183
|
+
excludedPaths: excludedPaths,
|
184
|
+
correlationId: correlationId,
|
185
|
+
});
|
169
186
|
});
|
170
187
|
}
|
171
188
|
searchWeb(text, service, limit, correlationId) {
|
172
189
|
return __awaiter(this, void 0, void 0, function* () {
|
173
|
-
return this.queryAndCheckError(Documents.SearchWeb, {
|
190
|
+
return this.queryAndCheckError(Documents.SearchWeb, {
|
191
|
+
text: text,
|
192
|
+
service: service,
|
193
|
+
limit: limit,
|
194
|
+
correlationId: correlationId,
|
195
|
+
});
|
174
196
|
});
|
175
197
|
}
|
176
198
|
createAlert(alert, correlationId) {
|
@@ -195,7 +217,11 @@ class Graphlit {
|
|
195
217
|
}
|
196
218
|
deleteAllAlerts(filter, isSynchronous, correlationId) {
|
197
219
|
return __awaiter(this, void 0, void 0, function* () {
|
198
|
-
return this.mutateAndCheckError(Documents.DeleteAllAlerts, {
|
220
|
+
return this.mutateAndCheckError(Documents.DeleteAllAlerts, {
|
221
|
+
filter: filter,
|
222
|
+
isSynchronous: isSynchronous,
|
223
|
+
correlationId: correlationId,
|
224
|
+
});
|
199
225
|
});
|
200
226
|
}
|
201
227
|
enableAlert(id) {
|
@@ -245,17 +271,27 @@ class Graphlit {
|
|
245
271
|
}
|
246
272
|
deleteAllCollections(filter, isSynchronous, correlationId) {
|
247
273
|
return __awaiter(this, void 0, void 0, function* () {
|
248
|
-
return this.mutateAndCheckError(Documents.DeleteAllCollections, {
|
274
|
+
return this.mutateAndCheckError(Documents.DeleteAllCollections, {
|
275
|
+
filter: filter,
|
276
|
+
isSynchronous: isSynchronous,
|
277
|
+
correlationId: correlationId,
|
278
|
+
});
|
249
279
|
});
|
250
280
|
}
|
251
281
|
addContentsToCollections(contents, collections) {
|
252
282
|
return __awaiter(this, void 0, void 0, function* () {
|
253
|
-
return this.mutateAndCheckError(Documents.AddContentsToCollections, {
|
283
|
+
return this.mutateAndCheckError(Documents.AddContentsToCollections, {
|
284
|
+
contents: contents,
|
285
|
+
collections: collections,
|
286
|
+
});
|
254
287
|
});
|
255
288
|
}
|
256
289
|
removeContentsFromCollection(contents, collection) {
|
257
290
|
return __awaiter(this, void 0, void 0, function* () {
|
258
|
-
return this.mutateAndCheckError(Documents.RemoveContentsFromCollection, {
|
291
|
+
return this.mutateAndCheckError(Documents.RemoveContentsFromCollection, {
|
292
|
+
contents: contents,
|
293
|
+
collection: collection,
|
294
|
+
});
|
259
295
|
});
|
260
296
|
}
|
261
297
|
getCollection(id) {
|
@@ -275,47 +311,113 @@ class Graphlit {
|
|
275
311
|
}
|
276
312
|
describeImage(prompt, uri, specification, correlationId) {
|
277
313
|
return __awaiter(this, void 0, void 0, function* () {
|
278
|
-
return this.mutateAndCheckError(Documents.DescribeImage, {
|
314
|
+
return this.mutateAndCheckError(Documents.DescribeImage, {
|
315
|
+
prompt: prompt,
|
316
|
+
uri: uri,
|
317
|
+
specification: specification,
|
318
|
+
correlationId: correlationId,
|
319
|
+
});
|
279
320
|
});
|
280
321
|
}
|
281
322
|
describeEncodedImage(prompt, mimeType, data, specification, correlationId) {
|
282
323
|
return __awaiter(this, void 0, void 0, function* () {
|
283
|
-
return this.mutateAndCheckError(Documents.DescribeEncodedImage, {
|
324
|
+
return this.mutateAndCheckError(Documents.DescribeEncodedImage, {
|
325
|
+
prompt: prompt,
|
326
|
+
mimeType: mimeType,
|
327
|
+
data: data,
|
328
|
+
specification: specification,
|
329
|
+
correlationId: correlationId,
|
330
|
+
});
|
284
331
|
});
|
285
332
|
}
|
286
333
|
screenshotPage(uri, maximumHeight, isSynchronous, workflow, collections, correlationId) {
|
287
334
|
return __awaiter(this, void 0, void 0, function* () {
|
288
|
-
return this.mutateAndCheckError(Documents.ScreenshotPage, {
|
335
|
+
return this.mutateAndCheckError(Documents.ScreenshotPage, {
|
336
|
+
uri: uri,
|
337
|
+
maximumHeight: maximumHeight,
|
338
|
+
isSynchronous: isSynchronous,
|
339
|
+
workflow: workflow,
|
340
|
+
collections: collections,
|
341
|
+
correlationId: correlationId,
|
342
|
+
});
|
289
343
|
});
|
290
344
|
}
|
291
345
|
ingestTextBatch(batch, textType, collections, observations, correlationId) {
|
292
346
|
return __awaiter(this, void 0, void 0, function* () {
|
293
|
-
return this.mutateAndCheckError(Documents.IngestTextBatch, {
|
347
|
+
return this.mutateAndCheckError(Documents.IngestTextBatch, {
|
348
|
+
batch: batch,
|
349
|
+
textType: textType,
|
350
|
+
collections: collections,
|
351
|
+
observations: observations,
|
352
|
+
correlationId: correlationId,
|
353
|
+
});
|
294
354
|
});
|
295
355
|
}
|
296
356
|
ingestBatch(uris, workflow, collections, observations, correlationId) {
|
297
357
|
return __awaiter(this, void 0, void 0, function* () {
|
298
|
-
return this.mutateAndCheckError(Documents.IngestBatch, {
|
358
|
+
return this.mutateAndCheckError(Documents.IngestBatch, {
|
359
|
+
uris: uris,
|
360
|
+
workflow: workflow,
|
361
|
+
collections: collections,
|
362
|
+
observations: observations,
|
363
|
+
correlationId: correlationId,
|
364
|
+
});
|
299
365
|
});
|
300
366
|
}
|
301
367
|
ingestUri(uri, name, id, isSynchronous, workflow, collections, observations, correlationId) {
|
302
368
|
return __awaiter(this, void 0, void 0, function* () {
|
303
|
-
return this.mutateAndCheckError(Documents.IngestUri, {
|
369
|
+
return this.mutateAndCheckError(Documents.IngestUri, {
|
370
|
+
uri: uri,
|
371
|
+
name: name,
|
372
|
+
id: id,
|
373
|
+
isSynchronous: isSynchronous,
|
374
|
+
workflow: workflow,
|
375
|
+
collections: collections,
|
376
|
+
observations: observations,
|
377
|
+
correlationId: correlationId,
|
378
|
+
});
|
304
379
|
});
|
305
380
|
}
|
306
381
|
ingestText(text, name, textType, uri, id, isSynchronous, workflow, collections, observations, correlationId) {
|
307
382
|
return __awaiter(this, void 0, void 0, function* () {
|
308
|
-
return this.mutateAndCheckError(Documents.IngestText, {
|
383
|
+
return this.mutateAndCheckError(Documents.IngestText, {
|
384
|
+
name: name,
|
385
|
+
text: text,
|
386
|
+
textType: textType,
|
387
|
+
uri: uri,
|
388
|
+
id: id,
|
389
|
+
isSynchronous: isSynchronous,
|
390
|
+
workflow: workflow,
|
391
|
+
collections: collections,
|
392
|
+
observations: observations,
|
393
|
+
correlationId: correlationId,
|
394
|
+
});
|
309
395
|
});
|
310
396
|
}
|
311
397
|
ingestMemory(text, name, textType, collections, correlationId) {
|
312
398
|
return __awaiter(this, void 0, void 0, function* () {
|
313
|
-
return this.mutateAndCheckError(Documents.IngestMemory, {
|
399
|
+
return this.mutateAndCheckError(Documents.IngestMemory, {
|
400
|
+
name: name,
|
401
|
+
text: text,
|
402
|
+
textType: textType,
|
403
|
+
collections: collections,
|
404
|
+
correlationId: correlationId,
|
405
|
+
});
|
314
406
|
});
|
315
407
|
}
|
316
408
|
ingestEncodedFile(name, data, mimeType, id, isSynchronous, workflow, collections, observations, correlationId) {
|
317
409
|
return __awaiter(this, void 0, void 0, function* () {
|
318
|
-
return this.mutateAndCheckError(Documents.IngestEncodedFile, {
|
410
|
+
return this.mutateAndCheckError(Documents.IngestEncodedFile, {
|
411
|
+
name: name,
|
412
|
+
data: data,
|
413
|
+
mimeType: mimeType,
|
414
|
+
id: id,
|
415
|
+
isSynchronous: isSynchronous,
|
416
|
+
workflow: workflow,
|
417
|
+
collections: collections,
|
418
|
+
observations: observations,
|
419
|
+
correlationId: correlationId,
|
420
|
+
});
|
319
421
|
});
|
320
422
|
}
|
321
423
|
updateContent(content) {
|
@@ -335,37 +437,83 @@ class Graphlit {
|
|
335
437
|
}
|
336
438
|
deleteAllContents(filter, isSynchronous, correlationId) {
|
337
439
|
return __awaiter(this, void 0, void 0, function* () {
|
338
|
-
return this.mutateAndCheckError(Documents.DeleteAllContents, {
|
440
|
+
return this.mutateAndCheckError(Documents.DeleteAllContents, {
|
441
|
+
filter: filter,
|
442
|
+
isSynchronous: isSynchronous,
|
443
|
+
correlationId: correlationId,
|
444
|
+
});
|
339
445
|
});
|
340
446
|
}
|
341
447
|
summarizeText(summarization, text, textType, correlationId) {
|
342
448
|
return __awaiter(this, void 0, void 0, function* () {
|
343
|
-
return this.mutateAndCheckError(Documents.SummarizeText, {
|
449
|
+
return this.mutateAndCheckError(Documents.SummarizeText, {
|
450
|
+
summarization: summarization,
|
451
|
+
text: text,
|
452
|
+
textType: textType,
|
453
|
+
correlationId: correlationId,
|
454
|
+
});
|
344
455
|
});
|
345
456
|
}
|
346
457
|
summarizeContents(summarizations, filter, correlationId) {
|
347
458
|
return __awaiter(this, void 0, void 0, function* () {
|
348
|
-
return this.mutateAndCheckError(Documents.SummarizeContents, {
|
459
|
+
return this.mutateAndCheckError(Documents.SummarizeContents, {
|
460
|
+
summarizations: summarizations,
|
461
|
+
filter: filter,
|
462
|
+
correlationId: correlationId,
|
463
|
+
});
|
349
464
|
});
|
350
465
|
}
|
351
466
|
extractText(prompt, text, tools, specification, textType, correlationId) {
|
352
467
|
return __awaiter(this, void 0, void 0, function* () {
|
353
|
-
return this.mutateAndCheckError(Documents.ExtractText, {
|
468
|
+
return this.mutateAndCheckError(Documents.ExtractText, {
|
469
|
+
prompt: prompt,
|
470
|
+
text: text,
|
471
|
+
textType: textType,
|
472
|
+
specification: specification,
|
473
|
+
tools: tools,
|
474
|
+
correlationId: correlationId,
|
475
|
+
});
|
354
476
|
});
|
355
477
|
}
|
356
478
|
extractContents(prompt, tools, specification, filter, correlationId) {
|
357
479
|
return __awaiter(this, void 0, void 0, function* () {
|
358
|
-
return this.mutateAndCheckError(Documents.ExtractContents, {
|
480
|
+
return this.mutateAndCheckError(Documents.ExtractContents, {
|
481
|
+
prompt: prompt,
|
482
|
+
filter: filter,
|
483
|
+
specification: specification,
|
484
|
+
tools: tools,
|
485
|
+
correlationId: correlationId,
|
486
|
+
});
|
359
487
|
});
|
360
488
|
}
|
361
489
|
publishContents(publishPrompt, connector, summaryPrompt, summarySpecification, publishSpecification, name, filter, workflow, isSynchronous, includeDetails, correlationId) {
|
362
490
|
return __awaiter(this, void 0, void 0, function* () {
|
363
|
-
return this.mutateAndCheckError(Documents.PublishContents, {
|
491
|
+
return this.mutateAndCheckError(Documents.PublishContents, {
|
492
|
+
summaryPrompt: summaryPrompt,
|
493
|
+
summarySpecification: summarySpecification,
|
494
|
+
connector: connector,
|
495
|
+
publishPrompt: publishPrompt,
|
496
|
+
publishSpecification: publishSpecification,
|
497
|
+
name: name,
|
498
|
+
filter: filter,
|
499
|
+
workflow: workflow,
|
500
|
+
isSynchronous: isSynchronous,
|
501
|
+
includeDetails: includeDetails,
|
502
|
+
correlationId: correlationId,
|
503
|
+
});
|
364
504
|
});
|
365
505
|
}
|
366
506
|
publishText(text, textType, connector, name, workflow, isSynchronous, correlationId) {
|
367
507
|
return __awaiter(this, void 0, void 0, function* () {
|
368
|
-
return this.mutateAndCheckError(Documents.PublishText, {
|
508
|
+
return this.mutateAndCheckError(Documents.PublishText, {
|
509
|
+
text: text,
|
510
|
+
textType: textType,
|
511
|
+
connector: connector,
|
512
|
+
name: name,
|
513
|
+
workflow: workflow,
|
514
|
+
isSynchronous: isSynchronous,
|
515
|
+
correlationId: correlationId,
|
516
|
+
});
|
369
517
|
});
|
370
518
|
}
|
371
519
|
getContent(id) {
|
@@ -400,7 +548,10 @@ class Graphlit {
|
|
400
548
|
}
|
401
549
|
createConversation(conversation, correlationId) {
|
402
550
|
return __awaiter(this, void 0, void 0, function* () {
|
403
|
-
return this.mutateAndCheckError(Documents.CreateConversation, {
|
551
|
+
return this.mutateAndCheckError(Documents.CreateConversation, {
|
552
|
+
conversation: conversation,
|
553
|
+
correlationId: correlationId,
|
554
|
+
});
|
404
555
|
});
|
405
556
|
}
|
406
557
|
updateConversation(conversation) {
|
@@ -415,12 +566,19 @@ class Graphlit {
|
|
415
566
|
}
|
416
567
|
deleteConversations(ids, isSynchronous) {
|
417
568
|
return __awaiter(this, void 0, void 0, function* () {
|
418
|
-
return this.mutateAndCheckError(Documents.DeleteConversations, {
|
569
|
+
return this.mutateAndCheckError(Documents.DeleteConversations, {
|
570
|
+
ids: ids,
|
571
|
+
isSynchronous: isSynchronous,
|
572
|
+
});
|
419
573
|
});
|
420
574
|
}
|
421
575
|
deleteAllConversations(filter, isSynchronous, correlationId) {
|
422
576
|
return __awaiter(this, void 0, void 0, function* () {
|
423
|
-
return this.mutateAndCheckError(Documents.DeleteAllConversations, {
|
577
|
+
return this.mutateAndCheckError(Documents.DeleteAllConversations, {
|
578
|
+
filter: filter,
|
579
|
+
isSynchronous: isSynchronous,
|
580
|
+
correlationId: correlationId,
|
581
|
+
});
|
424
582
|
});
|
425
583
|
}
|
426
584
|
clearConversation(id) {
|
@@ -450,77 +608,164 @@ class Graphlit {
|
|
450
608
|
}
|
451
609
|
reviseImage(prompt, uri, id, specification, correlationId) {
|
452
610
|
return __awaiter(this, void 0, void 0, function* () {
|
453
|
-
return this.mutateAndCheckError(Documents.ReviseImage, {
|
611
|
+
return this.mutateAndCheckError(Documents.ReviseImage, {
|
612
|
+
prompt: prompt,
|
613
|
+
uri: uri,
|
614
|
+
id: id,
|
615
|
+
specification: specification,
|
616
|
+
correlationId: correlationId,
|
617
|
+
});
|
454
618
|
});
|
455
619
|
}
|
456
620
|
reviseEncodedImage(prompt, mimeType, data, id, specification, correlationId) {
|
457
621
|
return __awaiter(this, void 0, void 0, function* () {
|
458
|
-
return this.mutateAndCheckError(Documents.ReviseEncodedImage, {
|
622
|
+
return this.mutateAndCheckError(Documents.ReviseEncodedImage, {
|
623
|
+
prompt: prompt,
|
624
|
+
mimeType: mimeType,
|
625
|
+
data: data,
|
626
|
+
id: id,
|
627
|
+
specification: specification,
|
628
|
+
correlationId: correlationId,
|
629
|
+
});
|
459
630
|
});
|
460
631
|
}
|
461
632
|
reviseText(prompt, text, id, specification, correlationId) {
|
462
633
|
return __awaiter(this, void 0, void 0, function* () {
|
463
|
-
return this.mutateAndCheckError(Documents.ReviseText, {
|
634
|
+
return this.mutateAndCheckError(Documents.ReviseText, {
|
635
|
+
prompt: prompt,
|
636
|
+
text: text,
|
637
|
+
id: id,
|
638
|
+
specification: specification,
|
639
|
+
correlationId: correlationId,
|
640
|
+
});
|
464
641
|
});
|
465
642
|
}
|
466
643
|
reviseContent(prompt, content, id, specification, correlationId) {
|
467
644
|
return __awaiter(this, void 0, void 0, function* () {
|
468
|
-
return this.mutateAndCheckError(Documents.ReviseContent, {
|
645
|
+
return this.mutateAndCheckError(Documents.ReviseContent, {
|
646
|
+
prompt: prompt,
|
647
|
+
content: content,
|
648
|
+
id: id,
|
649
|
+
specification: specification,
|
650
|
+
correlationId: correlationId,
|
651
|
+
});
|
469
652
|
});
|
470
653
|
}
|
471
654
|
prompt(prompt, mimeType, data, specification, messages, correlationId) {
|
472
655
|
return __awaiter(this, void 0, void 0, function* () {
|
473
|
-
return this.mutateAndCheckError(Documents.Prompt, {
|
656
|
+
return this.mutateAndCheckError(Documents.Prompt, {
|
657
|
+
prompt: prompt,
|
658
|
+
mimeType: mimeType,
|
659
|
+
data: data,
|
660
|
+
specification: specification,
|
661
|
+
messages: messages,
|
662
|
+
correlationId: correlationId,
|
663
|
+
});
|
474
664
|
});
|
475
665
|
}
|
476
666
|
retrieveSources(prompt, filter, augmentedFilter, retrievalStrategy, rerankingStrategy, correlationId) {
|
477
667
|
return __awaiter(this, void 0, void 0, function* () {
|
478
|
-
return this.mutateAndCheckError(Documents.RetrieveSources, {
|
668
|
+
return this.mutateAndCheckError(Documents.RetrieveSources, {
|
669
|
+
prompt: prompt,
|
670
|
+
filter: filter,
|
671
|
+
augmentedFilter: augmentedFilter,
|
672
|
+
retrievalStrategy: retrievalStrategy,
|
673
|
+
rerankingStrategy: rerankingStrategy,
|
674
|
+
correlationId: correlationId,
|
675
|
+
});
|
479
676
|
});
|
480
677
|
}
|
481
678
|
formatConversation(prompt, id, specification, includeDetails, correlationId) {
|
482
679
|
return __awaiter(this, void 0, void 0, function* () {
|
483
|
-
return this.mutateAndCheckError(Documents.FormatConversation, {
|
680
|
+
return this.mutateAndCheckError(Documents.FormatConversation, {
|
681
|
+
prompt: prompt,
|
682
|
+
id: id,
|
683
|
+
specification: specification,
|
684
|
+
includeDetails: includeDetails,
|
685
|
+
correlationId: correlationId,
|
686
|
+
});
|
484
687
|
});
|
485
688
|
}
|
486
689
|
completeConversation(completion, id, correlationId) {
|
487
690
|
return __awaiter(this, void 0, void 0, function* () {
|
488
|
-
return this.mutateAndCheckError(Documents.CompleteConversation, {
|
691
|
+
return this.mutateAndCheckError(Documents.CompleteConversation, {
|
692
|
+
completion: completion,
|
693
|
+
id: id,
|
694
|
+
correlationId: correlationId,
|
695
|
+
});
|
489
696
|
});
|
490
697
|
}
|
491
698
|
askGraphlit(prompt, type, id, specification, correlationId) {
|
492
699
|
return __awaiter(this, void 0, void 0, function* () {
|
493
|
-
return this.mutateAndCheckError(Documents.AskGraphlit, {
|
700
|
+
return this.mutateAndCheckError(Documents.AskGraphlit, {
|
701
|
+
prompt: prompt,
|
702
|
+
type: type,
|
703
|
+
id: id,
|
704
|
+
specification: specification,
|
705
|
+
correlationId: correlationId,
|
706
|
+
});
|
494
707
|
});
|
495
708
|
}
|
496
709
|
promptConversation(prompt, id, specification, mimeType, data, tools, requireTool, includeDetails, correlationId) {
|
497
710
|
return __awaiter(this, void 0, void 0, function* () {
|
498
|
-
return this.mutateAndCheckError(Documents.PromptConversation, {
|
711
|
+
return this.mutateAndCheckError(Documents.PromptConversation, {
|
712
|
+
prompt: prompt,
|
713
|
+
id: id,
|
714
|
+
specification: specification,
|
715
|
+
mimeType: mimeType,
|
716
|
+
data: data,
|
717
|
+
tools: tools,
|
718
|
+
requireTool: requireTool,
|
719
|
+
includeDetails: includeDetails,
|
720
|
+
correlationId: correlationId,
|
721
|
+
});
|
499
722
|
});
|
500
723
|
}
|
501
724
|
continueConversation(id, responses, correlationId) {
|
502
725
|
return __awaiter(this, void 0, void 0, function* () {
|
503
|
-
return this.mutateAndCheckError(Documents.ContinueConversation, {
|
726
|
+
return this.mutateAndCheckError(Documents.ContinueConversation, {
|
727
|
+
id: id,
|
728
|
+
responses: responses,
|
729
|
+
correlationId: correlationId,
|
730
|
+
});
|
504
731
|
});
|
505
732
|
}
|
506
733
|
publishConversation(id, connector, name, workflow, isSynchronous, correlationId) {
|
507
734
|
return __awaiter(this, void 0, void 0, function* () {
|
508
|
-
return this.mutateAndCheckError(Documents.PublishConversation, {
|
735
|
+
return this.mutateAndCheckError(Documents.PublishConversation, {
|
736
|
+
id: id,
|
737
|
+
connector: connector,
|
738
|
+
name: name,
|
739
|
+
workflow: workflow,
|
740
|
+
isSynchronous: isSynchronous,
|
741
|
+
correlationId: correlationId,
|
742
|
+
});
|
509
743
|
});
|
510
744
|
}
|
511
745
|
suggestConversation(id, count, correlationId) {
|
512
746
|
return __awaiter(this, void 0, void 0, function* () {
|
513
|
-
return this.mutateAndCheckError(Documents.SuggestConversation, {
|
747
|
+
return this.mutateAndCheckError(Documents.SuggestConversation, {
|
748
|
+
id: id,
|
749
|
+
count: count,
|
750
|
+
correlationId: correlationId,
|
751
|
+
});
|
514
752
|
});
|
515
753
|
}
|
516
754
|
queryOneDriveFolders(properties, folderId) {
|
517
755
|
return __awaiter(this, void 0, void 0, function* () {
|
518
|
-
return this.queryAndCheckError(Documents.QueryOneDriveFolders, {
|
756
|
+
return this.queryAndCheckError(Documents.QueryOneDriveFolders, {
|
757
|
+
properties: properties,
|
758
|
+
folderId: folderId,
|
759
|
+
});
|
519
760
|
});
|
520
761
|
}
|
521
762
|
querySharePointFolders(properties, libraryId, folderId) {
|
522
763
|
return __awaiter(this, void 0, void 0, function* () {
|
523
|
-
return this.queryAndCheckError(Documents.QuerySharePointFolders, {
|
764
|
+
return this.queryAndCheckError(Documents.QuerySharePointFolders, {
|
765
|
+
properties: properties,
|
766
|
+
libraryId: libraryId,
|
767
|
+
folderId: folderId,
|
768
|
+
});
|
524
769
|
});
|
525
770
|
}
|
526
771
|
querySharePointLibraries(properties) {
|
@@ -535,7 +780,10 @@ class Graphlit {
|
|
535
780
|
}
|
536
781
|
queryMicrosoftTeamsChannels(properties, teamId) {
|
537
782
|
return __awaiter(this, void 0, void 0, function* () {
|
538
|
-
return this.queryAndCheckError(Documents.QueryMicrosoftTeamsChannels, {
|
783
|
+
return this.queryAndCheckError(Documents.QueryMicrosoftTeamsChannels, {
|
784
|
+
properties: properties,
|
785
|
+
teamId: teamId,
|
786
|
+
});
|
539
787
|
});
|
540
788
|
}
|
541
789
|
querySlackChannels(properties) {
|
@@ -555,7 +803,10 @@ class Graphlit {
|
|
555
803
|
}
|
556
804
|
queryNotionPages(properties, identifier) {
|
557
805
|
return __awaiter(this, void 0, void 0, function* () {
|
558
|
-
return this.queryAndCheckError(Documents.QueryNotionPages, {
|
806
|
+
return this.queryAndCheckError(Documents.QueryNotionPages, {
|
807
|
+
properties: properties,
|
808
|
+
identifier: identifier,
|
809
|
+
});
|
559
810
|
});
|
560
811
|
}
|
561
812
|
createFeed(feed, correlationId) {
|
@@ -580,7 +831,11 @@ class Graphlit {
|
|
580
831
|
}
|
581
832
|
deleteAllFeeds(filter, isSynchronous, correlationId) {
|
582
833
|
return __awaiter(this, void 0, void 0, function* () {
|
583
|
-
return this.mutateAndCheckError(Documents.DeleteAllFeeds, {
|
834
|
+
return this.mutateAndCheckError(Documents.DeleteAllFeeds, {
|
835
|
+
filter: filter,
|
836
|
+
isSynchronous: isSynchronous,
|
837
|
+
correlationId: correlationId,
|
838
|
+
});
|
584
839
|
});
|
585
840
|
}
|
586
841
|
enableFeed(id) {
|
@@ -645,12 +900,19 @@ class Graphlit {
|
|
645
900
|
}
|
646
901
|
deleteSpecifications(ids, isSynchronous) {
|
647
902
|
return __awaiter(this, void 0, void 0, function* () {
|
648
|
-
return this.mutateAndCheckError(Documents.DeleteSpecifications, {
|
903
|
+
return this.mutateAndCheckError(Documents.DeleteSpecifications, {
|
904
|
+
ids: ids,
|
905
|
+
isSynchronous: isSynchronous,
|
906
|
+
});
|
649
907
|
});
|
650
908
|
}
|
651
909
|
deleteAllSpecifications(filter, isSynchronous, correlationId) {
|
652
910
|
return __awaiter(this, void 0, void 0, function* () {
|
653
|
-
return this.mutateAndCheckError(Documents.DeleteAllSpecifications, {
|
911
|
+
return this.mutateAndCheckError(Documents.DeleteAllSpecifications, {
|
912
|
+
filter: filter,
|
913
|
+
isSynchronous: isSynchronous,
|
914
|
+
correlationId: correlationId,
|
915
|
+
});
|
654
916
|
});
|
655
917
|
}
|
656
918
|
getSpecification(id) {
|
@@ -705,7 +967,11 @@ class Graphlit {
|
|
705
967
|
}
|
706
968
|
deleteAllWorkflows(filter, isSynchronous, correlationId) {
|
707
969
|
return __awaiter(this, void 0, void 0, function* () {
|
708
|
-
return this.mutateAndCheckError(Documents.DeleteAllWorkflows, {
|
970
|
+
return this.mutateAndCheckError(Documents.DeleteAllWorkflows, {
|
971
|
+
filter: filter,
|
972
|
+
isSynchronous: isSynchronous,
|
973
|
+
correlationId: correlationId,
|
974
|
+
});
|
709
975
|
});
|
710
976
|
}
|
711
977
|
getWorkflow(id) {
|
@@ -795,7 +1061,11 @@ class Graphlit {
|
|
795
1061
|
}
|
796
1062
|
deleteAllCategories(filter, isSynchronous, correlationId) {
|
797
1063
|
return __awaiter(this, void 0, void 0, function* () {
|
798
|
-
return this.mutateAndCheckError(Documents.DeleteAllCategories, {
|
1064
|
+
return this.mutateAndCheckError(Documents.DeleteAllCategories, {
|
1065
|
+
filter: filter,
|
1066
|
+
isSynchronous: isSynchronous,
|
1067
|
+
correlationId: correlationId,
|
1068
|
+
});
|
799
1069
|
});
|
800
1070
|
}
|
801
1071
|
getCategory(id) {
|
@@ -835,7 +1105,11 @@ class Graphlit {
|
|
835
1105
|
}
|
836
1106
|
deleteAllLabels(filter, isSynchronous, correlationId) {
|
837
1107
|
return __awaiter(this, void 0, void 0, function* () {
|
838
|
-
return this.mutateAndCheckError(Documents.DeleteAllLabels, {
|
1108
|
+
return this.mutateAndCheckError(Documents.DeleteAllLabels, {
|
1109
|
+
filter: filter,
|
1110
|
+
isSynchronous: isSynchronous,
|
1111
|
+
correlationId: correlationId,
|
1112
|
+
});
|
839
1113
|
});
|
840
1114
|
}
|
841
1115
|
getLabel(id) {
|
@@ -870,7 +1144,11 @@ class Graphlit {
|
|
870
1144
|
}
|
871
1145
|
deleteAllPersons(filter, isSynchronous, correlationId) {
|
872
1146
|
return __awaiter(this, void 0, void 0, function* () {
|
873
|
-
return this.mutateAndCheckError(Documents.DeleteAllPersons, {
|
1147
|
+
return this.mutateAndCheckError(Documents.DeleteAllPersons, {
|
1148
|
+
filter: filter,
|
1149
|
+
isSynchronous: isSynchronous,
|
1150
|
+
correlationId: correlationId,
|
1151
|
+
});
|
874
1152
|
});
|
875
1153
|
}
|
876
1154
|
getPerson(id) {
|
@@ -900,12 +1178,19 @@ class Graphlit {
|
|
900
1178
|
}
|
901
1179
|
deleteOrganizations(ids, isSynchronous) {
|
902
1180
|
return __awaiter(this, void 0, void 0, function* () {
|
903
|
-
return this.mutateAndCheckError(Documents.DeleteOrganizations, {
|
1181
|
+
return this.mutateAndCheckError(Documents.DeleteOrganizations, {
|
1182
|
+
ids: ids,
|
1183
|
+
isSynchronous: isSynchronous,
|
1184
|
+
});
|
904
1185
|
});
|
905
1186
|
}
|
906
1187
|
deleteAllOrganizations(filter, isSynchronous, correlationId) {
|
907
1188
|
return __awaiter(this, void 0, void 0, function* () {
|
908
|
-
return this.mutateAndCheckError(Documents.DeleteAllOrganizations, {
|
1189
|
+
return this.mutateAndCheckError(Documents.DeleteAllOrganizations, {
|
1190
|
+
filter: filter,
|
1191
|
+
isSynchronous: isSynchronous,
|
1192
|
+
correlationId: correlationId,
|
1193
|
+
});
|
909
1194
|
});
|
910
1195
|
}
|
911
1196
|
getOrganization(id) {
|
@@ -940,7 +1225,11 @@ class Graphlit {
|
|
940
1225
|
}
|
941
1226
|
deleteAllPlaces(filter, isSynchronous, correlationId) {
|
942
1227
|
return __awaiter(this, void 0, void 0, function* () {
|
943
|
-
return this.mutateAndCheckError(Documents.DeleteAllPlaces, {
|
1228
|
+
return this.mutateAndCheckError(Documents.DeleteAllPlaces, {
|
1229
|
+
filter: filter,
|
1230
|
+
isSynchronous: isSynchronous,
|
1231
|
+
correlationId: correlationId,
|
1232
|
+
});
|
944
1233
|
});
|
945
1234
|
}
|
946
1235
|
getPlace(id) {
|
@@ -975,7 +1264,11 @@ class Graphlit {
|
|
975
1264
|
}
|
976
1265
|
deleteAllEvents(filter, isSynchronous, correlationId) {
|
977
1266
|
return __awaiter(this, void 0, void 0, function* () {
|
978
|
-
return this.mutateAndCheckError(Documents.DeleteAllEvents, {
|
1267
|
+
return this.mutateAndCheckError(Documents.DeleteAllEvents, {
|
1268
|
+
filter: filter,
|
1269
|
+
isSynchronous: isSynchronous,
|
1270
|
+
correlationId: correlationId,
|
1271
|
+
});
|
979
1272
|
});
|
980
1273
|
}
|
981
1274
|
getEvent(id) {
|
@@ -1010,7 +1303,11 @@ class Graphlit {
|
|
1010
1303
|
}
|
1011
1304
|
deleteAllProducts(filter, isSynchronous, correlationId) {
|
1012
1305
|
return __awaiter(this, void 0, void 0, function* () {
|
1013
|
-
return this.mutateAndCheckError(Documents.DeleteAllProducts, {
|
1306
|
+
return this.mutateAndCheckError(Documents.DeleteAllProducts, {
|
1307
|
+
filter: filter,
|
1308
|
+
isSynchronous: isSynchronous,
|
1309
|
+
correlationId: correlationId,
|
1310
|
+
});
|
1014
1311
|
});
|
1015
1312
|
}
|
1016
1313
|
getProduct(id) {
|
@@ -1045,7 +1342,11 @@ class Graphlit {
|
|
1045
1342
|
}
|
1046
1343
|
deleteAllRepos(filter, isSynchronous, correlationId) {
|
1047
1344
|
return __awaiter(this, void 0, void 0, function* () {
|
1048
|
-
return this.mutateAndCheckError(Documents.DeleteAllRepos, {
|
1345
|
+
return this.mutateAndCheckError(Documents.DeleteAllRepos, {
|
1346
|
+
filter: filter,
|
1347
|
+
isSynchronous: isSynchronous,
|
1348
|
+
correlationId: correlationId,
|
1349
|
+
});
|
1049
1350
|
});
|
1050
1351
|
}
|
1051
1352
|
getRepo(id) {
|
@@ -1080,7 +1381,11 @@ class Graphlit {
|
|
1080
1381
|
}
|
1081
1382
|
deleteAllSoftwares(filter, isSynchronous, correlationId) {
|
1082
1383
|
return __awaiter(this, void 0, void 0, function* () {
|
1083
|
-
return this.mutateAndCheckError(Documents.DeleteAllSoftwares, {
|
1384
|
+
return this.mutateAndCheckError(Documents.DeleteAllSoftwares, {
|
1385
|
+
filter: filter,
|
1386
|
+
isSynchronous: isSynchronous,
|
1387
|
+
correlationId: correlationId,
|
1388
|
+
});
|
1084
1389
|
});
|
1085
1390
|
}
|
1086
1391
|
getSoftware(id) {
|
@@ -1110,12 +1415,19 @@ class Graphlit {
|
|
1110
1415
|
}
|
1111
1416
|
deleteMedicalConditions(ids, isSynchronous) {
|
1112
1417
|
return __awaiter(this, void 0, void 0, function* () {
|
1113
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalConditions, {
|
1418
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalConditions, {
|
1419
|
+
ids: ids,
|
1420
|
+
isSynchronous: isSynchronous,
|
1421
|
+
});
|
1114
1422
|
});
|
1115
1423
|
}
|
1116
1424
|
deleteAllMedicalConditions(filter, isSynchronous, correlationId) {
|
1117
1425
|
return __awaiter(this, void 0, void 0, function* () {
|
1118
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalConditions, {
|
1426
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalConditions, {
|
1427
|
+
filter: filter,
|
1428
|
+
isSynchronous: isSynchronous,
|
1429
|
+
correlationId: correlationId,
|
1430
|
+
});
|
1119
1431
|
});
|
1120
1432
|
}
|
1121
1433
|
getMedicalCondition(id) {
|
@@ -1145,12 +1457,19 @@ class Graphlit {
|
|
1145
1457
|
}
|
1146
1458
|
deleteMedicalGuidelines(ids, isSynchronous) {
|
1147
1459
|
return __awaiter(this, void 0, void 0, function* () {
|
1148
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalGuidelines, {
|
1460
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalGuidelines, {
|
1461
|
+
ids: ids,
|
1462
|
+
isSynchronous: isSynchronous,
|
1463
|
+
});
|
1149
1464
|
});
|
1150
1465
|
}
|
1151
1466
|
deleteAllMedicalGuidelines(filter, isSynchronous, correlationId) {
|
1152
1467
|
return __awaiter(this, void 0, void 0, function* () {
|
1153
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalGuidelines, {
|
1468
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalGuidelines, {
|
1469
|
+
filter: filter,
|
1470
|
+
isSynchronous: isSynchronous,
|
1471
|
+
correlationId: correlationId,
|
1472
|
+
});
|
1154
1473
|
});
|
1155
1474
|
}
|
1156
1475
|
getMedicalGuideline(id) {
|
@@ -1185,7 +1504,11 @@ class Graphlit {
|
|
1185
1504
|
}
|
1186
1505
|
deleteAllMedicalDrugs(filter, isSynchronous, correlationId) {
|
1187
1506
|
return __awaiter(this, void 0, void 0, function* () {
|
1188
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalDrugs, {
|
1507
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalDrugs, {
|
1508
|
+
filter: filter,
|
1509
|
+
isSynchronous: isSynchronous,
|
1510
|
+
correlationId: correlationId,
|
1511
|
+
});
|
1189
1512
|
});
|
1190
1513
|
}
|
1191
1514
|
getMedicalDrug(id) {
|
@@ -1200,12 +1523,16 @@ class Graphlit {
|
|
1200
1523
|
}
|
1201
1524
|
createMedicalIndication(MedicalIndication) {
|
1202
1525
|
return __awaiter(this, void 0, void 0, function* () {
|
1203
|
-
return this.mutateAndCheckError(Documents.CreateMedicalIndication, {
|
1526
|
+
return this.mutateAndCheckError(Documents.CreateMedicalIndication, {
|
1527
|
+
MedicalIndication: MedicalIndication,
|
1528
|
+
});
|
1204
1529
|
});
|
1205
1530
|
}
|
1206
1531
|
updateMedicalIndication(MedicalIndication) {
|
1207
1532
|
return __awaiter(this, void 0, void 0, function* () {
|
1208
|
-
return this.mutateAndCheckError(Documents.UpdateMedicalIndication, {
|
1533
|
+
return this.mutateAndCheckError(Documents.UpdateMedicalIndication, {
|
1534
|
+
MedicalIndication: MedicalIndication,
|
1535
|
+
});
|
1209
1536
|
});
|
1210
1537
|
}
|
1211
1538
|
deleteMedicalIndication(id) {
|
@@ -1215,12 +1542,19 @@ class Graphlit {
|
|
1215
1542
|
}
|
1216
1543
|
deleteMedicalIndications(ids, isSynchronous) {
|
1217
1544
|
return __awaiter(this, void 0, void 0, function* () {
|
1218
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalIndications, {
|
1545
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalIndications, {
|
1546
|
+
ids: ids,
|
1547
|
+
isSynchronous: isSynchronous,
|
1548
|
+
});
|
1219
1549
|
});
|
1220
1550
|
}
|
1221
1551
|
deleteAllMedicalIndications(filter, isSynchronous, correlationId) {
|
1222
1552
|
return __awaiter(this, void 0, void 0, function* () {
|
1223
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalIndications, {
|
1553
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalIndications, {
|
1554
|
+
filter: filter,
|
1555
|
+
isSynchronous: isSynchronous,
|
1556
|
+
correlationId: correlationId,
|
1557
|
+
});
|
1224
1558
|
});
|
1225
1559
|
}
|
1226
1560
|
getMedicalIndication(id) {
|
@@ -1235,12 +1569,16 @@ class Graphlit {
|
|
1235
1569
|
}
|
1236
1570
|
createMedicalContraindication(MedicalContraindication) {
|
1237
1571
|
return __awaiter(this, void 0, void 0, function* () {
|
1238
|
-
return this.mutateAndCheckError(Documents.CreateMedicalContraindication, {
|
1572
|
+
return this.mutateAndCheckError(Documents.CreateMedicalContraindication, {
|
1573
|
+
MedicalContraindication: MedicalContraindication,
|
1574
|
+
});
|
1239
1575
|
});
|
1240
1576
|
}
|
1241
1577
|
updateMedicalContraindication(MedicalContraindication) {
|
1242
1578
|
return __awaiter(this, void 0, void 0, function* () {
|
1243
|
-
return this.mutateAndCheckError(Documents.UpdateMedicalContraindication, {
|
1579
|
+
return this.mutateAndCheckError(Documents.UpdateMedicalContraindication, {
|
1580
|
+
MedicalContraindication: MedicalContraindication,
|
1581
|
+
});
|
1244
1582
|
});
|
1245
1583
|
}
|
1246
1584
|
deleteMedicalContraindication(id) {
|
@@ -1250,12 +1588,19 @@ class Graphlit {
|
|
1250
1588
|
}
|
1251
1589
|
deleteMedicalContraindications(ids, isSynchronous) {
|
1252
1590
|
return __awaiter(this, void 0, void 0, function* () {
|
1253
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalContraindications, {
|
1591
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalContraindications, {
|
1592
|
+
ids: ids,
|
1593
|
+
isSynchronous: isSynchronous,
|
1594
|
+
});
|
1254
1595
|
});
|
1255
1596
|
}
|
1256
1597
|
deleteAllMedicalContraindications(filter, isSynchronous, correlationId) {
|
1257
1598
|
return __awaiter(this, void 0, void 0, function* () {
|
1258
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalContraindications, {
|
1599
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalContraindications, {
|
1600
|
+
filter: filter,
|
1601
|
+
isSynchronous: isSynchronous,
|
1602
|
+
correlationId: correlationId,
|
1603
|
+
});
|
1259
1604
|
});
|
1260
1605
|
}
|
1261
1606
|
getMedicalContraindication(id) {
|
@@ -1290,7 +1635,11 @@ class Graphlit {
|
|
1290
1635
|
}
|
1291
1636
|
deleteAllMedicalTests(filter, isSynchronous, correlationId) {
|
1292
1637
|
return __awaiter(this, void 0, void 0, function* () {
|
1293
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalTests, {
|
1638
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalTests, {
|
1639
|
+
filter: filter,
|
1640
|
+
isSynchronous: isSynchronous,
|
1641
|
+
correlationId: correlationId,
|
1642
|
+
});
|
1294
1643
|
});
|
1295
1644
|
}
|
1296
1645
|
getMedicalTest(id) {
|
@@ -1320,12 +1669,19 @@ class Graphlit {
|
|
1320
1669
|
}
|
1321
1670
|
deleteMedicalDevices(ids, isSynchronous) {
|
1322
1671
|
return __awaiter(this, void 0, void 0, function* () {
|
1323
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalDevices, {
|
1672
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalDevices, {
|
1673
|
+
ids: ids,
|
1674
|
+
isSynchronous: isSynchronous,
|
1675
|
+
});
|
1324
1676
|
});
|
1325
1677
|
}
|
1326
1678
|
deleteAllMedicalDevices(filter, isSynchronous, correlationId) {
|
1327
1679
|
return __awaiter(this, void 0, void 0, function* () {
|
1328
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalDevices, {
|
1680
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalDevices, {
|
1681
|
+
filter: filter,
|
1682
|
+
isSynchronous: isSynchronous,
|
1683
|
+
correlationId: correlationId,
|
1684
|
+
});
|
1329
1685
|
});
|
1330
1686
|
}
|
1331
1687
|
getMedicalDevice(id) {
|
@@ -1355,12 +1711,19 @@ class Graphlit {
|
|
1355
1711
|
}
|
1356
1712
|
deleteMedicalProcedures(ids, isSynchronous) {
|
1357
1713
|
return __awaiter(this, void 0, void 0, function* () {
|
1358
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalProcedures, {
|
1714
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalProcedures, {
|
1715
|
+
ids: ids,
|
1716
|
+
isSynchronous: isSynchronous,
|
1717
|
+
});
|
1359
1718
|
});
|
1360
1719
|
}
|
1361
1720
|
deleteAllMedicalProcedures(filter, isSynchronous, correlationId) {
|
1362
1721
|
return __awaiter(this, void 0, void 0, function* () {
|
1363
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalProcedures, {
|
1722
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalProcedures, {
|
1723
|
+
filter: filter,
|
1724
|
+
isSynchronous: isSynchronous,
|
1725
|
+
correlationId: correlationId,
|
1726
|
+
});
|
1364
1727
|
});
|
1365
1728
|
}
|
1366
1729
|
getMedicalProcedure(id) {
|
@@ -1390,12 +1753,19 @@ class Graphlit {
|
|
1390
1753
|
}
|
1391
1754
|
deleteMedicalStudies(ids, isSynchronous) {
|
1392
1755
|
return __awaiter(this, void 0, void 0, function* () {
|
1393
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalStudies, {
|
1756
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalStudies, {
|
1757
|
+
ids: ids,
|
1758
|
+
isSynchronous: isSynchronous,
|
1759
|
+
});
|
1394
1760
|
});
|
1395
1761
|
}
|
1396
1762
|
deleteAllMedicalStudies(filter, isSynchronous, correlationId) {
|
1397
1763
|
return __awaiter(this, void 0, void 0, function* () {
|
1398
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalStudies, {
|
1764
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalStudies, {
|
1765
|
+
filter: filter,
|
1766
|
+
isSynchronous: isSynchronous,
|
1767
|
+
correlationId: correlationId,
|
1768
|
+
});
|
1399
1769
|
});
|
1400
1770
|
}
|
1401
1771
|
getMedicalStudy(id) {
|
@@ -1425,12 +1795,19 @@ class Graphlit {
|
|
1425
1795
|
}
|
1426
1796
|
deleteMedicalDrugClasses(ids, isSynchronous) {
|
1427
1797
|
return __awaiter(this, void 0, void 0, function* () {
|
1428
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalDrugClasses, {
|
1798
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalDrugClasses, {
|
1799
|
+
ids: ids,
|
1800
|
+
isSynchronous: isSynchronous,
|
1801
|
+
});
|
1429
1802
|
});
|
1430
1803
|
}
|
1431
1804
|
deleteAllMedicalDrugClasses(filter, isSynchronous, correlationId) {
|
1432
1805
|
return __awaiter(this, void 0, void 0, function* () {
|
1433
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalDrugClasses, {
|
1806
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalDrugClasses, {
|
1807
|
+
filter: filter,
|
1808
|
+
isSynchronous: isSynchronous,
|
1809
|
+
correlationId: correlationId,
|
1810
|
+
});
|
1434
1811
|
});
|
1435
1812
|
}
|
1436
1813
|
getMedicalDrugClass(id) {
|
@@ -1460,12 +1837,19 @@ class Graphlit {
|
|
1460
1837
|
}
|
1461
1838
|
deleteMedicalTherapies(ids, isSynchronous) {
|
1462
1839
|
return __awaiter(this, void 0, void 0, function* () {
|
1463
|
-
return this.mutateAndCheckError(Documents.DeleteMedicalTherapies, {
|
1840
|
+
return this.mutateAndCheckError(Documents.DeleteMedicalTherapies, {
|
1841
|
+
ids: ids,
|
1842
|
+
isSynchronous: isSynchronous,
|
1843
|
+
});
|
1464
1844
|
});
|
1465
1845
|
}
|
1466
1846
|
deleteAllMedicalTherapies(filter, isSynchronous, correlationId) {
|
1467
1847
|
return __awaiter(this, void 0, void 0, function* () {
|
1468
|
-
return this.mutateAndCheckError(Documents.DeleteAllMedicalTherapies, {
|
1848
|
+
return this.mutateAndCheckError(Documents.DeleteAllMedicalTherapies, {
|
1849
|
+
filter: filter,
|
1850
|
+
isSynchronous: isSynchronous,
|
1851
|
+
correlationId: correlationId,
|
1852
|
+
});
|
1469
1853
|
});
|
1470
1854
|
}
|
1471
1855
|
getMedicalTherapy(id) {
|
@@ -1496,7 +1880,7 @@ class Graphlit {
|
|
1496
1880
|
// helper functions
|
1497
1881
|
prettyPrintGraphQLError(err) {
|
1498
1882
|
if (!err)
|
1499
|
-
return
|
1883
|
+
return "Unknown error";
|
1500
1884
|
const parts = [];
|
1501
1885
|
// Add the base error message
|
1502
1886
|
parts.push(err.message);
|
@@ -1506,9 +1890,9 @@ class Graphlit {
|
|
1506
1890
|
}
|
1507
1891
|
// Add path info if available
|
1508
1892
|
if (err.path) {
|
1509
|
-
parts.push(`\n- Path: ${err.path.join(
|
1893
|
+
parts.push(`\n- Path: ${err.path.join(".")}`);
|
1510
1894
|
}
|
1511
|
-
return parts.join(
|
1895
|
+
return parts.join(" ");
|
1512
1896
|
}
|
1513
1897
|
mutateAndCheckError(mutation, variables) {
|
1514
1898
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -1517,20 +1901,24 @@ class Graphlit {
|
|
1517
1901
|
try {
|
1518
1902
|
const result = yield this.client.mutate({
|
1519
1903
|
mutation,
|
1520
|
-
variables: variables || {}
|
1904
|
+
variables: variables || {},
|
1521
1905
|
});
|
1522
1906
|
if (result.errors) {
|
1523
|
-
const errorMessage = result.errors
|
1907
|
+
const errorMessage = result.errors
|
1908
|
+
.map((err) => this.prettyPrintGraphQLError(err))
|
1909
|
+
.join("\n");
|
1524
1910
|
throw new Error(errorMessage);
|
1525
1911
|
}
|
1526
1912
|
if (!result.data) {
|
1527
|
-
throw new Error(
|
1913
|
+
throw new Error("No data returned from mutation.");
|
1528
1914
|
}
|
1529
1915
|
return result.data;
|
1530
1916
|
}
|
1531
1917
|
catch (error) {
|
1532
1918
|
if (error instanceof core_1.ApolloError && error.graphQLErrors.length > 0) {
|
1533
|
-
const errorMessage = error.graphQLErrors
|
1919
|
+
const errorMessage = error.graphQLErrors
|
1920
|
+
.map((err) => this.prettyPrintGraphQLError(err))
|
1921
|
+
.join("\n");
|
1534
1922
|
console.error(errorMessage);
|
1535
1923
|
throw new Error(errorMessage);
|
1536
1924
|
}
|
@@ -1551,20 +1939,24 @@ class Graphlit {
|
|
1551
1939
|
try {
|
1552
1940
|
const result = yield this.client.query({
|
1553
1941
|
query,
|
1554
|
-
variables: variables || {}
|
1942
|
+
variables: variables || {},
|
1555
1943
|
});
|
1556
1944
|
if (result.errors) {
|
1557
|
-
const errorMessage = result.errors
|
1945
|
+
const errorMessage = result.errors
|
1946
|
+
.map((err) => this.prettyPrintGraphQLError(err))
|
1947
|
+
.join("\n");
|
1558
1948
|
throw new Error(errorMessage);
|
1559
1949
|
}
|
1560
1950
|
if (!result.data) {
|
1561
|
-
throw new Error(
|
1951
|
+
throw new Error("No data returned from query.");
|
1562
1952
|
}
|
1563
1953
|
return result.data;
|
1564
1954
|
}
|
1565
1955
|
catch (error) {
|
1566
1956
|
if (error instanceof core_1.ApolloError && error.graphQLErrors.length > 0) {
|
1567
|
-
const errorMessage = error.graphQLErrors
|
1957
|
+
const errorMessage = error.graphQLErrors
|
1958
|
+
.map((err) => this.prettyPrintGraphQLError(err))
|
1959
|
+
.join("\n");
|
1568
1960
|
console.error(errorMessage);
|
1569
1961
|
throw new Error(errorMessage);
|
1570
1962
|
}
|