@botpress/cognitive 0.1.6 → 0.1.8

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.
@@ -1,19 +1,19 @@
1
1
 
2
- > @botpress/cognitive@0.1.6 build /home/runner/work/botpress/botpress/packages/cognitive
2
+ > @botpress/cognitive@0.1.8 build /home/runner/work/botpress/botpress/packages/cognitive
3
3
  > pnpm build:type && pnpm build:neutral && size-limit
4
4
 
5
5
 
6
- > @botpress/cognitive@0.1.6 build:type /home/runner/work/botpress/botpress/packages/cognitive
6
+ > @botpress/cognitive@0.1.8 build:type /home/runner/work/botpress/botpress/packages/cognitive
7
7
  > tsup --tsconfig tsconfig.build.json ./src/index.ts --dts-resolve --dts-only --clean
8
8
 
9
9
  CLI Building entry: ./src/index.ts
10
10
  CLI Using tsconfig: tsconfig.build.json
11
11
  CLI tsup v8.0.2
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 16779ms
14
- DTS dist/index.d.ts 487.14 KB
13
+ DTS ⚡️ Build success in 17458ms
14
+ DTS dist/index.d.ts 495.72 KB
15
15
 
16
- > @botpress/cognitive@0.1.6 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
16
+ > @botpress/cognitive@0.1.8 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
17
17
  > ts-node -T ./build.ts --neutral
18
18
 
19
19
  Done
package/dist/index.d.ts CHANGED
@@ -2607,6 +2607,12 @@ interface ConfigureIntegrationRequestBody {
2607
2607
  * Recurring schedule on which `register()` will be called on the integration
2608
2608
  */
2609
2609
  scheduleRegisterCall?: "hourly" | "daily" | "weekly" | "bi-weekly" | "monthly" | "bi-monthly" | "quarterly" | "yearly";
2610
+ /**
2611
+ * Sandbox identifiers for the integration. Setting this to null will remove all sandbox identifiers. Setting an individual sandbox identifier to null will remove that sandbox identifier. This is an experimental feature meant to be used by specific integrations.
2612
+ */
2613
+ sandboxIdentifiers?: {
2614
+ [k: string]: {} | null;
2615
+ } | null;
2610
2616
  }
2611
2617
  type ConfigureIntegrationInput = ConfigureIntegrationRequestBody & ConfigureIntegrationRequestHeaders & ConfigureIntegrationRequestQuery & ConfigureIntegrationRequestParams;
2612
2618
  interface ConfigureIntegrationResponse {
@@ -3842,6 +3848,16 @@ interface GetPublicIntegrationByIdResponse {
3842
3848
  */
3843
3849
  extractScript?: string;
3844
3850
  };
3851
+ sandbox?: {
3852
+ /**
3853
+ * VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook used specifically for the sandbox
3854
+ */
3855
+ identifierExtractScript?: string;
3856
+ /**
3857
+ * VRL Script of the [Integration](#schema_integration) to extract the message from an incoming webhook used specifically for the sandbox
3858
+ */
3859
+ messageExtractScript?: string;
3860
+ };
3845
3861
  /**
3846
3862
  * URL of the [Integration](#schema_integration)
3847
3863
  */
@@ -4217,6 +4233,16 @@ interface GetPublicIntegrationResponse {
4217
4233
  */
4218
4234
  extractScript?: string;
4219
4235
  };
4236
+ sandbox?: {
4237
+ /**
4238
+ * VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook used specifically for the sandbox
4239
+ */
4240
+ identifierExtractScript?: string;
4241
+ /**
4242
+ * VRL Script of the [Integration](#schema_integration) to extract the message from an incoming webhook used specifically for the sandbox
4243
+ */
4244
+ messageExtractScript?: string;
4245
+ };
4220
4246
  /**
4221
4247
  * URL of the [Integration](#schema_integration)
4222
4248
  */
@@ -7194,7 +7220,7 @@ interface CreateIntegrationRequestBody {
7194
7220
  * Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
7195
7221
  */
7196
7222
  secrets?: {
7197
- [k: string]: string;
7223
+ [k: string]: string | null;
7198
7224
  };
7199
7225
  /**
7200
7226
  * JavaScript code of the integration
@@ -7258,6 +7284,16 @@ interface CreateIntegrationResponse {
7258
7284
  */
7259
7285
  extractScript?: string;
7260
7286
  };
7287
+ sandbox?: {
7288
+ /**
7289
+ * VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook used specifically for the sandbox
7290
+ */
7291
+ identifierExtractScript?: string;
7292
+ /**
7293
+ * VRL Script of the [Integration](#schema_integration) to extract the message from an incoming webhook used specifically for the sandbox
7294
+ */
7295
+ messageExtractScript?: string;
7296
+ };
7261
7297
  /**
7262
7298
  * URL of the [Integration](#schema_integration)
7263
7299
  */
@@ -7864,7 +7900,7 @@ interface ValidateIntegrationCreationRequestBody {
7864
7900
  * Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
7865
7901
  */
7866
7902
  secrets?: {
7867
- [k: string]: string;
7903
+ [k: string]: string | null;
7868
7904
  };
7869
7905
  /**
7870
7906
  * JavaScript code of the integration
@@ -8171,6 +8207,10 @@ interface UpdateIntegrationRequestBody {
8171
8207
  };
8172
8208
  } | null;
8173
8209
  };
8210
+ sandbox?: {
8211
+ identifierExtractScript?: string | null;
8212
+ messageExtractScript?: string | null;
8213
+ };
8174
8214
  /**
8175
8215
  * Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
8176
8216
  */
@@ -8235,6 +8275,16 @@ interface UpdateIntegrationResponse {
8235
8275
  */
8236
8276
  extractScript?: string;
8237
8277
  };
8278
+ sandbox?: {
8279
+ /**
8280
+ * VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook used specifically for the sandbox
8281
+ */
8282
+ identifierExtractScript?: string;
8283
+ /**
8284
+ * VRL Script of the [Integration](#schema_integration) to extract the message from an incoming webhook used specifically for the sandbox
8285
+ */
8286
+ messageExtractScript?: string;
8287
+ };
8238
8288
  /**
8239
8289
  * URL of the [Integration](#schema_integration)
8240
8290
  */
@@ -8830,6 +8880,10 @@ interface ValidateIntegrationUpdateRequestBody {
8830
8880
  };
8831
8881
  } | null;
8832
8882
  };
