graphlit-client 1.0.20250710002 → 1.0.20250713001

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/README.md CHANGED
@@ -404,9 +404,9 @@ if (process.env.OPENAI_API_KEY) {
404
404
  }
405
405
 
406
406
  if (process.env.COHERE_API_KEY) {
407
- const { CohereClient } = await import("cohere-ai");
407
+ const { CohereClientV2 } = await import("cohere-ai");
408
408
  client.setCohereClient(
409
- new CohereClient({ token: process.env.COHERE_API_KEY }),
409
+ new CohereClientV2({ token: process.env.COHERE_API_KEY }),
410
410
  );
411
411
  }
412
412
 
@@ -568,9 +568,9 @@ if (process.env.OPENAI_API_KEY) {
568
568
  }
569
569
 
570
570
  if (process.env.COHERE_API_KEY) {
571
- const { CohereClient } = await import("cohere-ai");
571
+ const { CohereClientV2 } = await import("cohere-ai");
572
572
  client.setCohereClient(
573
- new CohereClient({ token: process.env.COHERE_API_KEY }),
573
+ new CohereClientV2({ token: process.env.COHERE_API_KEY }),
574
574
  );
575
575
  }
576
576
 
package/dist/client.d.ts CHANGED
@@ -159,6 +159,7 @@ declare class Graphlit {
159
159
  publishText(text: string, textType: Types.TextTypes, connector: Types.ContentPublishingConnectorInput, name?: string, workflow?: Types.EntityReferenceInput, isSynchronous?: boolean, correlationId?: string): Promise<Types.PublishTextMutation>;
160
160
  getContent(id: string): Promise<Types.GetContentQuery>;
161
161
  lookupContents(ids: string[]): Promise<Types.LookupContentsResults>;
162
+ queryObservables(filter?: Types.ContentFilter): Promise<Types.QueryObservablesQuery>;
162
163
  queryContents(filter?: Types.ContentFilter): Promise<Types.QueryContentsQuery>;
163
164
  queryContentsObservations(filter?: Types.ContentFilter): Promise<Types.QueryContentsObservationsQuery>;
164
165
  queryContentsFacets(filter?: Types.ContentFilter): Promise<Types.QueryContentsFacetsQuery>;
package/dist/client.js CHANGED
@@ -718,6 +718,9 @@ class Graphlit {
718
718
  async lookupContents(ids) {
719
719
  return this.queryAndCheckError(Documents.LookupContents, { ids: ids });
720
720
  }
721
+ async queryObservables(filter) {
722
+ return this.queryAndCheckError(Documents.QueryObservables, { filter: filter });
723
+ }
721
724
  async queryContents(filter) {
722
725
  return this.queryAndCheckError(Documents.QueryContents, { filter: filter });
723
726
  }
@@ -57,6 +57,7 @@ export declare const QueryContents: import("graphql").DocumentNode;
57
57
  export declare const QueryContentsFacets: import("graphql").DocumentNode;
58
58
  export declare const QueryContentsGraph: import("graphql").DocumentNode;
59
59
  export declare const QueryContentsObservations: import("graphql").DocumentNode;
60
+ export declare const QueryObservables: import("graphql").DocumentNode;
60
61
  export declare const ScreenshotPage: import("graphql").DocumentNode;
61
62
  export declare const SummarizeContents: import("graphql").DocumentNode;
62
63
  export declare const SummarizeText: import("graphql").DocumentNode;
@@ -2999,6 +2999,19 @@ export const QueryContentsObservations = gql `
2999
2999
  }
3000
3000
  }
3001
3001
  `;
3002
+ export const QueryObservables = gql `
3003
+ query QueryObservables($filter: ContentFilter, $correlationId: String) {
3004
+ observables(filter: $filter, correlationId: $correlationId) {
3005
+ results {
3006
+ type
3007
+ observable {
3008
+ id
3009
+ name
3010
+ }
3011
+ }
3012
+ }
3013
+ }
3014
+ `;
3002
3015
  export const ScreenshotPage = gql `
3003
3016
  mutation ScreenshotPage($uri: URL!, $maximumHeight: Int, $isSynchronous: Boolean, $workflow: EntityReferenceInput, $collections: [EntityReferenceInput!], $correlationId: String) {
3004
3017
  screenshotPage(
@@ -9943,6 +9943,12 @@ export type ObservableFacet = {
9943
9943
  /** The observed entity type. */
9944
9944
  type?: Maybe<ObservableTypes>;
9945
9945
  };
9946
+ /** Represents observable results. */
9947
+ export type ObservableResults = {
9948
+ __typename?: 'ObservableResults';
9949
+ /** The retrieved observables. */
9950
+ results?: Maybe<Array<Maybe<ObservationReference>>>;
9951
+ };
9946
9952
  /** Observable type */
9947
9953
  export declare enum ObservableTypes {
9948
9954
  /** Category */
@@ -12099,6 +12105,8 @@ export type Query = {
12099
12105
  notionDatabases?: Maybe<NotionDatabaseResults>;
12100
12106
  /** Retrieves available Notion pages within Notion database, non-recursive. */
12101
12107
  notionPages?: Maybe<NotionPageResults>;
12108
+ /** Retrieves observables from contents based on the provided filter criteria. */
12109
+ observables?: Maybe<ObservableResults>;
12102
12110
  /** Lookup a observation given its ID. */
12103
12111
  observation?: Maybe<Observation>;
12104
12112
  /** Retrieves available OneDrive folders. */
@@ -12546,6 +12554,10 @@ export type QueryNotionPagesArgs = {
12546
12554
  identifier: Scalars['String']['input'];
12547
12555
  properties: NotionPagesInput;
12548
12556
  };
12557
+ export type QueryObservablesArgs = {
12558
+ correlationId?: InputMaybe<Scalars['String']['input']>;
12559
+ filter?: InputMaybe<ContentFilter>;
12560
+ };
12549
12561
  export type QueryObservationArgs = {
12550
12562
  correlationId?: InputMaybe<Scalars['String']['input']>;
12551
12563
  id: Scalars['ID']['input'];
@@ -18574,6 +18586,25 @@ export type QueryContentsObservationsQuery = {
18574
18586
  } | null> | null;
18575
18587
  } | null;
18576
18588
  };
18589
+ export type QueryObservablesQueryVariables = Exact<{
18590
+ filter?: InputMaybe<ContentFilter>;
18591
+ correlationId?: InputMaybe<Scalars['String']['input']>;
18592
+ }>;
18593
+ export type QueryObservablesQuery = {
18594
+ __typename?: 'Query';
18595
+ observables?: {
18596
+ __typename?: 'ObservableResults';
18597
+ results?: Array<{
18598
+ __typename?: 'ObservationReference';
18599
+ type: ObservableTypes;
18600
+ observable: {
18601
+ __typename?: 'NamedEntityReference';
18602
+ id: string;
18603
+ name?: string | null;
18604
+ };
18605
+ } | null> | null;
18606
+ } | null;
18607
+ };
18577
18608
  export type ScreenshotPageMutationVariables = Exact<{
18578
18609
  uri: Scalars['URL']['input'];
18579
18610
  maximumHeight?: InputMaybe<Scalars['Int']['input']>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20250710002",
3
+ "version": "1.0.20250713001",
4
4
  "description": "Graphlit API Client for TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/client.js",