@botpress/cognitive 0.1.17 → 0.1.19

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.17 build /home/runner/work/botpress/botpress/packages/cognitive
2
+ > @botpress/cognitive@0.1.19 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.17 build:type /home/runner/work/botpress/botpress/packages/cognitive
6
+ > @botpress/cognitive@0.1.19 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 12149ms
14
- DTS dist/index.d.ts 555.36 KB
13
+ DTS ⚡️ Build success in 10520ms
14
+ DTS dist/index.d.ts 568.23 KB
15
15
 
16
- > @botpress/cognitive@0.1.17 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
16
+ > @botpress/cognitive@0.1.19 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
@@ -5569,6 +5569,388 @@ interface GetPublicPluginCodeResponse {
5569
5569
  code: string;
5570
5570
  }
5571
5571
 
5572
+ interface ListPublicInterfacesRequestHeaders {
5573
+ }
5574
+ interface ListPublicInterfacesRequestQuery {
5575
+ nextToken?: string;
5576
+ name?: string;
5577
+ version?: string;
5578
+ }
5579
+ interface ListPublicInterfacesRequestParams {
5580
+ }
5581
+ interface ListPublicInterfacesRequestBody {
5582
+ }
5583
+ type ListPublicInterfacesInput = ListPublicInterfacesRequestBody & ListPublicInterfacesRequestHeaders & ListPublicInterfacesRequestQuery & ListPublicInterfacesRequestParams;
5584
+ interface ListPublicInterfacesResponse {
5585
+ interfaces: {
5586
+ /**
5587
+ * ID of the [Interface](#schema_interface)
5588
+ */
5589
+ id: string;
5590
+ /**
5591
+ * Creation date of the [Interface](#schema_interface) in ISO 8601 format
5592
+ */
5593
+ createdAt: string;
5594
+ /**
5595
+ * Updating date of the [Interface](#schema_interface) in ISO 8601 format
5596
+ */
5597
+ updatedAt: string;
5598
+ /**
5599
+ * Name of the [Interface](#schema_interface)
5600
+ */
5601
+ name: string;
5602
+ /**
5603
+ * Version of the [Interface](#schema_interface)
5604
+ */
5605
+ version: string;
5606
+ /**
5607
+ * Title of the interface. This is the name that will be displayed in the UI
5608
+ */
5609
+ title: string;
5610
+ /**
5611
+ * Description of the interface. This is the description that will be displayed in the UI
5612
+ */
5613
+ description: string;
5614
+ /**
5615
+ * URL of the icon of the interface. This is the icon that will be displayed in the UI
5616
+ */
5617
+ iconUrl: string;
5618
+ /**
5619
+ * URL of the readme of the interface. This is the readme that will be displayed in the UI
5620
+ */
5621
+ readmeUrl: string;
5622
+ /**
5623
+ * Indicates if the interface is public. Public interfaces are available to all and cannot be updated without creating a new version.
5624
+ */
5625
+ public: boolean;
5626
+ }[];
5627
+ meta: {
5628
+ /**
5629
+ * 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.
5630
+ */
5631
+ nextToken?: string;
5632
+ };
5633
+ }
5634
+
5635
+ interface GetPublicInterfaceByIdRequestHeaders {
5636
+ }
5637
+ interface GetPublicInterfaceByIdRequestQuery {
5638
+ }
5639
+ interface GetPublicInterfaceByIdRequestParams {
5640
+ id: string;
5641
+ }
5642
+ interface GetPublicInterfaceByIdRequestBody {
5643
+ }
5644
+ type GetPublicInterfaceByIdInput = GetPublicInterfaceByIdRequestBody & GetPublicInterfaceByIdRequestHeaders & GetPublicInterfaceByIdRequestQuery & GetPublicInterfaceByIdRequestParams;
5645
+ interface GetPublicInterfaceByIdResponse {
5646
+ interface: {
5647
+ /**
5648
+ * ID of the [Interface](#schema_interface)
5649
+ */
5650
+ id: string;
5651
+ /**
5652
+ * Creation date of the [Interface](#schema_interface) in ISO 8601 format
5653
+ */
5654
+ createdAt: string;
5655
+ /**
5656
+ * Updating date of the [Interface](#schema_interface) in ISO 8601 format
5657
+ */
5658
+ updatedAt: string;
5659
+ /**
5660
+ * Name of the [Interface](#schema_interface)
5661
+ */
5662
+ name: string;
5663
+ /**
5664
+ * Version of the [Interface](#schema_interface)
5665
+ */
5666
+ version: string;
5667
+ entities: {
5668
+ /**
5669
+ * Entity definition
5670
+ */
5671
+ [k: string]: {
5672
+ /**
5673
+ * Title of the entity
5674
+ */
5675
+ title?: string;
5676
+ /**
5677
+ * Description of the entity
5678
+ */
5679
+ description?: string;
5680
+ schema: {
5681
+ [k: string]: any;
5682
+ };
5683
+ };
5684
+ };
5685
+ events: {
5686
+ /**
5687
+ * Event Definition
5688
+ */
5689
+ [k: string]: {
5690
+ /**
5691
+ * Title of the event
5692
+ */
5693
+ title?: string;
5694
+ /**
5695
+ * Description of the event
5696
+ */
5697
+ description?: string;
5698
+ schema: {
5699
+ [k: string]: any;
5700
+ };
5701
+ /**
5702
+ * Optional attributes
5703
+ */
5704
+ attributes?: {
5705
+ [k: string]: string;
5706
+ };
5707
+ };
5708
+ };
5709
+ actions: {
5710
+ /**
5711
+ * Action definition
5712
+ */
5713
+ [k: string]: {
5714
+ /**
5715
+ * Title of the action
5716
+ */
5717
+ title?: string;
5718
+ /**
5719
+ * Description of the action
5720
+ */
5721
+ description?: string;
5722
+ billable?: boolean;
5723
+ cacheable?: boolean;
5724
+ input: {
5725
+ schema: {
5726
+ [k: string]: any;
5727
+ };
5728
+ };
5729
+ output: {
5730
+ schema: {
5731
+ [k: string]: any;
5732
+ };
5733
+ };
5734
+ /**
5735
+ * Optional attributes
5736
+ */
5737
+ attributes?: {
5738
+ [k: string]: string;
5739
+ };
5740
+ };
5741
+ };
5742
+ channels: {
5743
+ [k: string]: {
5744
+ /**
5745
+ * Title of the channel
5746
+ */
5747
+ title?: string;
5748
+ /**
5749
+ * Description of the channel
5750
+ */
5751
+ description?: string;
5752
+ messages: {
5753
+ /**
5754
+ * Message definition
5755
+ */
5756
+ [k: string]: {
5757
+ schema: {
5758
+ [k: string]: any;
5759
+ };
5760
+ };
5761
+ };
5762
+ };
5763
+ };
5764
+ /**
5765
+ * Template string optionaly used at build time by integrations implementing this interface to pick a name for actions and events.
5766
+ */
5767
+ nameTemplate?: {
5768
+ script: string;
5769
+ language: string;
5770
+ };
5771
+ /**
5772
+ * Title of the interface. This is the name that will be displayed in the UI
5773
+ */
5774
+ title: string;
5775
+ /**
5776
+ * Description of the interface. This is the description that will be displayed in the UI
5777
+ */
5778
+ description: string;
5779
+ /**
5780
+ * URL of the icon of the interface. This is the icon that will be displayed in the UI
5781
+ */
5782
+ iconUrl: string;
5783
+ /**
5784
+ * URL of the readme of the interface. This is the readme that will be displayed in the UI
5785
+ */
5786
+ readmeUrl: string;
5787
+ /**
5788
+ * Indicates if the interface is public. Public interfaces are available to all and cannot be updated without creating a new version.
5789
+ */
5790
+ public: boolean;
5791
+ };
5792
+ }
5793
+
5794
+ interface GetPublicInterfaceRequestHeaders {
5795
+ }
5796
+ interface GetPublicInterfaceRequestQuery {
5797
+ }
5798
+ interface GetPublicInterfaceRequestParams {
5799
+ name: string;
5800
+ version: string;
5801
+ }
5802
+ interface GetPublicInterfaceRequestBody {
5803
+ }
5804
+ type GetPublicInterfaceInput = GetPublicInterfaceRequestBody & GetPublicInterfaceRequestHeaders & GetPublicInterfaceRequestQuery & GetPublicInterfaceRequestParams;
5805
+ interface GetPublicInterfaceResponse {
5806
+ interface: {
5807
+ /**
5808
+ * ID of the [Interface](#schema_interface)
5809
+ */
5810
+ id: string;
5811
+ /**
5812
+ * Creation date of the [Interface](#schema_interface) in ISO 8601 format
5813
+ */
5814
+ createdAt: string;
5815
+ /**
5816
+ * Updating date of the [Interface](#schema_interface) in ISO 8601 format
5817
+ */
5818
+ updatedAt: string;
5819
+ /**
5820
+ * Name of the [Interface](#schema_interface)
5821
+ */
5822
+ name: string;
5823
+ /**
5824
+ * Version of the [Interface](#schema_interface)
5825
+ */
5826
+ version: string;
5827
+ entities: {
5828
+ /**
5829
+ * Entity definition
5830
+ */
5831
+ [k: string]: {
5832
+ /**
5833
+ * Title of the entity
5834
+ */
5835
+ title?: string;
5836
+ /**
5837
+ * Description of the entity
5838
+ */
5839
+ description?: string;
5840
+ schema: {
5841
+ [k: string]: any;
5842
+ };
5843
+ };
5844
+ };
5845
+ events: {
5846
+ /**
5847
+ * Event Definition
5848
+ */
5849
+ [k: string]: {
5850
+ /**
5851
+ * Title of the event
5852
+ */
5853
+ title?: string;
5854
+ /**
5855
+ * Description of the event
5856
+ */
5857
+ description?: string;
5858
+ schema: {
5859
+ [k: string]: any;
5860
+ };
5861
+ /**
5862
+ * Optional attributes
5863
+ */
5864
+ attributes?: {
5865
+ [k: string]: string;
5866
+ };
5867
+ };
5868
+ };
5869
+ actions: {
5870
+ /**
5871
+ * Action definition
5872
+ */
5873
+ [k: string]: {
5874
+ /**
5875
+ * Title of the action
5876
+ */
5877
+ title?: string;
5878
+ /**
5879
+ * Description of the action
5880
+ */
5881
+ description?: string;
5882
+ billable?: boolean;
5883
+ cacheable?: boolean;
5884
+ input: {
5885
+ schema: {
5886
+ [k: string]: any;
5887
+ };
5888
+ };
5889
+ output: {
5890
+ schema: {
5891
+ [k: string]: any;
5892
+ };
5893
+ };
5894
+ /**
5895
+ * Optional attributes
5896
+ */
5897
+ attributes?: {
5898
+ [k: string]: string;
5899
+ };
5900
+ };
5901
+ };
5902
+ channels: {
5903
+ [k: string]: {
5904
+ /**
5905
+ * Title of the channel
5906
+ */
5907
+ title?: string;
5908
+ /**
5909
+ * Description of the channel
5910
+ */
5911
+ description?: string;
5912
+ messages: {
5913
+ /**
5914
+ * Message definition
5915
+ */
5916
+ [k: string]: {
5917
+ schema: {
5918
+ [k: string]: any;
5919
+ };
5920
+ };
5921
+ };
5922
+ };
5923
+ };
5924
+ /**
5925
+ * Template string optionaly used at build time by integrations implementing this interface to pick a name for actions and events.
5926
+ */
5927
+ nameTemplate?: {
5928
+ script: string;
5929
+ language: string;
5930
+ };
5931
+ /**
5932
+ * Title of the interface. This is the name that will be displayed in the UI
5933
+ */
5934
+ title: string;
5935
+ /**
5936
+ * Description of the interface. This is the description that will be displayed in the UI
5937
+ */
5938
+ description: string;
5939
+ /**
5940
+ * URL of the icon of the interface. This is the icon that will be displayed in the UI
5941
+ */
5942
+ iconUrl: string;
5943
+ /**
5944
+ * URL of the readme of the interface. This is the readme that will be displayed in the UI
5945
+ */
5946
+ readmeUrl: string;
5947
+ /**
5948
+ * Indicates if the interface is public. Public interfaces are available to all and cannot be updated without creating a new version.
5949
+ */
5950
+ public: boolean;
5951
+ };
5952
+ }
5953
+
5572
5954
  interface CreateBotRequestHeaders {
5573
5955
  }
