graphlit-client 1.0.20240426001 → 1.0.20240505001

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 CHANGED
@@ -9,9 +9,18 @@ declare class Graphlit {
9
9
  private ownerId;
10
10
  private jwtSecret;
11
11
  constructor(organizationId?: string, environmentId?: string, jwtSecret?: string, ownerId?: string, apiUri?: string);
12
+ refreshClient(): void;
13
+ private generateToken;
14
+ getProject(): Promise<Types.GetProjectQuery>;
15
+ updateProject(project: Types.ProjectUpdateInput): Promise<Types.UpdateProjectMutation>;
16
+ lookupProjectUsage(correlationId: string): Promise<Types.LookupUsageQuery>;
17
+ lookupProjectCredits(correlationId: string): Promise<Types.LookupCreditsQuery>;
18
+ queryProjectUsage(startDate: Types.Scalars['DateTime'], duration: Types.Scalars['TimeSpan']): Promise<Types.QueryUsageQuery>;
19
+ queryProjectCredits(startDate: Types.Scalars['DateTime'], duration: Types.Scalars['TimeSpan']): Promise<Types.QueryCreditsQuery>;
12
20
  createAlert(alert: Types.AlertInput, correlationId?: string): Promise<Types.CreateAlertMutation>;
13
21
  updateAlert(alert: Types.AlertUpdateInput): Promise<Types.UpdateAlertMutation>;
14
22
  deleteAlert(id: string): Promise<Types.DeleteAlertMutation>;
23
+ deleteAlerts(): Promise<Types.DeleteAlertsMutation>;
15
24
  deleteAllAlerts(): Promise<Types.DeleteAllAlertsMutation>;
16
25
  enableAlert(id: string): Promise<Types.EnableAlertMutation>;
17
26
  disableAlert(id: string): Promise<Types.DisableAlertMutation>;
@@ -20,6 +29,8 @@ declare class Graphlit {
20
29
  createCollection(Collection: Types.CollectionInput): Promise<Types.CreateCollectionMutation>;
21
30
  updateCollection(Collection: Types.CollectionUpdateInput): Promise<Types.UpdateCollectionMutation>;
22
31
  deleteCollection(id: string): Promise<Types.DeleteCollectionMutation>;
32
+ deleteCollections(): Promise<Types.DeleteCollectionsMutation>;
33
+ deleteAllCollections(): Promise<Types.DeleteAllCollectionsMutation>;
23
34
  addContentsToCollections(contents: Types.EntityReferenceInput[], collections: Types.EntityReferenceInput[]): Promise<Types.AddContentsToCollectionsMutation>;
24
35
  removeContentsFromCollection(contents: Types.EntityReferenceInput[], collection: Types.EntityReferenceInput): Promise<Types.RemoveContentsFromCollectionMutation>;
25
36
  getCollection(id: string): Promise<Types.GetCollectionQuery>;
@@ -29,15 +40,20 @@ declare class Graphlit {
29
40
  ingestEncodedFile(name: string, data: string, mimeType: string, id?: string, isSynchronous?: boolean, workflow?: Types.EntityReferenceInput, correlationId?: string): Promise<Types.IngestEncodedFileMutation>;
30
41
  updateContent(content: Types.ContentUpdateInput): Promise<Types.UpdateContentMutation>;
31
42
  deleteContent(id: string): Promise<Types.DeleteContentMutation>;
43
+ deleteContents(): Promise<Types.DeleteContentsMutation>;
32
44
  deleteAllContents(): Promise<Types.DeleteAllContentsMutation>;
33
45
  summarizeContents(summarizations: [Types.SummarizationStrategyInput], filter?: Types.ContentFilter, correlationId?: string): Promise<Types.SummarizeContentsMutation>;
34
46
  extractContents(prompt: string, filter?: Types.ContentFilter, specification?: Types.EntityReferenceInput, correlationId?: string): Promise<Types.ExtractContentsMutation>;
35
47
  publishContents(summaryPrompt: string, summarySpecification: Types.EntityReferenceInput, connector: Types.ContentPublishingConnectorInput, publishPrompt?: string, publishSpecification?: Types.EntityReferenceInput, name?: string, filter?: Types.ContentFilter, workflow?: Types.EntityReferenceInput, correlationId?: string): Promise<Types.PublishContentsMutation>;
48
+ publishText(text: string, textType: Types.TextTypes, connector: Types.ContentPublishingConnectorInput, name?: string, workflow?: Types.EntityReferenceInput, correlationId?: string): Promise<Types.PublishTextMutation>;
36
49
  getContent(id: string): Promise<Types.GetContentQuery>;
37
50
  queryContents(filter?: Types.ContentFilter): Promise<Types.QueryContentsQuery>;
51
+ queryContentsFacets(filter?: Types.ContentFilter): Promise<Types.QueryContentsFacetsQuery>;
52
+ queryContentsGraph(filter?: Types.ContentFilter): Promise<Types.QueryContentsGraphQuery>;
38
53
  createConversation(conversation: Types.ConversationInput, correlationId?: string): Promise<Types.CreateConversationMutation>;
39
54
  updateConversation(conversation: Types.ConversationUpdateInput): Promise<Types.UpdateConversationMutation>;
40
55
  deleteConversation(id: string): Promise<Types.DeleteConversationMutation>;
56
+ deleteConversations(): Promise<Types.DeleteConversationsMutation>;
41
57
  deleteAllConversations(): Promise<Types.DeleteAllConversationsMutation>;
42
58
  clearConversation(id: string): Promise<Types.ClearConversationMutation>;
43
59
  closeConversation(id: string): Promise<Types.CloseConversationMutation>;
@@ -49,6 +65,7 @@ declare class Graphlit {
49
65
  createFeed(feed: Types.FeedInput, correlationId?: string): Promise<Types.CreateFeedMutation>;
50
66
  updateFeed(feed: Types.FeedUpdateInput): Promise<Types.UpdateFeedMutation>;
51
67
  deleteFeed(id: string): Promise<Types.DeleteFeedMutation>;
68
+ deleteFeeds(): Promise<Types.DeleteFeedsMutation>;
52
69
  deleteAllFeeds(): Promise<Types.DeleteAllFeedsMutation>;
53
70
  enableFeed(id: string): Promise<Types.EnableFeedMutation>;
54
71
  disableFeed(id: string): Promise<Types.DeleteFeedMutation>;
@@ -58,14 +75,83 @@ declare class Graphlit {
58
75
  createSpecification(specification: Types.SpecificationInput): Promise<Types.CreateSpecificationMutation>;
59
76
  updateSpecification(specification: Types.SpecificationUpdateInput): Promise<Types.UpdateSpecificationMutation>;
60
77
  deleteSpecification(id: string): Promise<Types.DeleteSpecificationMutation>;
78
+ deleteSpecifications(): Promise<Types.DeleteSpecificationsMutation>;
79
+ deleteAllSpecifications(): Promise<Types.DeleteAllSpecificationsMutation>;
61
80
  getSpecification(id: string): Promise<Types.GetSpecificationQuery>;
62
81
  querySpecifications(filter?: Types.SpecificationFilter): Promise<Types.QuerySpecificationsQuery>;
63
82
  createWorkflow(workflow: Types.WorkflowInput): Promise<Types.CreateWorkflowMutation>;
64
83
  updateWorkflow(workflow: Types.WorkflowUpdateInput): Promise<Types.UpdateWorkflowMutation>;
65
84
  deleteWorkflow(id: string): Promise<Types.DeleteWorkflowMutation>;
85
+ deleteWorkflows(): Promise<Types.DeleteWorkflowsMutation>;
66
86
  deleteAllWorkflows(): Promise<Types.DeleteAllWorkflowsMutation>;
67
87
  getWorkflow(id: string): Promise<Types.GetWorkflowQuery>;
68
88
  queryWorkflows(filter?: Types.WorkflowFilter): Promise<Types.QueryWorkflowsQuery>;
89
+ createCategory(category: Types.CategoryInput): Promise<Types.CreateCategoryMutation>;
90
+ updateCategory(category: Types.CategoryUpdateInput): Promise<Types.UpdateCategoryMutation>;
91
+ deleteCategory(id: string): Promise<Types.DeleteCategoryMutation>;
92
+ deleteCategories(): Promise<Types.DeleteCategoriesMutation>;
93
+ deleteAllCategories(): Promise<Types.DeleteAllCategoriesMutation>;
94
+ getCategory(id: string): Promise<Types.GetCategoryQuery>;
95
+ queryCategories(filter?: Types.CategoryFilter): Promise<Types.QueryCategoriesQuery>;
96
+ createLabel(label: Types.LabelInput): Promise<Types.CreateLabelMutation>;
97
+ updateLabel(label: Types.LabelUpdateInput): Promise<Types.UpdateLabelMutation>;
98
+ deleteLabel(id: string): Promise<Types.DeleteLabelMutation>;
99
+ deleteLabels(): Promise<Types.DeleteLabelsMutation>;
100
+ deleteAllLabels(): Promise<Types.DeleteAllLabelsMutation>;
101
+ getLabel(id: string): Promise<Types.GetLabelQuery>;
102
+ queryLabels(filter?: Types.LabelFilter): Promise<Types.QueryLabelsQuery>;
103
+ createPerson(person: Types.PersonInput): Promise<Types.CreatePersonMutation>;
104
+ updatePerson(person: Types.PersonUpdateInput): Promise<Types.UpdatePersonMutation>;
105
+ deletePerson(id: string): Promise<Types.DeletePersonMutation>;
106
+ deletePersons(): Promise<Types.DeletePersonsMutation>;
107
+ deleteAllPersons(): Promise<Types.DeleteAllPersonsMutation>;
108
+ getPerson(id: string): Promise<Types.GetPersonQuery>;
109
+ queryPersons(filter?: Types.PersonFilter): Promise<Types.QueryPersonsQuery>;
110
+ createOrganization(organization: Types.OrganizationInput): Promise<Types.CreateOrganizationMutation>;
111
+ updateOrganization(organization: Types.OrganizationUpdateInput): Promise<Types.UpdateOrganizationMutation>;
112
+ deleteOrganization(id: string): Promise<Types.DeleteOrganizationMutation>;
113
+ deleteOrganizations(): Promise<Types.DeleteOrganizationsMutation>;
114
+ deleteAllOrganizations(): Promise<Types.DeleteAllOrganizationsMutation>;
115
+ getOrganization(id: string): Promise<Types.GetOrganizationQuery>;
116
+ queryOrganizations(filter?: Types.OrganizationFilter): Promise<Types.QueryOrganizationsQuery>;
117
+ createPlace(place: Types.PlaceInput): Promise<Types.CreatePlaceMutation>;
118
+ updatePlace(place: Types.PlaceUpdateInput): Promise<Types.UpdatePlaceMutation>;
119
+ deletePlace(id: string): Promise<Types.DeletePlaceMutation>;
120
+ deletePlaces(): Promise<Types.DeletePlacesMutation>;
121
+ deleteAllPlaces(): Promise<Types.DeleteAllPlacesMutation>;
122
+ getPlace(id: string): Promise<Types.GetPlaceQuery>;
123
+ queryPlaces(filter?: Types.PlaceFilter): Promise<Types.QueryPlacesQuery>;
124
+ createEvent(event: Types.EventInput): Promise<Types.CreateEventMutation>;
125
+ updateEvent(event: Types.EventUpdateInput): Promise<Types.UpdateEventMutation>;
126
+ deleteEvent(id: string): Promise<Types.DeleteEventMutation>;
127
+ deleteEvents(): Promise<Types.DeleteEventsMutation>;
128
+ deleteAllEvents(): Promise<Types.DeleteAllEventsMutation>;
129
+ getEvent(id: string): Promise<Types.GetEventQuery>;
130
+ queryEvents(filter?: Types.EventFilter): Promise<Types.QueryEventsQuery>;
131
+ createProduct(product: Types.ProductInput): Promise<Types.CreateProductMutation>;
132
+ updateProduct(product: Types.ProductUpdateInput): Promise<Types.UpdateProductMutation>;
133
+ deleteProduct(id: string): Promise<Types.DeleteProductMutation>;
134
+ deleteProducts(): Promise<Types.DeleteProductsMutation>;
135
+ deleteAllProducts(): Promise<Types.DeleteAllProductsMutation>;
136
+ getProduct(id: string): Promise<Types.GetProductQuery>;
137
+ queryProducts(filter?: Types.ProductFilter): Promise<Types.QueryProductsQuery>;
138
+ createRepo(repo: Types.RepoInput): Promise<Types.CreateRepoMutation>;
139
+ updateRepo(repo: Types.RepoUpdateInput): Promise<Types.UpdateRepoMutation>;
140
+ deleteRepo(id: string): Promise<Types.DeleteRepoMutation>;
141
+ deleteRepos(): Promise<Types.DeleteReposMutation>;
142
+ deleteAllRepos(): Promise<Types.DeleteAllReposMutation>;
143
+ getRepo(id: string): Promise<Types.GetRepoQuery>;
144
+ queryRepos(filter?: Types.RepoFilter): Promise<Types.QueryReposQuery>;
145
+ createSoftware(software: Types.SoftwareInput): Promise<Types.CreateSoftwareMutation>;
146
+ updateSoftware(software: Types.SoftwareUpdateInput): Promise<Types.UpdateSoftwareMutation>;
147
+ deleteSoftware(id: string): Promise<Types.DeleteSoftwareMutation>;
148
+ deleteSoftwares(): Promise<Types.DeleteSoftwaresMutation>;
149
+ deleteAllSoftwares(): Promise<Types.DeleteAllSoftwaresMutation>;
150
+ getSoftware(id: string): Promise<Types.GetSoftwareQuery>;
151
+ querySoftwares(filter?: Types.SoftwareFilter): Promise<Types.QuerySoftwaresQuery>;
152
+ createObservation(observation: Types.ObservationInput): Promise<Types.CreateObservationMutation>;
153
+ updateObservation(observation: Types.ObservationUpdateInput): Promise<Types.UpdateObservationMutation>;
154
+ deleteObservation(id: string): Promise<Types.DeleteObservationMutation>;
69
155
  private mutateAndCheckError;
70
156
  private queryAndCheckError;
71
157
  }
package/dist/client.js CHANGED
@@ -65,14 +65,11 @@ class Graphlit {
65
65
  if (!this.jwtSecret) {
66
66
  throw new Error("Graphlit environment JWT secret is required.");
67
67
  }
68
- const expiration = Math.floor(Date.now() / 1000) + (60 * 60); // one hour from now
69
- const payload = {
70
- "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" }),
71
- exp: expiration,
72
- iss: "graphlit",
73
- aud: "https://portal.graphlit.io",
74
- };
75
- this.token = jwt.sign(payload, this.jwtSecret, { algorithm: 'HS256' });
68
+ this.refreshClient();
69
+ }
70
+ refreshClient() {
71
+ this.client = undefined;
72
+ this.generateToken();
76
73
  const httpLink = (0, core_1.createHttpLink)({
77
74
  uri: this.apiUri,
78
75
  });
@@ -100,6 +97,49 @@ class Graphlit {
100
97
  }
101
98
  });
102
99
  }
