graphlit-client 1.0.20240418020 → 1.0.20240418022

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
@@ -3,70 +3,70 @@ import * as Types from './generated/graphql-types';
3
3
  declare class Graphlit {
4
4
  client: ApolloClient<NormalizedCacheObject> | undefined;
5
5
  token: string | undefined;
6
+ correlationId: string | undefined;
6
7
  private apiUri;
7
8
  private organizationId;
8
9
  private environmentId;
9
10
  private ownerId;
10
11
  private jwtSecret;
11
- private correlationId;
12
12
  constructor(organizationId?: string, environmentId?: string, jwtSecret?: string, ownerId?: string, apiUri?: string, correlationId?: string);
13
- createAlert(alert: Types.AlertInput): Promise<Types.Alert>;
14
- updateAlert(alert: Types.AlertUpdateInput): Promise<Types.Alert>;
15
- deleteAlert(id: string): Promise<Types.Alert>;
16
- deleteAllAlerts(): Promise<void>;
17
- enableAlert(id: string): Promise<Types.Alert>;
18
- disableAlert(id: string): Promise<Types.Alert>;
19
- getAlert(id: string): Promise<Types.Alert>;
20
- queryAlerts(filter: Types.AlertFilter): Promise<Types.AlertResults>;
21
- createCollection(Collection: Types.CollectionInput): Promise<Types.Collection>;
22
- updateCollection(Collection: Types.CollectionUpdateInput): Promise<Types.Collection>;
23
- deleteCollection(id: string): Promise<Types.Collection>;
24
- addContentsToCollections(contents: Types.EntityReferenceInput[], collections: Types.EntityReferenceInput[]): Promise<Types.Collection[]>;
25
- removeContentsFromCollection(contents: Types.EntityReferenceInput[], collection: Types.EntityReferenceInput): Promise<Types.Collection>;
26
- getCollection(id: string): Promise<Types.Collection>;
27
- queryCollections(filter: Types.CollectionFilter): Promise<Types.CollectionResults>;
28
- ingestUri(uri: string, name?: string, id?: string, isSynchronous?: boolean, workflow?: Types.EntityReferenceInput): Promise<Types.Content>;
29
- ingestText(name: string, text: string, textType?: Types.TextTypes, uri?: string, id?: string, isSynchronous?: boolean, workflow?: Types.EntityReferenceInput): Promise<Types.Content>;
30
- ingestEncodedFile(name: string, data: string, mimeType: string, id?: string, isSynchronous?: boolean, workflow?: Types.EntityReferenceInput): Promise<Types.Content>;
31
- updateContent(content: Types.ContentUpdateInput): Promise<Types.Content>;
32
- deleteContent(id: string): Promise<Types.Content>;
33
- deleteAllContents(): Promise<void>;
34
- summarizeContents(summarizations: [Types.SummarizationStrategyInput], filter?: Types.ContentFilter): Promise<Types.PromptSummarization[]>;
35
- extractContents(prompt: string, filter?: Types.ContentFilter, specification?: Types.EntityReferenceInput): Promise<Types.ExtractCompletion[]>;
36
- publishContents(summaryPrompt: string, summarySpecification: Types.EntityReferenceInput, connector: Types.ContentPublishingConnectorInput, publishPrompt?: string, publishSpecification?: Types.EntityReferenceInput, name?: string, filter?: Types.ContentFilter, workflow?: Types.EntityReferenceInput): Promise<Types.Content>;
37
- getContent(id: string): Promise<Types.Content>;
38
- queryContents(filter: Types.ContentFilter): Promise<Types.ContentResults>;
39
- createConversation(conversation: Types.ConversationInput): Promise<Types.Conversation>;
40
- updateConversation(conversation: Types.ConversationUpdateInput): Promise<Types.Conversation>;
41
- deleteConversation(id: string): Promise<Types.Conversation>;
42
- deleteAllConversations(): Promise<void>;
43
- clearConversation(id: string): Promise<Types.Conversation>;
44
- closeConversation(id: string): Promise<Types.Conversation>;
45
- getConversation(id: string): Promise<Types.Conversation>;
46
- queryConversations(filter: Types.ConversationFilter): Promise<Types.ConversationResults>;
47
- promptConversation(prompt: string, id?: string): Promise<Types.PromptConversation>;
48
- publishConversation(id: string, connector: Types.ContentPublishingConnectorInput, name?: string, workflow?: Types.EntityReferenceInput): Promise<Types.Content>;
49
- suggestConversation(id: string, count?: number): Promise<Types.PromptSuggestion>;
50
- createFeed(feed: Types.FeedInput): Promise<Types.Feed>;
51
- updateFeed(feed: Types.FeedUpdateInput): Promise<Types.Feed>;
52
- deleteFeed(id: string): Promise<Types.Feed>;
53
- deleteAllFeeds(): Promise<void>;
54
- enableFeed(id: string): Promise<Types.Feed>;
55
- disableFeed(id: string): Promise<Types.Feed>;
56
- getFeed(id: string): Promise<Types.Feed>;
57
- queryFeeds(filter: Types.FeedFilter): Promise<Types.FeedResults>;
58
- promptSpecifications(prompt: string, ids: [string]): Promise<Types.PromptCompletion[]>;
59
- createSpecification(specification: Types.SpecificationInput): Promise<Types.Specification>;
60
- updateSpecification(specification: Types.SpecificationUpdateInput): Promise<Types.Specification>;
61
- deleteSpecification(id: string): Promise<Types.Specification>;
62
- getSpecification(id: string): Promise<Types.Specification>;
63
- querySpecifications(filter: Types.SpecificationFilter): Promise<Types.SpecificationResults>;
64
- createWorkflow(workflow: Types.WorkflowInput): Promise<Types.Workflow>;
65
- updateWorkflow(workflow: Types.WorkflowUpdateInput): Promise<Types.Workflow>;
66
- deleteWorkflow(id: string): Promise<Types.Workflow>;
67
- deleteAllWorkflows(): Promise<void>;
68
- getWorkflow(id: string): Promise<Types.Workflow>;
69
- queryWorkflows(filter: Types.WorkflowFilter): Promise<Types.WorkflowResults>;
13
+ createAlert(alert: Types.AlertInput): Promise<Types.CreateAlertMutation>;
14
+ updateAlert(alert: Types.AlertUpdateInput): Promise<Types.UpdateAlertMutation>;
15
+ deleteAlert(id: string): Promise<Types.DeleteAlertMutation>;
16
+ deleteAllAlerts(): Promise<Types.DeleteAllAlertsMutation>;
17
+ enableAlert(id: string): Promise<Types.EnableAlertMutation>;
18
+ disableAlert(id: string): Promise<Types.DisableAlertMutation>;
19
+ getAlert(id: string): Promise<Types.GetAlertQuery>;
20
+ queryAlerts(filter?: Types.AlertFilter): Promise<Types.QueryAlertsQuery>;
21
+ createCollection(Collection: Types.CollectionInput): Promise<Types.CreateCollectionMutation>;
22
+ updateCollection(Collection: Types.CollectionUpdateInput): Promise<Types.UpdateCollectionMutation>;
23
+ deleteCollection(id: string): Promise<Types.DeleteCollectionMutation>;
24
+ addContentsToCollections(contents: Types.EntityReferenceInput[], collections: Types.EntityReferenceInput[]): Promise<Types.AddContentsToCollectionsMutation>;
25
+ removeContentsFromCollection(contents: Types.EntityReferenceInput[], collection: Types.EntityReferenceInput): Promise<Types.RemoveContentsFromCollectionMutation>;
26
+ getCollection(id: string): Promise<Types.GetCollectionQuery>;
27
+ queryCollections(filter?: Types.CollectionFilter): Promise<Types.QueryCollectionsQuery>;
28
+ ingestUri(uri: string, name?: string, id?: string, isSynchronous?: boolean, workflow?: Types.EntityReferenceInput): Promise<Types.IngestUriMutation>;
29
+ ingestText(name: string, text: string, textType?: Types.TextTypes, uri?: string, id?: string, isSynchronous?: boolean, workflow?: Types.EntityReferenceInput): Promise<Types.IngestTextMutation>;
30
+ ingestEncodedFile(name: string, data: string, mimeType: string, id?: string, isSynchronous?: boolean, workflow?: Types.EntityReferenceInput): Promise<Types.IngestEncodedFileMutation>;
31
+ updateContent(content: Types.ContentUpdateInput): Promise<Types.UpdateContentMutation>;
32
+ deleteContent(id: string): Promise<Types.DeleteContentMutation>;
33
+ deleteAllContents(): Promise<Types.DeleteAllContentsMutation>;
34
+ summarizeContents(summarizations: [Types.SummarizationStrategyInput], filter?: Types.ContentFilter): Promise<Types.SummarizeContentsMutation>;
35
+ extractContents(prompt: string, filter?: Types.ContentFilter, specification?: Types.EntityReferenceInput): Promise<Types.ExtractContentsMutation>;
36
+ publishContents(summaryPrompt: string, summarySpecification: Types.EntityReferenceInput, connector: Types.ContentPublishingConnectorInput, publishPrompt?: string, publishSpecification?: Types.EntityReferenceInput, name?: string, filter?: Types.ContentFilter, workflow?: Types.EntityReferenceInput): Promise<Types.PublishContentsMutation>;
37
+ getContent(id: string): Promise<Types.GetContentQuery>;
38
+ queryContents(filter?: Types.ContentFilter): Promise<Types.QueryContentsQuery>;
39
+ createConversation(conversation: Types.ConversationInput): Promise<Types.CreateConversationMutation>;
40
+ updateConversation(conversation: Types.ConversationUpdateInput): Promise<Types.UpdateConversationMutation>;
41
+ deleteConversation(id: string): Promise<Types.DeleteConversationMutation>;
42
+ deleteAllConversations(): Promise<Types.DeleteAllConversationsMutation>;
43
+ clearConversation(id: string): Promise<Types.ClearConversationMutation>;
44
+ closeConversation(id: string): Promise<Types.CloseConversationMutation>;
45
+ getConversation(id: string): Promise<Types.GetConversationQuery>;
46
+ queryConversations(filter?: Types.ConversationFilter): Promise<Types.QueryConversationsQuery>;
47
+ promptConversation(prompt: string, id?: string): Promise<Types.PromptConversationMutation>;
48
+ publishConversation(id: string, connector: Types.ContentPublishingConnectorInput, name?: string, workflow?: Types.EntityReferenceInput): Promise<Types.PublishConversationMutation>;
49
+ suggestConversation(id: string, count?: number): Promise<Types.SuggestConversationMutation>;
50
+ createFeed(feed: Types.FeedInput): Promise<Types.CreateFeedMutation>;
51
+ updateFeed(feed: Types.FeedUpdateInput): Promise<Types.UpdateFeedMutation>;
52
+ deleteFeed(id: string): Promise<Types.DeleteFeedMutation>;
53
+ deleteAllFeeds(): Promise<Types.DeleteAllFeedsMutation>;
54
+ enableFeed(id: string): Promise<Types.EnableFeedMutation>;
55
+ disableFeed(id: string): Promise<Types.DeleteFeedMutation>;
56
+ getFeed(id: string): Promise<Types.GetFeedQuery>;
57
+ queryFeeds(filter?: Types.FeedFilter): Promise<Types.QueryFeedsQuery>;
58
+ promptSpecifications(prompt: string, ids: [string]): Promise<Types.PromptSpecificationsMutation>;
59
+ createSpecification(specification: Types.SpecificationInput): Promise<Types.CreateSpecificationMutation>;
60
+ updateSpecification(specification: Types.SpecificationUpdateInput): Promise<Types.UpdateSpecificationMutation>;
61
+ deleteSpecification(id: string): Promise<Types.DeleteSpecificationMutation>;
62
+ getSpecification(id: string): Promise<Types.GetSpecificationQuery>;
63
+ querySpecifications(filter?: Types.SpecificationFilter): Promise<Types.QuerySpecificationsQuery>;
64
+ createWorkflow(workflow: Types.WorkflowInput): Promise<Types.CreateWorkflowMutation>;
65
+ updateWorkflow(workflow: Types.WorkflowUpdateInput): Promise<Types.UpdateWorkflowMutation>;
66
+ deleteWorkflow(id: string): Promise<Types.DeleteWorkflowMutation>;
67
+ deleteAllWorkflows(): Promise<Types.DeleteAllWorkflowsMutation>;
68
+ getWorkflow(id: string): Promise<Types.GetWorkflowQuery>;
69
+ queryWorkflows(filter?: Types.WorkflowFilter): Promise<Types.QueryWorkflowsQuery>;
70
70
  private mutateAndCheckError;
71
71
  private queryAndCheckError;
72
72
  }
package/dist/client.js CHANGED
@@ -147,8 +147,8 @@ class Graphlit {
147
147
  });
148
148
  }
149
149
  /*
150
- public async deleteAllCollections(): Promise<void> {
151
- return this.mutateAndCheckError<void>(
150
+ public async deleteAllCollections(): Promise<Types.DeleteAllCollectionsMutation> {
151
+ return this.mutateAndCheckError<Types.DeleteAllCollectionsMutation>(
152
152
  Documents.DeleteAllCollections
153
153
  );
154
154
  }
@@ -345,8 +345,8 @@ class Graphlit {
345
345
  });
346
346
  }
347
347
  /*
348
- public async deleteAllSpecifications(): Promise<void> {
349
- return this.mutateAndCheckError<void>(
348
+ public async deleteAllSpecifications(): Promise<Types.DeleteAllSpecificationsMutation> {
349
+ return this.mutateAndCheckError<Types.DeleteAllSpecificationsMutation>(
350
350
  Documents.DeleteAllSpecifications
351
351
  );
352
352
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20240418020",
3
+ "version": "1.0.20240418022",
4
4
  "description": "Graphlit API TypeScript Client",
5
5
  "main": "dist/client.js",
6
6
  "types": "dist/client.d.ts",