5574
5956
  interface CreateBotRequestQuery {
@@ -7026,6 +7408,7 @@ interface GetBotLogsRequestQuery {
7026
7408
  userId?: string;
7027
7409
  workflowId?: string;
7028
7410
  conversationId?: string;
7411
+ messageContains?: string;
7029
7412
  nextToken?: string;
7030
7413
  }
7031
7414
  interface GetBotLogsRequestParams {
@@ -10624,6 +11007,7 @@ interface GetIntegrationLogsRequestQuery {
10624
11007
  level?: string;
10625
11008
  userId?: string;
10626
11009
  conversationId?: string;
11010
+ messageContains?: string;
10627
11011
  nextToken?: string;
10628
11012
  }
10629
11013
  interface GetIntegrationLogsRequestParams {
@@ -11962,6 +12346,7 @@ interface ListInterfacesRequestHeaders {
11962
12346
  interface ListInterfacesRequestQuery {
11963
12347
  nextToken?: string;
11964
12348
  name?: string;
12349
+ version?: string;
11965
12350
  }
11966
12351
  interface ListInterfacesRequestParams {
11967
12352
  }
@@ -13432,8 +13817,15 @@ interface ListUsageActivityDailyRequestBody {
13432
13817
  type ListUsageActivityDailyInput = ListUsageActivityDailyRequestBody & ListUsageActivityDailyRequestHeaders & ListUsageActivityDailyRequestQuery & ListUsageActivityDailyRequestParams;
13433
13818
  interface ListUsageActivityDailyResponse {
13434
13819
  data: {
13820
+ key: string;
13435
13821
  date: string;
13436
13822
  value: number;
13823
+ metadata?: {
13824
+ botId: string;
13825
+ type: "IntegrationAction" | "FileIndexing";
13826
+ subtype: string;
13827
+ source?: string;
13828
+ };
13437
13829
  }[];
13438
13830
  meta: {
13439
13831
  nextToken?: string;
@@ -14290,6 +14682,33 @@ interface ListFilePassagesResponse {
14290
14682
  };
14291
14683
  }
14292
14684
 
14685
+ interface SetFilePassagesRequestHeaders {
14686
+ }
14687
+ interface SetFilePassagesRequestQuery {
14688
+ }
14689
+ interface SetFilePassagesRequestParams {
14690
+ id: string;
14691
+ }
14692
+ interface SetFilePassagesRequestBody {
14693
+ /**
14694
+ * Note: The passages should appear in the array in the same order as they appear in the original document.
14695
+ */
14696
+ passages: {
14697
+ /**
14698
+ * The content of the passage, supports Markdown formatting.
14699
+ */
14700
+ content: string;
14701
+ /**
14702
+ * The type should match the Markdown format used for the passage content.
14703
+ */
14704
+ type?: "title" | "subtitle" | "paragraph" | "blockquote" | "list" | "table" | "code" | "image";
14705
+ pageNumber?: number;
14706
+ }[];
14707
+ }
14708
+ type SetFilePassagesInput = SetFilePassagesRequestBody & SetFilePassagesRequestHeaders & SetFilePassagesRequestQuery & SetFilePassagesRequestParams;
14709
+ interface SetFilePassagesResponse {
14710
+ }
14711
+
14293
14712
  interface ListFileTagsRequestHeaders {
14294
14713
  }
14295
14714
  interface ListFileTagsRequestQuery {
@@ -16124,6 +16543,9 @@ declare class Client$1 {
16124
16543
  readonly getPublicPluginById: (input: GetPublicPluginByIdInput) => Promise<GetPublicPluginByIdResponse>;
16125
16544
  readonly getPublicPlugin: (input: GetPublicPluginInput) => Promise<GetPublicPluginResponse>;
16126
16545
  readonly getPublicPluginCode: (input: GetPublicPluginCodeInput) => Promise<GetPublicPluginCodeResponse>;
16546
+ readonly listPublicInterfaces: (input: ListPublicInterfacesInput) => Promise<ListPublicInterfacesResponse>;
16547
+ readonly getPublicInterfaceById: (input: GetPublicInterfaceByIdInput) => Promise<GetPublicInterfaceByIdResponse>;
16548
+ readonly getPublicInterface: (input: GetPublicInterfaceInput) => Promise<GetPublicInterfaceResponse>;
16127
16549
  readonly createBot: (input: CreateBotInput) => Promise<CreateBotResponse>;
16128
16550
  readonly updateBot: (input: UpdateBotInput) => Promise<UpdateBotResponse>;
16129
16551
  readonly transferBot: (input: TransferBotInput) => Promise<TransferBotResponse>;
@@ -16211,6 +16633,7 @@ declare class Client$1 {
16211
16633
  readonly copyFile: (input: CopyFileInput) => Promise<CopyFileResponse>;
16212
16634
  readonly searchFiles: (input: SearchFilesInput) => Promise<SearchFilesResponse>;
16213
16635
  readonly listFilePassages: (input: ListFilePassagesInput) => Promise<ListFilePassagesResponse>;
16636
+ readonly setFilePassages: (input: SetFilePassagesInput) => Promise<SetFilePassagesResponse>;
16214
16637
  readonly listFileTags: (input: ListFileTagsInput) => Promise<ListFileTagsResponse>;
16215
16638
  readonly listFileTagValues: (input: ListFileTagValuesInput) => Promise<ListFileTagValuesResponse>;
16216
16639
  readonly createKnowledgeBase: (input: CreateKnowledgeBaseInput) => Promise<CreateKnowledgeBaseResponse>;
@@ -16488,6 +16911,7 @@ declare class Client extends Client$1 implements IClient {
16488
16911
  }>;
16489
16912
  interfaces: (props: {
16490
16913
  name?: string | undefined;
16914
+ version?: string | undefined;
16491
16915
  }) => AsyncCollection<{
16492
16916
  id: string;
16493
16917
  createdAt: string;
@@ -16572,8 +16996,15 @@ declare class Client extends Client$1 implements IClient {
16572
16996
  dateFrom?: string | undefined;
16573
16997
  dateUntil?: string | undefined;
16574
16998
  }) => AsyncCollection<{
16999
+ key: string;
16575
17000
  date: string;
16576
17001
  value: number;
17002
+ metadata?: {
17003
+ botId: string;
17004
+ type: "IntegrationAction" | "FileIndexing";
17005
+ subtype: string;
17006
+ source?: string;
17007
+ };
16577
17008
  }>;
16578
17009
  };
16579
17010
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cognitive",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "Wrapper around the Botpress Client to call LLMs",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",