100
+ generateToken() {
101
+ if (!this.jwtSecret) {
102
+ throw new Error("Graphlit environment JWT secret is required.");
103
+ }
104
+ const expiration = Math.floor(Date.now() / 1000) + (24 * 60 * 60); // one day from now
105
+ const payload = {
106
+ "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" }),
107
+ exp: expiration,
108
+ iss: "graphlit",
109
+ aud: "https://portal.graphlit.io",
110
+ };
111
+ this.token = jwt.sign(payload, this.jwtSecret, { algorithm: 'HS256' });
112
+ }
113
+ getProject() {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ return this.queryAndCheckError(Documents.GetProject, {});
116
+ });
117
+ }
118
+ updateProject(project) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ return this.mutateAndCheckError(Documents.UpdateProject, { project: project });
121
+ });
122
+ }
123
+ lookupProjectUsage(correlationId) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ return this.queryAndCheckError(Documents.LookupUsage, { correlationId: correlationId });
126
+ });
127
+ }
128
+ lookupProjectCredits(correlationId) {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ return this.queryAndCheckError(Documents.LookupCredits, { correlationId: correlationId });
131
+ });
132
+ }
133
+ queryProjectUsage(startDate, duration) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ return this.queryAndCheckError(Documents.QueryUsage, { startDate: startDate, duration: duration });
136
+ });
137
+ }
138
+ queryProjectCredits(startDate, duration) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ return this.queryAndCheckError(Documents.QueryCredits, { startDate: startDate, duration: duration });
141
+ });
142
+ }
103
143
  createAlert(alert, correlationId) {
104
144
  return __awaiter(this, void 0, void 0, function* () {
105
145
  return this.mutateAndCheckError(Documents.CreateAlert, { alert: alert, correlationId: correlationId });
@@ -115,6 +155,11 @@ class Graphlit {
115
155
  return this.mutateAndCheckError(Documents.DeleteAlert, { id: id });
116
156
  });
117
157
  }
158
+ deleteAlerts() {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ return this.mutateAndCheckError(Documents.DeleteAlerts);
161
+ });
162
+ }
118
163
  deleteAllAlerts() {
119
164
  return __awaiter(this, void 0, void 0, function* () {
120
165
  return this.mutateAndCheckError(Documents.DeleteAllAlerts);
@@ -155,13 +200,16 @@ class Graphlit {
155
200
  return this.mutateAndCheckError(Documents.DeleteCollection, { id: id });
156
201
  });
157
202
  }
158
- /*
159
- public async deleteAllCollections(): Promise<Types.DeleteAllCollectionsMutation> {
160
- return this.mutateAndCheckError<Types.DeleteAllCollectionsMutation>(
161
- Documents.DeleteAllCollections
162
- );
203
+ deleteCollections() {
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ return this.mutateAndCheckError(Documents.DeleteCollections);
206
+ });
207
+ }
208
+ deleteAllCollections() {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ return this.mutateAndCheckError(Documents.DeleteAllCollections);
211
+ });
163
212
  }
164
- */
165
213
  addContentsToCollections(contents, collections) {
166
214
  return __awaiter(this, void 0, void 0, function* () {
167
215
  return this.mutateAndCheckError(Documents.AddContentsToCollections, { contents: contents, collections: collections });
@@ -207,6 +255,11 @@ class Graphlit {
207
255
  return this.mutateAndCheckError(Documents.DeleteContent, { id: id });
208
256
  });
209
257
  }
258
+ deleteContents() {
259
+ return __awaiter(this, void 0, void 0, function* () {
260
+ return this.mutateAndCheckError(Documents.DeleteContents);
261
+ });
262
+ }
210
263
  deleteAllContents() {
211
264
  return __awaiter(this, void 0, void 0, function* () {
212
265
  return this.mutateAndCheckError(Documents.DeleteAllContents);
@@ -227,6 +280,11 @@ class Graphlit {
227
280
  return this.mutateAndCheckError(Documents.PublishContents, { summaryPrompt: summaryPrompt, summarySpecification: summarySpecification, connector: connector, publishPrompt: publishPrompt, publishSpecification: publishSpecification, name: name, filter: filter, workflow: workflow, correlationId: correlationId });
228
281
  });
229
282
  }
283
+ publishText(text, textType, connector, name, workflow, correlationId) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ return this.mutateAndCheckError(Documents.PublishText, { text: text, textType: textType, connector: connector, name: name, workflow: workflow, correlationId: correlationId });
286
+ });
287
+ }
230
288
  getContent(id) {
231
289
  return __awaiter(this, void 0, void 0, function* () {
232
290
  return this.queryAndCheckError(Documents.GetContent, { id: id });
@@ -237,6 +295,16 @@ class Graphlit {
237
295
  return this.queryAndCheckError(Documents.QueryContents, { filter: filter });
238
296
  });
239
297
  }
298
+ queryContentsFacets(filter) {
299
+ return __awaiter(this, void 0, void 0, function* () {
300
+ return this.queryAndCheckError(Documents.QueryContentsFacets, { filter: filter });
301
+ });
302
+ }
303
+ queryContentsGraph(filter) {
304
+ return __awaiter(this, void 0, void 0, function* () {
305
+ return this.queryAndCheckError(Documents.QueryContentsGraph, { filter: filter });
306
+ });
307
+ }
240
308
  createConversation(conversation, correlationId) {
241
309
  return __awaiter(this, void 0, void 0, function* () {
242
310
  return this.mutateAndCheckError(Documents.CreateConversation, { conversation: conversation, correlationId: correlationId });
@@ -252,6 +320,11 @@ class Graphlit {
252
320
  return this.mutateAndCheckError(Documents.DeleteConversation, { id: id });
253
321
  });
254
322
  }
323
+ deleteConversations() {
324
+ return __awaiter(this, void 0, void 0, function* () {
325
+ return this.mutateAndCheckError(Documents.DeleteConversations);
326
+ });
327
+ }
255
328
  deleteAllConversations() {
256
329
  return __awaiter(this, void 0, void 0, function* () {
257
330
  return this.mutateAndCheckError(Documents.DeleteAllConversations);
@@ -307,6 +380,11 @@ class Graphlit {
307
380
  return this.mutateAndCheckError(Documents.DeleteFeed, { id: id });
308
381
  });
309
382
  }
383
+ deleteFeeds() {
384
+ return __awaiter(this, void 0, void 0, function* () {
385
+ return this.mutateAndCheckError(Documents.DeleteFeeds);
386
+ });
387
+ }
310
388
  deleteAllFeeds() {
311
389
  return __awaiter(this, void 0, void 0, function* () {
312
390
  return this.mutateAndCheckError(Documents.DeleteAllFeeds);
@@ -332,7 +410,6 @@ class Graphlit {
332
410
  return this.queryAndCheckError(Documents.QueryFeeds, { filter: filter });
333
411
  });
334
412
  }
335
- // TODO: project credits, usage, etc.
336
413
  promptSpecifications(prompt, ids) {
337
414
  return __awaiter(this, void 0, void 0, function* () {
338
415
  return this.mutateAndCheckError(Documents.PromptSpecifications, { prompt: prompt, ids: ids });
@@ -353,13 +430,16 @@ class Graphlit {
353
430
  return this.mutateAndCheckError(Documents.DeleteSpecification, { id: id });
354
431
  });
355
432
  }
356
- /*
357
- public async deleteAllSpecifications(): Promise<Types.DeleteAllSpecificationsMutation> {
358
- return this.mutateAndCheckError<Types.DeleteAllSpecificationsMutation>(
359
- Documents.DeleteAllSpecifications
360
- );
433
+ deleteSpecifications() {
434
+ return __awaiter(this, void 0, void 0, function* () {
435
+ return this.mutateAndCheckError(Documents.DeleteSpecifications);
436
+ });
437
+ }
438
+ deleteAllSpecifications() {
439
+ return __awaiter(this, void 0, void 0, function* () {
440
+ return this.mutateAndCheckError(Documents.DeleteAllSpecifications);
441
+ });
361
442
  }
362
- */
363
443
  getSpecification(id) {
364
444
  return __awaiter(this, void 0, void 0, function* () {
365
445
  return this.queryAndCheckError(Documents.GetSpecification, { id: id });
@@ -385,6 +465,11 @@ class Graphlit {
385
465
  return this.mutateAndCheckError(Documents.DeleteWorkflow, { id: id });
386
466
  });
387
467
  }
468
+ deleteWorkflows() {
469
+ return __awaiter(this, void 0, void 0, function* () {
470
+ return this.mutateAndCheckError(Documents.DeleteWorkflows);
471
+ });
472
+ }
388
473
  deleteAllWorkflows() {
389
474
  return __awaiter(this, void 0, void 0, function* () {
390
475
  return this.mutateAndCheckError(Documents.DeleteAllWorkflows);
@@ -400,6 +485,336 @@ class Graphlit {
400
485
  return this.queryAndCheckError(Documents.QueryWorkflows, { filter: filter });
401
486
  });
402
487
  }
488
+ createCategory(category) {
489
+ return __awaiter(this, void 0, void 0, function* () {
490
+ return this.mutateAndCheckError(Documents.CreateCategory, { category: category });
491
+ });
492
+ }
493
+ updateCategory(category) {
494
+ return __awaiter(this, void 0, void 0, function* () {
495
+ return this.mutateAndCheckError(Documents.UpdateCategory, { category: category });
496
+ });
497
+ }
498
+ deleteCategory(id) {
499
+ return __awaiter(this, void 0, void 0, function* () {
500
+ return this.mutateAndCheckError(Documents.DeleteCategory, { id: id });
501
+ });
502
+ }
503
+ deleteCategories() {
504
+ return __awaiter(this, void 0, void 0, function* () {
505
+ return this.mutateAndCheckError(Documents.DeleteCategories);
506
+ });
507
+ }
508
+ deleteAllCategories() {
509
+ return __awaiter(this, void 0, void 0, function* () {
510
+ return this.mutateAndCheckError(Documents.DeleteAllCategories);
511
+ });
512
+ }
513
+ getCategory(id) {
514
+ return __awaiter(this, void 0, void 0, function* () {
515
+ return this.queryAndCheckError(Documents.GetCategory, { id: id });
516
+ });
517
+ }
518
+ queryCategories(filter) {
519
+ return __awaiter(this, void 0, void 0, function* () {
520
+ return this.queryAndCheckError(Documents.QueryCategories, { filter: filter });
521
+ });
522
+ }
523
+ createLabel(label) {
524
+ return __awaiter(this, void 0, void 0, function* () {
525
+ return this.mutateAndCheckError(Documents.CreateLabel, { label: label });
526
+ });
527
+ }
528
+ updateLabel(label) {
529
+ return __awaiter(this, void 0, void 0, function* () {
530
+ return this.mutateAndCheckError(Documents.UpdateLabel, { label: label });
531
+ });
532
+ }
533
+ deleteLabel(id) {
534
+ return __awaiter(this, void 0, void 0, function* () {
535
+ return this.mutateAndCheckError(Documents.DeleteLabel, { id: id });
536
+ });
537
+ }
538
+ deleteLabels() {
539
+ return __awaiter(this, void 0, void 0, function* () {
540
+ return this.mutateAndCheckError(Documents.DeleteLabels);
541
+ });
542
+ }
543
+ deleteAllLabels() {
544
+ return __awaiter(this, void 0, void 0, function* () {
545
+ return this.mutateAndCheckError(Documents.DeleteAllLabels);
546
+ });
547
+ }
548
+ getLabel(id) {
549
+ return __awaiter(this, void 0, void 0, function* () {
550
+ return this.queryAndCheckError(Documents.GetLabel, { id: id });
551
+ });
552
+ }
553
+ queryLabels(filter) {
554
+ return __awaiter(this, void 0, void 0, function* () {
555
+ return this.queryAndCheckError(Documents.QueryLabels, { filter: filter });
556
+ });
557
+ }
558
+ createPerson(person) {
559
+ return __awaiter(this, void 0, void 0, function* () {
560
+ return this.mutateAndCheckError(Documents.CreatePerson, { person: person });
561
+ });
562
+ }
563
+ updatePerson(person) {
564
+ return __awaiter(this, void 0, void 0, function* () {
565
+ return this.mutateAndCheckError(Documents.UpdatePerson, { person: person });
566
+ });
567
+ }
568
+ deletePerson(id) {
569
+ return __awaiter(this, void 0, void 0, function* () {
570
+ return this.mutateAndCheckError(Documents.DeletePerson, { id: id });
571
+ });
572
+ }
573
+ deletePersons() {
574
+ return __awaiter(this, void 0, void 0, function* () {
575
+ return this.mutateAndCheckError(Documents.DeletePersons);
576
+ });
577
+ }
578
+ deleteAllPersons() {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ return this.mutateAndCheckError(Documents.DeleteAllPersons);
581
+ });
582
+ }
583
+ getPerson(id) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ return this.queryAndCheckError(Documents.GetPerson, { id: id });
586
+ });
587
+ }
588
+ queryPersons(filter) {
589
+ return __awaiter(this, void 0, void 0, function* () {
590
+ return this.queryAndCheckError(Documents.QueryPersons, { filter: filter });
591
+ });
592
+ }
593
+ createOrganization(organization) {
594
+ return __awaiter(this, void 0, void 0, function* () {
595
+ return this.mutateAndCheckError(Documents.CreateOrganization, { organization: organization });
596
+ });
597
+ }
598
+ updateOrganization(organization) {
599
+ return __awaiter(this, void 0, void 0, function* () {
600
+ return this.mutateAndCheckError(Documents.UpdateOrganization, { organization: organization });
601
+ });
602
+ }
603
+ deleteOrganization(id) {
604
+ return __awaiter(this, void 0, void 0, function* () {
605
+ return this.mutateAndCheckError(Documents.DeleteOrganization, { id: id });
606
+ });
607
+ }
608
+ deleteOrganizations() {
609
+ return __awaiter(this, void 0, void 0, function* () {
610
+ return this.mutateAndCheckError(Documents.DeleteOrganizations);
611
+ });
612
+ }
613
+ deleteAllOrganizations() {
614
+ return __awaiter(this, void 0, void 0, function* () {
615
+ return this.mutateAndCheckError(Documents.DeleteAllOrganizations);
616
+ });
617
+ }
618
+ getOrganization(id) {
619
+ return __awaiter(this, void 0, void 0, function* () {
620
+ return this.queryAndCheckError(Documents.GetOrganization, { id: id });
621
+ });
622
+ }
623
+ queryOrganizations(filter) {
624
+ return __awaiter(this, void 0, void 0, function* () {
625
+ return this.queryAndCheckError(Documents.QueryOrganizations, { filter: filter });
626
+ });
627
+ }
628
+ createPlace(place) {
629
+ return __awaiter(this, void 0, void 0, function* () {
630
+ return this.mutateAndCheckError(Documents.CreatePlace, { place: place });
631
+ });
632
+ }
633
+ updatePlace(place) {
634
+ return __awaiter(this, void 0, void 0, function* () {
635
+ return this.mutateAndCheckError(Documents.UpdatePlace, { place: place });
636
+ });
637
+ }
638
+ deletePlace(id) {
639
+ return __awaiter(this, void 0, void 0, function* () {
640
+ return this.mutateAndCheckError(Documents.DeletePlace, { id: id });
641
+ });
642
+ }
643
+ deletePlaces() {
644
+ return __awaiter(this, void 0, void 0, function* () {
645
+ return this.mutateAndCheckError(Documents.DeletePlaces);
646
+ });
647
+ }
648
+ deleteAllPlaces() {
649
+ return __awaiter(this, void 0, void 0, function* () {
650
+ return this.mutateAndCheckError(Documents.DeleteAllPlaces);
651
+ });
652
+ }
653
+ getPlace(id) {
654
+ return __awaiter(this, void 0, void 0, function* () {
655
+ return this.queryAndCheckError(Documents.GetPlace, { id: id });
656
+ });
657
+ }
658
+ queryPlaces(filter) {
659
+ return __awaiter(this, void 0, void 0, function* () {
660
+ return this.queryAndCheckError(Documents.QueryPlaces, { filter: filter });
661
+ });
662
+ }
663
+ createEvent(event) {
664
+ return __awaiter(this, void 0, void 0, function* () {
665
+ return this.mutateAndCheckError(Documents.CreateEvent, { event: event });
666
+ });
667
+ }
668
+ updateEvent(event) {
669
+ return __awaiter(this, void 0, void 0, function* () {
670
+ return this.mutateAndCheckError(Documents.UpdateEvent, { event: event });
671
+ });
672
+ }
673
+ deleteEvent(id) {
674
+ return __awaiter(this, void 0, void 0, function* () {
675
+ return this.mutateAndCheckError(Documents.DeleteEvent, { id: id });
676
+ });
677
+ }
678
+ deleteEvents() {
679
+ return __awaiter(this, void 0, void 0, function* () {
680
+ return this.mutateAndCheckError(Documents.DeleteEvents);
681
+ });
682
+ }
683
+ deleteAllEvents() {
684
+ return __awaiter(this, void 0, void 0, function* () {
685
+ return this.mutateAndCheckError(Documents.DeleteAllEvents);
686
+ });
687
+ }
688
+ getEvent(id) {
689
+ return __awaiter(this, void 0, void 0, function* () {
690
+ return this.queryAndCheckError(Documents.GetEvent, { id: id });
691
+ });
692
+ }
693
+ queryEvents(filter) {
694
+ return __awaiter(this, void 0, void 0, function* () {
695
+ return this.queryAndCheckError(Documents.QueryEvents, { filter: filter });
696
+ });
697
+ }
698
+ createProduct(product) {
699
+ return __awaiter(this, void 0, void 0, function* () {
700
+ return this.mutateAndCheckError(Documents.CreateProduct, { product: product });
701
+ });
702
+ }
703
+ updateProduct(product) {
704
+ return __awaiter(this, void 0, void 0, function* () {
705
+ return this.mutateAndCheckError(Documents.UpdateProduct, { product: product });
706
+ });
707
+ }
708
+ deleteProduct(id) {
709
+ return __awaiter(this, void 0, void 0, function* () {
710
+ return this.mutateAndCheckError(Documents.DeleteProduct, { id: id });
711
+ });
712
+ }
713
+ deleteProducts() {
714
+ return __awaiter(this, void 0, void 0, function* () {
715
+ return this.mutateAndCheckError(Documents.DeleteProducts);
716
+ });
717
+ }
718
+ deleteAllProducts() {
719
+ return __awaiter(this, void 0, void 0, function* () {
720
+ return this.mutateAndCheckError(Documents.DeleteAllProducts);
721
+ });
722
+ }
723
+ getProduct(id) {
724
+ return __awaiter(this, void 0, void 0, function* () {
725
+ return this.queryAndCheckError(Documents.GetProduct, { id: id });
726
+ });
727
+ }
728
+ queryProducts(filter) {
729
+ return __awaiter(this, void 0, void 0, function* () {
730
+ return this.queryAndCheckError(Documents.QueryProducts, { filter: filter });
731
+ });
732
+ }
733
+ createRepo(repo) {
734
+ return __awaiter(this, void 0, void 0, function* () {
735
+ return this.mutateAndCheckError(Documents.CreateRepo, { repo: repo });
736
+ });
737
+ }
738
+ updateRepo(repo) {
739
+ return __awaiter(this, void 0, void 0, function* () {
740
+ return this.mutateAndCheckError(Documents.UpdateRepo, { repo: repo });
741
+ });
742
+ }
743
+ deleteRepo(id) {
744
+ return __awaiter(this, void 0, void 0, function* () {
745
+ return this.mutateAndCheckError(Documents.DeleteRepo, { id: id });
746
+ });
747
+ }
748
+ deleteRepos() {
749
+ return __awaiter(this, void 0, void 0, function* () {
750
+ return this.mutateAndCheckError(Documents.DeleteRepos);
751
+ });
752
+ }
753
+ deleteAllRepos() {
754
+ return __awaiter(this, void 0, void 0, function* () {
755
+ return this.mutateAndCheckError(Documents.DeleteAllRepos);
756
+ });
757
+ }
758
+ getRepo(id) {
759
+ return __awaiter(this, void 0, void 0, function* () {
760
+ return this.queryAndCheckError(Documents.GetRepo, { id: id });
761
+ });
762
+ }
763
+ queryRepos(filter) {
764
+ return __awaiter(this, void 0, void 0, function* () {
765
+ return this.queryAndCheckError(Documents.QueryRepos, { filter: filter });
766
+ });
767
+ }
768
+ createSoftware(software) {
769
+ return __awaiter(this, void 0, void 0, function* () {
770
+ return this.mutateAndCheckError(Documents.CreateSoftware, { software: software });
771
+ });
772
+ }
773
+ updateSoftware(software) {
774
+ return __awaiter(this, void 0, void 0, function* () {
775
+ return this.mutateAndCheckError(Documents.UpdateSoftware, { software: software });
776
+ });
777
+ }
778
+ deleteSoftware(id) {
779
+ return __awaiter(this, void 0, void 0, function* () {
780
+ return this.mutateAndCheckError(Documents.DeleteSoftware, { id: id });
781
+ });
782
+ }
783
+ deleteSoftwares() {
784
+ return __awaiter(this, void 0, void 0, function* () {
785
+ return this.mutateAndCheckError(Documents.DeleteSoftwares);
786
+ });
787
+ }
788
+ deleteAllSoftwares() {
789
+ return __awaiter(this, void 0, void 0, function* () {
790
+ return this.mutateAndCheckError(Documents.DeleteAllSoftwares);
791
+ });
792
+ }
793
+ getSoftware(id) {
794
+ return __awaiter(this, void 0, void 0, function* () {
795
+ return this.queryAndCheckError(Documents.GetSoftware, { id: id });
796
+ });
797
+ }
798
+ querySoftwares(filter) {
799
+ return __awaiter(this, void 0, void 0, function* () {
800
+ return this.queryAndCheckError(Documents.QuerySoftwares, { filter: filter });
801
+ });
802
+ }
803
+ createObservation(observation) {
804
+ return __awaiter(this, void 0, void 0, function* () {
805
+ return this.mutateAndCheckError(Documents.CreateObservation, { observation: observation });
806
+ });
807
+ }
808
+ updateObservation(observation) {
809
+ return __awaiter(this, void 0, void 0, function* () {
810
+ return this.mutateAndCheckError(Documents.UpdateObservation, { observation: observation });
811
+ });
812
+ }
813
+ deleteObservation(id) {
814
+ return __awaiter(this, void 0, void 0, function* () {
815
+ return this.mutateAndCheckError(Documents.DeleteObservation, { id: id });
816
+ });
817
+ }
403
818
  // helper functions
404
819
  mutateAndCheckError(mutation, variables) {
405
820
  return __awaiter(this, void 0, void 0, function* () {