@manta-eu/client 0.2.0 → 0.3.0

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.
Files changed (43) hide show
  1. package/dist/generated/graphql.d.ts +136 -35
  2. package/dist/generated/graphql.d.ts.map +1 -1
  3. package/dist/generated/graphql.js +70 -14
  4. package/dist/generated/graphql.js.map +1 -1
  5. package/dist/shared/datastore-id.js +1 -1
  6. package/dist/shared/datastore-id.js.map +1 -1
  7. package/dist/shared/memory-citation-sampling.d.ts +2 -1
  8. package/dist/shared/memory-citation-sampling.d.ts.map +1 -1
  9. package/dist/shared/memory-citation-sampling.js +5 -4
  10. package/dist/shared/memory-citation-sampling.js.map +1 -1
  11. package/dist/shared/memory-diversity.js +1 -1
  12. package/dist/shared/memory-diversity.js.map +1 -1
  13. package/dist/shared/memory-keyword-recall.d.ts +1 -0
  14. package/dist/shared/memory-keyword-recall.d.ts.map +1 -1
  15. package/dist/shared/memory-keyword-recall.js +2 -1
  16. package/dist/shared/memory-keyword-recall.js.map +1 -1
  17. package/dist/shared/rdf-namespaces.d.ts +1 -3
  18. package/dist/shared/rdf-namespaces.d.ts.map +1 -1
  19. package/dist/shared/rdf-namespaces.js +2 -4
  20. package/dist/shared/rdf-namespaces.js.map +1 -1
  21. package/dist/shared/tools/coercers.d.ts.map +1 -1
  22. package/dist/shared/tools/coercers.js +6 -3
  23. package/dist/shared/tools/coercers.js.map +1 -1
  24. package/dist/shared/tools/index.d.ts +1 -1
  25. package/dist/shared/tools/index.d.ts.map +1 -1
  26. package/dist/shared/tools/metadata.js +23 -23
  27. package/dist/shared/tools/metadata.js.map +1 -1
  28. package/dist/shared/tools/types.d.ts +24 -24
  29. package/dist/shared/tools/types.d.ts.map +1 -1
  30. package/dist/shared/writable-shape-query.js +2 -2
  31. package/dist/shared/writable-shape-query.js.map +1 -1
  32. package/package.json +5 -5
  33. package/src/generated/graphql.ts +225 -48
  34. package/src/shared/datastore-id.ts +1 -1
  35. package/src/shared/memory-citation-sampling.ts +5 -5
  36. package/src/shared/memory-diversity.ts +1 -1
  37. package/src/shared/memory-keyword-recall.ts +3 -1
  38. package/src/shared/rdf-namespaces.ts +2 -9
  39. package/src/shared/tools/coercers.ts +7 -4
  40. package/src/shared/tools/index.ts +8 -8
  41. package/src/shared/tools/metadata.ts +23 -23
  42. package/src/shared/tools/types.ts +30 -30
  43. package/src/shared/writable-shape-query.ts +2 -2
@@ -530,6 +530,7 @@ export type GQLCreateDataConnectionInput = {
530
530
  connectorType: Scalars["String"]["input"];
531
531
  name: Scalars["String"]["input"];
532
532
  settings: Array<GQLDataConnectionSettingInput>;
533
+ sourceName?: InputMaybe<Scalars["String"]["input"]>;
533
534
  };
534
535
 