8883
+ sandbox?: {
8884
+ identifierExtractScript?: string | null;
8885
+ messageExtractScript?: string | null;
8886
+ };
8833
8887
  /**
8834
8888
  * Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
8835
8889
  */
@@ -8874,8 +8928,17 @@ interface ListIntegrationsRequestHeaders {
8874
8928
  }
8875
8929
  interface ListIntegrationsRequestQuery {
8876
8930
  nextToken?: string;
8931
+ limit?: number;
8877
8932
  name?: string;
8878
8933
  version?: string;
8934
+ interfaceId?: string;
8935
+ interfaceName?: string;
8936
+ visibility?: "public" | "private";
8937
+ installedByBotId?: string;
8938
+ verificationStatus?: "unapproved" | "pending" | "approved" | "rejected";
8939
+ search?: string;
8940
+ sortBy?: "popularity" | "name" | "createdAt" | "updatedAt" | "installCount";
8941
+ direction?: "asc" | "desc";
8879
8942
  dev?: boolean;
8880
8943
  }
8881
8944
  interface ListIntegrationsRequestParams {
@@ -8925,6 +8988,36 @@ interface ListIntegrationsResponse {
8925
8988
  * Status of the integration version verification
8926
8989
  */
8927
8990
  verificationStatus: "unapproved" | "pending" | "approved" | "rejected";
8991
+ /**
8992
+ * Metadata about which fields matched the search criteria
8993
+ */
8994
+ matchedOn?: {
8995
+ /**
8996
+ * Whether the integration name matched the search term
8997
+ */
8998
+ name?: boolean;
8999
+ /**
9000
+ * Whether the integration title matched the search term
9001
+ */
9002
+ title?: boolean;
9003
+ /**
9004
+ * Whether the integration description matched the search term
9005
+ */
9006
+ description?: boolean;
9007
+ /**
9008
+ * Action names that matched the search term
9009
+ */
9010
+ actions?: string[];
9011
+ /**
9012
+ * Interface names that matched the search term
9013
+ */
9014
+ interfaces?: string[];
9015
+ };
9016
+ ownerWorkspace?: {
9017
+ id: string;
9018
+ handle: string | null;
9019
+ name: string;
9020
+ };
8928
9021
  }[];
8929
9022
  meta: {
8930
9023
  /**
@@ -8971,6 +9064,16 @@ interface GetIntegrationResponse {
8971
9064
  */
8972
9065
  extractScript?: string;
8973
9066
  };
9067
+ sandbox?: {
9068
+ /**
9069
+ * VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook used specifically for the sandbox
9070
+ */
9071
+ identifierExtractScript?: string;
9072
+ /**
9073
+ * VRL Script of the [Integration](#schema_integration) to extract the message from an incoming webhook used specifically for the sandbox
9074
+ */
9075
+ messageExtractScript?: string;
9076
+ };
8974
9077
  /**
8975
9078
  * URL of the [Integration](#schema_integration)
8976
9079
  */
@@ -9365,6 +9468,16 @@ interface GetIntegrationByNameResponse {
9365
9468
  */
9366
9469
  extractScript?: string;
9367
9470
  };
9471
+ sandbox?: {
9472
+ /**
9473
+ * VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook used specifically for the sandbox
9474
+ */
9475
+ identifierExtractScript?: string;
9476
+ /**
9477
+ * VRL Script of the [Integration](#schema_integration) to extract the message from an incoming webhook used specifically for the sandbox
9478
+ */
9479
+ messageExtractScript?: string;
9480
+ };
9368
9481
  /**
9369
9482
  * URL of the [Integration](#schema_integration)
9370
9483
  */
@@ -11598,6 +11711,22 @@ interface ListPluginsResponse {
11598
11711
  * Version of the [Plugin](#schema_plugin)
11599
11712
  */
11600
11713
  version: string;
11714
+ /**
11715
+ * Title of the plugin. This is the name that will be displayed in the UI
11716
+ */
11717
+ title: string;
11718
+ /**
11719
+ * Description of the plugin. This is the description that will be displayed in the UI
11720
+ */
11721
+ description: string;
11722
+ /**
11723
+ * URL of the icon of the plugin. This is the icon that will be displayed in the UI
11724
+ */
11725
+ iconUrl: string;
11726
+ /**
11727
+ * URL of the readme of the plugin. This is the readme that will be displayed in the UI
11728
+ */
11729
+ readmeUrl: string;
11601
11730
  }[];
11602
11731
  meta: {
11603
11732
  /**
@@ -12659,6 +12788,105 @@ interface ListFileTagValuesResponse {
12659
12788
  };
12660
12789
  }
12661
12790
 
12791
+ interface CreateKnowledgeBaseRequestHeaders {
12792
+ }
12793
+ interface CreateKnowledgeBaseRequestQuery {
12794
+ }
12795
+ interface CreateKnowledgeBaseRequestParams {
12796
+ }
12797
+ interface CreateKnowledgeBaseRequestBody {
12798
+ /**
12799
+ * Name of the knowledge base.
12800
+ */
12801
+ name: string;
12802
+ }
12803
+ type CreateKnowledgeBaseInput = CreateKnowledgeBaseRequestBody & CreateKnowledgeBaseRequestHeaders & CreateKnowledgeBaseRequestQuery & CreateKnowledgeBaseRequestParams;
12804
+ interface CreateKnowledgeBaseResponse {
12805
+ knowledgeBase: {
12806
+ /**
12807
+ * Knowledge base ID
12808
+ */
12809
+ id: string;
12810
+ /**
12811
+ * Name of the knowledge base.
12812
+ */
12813
+ name: string;
12814
+ };
12815
+ }
12816
+
12817
+ interface DeleteKnowledgeBaseRequestHeaders {
12818
+ }
12819
+ interface DeleteKnowledgeBaseRequestQuery {
12820
+ }
12821
+ interface DeleteKnowledgeBaseRequestParams {
12822
+ id: string;
12823
+ }
12824
+ interface DeleteKnowledgeBaseRequestBody {
12825
+ }
12826
+ type DeleteKnowledgeBaseInput = DeleteKnowledgeBaseRequestBody & DeleteKnowledgeBaseRequestHeaders & DeleteKnowledgeBaseRequestQuery & DeleteKnowledgeBaseRequestParams;
12827
+ interface DeleteKnowledgeBaseResponse {
12828
+ }
12829
+
12830
+ interface UpdateKnowledgeBaseRequestHeaders {
12831
+ }
12832
+ interface UpdateKnowledgeBaseRequestQuery {
12833
+ }
12834
+ interface UpdateKnowledgeBaseRequestParams {
12835
+ id: string;
12836
+ }
12837
+ interface UpdateKnowledgeBaseRequestBody {
12838
+ /**
12839
+ * New name of the knowledge base.
12840
+ */
12841
+ name: string;
12842
+ }
12843
+ type UpdateKnowledgeBaseInput = UpdateKnowledgeBaseRequestBody & UpdateKnowledgeBaseRequestHeaders & UpdateKnowledgeBaseRequestQuery & UpdateKnowledgeBaseRequestParams;
12844
+ interface UpdateKnowledgeBaseResponse {
12845
+ knowledgeBase: {
12846
+ /**
12847
+ * Knowledge base ID
12848
+ */
12849
+ id: string;
12850
+ /**
12851
+ * Name of the knowledge base.
12852
+ */
12853
+ name: string;
12854
+ };
12855
+ }
12856
+
12857
+ interface ListKnowledgeBasesRequestHeaders {
12858
+ }
12859
+ interface ListKnowledgeBasesRequestQuery {
12860
+ nextToken?: string;
12861
+ }
12862
+ interface ListKnowledgeBasesRequestParams {
12863
+ }
12864
+ interface ListKnowledgeBasesRequestBody {
12865
+ }
12866
+ type ListKnowledgeBasesInput = ListKnowledgeBasesRequestBody & ListKnowledgeBasesRequestHeaders & ListKnowledgeBasesRequestQuery & ListKnowledgeBasesRequestParams;
12867
+ interface ListKnowledgeBasesResponse {
12868
+ knowledgeBases: {
12869
+ /**
12870
+ * Knowledge base ID
12871
+ */
12872
+ id: string;
12873
+ /**
12874
+ * Name of the knowledge base.
12875
+ */
12876
+ name: string;
12877
+ /**
12878
+ * Knowledge base creation timestamp in ISO 8601 format
12879
+ */
12880
+ createdAt: string;
12881
+ }[];
12882
+ meta: {
12883
+ /**
12884
+ * The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint.
12885
+ */
12886
+ nextToken?: string;
12887
+ };
12888
+ }
12889
+
12662
12890
  interface ListTablesRequestHeaders {
12663
12891
  }
12664
12892
  interface ListTablesRequestQuery {
@@ -14431,6 +14659,10 @@ declare class Client$1 {
14431
14659
  readonly listFilePassages: (input: ListFilePassagesInput) => Promise<ListFilePassagesResponse>;
14432
14660
  readonly listFileTags: (input: ListFileTagsInput) => Promise<ListFileTagsResponse>;
14433
14661
  readonly listFileTagValues: (input: ListFileTagValuesInput) => Promise<ListFileTagValuesResponse>;
14662
+ readonly createKnowledgeBase: (input: CreateKnowledgeBaseInput) => Promise<CreateKnowledgeBaseResponse>;
14663
+ readonly deleteKnowledgeBase: (input: DeleteKnowledgeBaseInput) => Promise<DeleteKnowledgeBaseResponse>;
14664
+ readonly updateKnowledgeBase: (input: UpdateKnowledgeBaseInput) => Promise<UpdateKnowledgeBaseResponse>;
14665
+ readonly listKnowledgeBases: (input: ListKnowledgeBasesInput) => Promise<ListKnowledgeBasesResponse>;
14434
14666
  readonly listTables: (input: ListTablesInput) => Promise<ListTablesResponse>;
14435
14667
  readonly getTable: (input: GetTableInput) => Promise<GetTableResponse>;
14436
14668
  readonly getOrCreateTable: (input: GetOrCreateTableInput) => Promise<GetOrCreateTableResponse>;
@@ -14666,6 +14898,18 @@ declare class Lister {
14666
14898
  iconUrl: string;
14667
14899
  public: boolean;
14668
14900
  verificationStatus: "unapproved" | "pending" | "approved" | "rejected";
14901
+ matchedOn?: {
14902
+ name?: boolean;
14903
+ title?: boolean;
14904
+ description?: boolean;
14905
+ actions?: string[];
14906
+ interfaces?: string[];
14907
+ };
14908
+ ownerWorkspace?: {
14909
+ id: string;
14910
+ handle: string | null;
14911
+ name: string;
14912
+ };
14669
14913
  }>;
14670
14914
  readonly interfaces: (props: ListInputs["listInterfaces"]) => AsyncCollection<{
14671
14915
  id: string;
@@ -14725,7 +14969,7 @@ declare class Client extends Client$1 implements IClient {
14725
14969
  /**
14726
14970
  * Create/update and upload a file in a single step. Returns an object containing the file metadata and the URL to retrieve the file.
14727
14971
  */
14728
- readonly uploadFile: ({ key, index, tags, contentType, accessPolicies, content, url, indexing, expiresAt, publicContentImmediatelyAccessible, }: ClientInputs["uploadFile"]) => Promise<ClientOutputs["uploadFile"]>;
14972
+ readonly uploadFile: ({ key, index, tags, contentType, accessPolicies, content, url, indexing, expiresAt, metadata, publicContentImmediatelyAccessible, }: ClientInputs["uploadFile"]) => Promise<ClientOutputs["uploadFile"]>;
14729
14973
  }
14730
14974
 
14731
14975
  // TypeScript Version: 4.7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cognitive",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Wrapper around the Botpress Client to call LLMs",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",