535
536
  export type GQLCreateInferalIntegrationInput = {
@@ -655,6 +656,7 @@ export type GQLCustomAppPage = {
655
656
  };
656
657
 
657
658
  export enum GQLCustomAppPermission {
659
+ ReadWarehouse = "READ_WAREHOUSE",
658
660
  ShareChats = "SHARE_CHATS",
659
661
  WriteData = "WRITE_DATA",
660
662
  }
@@ -757,6 +759,7 @@ export type GQLDataConnection = {
757
759
  id: Scalars["String"]["output"];
758
760
  name: Scalars["String"]["output"];
759
761
  settings: Array<GQLDataConnectionSetting>;
762
+ sourceName?: Maybe<Scalars["String"]["output"]>;
760
763
  status: GQLDataConnectionStatus;
761
764
  };
762
765
 
@@ -843,8 +846,12 @@ export type GQLDatastoreProvisioningStatus = {
843
846
 
844
847
  export type GQLDatastoreSubscription = {
845
848
  __typename?: "DatastoreSubscription";
849
+ amount?: Maybe<Scalars["Int"]["output"]>;
850
+ currency?: Maybe<Scalars["String"]["output"]>;
846
851
  datastoreId: Scalars["String"]["output"];
847
852
  inGoodStanding: Scalars["Boolean"]["output"];
853
+ interval?: Maybe<Scalars["String"]["output"]>;
854
+ intervalCount?: Maybe<Scalars["Int"]["output"]>;
848
855
  status: Scalars["String"]["output"];
849
856
  };
850
857
 
@@ -1026,6 +1033,14 @@ export type GQLExecuteActionUpdateInput = {
1026
1033
  subjectIri: Scalars["IRI"]["input"];
1027
1034
  };
1028
1035
 
1036
+ export type GQLFactExplanationResponse = {
1037
+ __typename?: "FactExplanationResponse";
1038
+ error?: Maybe<Scalars["String"]["output"]>;
1039
+ facts: Scalars["JSON"]["output"];
1040
+ formatted: Scalars["String"]["output"];
1041
+ summary?: Maybe<Scalars["String"]["output"]>;
1042
+ };
1043
+
1029
1044
  export enum GQLFactValueStatus {
1030
1045
  Changed = "CHANGED",
1031
1046
  Removed = "REMOVED",
@@ -1040,6 +1055,12 @@ export type GQLFileFactsInput = {
1040
1055
  width?: InputMaybe<Scalars["PositiveInt"]["input"]>;
1041
1056
  };
1042
1057
 
1058
+ export type GQLForgetUserNameResponse = {
1059
+ __typename?: "ForgetUserNameResponse";
1060
+ datastoreIds: Array<Scalars["String"]["output"]>;
1061
+ id: Scalars["String"]["output"];
1062
+ };
1063
+
1043
1064
  export type GQLGmailIntegration = {
1044
1065
  __typename?: "GmailIntegration";
1045
1066
  email: Scalars["String"]["output"];
@@ -1210,6 +1231,7 @@ export type GQLInitiateUploadResponse = {
1210
1231
  };
1211
1232
 
1212
1233
  export enum GQLIntegration {
1234
+ Canva = "CANVA",
1213
1235
  Dash = "DASH",
1214
1236
  Figma = "FIGMA",
1215
1237
  Google = "GOOGLE",
@@ -1369,7 +1391,7 @@ export type GQLLinkedinSetupProgress = {
1369
1391
  state: Array<Scalars["String"]["output"]>;
1370
1392
  };
1371
1393
 
1372
- export type GQLManageRdFoxRuleInput = {
1394
+ export type GQLManageRuleInput = {
1373
1395
  dryRun?: InputMaybe<Scalars["Boolean"]["input"]>;
1374
1396
  expectNoInference?: InputMaybe<Scalars["Boolean"]["input"]>;
1375
1397
  humanIntent: Scalars["String"]["input"];
@@ -1379,8 +1401,8 @@ export type GQLManageRdFoxRuleInput = {
1379
1401
  testTriple?: InputMaybe<GQLTestTripleInput>;
1380
1402
  };
1381
1403
 
1382
- export type GQLManageRdFoxRuleResponse = {
1383
- __typename?: "ManageRDFoxRuleResponse";
1404
+ export type GQLManageRuleResponse = {
1405
+ __typename?: "ManageRuleResponse";
1384
1406
  error?: Maybe<Scalars["String"]["output"]>;
1385
1407
  inferenceTest?: Maybe<Scalars["String"]["output"]>;
1386
1408
  inferenceVerified: Scalars["Boolean"]["output"];
@@ -1613,6 +1635,7 @@ export type GQLMutation = {
1613
1635
  executeActionDeletion: GQLExecuteActionResponse;
1614
1636
  executeActionPlan: GQLExecuteActionPlanResponse;
1615
1637
  executeActionUpdate: GQLExecuteActionResponse;
1638
+ forgetUserName: GQLForgetUserNameResponse;
1616
1639
  generateStructuredData: GQLStructuredDataResponse;
1617
1640
  googleAnalyticsSetupConnect: GQLGoogleAnalyticsSetupProgress;
1618
1641
  googleSetupConnect: GQLGoogleSetupProgress;
@@ -1625,7 +1648,7 @@ export type GQLMutation = {
1625
1648
  linkOrganizationToProvider: GQLLinkOrganizationResponse;
1626
1649
  linkUnlinkedDatastore: GQLProvisionDatastoreResponse;
1627
1650
  linkedinSetupConnect?: Maybe<GQLLinkedinSetupProgress>;
1628
- manageRDFoxRule: GQLManageRdFoxRuleResponse;
1651
+ manageRule: GQLManageRuleResponse;
1629
1652
  manualActionChangeAssignees?: Maybe<GQLManualActionChangeAssigneesPayload>;
1630
1653
  manualActionResolve?: Maybe<GQLManualActionResolvePayload>;
1631
1654
  materializeOntologyCoverage: GQLMaterializeOntologyCoverageResponse;
@@ -1662,7 +1685,7 @@ export type GQLMutation = {
1662
1685
  updateMemory: GQLUpdateMemoryResponse;
1663
1686
  updateTeamMember: GQLTeamMemberUpdateResponse;
1664
1687
  updateUserPreferences: GQLUpdateUserPreferencesResponse;
1665
- validateRDFoxRule: GQLValidateRdFoxRuleResponse;
1688
+ validateRule: GQLValidateRuleResponse;
1666
1689
  validateStagedRules: GQLValidateStagedRulesResponse;
1667
1690
  };
1668
1691
 
@@ -1814,6 +1837,10 @@ export type GQLMutationExecuteActionUpdateArgs = {
1814
1837
  input: GQLExecuteActionUpdateInput;
1815
1838
  };
1816
1839
 
1840
+ export type GQLMutationForgetUserNameArgs = {
1841
+ userId: Scalars["String"]["input"];
1842
+ };
1843
+
1817
1844
  export type GQLMutationGenerateStructuredDataArgs = {
1818
1845
  input: GQLStructuredDataInput;
1819
1846
  };
@@ -1876,8 +1903,8 @@ export type GQLMutationLinkedinSetupConnectArgs = {
1876
1903
  accountIds: Array<Scalars["String"]["input"]>;
1877
1904
  };
1878
1905
 
1879
- export type GQLMutationManageRdFoxRuleArgs = {
1880
- input: GQLManageRdFoxRuleInput;
1906
+ export type GQLMutationManageRuleArgs = {
1907
+ input: GQLManageRuleInput;
1881
1908
  };
1882
1909
 
1883
1910
  export type GQLMutationManualActionChangeAssigneesArgs = {
@@ -1889,6 +1916,7 @@ export type GQLMutationManualActionChangeAssigneesArgs = {
1889
1916
 
1890
1917
  export type GQLMutationManualActionResolveArgs = {
1891
1918
  namedGraphIri: Scalars["String"]["input"];
1919
+ reason?: InputMaybe<Scalars["String"]["input"]>;
1892
1920
  resolvedBy: Scalars["String"]["input"];
1893
1921
  status: GQLManualActionResolveStatus;
1894
1922
  subjectIri: Scalars["String"]["input"];
@@ -2058,8 +2086,8 @@ export type GQLMutationUpdateUserPreferencesArgs = {
2058
2086
  input: GQLUpdateUserPreferencesInput;
2059
2087
  };
2060
2088
 
2061
- export type GQLMutationValidateRdFoxRuleArgs = {
2062
- input: GQLValidateRdFoxRuleInput;
2089
+ export type GQLMutationValidateRuleArgs = {
2090
+ input: GQLValidateRuleInput;
2063
2091
  };
2064
2092
 
2065
2093
  export type GQLMutationValidateStagedRulesArgs = {
@@ -2191,7 +2219,7 @@ export type GQLQuery = {
2191
2219
  datastoreSubscriptions: Array<GQLDatastoreSubscription>;
2192
2220
  datastoreTree: Array<GQLDatastoreTreeNode>;
2193
2221
  detectMemoryConflicts: GQLDetectMemoryConflictsResult;
2194
- explainRDFoxFact: GQLRdFoxExplanationResponse;
2222
+ explainFact: GQLFactExplanationResponse;
2195
2223
  gmailIntegrations: Array<GQLGmailIntegration>;
2196
2224
  googleAnalyticsSetupProgress: GQLGoogleAnalyticsSetupProgress;
2197
2225
  googleBrandSuggestions: Array<GQLGoogleBrandSuggestion>;
@@ -2225,6 +2253,7 @@ export type GQLQuery = {
2225
2253
  unlinkedDatastores: Array<GQLUnlinkedDatastore>;
2226
2254
  userPreferences: GQLUserPreferences;
2227
2255
  validateActionPlan: GQLValidateActionPlanResponse;
2256
+ warehouseQuery: GQLWarehouseQueryResponse;
2228
2257
  };
2229
2258
 
2230
2259
  export type GQLQueryActionPlanDiffArgs = {
@@ -2323,7 +2352,7 @@ export type GQLQueryDetectMemoryConflictsArgs = {
2323
2352
  input: GQLDetectMemoryConflictsInput;
2324
2353
  };
2325
2354
 
2326
- export type GQLQueryExplainRdFoxFactArgs = {
2355
+ export type GQLQueryExplainFactArgs = {
2327
2356
  namedGraph?: InputMaybe<Scalars["IRI"]["input"]>;
2328
2357
  object: Scalars["String"]["input"];
2329
2358
  objectDatatype?: InputMaybe<Scalars["String"]["input"]>;
@@ -2433,12 +2462,8 @@ export type GQLQueryValidateActionPlanArgs = {
2433
2462
  shaclShapeIri?: InputMaybe<Scalars["IRI"]["input"]>;
2434
2463
  };
2435
2464
 
2436
- export type GQLRdFoxExplanationResponse = {
2437
- __typename?: "RDFoxExplanationResponse";
2438
- error?: Maybe<Scalars["String"]["output"]>;
2439
- facts: Scalars["JSON"]["output"];
2440
- formatted: Scalars["String"]["output"];
2441
- summary?: Maybe<Scalars["String"]["output"]>;
2465
+ export type GQLQueryWarehouseQueryArgs = {
2466
+ sql: Scalars["String"]["input"];
2442
2467
  };
2443
2468
 
2444
2469
  export type GQLRecordHotelProfileResponse = {
@@ -3066,12 +3091,12 @@ export type GQLValidateActionPlanResponse = {
3066
3091
  valid: Scalars["Boolean"]["output"];
3067
3092
  };
3068
3093
 
3069
- export type GQLValidateRdFoxRuleInput = {
3094
+ export type GQLValidateRuleInput = {
3070
3095
  rule: Scalars["DatalogRule"]["input"];
3071
3096
  };
3072
3097
 
3073
- export type GQLValidateRdFoxRuleResponse = {
3074
- __typename?: "ValidateRDFoxRuleResponse";
3098
+ export type GQLValidateRuleResponse = {
3099
+ __typename?: "ValidateRuleResponse";
3075
3100
  error?: Maybe<Scalars["String"]["output"]>;
3076
3101
  ruleStructure?: Maybe<GQLRuleStructure>;
3077
3102
  valid: Scalars["Boolean"]["output"];
@@ -3086,6 +3111,28 @@ export type GQLValidateStagedRulesResponse = {
3086
3111
  syntaxErrors: Array<Scalars["String"]["output"]>;
3087
3112
  };
3088
3113
 
3114
+ export type GQLWarehouseColumn = {
3115
+ __typename?: "WarehouseColumn";
3116
+ name: Scalars["String"]["output"];
3117
+ type: Scalars["String"]["output"];
3118
+ };
3119
+
3120
+ export type GQLWarehouseQueryResponse = {
3121
+ __typename?: "WarehouseQueryResponse";
3122
+ columns?: Maybe<Array<GQLWarehouseColumn>>;
3123
+ error?: Maybe<Scalars["String"]["output"]>;
3124
+ rows?: Maybe<Array<Scalars["JSON"]["output"]>>;
3125
+ statistics?: Maybe<GQLWarehouseStatistics>;
3126
+ truncated: Scalars["Boolean"]["output"];
3127
+ };
3128
+
3129
+ export type GQLWarehouseStatistics = {
3130
+ __typename?: "WarehouseStatistics";
3131
+ returnRows?: Maybe<Scalars["SafeInt"]["output"]>;
3132
+ scanBytes?: Maybe<Scalars["SafeInt"]["output"]>;
3133
+ scanRows?: Maybe<Scalars["SafeInt"]["output"]>;
3134
+ };
3135
+
3089
3136
  export type GQLWoocommerceProviderInput = {
3090
3137
  consumerKey: Scalars["String"]["input"];
3091
3138
  consumerSecret: Scalars["String"]["input"];
@@ -3642,6 +3689,15 @@ export type GQLExecuteAgentActionUpdateMutation = {
3642
3689
  };
3643
3690
  };
3644
3691
 
3692
+ export type GQLForgetUserNameMutationVariables = Exact<{
3693
+ userId: Scalars["String"]["input"];
3694
+ }>;
3695
+
3696
+ export type GQLForgetUserNameMutation = {
3697
+ __typename?: "Mutation";
3698
+ forgetUserName: { __typename?: "ForgetUserNameResponse"; id: string; datastoreIds: Array<string> };
3699
+ };
3700
+
3645
3701
  export type GQLGenerateStructuredDataMutationVariables = Exact<{
3646
3702
  input: GQLStructuredDataInput;
3647
3703
  }>;
@@ -4965,6 +5021,7 @@ export type GQLDataConnectionsQuery = {
4965
5021
  id: string;
4966
5022
  name: string;
4967
5023
  connectorType: string;
5024
+ sourceName?: string | null;
4968
5025
  status: GQLDataConnectionStatus;
4969
5026
  error?: string | null;
4970
5027
  createdAt: string;
@@ -5051,6 +5108,10 @@ export type GQLDatastoreSubscriptionsQuery = {
5051
5108
  datastoreId: string;
5052
5109
  status: string;
5053
5110
  inGoodStanding: boolean;
5111
+ amount?: number | null;
5112
+ currency?: string | null;
5113
+ interval?: string | null;
5114
+ intervalCount?: number | null;
5054
5115
  }>;
5055
5116
  };
5056
5117
 
@@ -5101,7 +5162,7 @@ export type GQLDetectMemoryConflictsQuery = {
5101
5162
  };
5102
5163
  };
5103
5164
 
5104
- export type GQLExplainRdFoxFactQueryVariables = Exact<{
5165
+ export type GQLExplainFactQueryVariables = Exact<{
5105
5166
  subject: Scalars["String"]["input"];
5106
5167
  predicate?: InputMaybe<Scalars["String"]["input"]>;
5107
5168
  object: Scalars["String"]["input"];
@@ -5110,10 +5171,10 @@ export type GQLExplainRdFoxFactQueryVariables = Exact<{
5110
5171
  namedGraph?: InputMaybe<Scalars["IRI"]["input"]>;
5111
5172
  }>;
5112
5173
 
5113
- export type GQLExplainRdFoxFactQuery = {
5174
+ export type GQLExplainFactQuery = {
5114
5175
  __typename?: "Query";
5115
- explainRDFoxFact: {
5116
- __typename?: "RDFoxExplanationResponse";
5176
+ explainFact: {
5177
+ __typename?: "FactExplanationResponse";
5117
5178
  facts: unknown;
5118
5179
  formatted: string;
5119
5180
  summary?: string | null;
@@ -5818,6 +5879,27 @@ export type GQLValidateActionPlanQuery = {
5818
5879
  };
5819
5880
  };
5820
5881
 
5882
+ export type GQLWarehouseQueryQueryVariables = Exact<{
5883
+ sql: Scalars["String"]["input"];
5884
+ }>;
5885
+
5886
+ export type GQLWarehouseQueryQuery = {
5887
+ __typename?: "Query";
5888
+ warehouseQuery: {
5889
+ __typename?: "WarehouseQueryResponse";
5890
+ rows?: Array<unknown> | null;
5891
+ truncated: boolean;
5892
+ error?: string | null;
5893
+ columns?: Array<{ __typename?: "WarehouseColumn"; name: string; type: string }> | null;
5894
+ statistics?: {
5895
+ __typename?: "WarehouseStatistics";
5896
+ scanRows?: number | null;
5897
+ scanBytes?: number | null;
5898
+ returnRows?: number | null;
5899
+ } | null;
5900
+ };
5901
+ };
5902
+
5821
5903
  export const CustomAppConnectionFieldsFragmentDoc = `
5822
5904
  fragment CustomAppConnectionFields on CustomAppConnection {
5823
5905
  issuer
@@ -7006,6 +7088,33 @@ export const useExecuteAgentActionUpdateMutation = <TError = unknown, TContext =
7006
7088
  });
7007
7089
  };
7008
7090
 
7091
+ export const ForgetUserNameDocument = `
7092
+ mutation ForgetUserName($userId: String!) {
7093
+ forgetUserName(userId: $userId) {
7094
+ id
7095
+ datastoreIds
7096
+ }
7097
+ }
7098
+ `;
7099
+
7100
+ export const useForgetUserNameMutation = <TError = unknown, TContext = unknown>(
7101
+ client: GraphQLClient,
7102
+ options?: UseMutationOptions<GQLForgetUserNameMutation, TError, GQLForgetUserNameMutationVariables, TContext>,
7103
+ headers?: RequestInit["headers"],
7104
+ ) => {
7105
+ return useMutation<GQLForgetUserNameMutation, TError, GQLForgetUserNameMutationVariables, TContext>({
7106
+ mutationKey: ["ForgetUserName"],
7107
+ mutationFn: (variables?: GQLForgetUserNameMutationVariables) =>
7108
+ fetcher<GQLForgetUserNameMutation, GQLForgetUserNameMutationVariables>(
7109
+ client,
7110
+ ForgetUserNameDocument,
7111
+ variables,
7112
+ headers,
7113
+ )(),
7114
+ ...options,
7115
+ });
7116
+ };
7117
+
7009
7118
  export const GenerateStructuredDataDocument = `
7010
7119
  mutation GenerateStructuredData($input: StructuredDataInput!) {
7011
7120
  generateStructuredData(input: $input) {
@@ -9697,6 +9806,7 @@ export const DataConnectionsDocument = `
9697
9806
  id
9698
9807
  name
9699
9808
  connectorType
9809
+ sourceName
9700
9810
  status
9701
9811
  error
9702
9812
  createdAt
@@ -9962,6 +10072,10 @@ export const DatastoreSubscriptionsDocument = `
9962
10072
  datastoreId
9963
10073
  status
9964
10074
  inGoodStanding
10075
+ amount
10076
+ currency
10077
+ interval
10078
+ intervalCount
9965
10079
  }
9966
10080
  }
9967
10081
  `;
@@ -10152,9 +10266,9 @@ useSuspenseDetectMemoryConflictsQuery.getKey = (variables: GQLDetectMemoryConfli
10152
10266
  variables,
10153
10267
  ];
10154
10268
 
10155
- export const ExplainRdFoxFactDocument = `
10156
- query ExplainRDFoxFact($subject: String!, $predicate: String, $object: String!, $objectDatatype: String, $summarize: Boolean = false, $namedGraph: IRI) {
10157
- explainRDFoxFact(
10269
+ export const ExplainFactDocument = `
10270
+ query ExplainFact($subject: String!, $predicate: String, $object: String!, $objectDatatype: String, $summarize: Boolean = false, $namedGraph: IRI) {
10271
+ explainFact(
10158
10272
  subject: $subject
10159
10273
  predicate: $predicate
10160
10274
  object: $object
@@ -10170,19 +10284,19 @@ export const ExplainRdFoxFactDocument = `
10170
10284
  }
10171
10285
  `;
10172
10286
 
10173
- export const useExplainRdFoxFactQuery = <TData = GQLExplainRdFoxFactQuery, TError = unknown>(
10287
+ export const useExplainFactQuery = <TData = GQLExplainFactQuery, TError = unknown>(
10174
10288
  client: GraphQLClient,
10175
- variables: GQLExplainRdFoxFactQueryVariables,
10176
- options?: Omit<UseQueryOptions<GQLExplainRdFoxFactQuery, TError, TData>, "queryKey"> & {
10177
- queryKey?: UseQueryOptions<GQLExplainRdFoxFactQuery, TError, TData>["queryKey"];
10289
+ variables: GQLExplainFactQueryVariables,
10290
+ options?: Omit<UseQueryOptions<GQLExplainFactQuery, TError, TData>, "queryKey"> & {
10291
+ queryKey?: UseQueryOptions<GQLExplainFactQuery, TError, TData>["queryKey"];
10178
10292
  },
10179
10293
  headers?: RequestInit["headers"],
10180
10294
  ) => {
10181
- return useQuery<GQLExplainRdFoxFactQuery, TError, TData>({
10182
- queryKey: ["ExplainRDFoxFact", variables],
10183
- queryFn: fetcher<GQLExplainRdFoxFactQuery, GQLExplainRdFoxFactQueryVariables>(
10295
+ return useQuery<GQLExplainFactQuery, TError, TData>({
10296
+ queryKey: ["ExplainFact", variables],
10297
+ queryFn: fetcher<GQLExplainFactQuery, GQLExplainFactQueryVariables>(
10184
10298
  client,
10185
- ExplainRdFoxFactDocument,
10299
+ ExplainFactDocument,
10186
10300
  variables,
10187
10301
  headers,
10188
10302
  ),
@@ -10190,21 +10304,21 @@ export const useExplainRdFoxFactQuery = <TData = GQLExplainRdFoxFactQuery, TErro
10190
10304
  });
10191
10305
  };
10192
10306
 
10193
- useExplainRdFoxFactQuery.getKey = (variables: GQLExplainRdFoxFactQueryVariables) => ["ExplainRDFoxFact", variables];
10307
+ useExplainFactQuery.getKey = (variables: GQLExplainFactQueryVariables) => ["ExplainFact", variables];
10194
10308
 
10195
- export const useSuspenseExplainRdFoxFactQuery = <TData = GQLExplainRdFoxFactQuery, TError = unknown>(
10309
+ export const useSuspenseExplainFactQuery = <TData = GQLExplainFactQuery, TError = unknown>(
10196
10310
  client: GraphQLClient,
10197
- variables: GQLExplainRdFoxFactQueryVariables,
10198
- options?: Omit<UseSuspenseQueryOptions<GQLExplainRdFoxFactQuery, TError, TData>, "queryKey"> & {
10199
- queryKey?: UseSuspenseQueryOptions<GQLExplainRdFoxFactQuery, TError, TData>["queryKey"];
10311
+ variables: GQLExplainFactQueryVariables,
10312
+ options?: Omit<UseSuspenseQueryOptions<GQLExplainFactQuery, TError, TData>, "queryKey"> & {
10313
+ queryKey?: UseSuspenseQueryOptions<GQLExplainFactQuery, TError, TData>["queryKey"];
10200
10314
  },
10201
10315
  headers?: RequestInit["headers"],
10202
10316
  ) => {
10203
- return useSuspenseQuery<GQLExplainRdFoxFactQuery, TError, TData>({
10204
- queryKey: ["ExplainRDFoxFactSuspense", variables],
10205
- queryFn: fetcher<GQLExplainRdFoxFactQuery, GQLExplainRdFoxFactQueryVariables>(
10317
+ return useSuspenseQuery<GQLExplainFactQuery, TError, TData>({
10318
+ queryKey: ["ExplainFactSuspense", variables],
10319
+ queryFn: fetcher<GQLExplainFactQuery, GQLExplainFactQueryVariables>(
10206
10320
  client,
10207
- ExplainRdFoxFactDocument,
10321
+ ExplainFactDocument,
10208
10322
  variables,
10209
10323
  headers,
10210
10324
  ),
@@ -10212,10 +10326,7 @@ export const useSuspenseExplainRdFoxFactQuery = <TData = GQLExplainRdFoxFactQuer
10212
10326
  });
10213
10327
  };
10214
10328
 
10215
- useSuspenseExplainRdFoxFactQuery.getKey = (variables: GQLExplainRdFoxFactQueryVariables) => [
10216
- "ExplainRDFoxFactSuspense",
10217
- variables,
10218
- ];
10329
+ useSuspenseExplainFactQuery.getKey = (variables: GQLExplainFactQueryVariables) => ["ExplainFactSuspense", variables];
10219
10330
 
10220
10331
  export const GmailIntegrationsDocument = `
10221
10332
  query GmailIntegrations {
@@ -12156,3 +12267,69 @@ useSuspenseValidateActionPlanQuery.getKey = (variables: GQLValidateActionPlanQue
12156
12267
  "ValidateActionPlanSuspense",
12157
12268
  variables,
12158
12269
  ];
12270
+
12271
+ export const WarehouseQueryDocument = `
12272
+ query WarehouseQuery($sql: String!) {
12273
+ warehouseQuery(sql: $sql) {
12274
+ columns {
12275
+ name
12276
+ type
12277
+ }
12278
+ rows
12279
+ truncated
12280
+ statistics {
12281
+ scanRows
12282
+ scanBytes
12283
+ returnRows
12284
+ }
12285
+ error
12286
+ }
12287
+ }
12288
+ `;
12289
+
12290
+ export const useWarehouseQueryQuery = <TData = GQLWarehouseQueryQuery, TError = unknown>(
12291
+ client: GraphQLClient,
12292
+ variables: GQLWarehouseQueryQueryVariables,
12293
+ options?: Omit<UseQueryOptions<GQLWarehouseQueryQuery, TError, TData>, "queryKey"> & {
12294
+ queryKey?: UseQueryOptions<GQLWarehouseQueryQuery, TError, TData>["queryKey"];
12295
+ },
12296
+ headers?: RequestInit["headers"],
12297
+ ) => {
12298
+ return useQuery<GQLWarehouseQueryQuery, TError, TData>({
12299
+ queryKey: ["WarehouseQuery", variables],
12300
+ queryFn: fetcher<GQLWarehouseQueryQuery, GQLWarehouseQueryQueryVariables>(
12301
+ client,
12302
+ WarehouseQueryDocument,
12303
+ variables,
12304
+ headers,
12305
+ ),
12306
+ ...options,
12307
+ });
12308
+ };
12309
+
12310
+ useWarehouseQueryQuery.getKey = (variables: GQLWarehouseQueryQueryVariables) => ["WarehouseQuery", variables];
12311
+
12312
+ export const useSuspenseWarehouseQueryQuery = <TData = GQLWarehouseQueryQuery, TError = unknown>(
12313
+ client: GraphQLClient,
12314
+ variables: GQLWarehouseQueryQueryVariables,
12315
+ options?: Omit<UseSuspenseQueryOptions<GQLWarehouseQueryQuery, TError, TData>, "queryKey"> & {
12316
+ queryKey?: UseSuspenseQueryOptions<GQLWarehouseQueryQuery, TError, TData>["queryKey"];
12317
+ },
12318
+ headers?: RequestInit["headers"],
12319
+ ) => {
12320
+ return useSuspenseQuery<GQLWarehouseQueryQuery, TError, TData>({
12321
+ queryKey: ["WarehouseQuerySuspense", variables],
12322
+ queryFn: fetcher<GQLWarehouseQueryQuery, GQLWarehouseQueryQueryVariables>(
12323
+ client,
12324
+ WarehouseQueryDocument,
12325
+ variables,
12326
+ headers,
12327
+ ),
12328
+ ...options,
12329
+ });
12330
+ };
12331
+
12332
+ useSuspenseWarehouseQueryQuery.getKey = (variables: GQLWarehouseQueryQueryVariables) => [
12333
+ "WarehouseQuerySuspense",
12334
+ variables,
12335
+ ];
@@ -17,7 +17,7 @@ export function deriveDatastoreId(organizationName: string, segments: string[]):
17
17
  );
18
18
  }
19
19
 
20
- // Validated before reaching Infisical/KGC/RDFox since the Keycloak attribute is admin-settable.
20
+ // Validated before reaching Infisical, KGC or the datastore, since the Keycloak attribute is admin-settable.
21
21
  const datastoreIdPattern = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
22
22
 
23
23
  export function isValidDatastoreId(id: string): boolean {
@@ -9,18 +9,18 @@ export function shouldRequestCitations(seed: string, rate: number = memoryCitati
9
9
 
10
10
  export type CitationRequestTurn = {
11
11
  hasPersonalPreload: boolean;
12
+ hasPersonalRecall: boolean;
12
13
  hasSharedSections: boolean;
13
14
  seed: string;
14
15
  };
15
16
 
16
17
  export type CitationDecision =
17
18
  | { requested: false; reason: "none" }
18
- | { requested: true; reason: "personal" | "sampled" };
19
+ | { requested: true; reason: "personal" | "recalled" | "sampled" };
19
20
 
20
21
  export function citationDecisionForTurn(turn: CitationRequestTurn, rate?: number): CitationDecision {
21
22
  if (turn.hasPersonalPreload) return { requested: true, reason: "personal" };
22
- if (turn.hasSharedSections && shouldRequestCitations(turn.seed, rate)) {
23
- return { requested: true, reason: "sampled" };
24
- }
25
- return { requested: false, reason: "none" };
23
+ if (!turn.hasPersonalRecall && !turn.hasSharedSections) return { requested: false, reason: "none" };
24
+ if (!shouldRequestCitations(turn.seed, rate)) return { requested: false, reason: "none" };
25
+ return { requested: true, reason: turn.hasPersonalRecall ? "recalled" : "sampled" };
26
26
  }
@@ -7,7 +7,7 @@ export type DiversityCandidate = {
7
7
  description?: string | null;
8
8
  };
9
9
 
10
- const tokenPattern = /[a-z0-9]+/g;
10
+ const tokenPattern = /[\p{L}\p{N}]+/gu;
11
11
 
12
12
  const minimumTokenLength = 3;
13
13
 
@@ -5,6 +5,8 @@ export const rankFusionConstant = 60;
5
5
 
6
6
  export const maxKeywordTerms = 8;
7
7
 
8
+ export const maxKeywordTermLength = 40;
9
+
8
10
  export type KeywordCandidate = DiversityCandidate & { iri: string };
9
11
 
10
12
  // A term feeds a SPARQL CONTAINS that admits rows, so a stray function word like "the" would widen the pool to the
@@ -103,7 +105,7 @@ const stopWords = new Set([
103
105
 
104
106
  export function keywordTerms(text: string, limit: number = maxKeywordTerms): string[] {
105
107
  return [...memoryTokens({ label: text })]
106
- .filter((token) => !stopWords.has(token))
108
+ .filter((token) => !stopWords.has(token) && token.length <= maxKeywordTermLength)
107
109
  .sort((a, b) => b.length - a.length || a.localeCompare(b))
108
110
  .slice(0, limit);
109
111
  }
@@ -3,12 +3,8 @@ import {
3
3
  expandPrefix as expandPrefixIri,
4
4
  iriLocalName as iriLocalNameValue,
5
5
  iriNamespace as iriNamespaceValue,
6
- rdfoxDefaultBaseIri as rdfoxDefaultBaseIriValue,
7
- shaclGraphIri as shaclGraphIriValue,
8
6
  } from "@manta-eu/rdf-lib/namespaces";
9
7
 
10
- export const rulesGraphIri = `${rdfoxDefaultBaseIriValue}rules`;
11
-
12
8
  // KGC uploads the realm ontology here (kgc/kgc/realms/lib/ontology.py: realm_base + "ontology").
13
9
  export const ontologyGraphIri = expandPrefixIri(":ontology");
14
10
 
@@ -19,8 +15,6 @@ export const writeLifecycle = {
19
15
  createOnly: expandPrefixIri("relay:CreateOnly"),
20
16
  };
21
17
 
22
- export const nonDataGraphIris = [ontologyGraphIri, shaclGraphIriValue, rulesGraphIri];
23
-
24
18
  export function mintInstanceIri(classIri: string, localId: string): string {
25
19
  return `${iriNamespaceValue(classIri)}${encodeIriLocalNameValue(`${iriLocalNameValue(classIri)}_${localId}`)}`;
26
20
  }
@@ -33,7 +27,7 @@ export {
33
27
  encodeIriUnsafeChars,
34
28
  expandPrefix,
35
29
  formatEntityName,
36
- formatIriForRdfox,
30
+ formatIriForSparql,
37
31
  getNamespaceValues,
38
32
  isFullIri,
39
33
  isValidFullIri,
@@ -52,8 +46,7 @@ export {
52
46
  nfo,
53
47
  parseEntityUri,
54
48
  prependMissingSparqlPrefixes,
55
- rdfoxDefaultBaseIri,
56
- shaclGraphIri,
49
+ shaclGraph,
57
50
  sh,
58
51
  toTurtlePrefixes,
59
52
  validateFullIri,
@@ -1,5 +1,5 @@
1
1
  import type {
2
- RDFoxFactsOutput,
2
+ QueryKnowledgeGraphOutput,
3
3
  ShowEntitiesOutput,
4
4
  SparqlJsonResults,
5
5
  ToolErrorResult,
@@ -43,8 +43,11 @@ function coerceWith<T>(
43
43
  return { is_error: true, content: `Unexpected ${toolName} output format` };
44
44
  }
45
45
 
46
- function coerceRDFoxFactsOutput(raw: unknown): RDFoxFactsOutput {
47
- return coerceWith<RDFoxFactsOutput>("getRDFoxFacts", raw, [isSparqlJsonResults, isJsonLdGraphDocument]);
46
+ function coerceQueryKnowledgeGraphOutput(raw: unknown): QueryKnowledgeGraphOutput {
47
+ return coerceWith<QueryKnowledgeGraphOutput>("queryKnowledgeGraph", raw, [
48
+ isSparqlJsonResults,
49
+ isJsonLdGraphDocument,
50
+ ]);
48
51
  }
49
52
 
50
53
  export function isShowEntitiesResult(data: unknown): data is Exclude<ShowEntitiesOutput, ToolErrorResult> {
@@ -62,7 +65,7 @@ function coerceShowEntitiesOutput(raw: unknown): ShowEntitiesOutput {
62
65
  }
63
66
 
64
67
  const coercers: Partial<Record<ToolName, ToolOutputCoercer<ToolName>>> = {
65
- getRDFoxFacts: coerceRDFoxFactsOutput as ToolOutputCoercer<"getRDFoxFacts">,
68
+ queryKnowledgeGraph: coerceQueryKnowledgeGraphOutput as ToolOutputCoercer<"queryKnowledgeGraph">,
66
69
  showEntities: coerceShowEntitiesOutput as ToolOutputCoercer<"showEntities">,
67
70
  };
68
71