@botpress/cognitive 0.3.12 → 0.3.14

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.3.12 build /home/runner/work/botpress/botpress/packages/cognitive
2
+ > @botpress/cognitive@0.3.14 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.3.12 build:type /home/runner/work/botpress/botpress/packages/cognitive
6
+ > @botpress/cognitive@0.3.14 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 6815ms
14
- DTS dist/index.d.ts 665.56 KB
13
+ DTS ⚡️ Build success in 7162ms
14
+ DTS dist/index.d.ts 670.76 KB
15
15
 
16
- > @botpress/cognitive@0.3.12 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
16
+ > @botpress/cognitive@0.3.14 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
@@ -1715,6 +1715,12 @@ interface ListParticipantsResponse {
1715
1715
  * Picture URL of the [User](#schema_user)
1716
1716
  */
1717
1717
  pictureUrl?: string;
1718
+ /**
1719
+ * Optional attributes
1720
+ */
1721
+ attributes?: {
1722
+ [k: string]: string;
1723
+ };
1718
1724
  }[];
1719
1725
  meta: {
1720
1726
  /**
@@ -1769,6 +1775,12 @@ interface AddParticipantResponse {
1769
1775
  * Picture URL of the [User](#schema_user)
1770
1776
  */
1771
1777
  pictureUrl?: string;
1778
+ /**
1779
+ * Optional attributes
1780
+ */
1781
+ attributes?: {
1782
+ [k: string]: string;
1783
+ };
1772
1784
  };
1773
1785
  }
1774
1786
 
@@ -1814,6 +1826,12 @@ interface GetParticipantResponse {
1814
1826
  * Picture URL of the [User](#schema_user)
1815
1827
  */
1816
1828
  pictureUrl?: string;
1829
+ /**
1830
+ * Optional attributes
1831
+ */
1832
+ attributes?: {
1833
+ [k: string]: string;
1834
+ };
1817
1835
  };
1818
1836
  }
1819
1837
 
@@ -2500,6 +2518,12 @@ interface InitializeIncomingMessageRequestBody {
2500
2518
  * URI of the user picture
2501
2519
  */
2502
2520
  pictureUrl?: string;
2521
+ /**
2522
+ * Optional attributes
2523
+ */
2524
+ attributes?: {
2525
+ [k: string]: string;
2526
+ };
2503
2527
  /**
2504
2528
  * Optional list of tag names to use for strict matching when looking up existing messages. If provided, all specified tags must match exactly for a message to be considered a match. For example, with an existing message whose tags are {"foo": "a", "bar": "b", baz: "c"}: Without this parameter, ALL tags must match exactly. With ["bar","baz"], all listed tags must match their values, and other tags are not considered.
2505
2529
  */
@@ -2583,6 +2607,12 @@ interface InitializeIncomingMessageResponse {
2583
2607
  * Picture URL of the [User](#schema_user)
2584
2608
  */
2585
2609
  pictureUrl?: string;
2610
+ /**
2611
+ * Optional attributes
2612
+ */
2613
+ attributes?: {
2614
+ [k: string]: string;
2615
+ };
2586
2616
  };
2587
2617
  /**
2588
2618
  * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
@@ -2795,6 +2825,12 @@ interface CreateUserRequestBody {
2795
2825
  * URI of the user picture
2796
2826
  */
2797
2827
  pictureUrl?: string;
2828
+ /**
2829
+ * Optional attributes
2830
+ */
2831
+ attributes?: {
2832
+ [k: string]: string;
2833
+ };
2798
2834
  }
2799
2835
  type CreateUserInput = CreateUserRequestBody & CreateUserRequestHeaders & CreateUserRequestQuery & CreateUserRequestParams;
2800
2836
  interface CreateUserResponse {
@@ -2828,6 +2864,12 @@ interface CreateUserResponse {
2828
2864
  * Picture URL of the [User](#schema_user)
2829
2865
  */
2830
2866
  pictureUrl?: string;
2867
+ /**
2868
+ * Optional attributes
2869
+ */
2870
+ attributes?: {
2871
+ [k: string]: string;
2872
+ };
2831
2873
  };
2832
2874
  }
2833
2875
 
@@ -2872,6 +2914,12 @@ interface GetUserResponse {
2872
2914
  * Picture URL of the [User](#schema_user)
2873
2915
  */
2874
2916
  pictureUrl?: string;
2917
+ /**
2918
+ * Optional attributes
2919
+ */
2920
+ attributes?: {
2921
+ [k: string]: string;
2922
+ };
2875
2923
  };
2876
2924
  }
2877
2925
 
@@ -2922,6 +2970,12 @@ interface ListUsersResponse {
2922
2970
  * Picture URL of the [User](#schema_user)
2923
2971
  */
2924
2972
  pictureUrl?: string;
2973
+ /**
2974
+ * Optional attributes
2975
+ */
2976
+ attributes?: {
2977
+ [k: string]: string;
2978
+ };
2925
2979
  }[];
2926
2980
  meta: {
2927
2981
  /**
@@ -2957,6 +3011,12 @@ interface GetOrCreateUserRequestBody {
2957
3011
  * URI of the user picture
2958
3012
  */
2959
3013
  pictureUrl?: string;
3014
+ /**
3015
+ * Optional attributes
3016
+ */
3017
+ attributes?: {
3018
+ [k: string]: string;
3019
+ };
2960
3020
  /**
2961
3021
  * Optional list of tag names to use for strict matching when looking up existing users. If provided, all specified tags must match exactly for a user to be considered a match. For example, with an existing user whose tags are {"foo": "a", "bar": "b", baz: "c"}: Without this parameter, ALL tags must match exactly. With ["bar","baz"], all listed tags must match their values, and other tags are not considered.
2962
3022
  */
@@ -2994,6 +3054,12 @@ interface GetOrCreateUserResponse {
2994
3054
  * Picture URL of the [User](#schema_user)
2995
3055
  */
2996
3056
  pictureUrl?: string;
3057
+ /**
3058
+ * Optional attributes
3059
+ */
3060
+ attributes?: {
3061
+ [k: string]: string;
3062
+ };
2997
3063
  };
2998
3064
  }
2999
3065
 
@@ -3019,6 +3085,12 @@ interface UpdateUserRequestBody {
3019
3085
  * URI of the user picture
3020
3086
  */
3021
3087
  pictureUrl?: string | null;
3088
+ /**
3089
+ * Optional attributes. Set attributes to null to remove them
3090
+ */
3091
+ attributes?: {
3092
+ [k: string]: string | null;
3093
+ };
3022
3094
  }
3023
3095
  type UpdateUserInput = UpdateUserRequestBody & UpdateUserRequestHeaders & UpdateUserRequestQuery & UpdateUserRequestParams;
3024
3096
  interface UpdateUserResponse {
@@ -3052,6 +3124,12 @@ interface UpdateUserResponse {
3052
3124
  * Picture URL of the [User](#schema_user)
3053
3125
  */
3054
3126
  pictureUrl?: string;
3127
+ /**
3128
+ * Optional attributes
3129
+ */
3130
+ attributes?: {
3131
+ [k: string]: string;
3132
+ };
3055
3133
  };
3056
3134
  }
3057
3135
 
@@ -4805,6 +4883,10 @@ interface GetPublicIntegrationByIdResponse {
4805
4883
  * URL of the [Integration](#schema_integration)
4806
4884
  */
4807
4885
  url: string;
4886
+ /**
4887
+ * Signing secret of the [Integration](#schema_integration). This field is only visible when creating a new integration or when rotating the signing secret of an existing integration.
4888
+ */
4889
+ signingSecret: string;
4808
4890
  /**
4809
4891
  * Name of the [Integration](#schema_integration)
4810
4892
  */
@@ -5221,6 +5303,10 @@ interface GetPublicIntegrationResponse {
5221
5303
  * URL of the [Integration](#schema_integration)
5222
5304
  */
5223
5305
  url: string;
5306
+ /**
5307
+ * Signing secret of the [Integration](#schema_integration). This field is only visible when creating a new integration or when rotating the signing secret of an existing integration.
5308
+ */
5309
+ signingSecret: string;
5224
5310
  /**
5225
5311
  * Name of the [Integration](#schema_integration)
5226
5312
  */
@@ -6960,7 +7046,7 @@ interface CreateBotResponse {
6960
7046
  */
6961
7047
  updatedAt: string;
6962
7048
  /**
6963
- * Signing secret of the [Bot](#schema_bot)
7049
+ * Signing secret of the [Bot](#schema_bot). This field is only visible when creating a new bot or when rotating the signing secret of an existing bot.
6964
7050
  */
6965
7051
  signingSecret: string;
6966
7052
  /**
@@ -7374,9 +7460,9 @@ interface UpdateBotRequestBody {
7374
7460
  */
7375
7461
  url?: string | null;
7376
7462
  /**
7377
- * Type of the [Bot](#schema_bot) authentication (`iam`)
7463
+ * Type of the [Bot](#schema_bot) authentication (`iam` or `hmac-sha256`)
7378
7464
  */
7379
- authentication?: "iam";
7465
+ authentication?: "iam" | "hmac-sha256";
7380
7466
  configuration?: {
7381
7467
  /**
7382
7468
  * Configuration data
@@ -7640,7 +7726,7 @@ interface UpdateBotResponse {
7640
7726
  */
7641
7727
  updatedAt: string;
7642
7728
  /**
7643
- * Signing secret of the [Bot](#schema_bot)
7729
+ * Signing secret of the [Bot](#schema_bot). This field is only visible when creating a new bot or when rotating the signing secret of an existing bot.
7644
7730
  */
7645
7731
  signingSecret: string;
7646
7732
  /**
@@ -8041,6 +8127,23 @@ interface UpdateBotResponse {
8041
8127
  };
8042
8128
  }
8043
8129
 
8130
+ interface RotateBotSigningSecretsRequestHeaders {
8131
+ }
8132
+ interface RotateBotSigningSecretsRequestQuery {
8133
+ }
8134
+ interface RotateBotSigningSecretsRequestParams {
8135
+ id: string;
8136
+ }
8137
+ interface RotateBotSigningSecretsRequestBody {
8138
+ }
8139
+ type RotateBotSigningSecretsInput = RotateBotSigningSecretsRequestBody & RotateBotSigningSecretsRequestHeaders & RotateBotSigningSecretsRequestQuery & RotateBotSigningSecretsRequestParams;
8140
+ interface RotateBotSigningSecretsResponse {
8141
+ /**
8142
+ * The new signing secret that can be used immediately. The old signing secret(s) will continue to work for 24 hours after this operation to allow for a smooth transition.
8143
+ */
8144
+ newSigningSecret: string;
8145
+ }
8146
+
8044
8147
  interface TransferBotRequestHeaders {
8045
8148
  }
8046
8149
  interface TransferBotRequestQuery {
@@ -8131,7 +8234,7 @@ interface GetBotResponse {
8131
8234
  */
8132
8235
  updatedAt: string;
8133
8236
  /**
8134
- * Signing secret of the [Bot](#schema_bot)
8237
+ * Signing secret of the [Bot](#schema_bot). This field is only visible when creating a new bot or when rotating the signing secret of an existing bot.
8135
8238
  */
8136
8239
  signingSecret: string;
8137
8240
  /**
@@ -9599,7 +9702,7 @@ interface GetAuditRecordsResponse {
9599
9702
  resourceId: string | null;
9600
9703
  resourceName?: string | null;
9601
9704
  value?: string | null;
9602
- action: "UNKNOWN" | "ADD_WORKSPACE_MEMBER" | "REMOVE_WORKSPACE_MEMBER" | "UPDATE_WORKSPACE_MEMBER" | "CLOSE_WORKSPACE" | "CREATE_BOT" | "CREATE_WORKSPACE" | "DELETE_BOT" | "DEPLOY_BOT" | "TRANSFER_BOT" | "DOWNLOAD_BOT_ARCHIVE" | "UPDATE_BOT" | "UPDATE_BOT_CHANNEL" | "UPDATE_BOT_CONFIG" | "UPDATE_PAYMENT_METHOD" | "UPDATE_WORKSPACE" | "SET_SPENDING_LIMIT" | "SET_AI_SPENDING_LIMIT" | "UPDATE_WORKSPACE_BILLING_READONLY" | "EXECUTE_AUTO_RECHARGE_SUCCESS" | "EXECUTE_AUTO_RECHARGE_FAILED";
9705
+ action: "UNKNOWN" | "ADD_WORKSPACE_MEMBER" | "REMOVE_WORKSPACE_MEMBER" | "UPDATE_WORKSPACE_MEMBER" | "CLOSE_WORKSPACE" | "CREATE_BOT" | "CREATE_WORKSPACE" | "DELETE_BOT" | "DEPLOY_BOT" | "TRANSFER_BOT" | "DOWNLOAD_BOT_ARCHIVE" | "UPDATE_BOT" | "UPDATE_BOT_CHANNEL" | "UPDATE_BOT_CONFIG" | "UPDATE_PAYMENT_METHOD" | "UPDATE_WORKSPACE" | "SET_SPENDING_LIMIT" | "SET_AI_SPENDING_LIMIT" | "UPDATE_WORKSPACE_BILLING_READONLY" | "UPDATE_WORKSPACE_PLAN_READONLY" | "UPDATE_WORKSPACE_ADDONS_READONLY" | "EXECUTE_AUTO_RECHARGE_SUCCESS" | "EXECUTE_AUTO_RECHARGE_FAILED";
9603
9706
  }[];
9604
9707
  meta: {
9605
9708
  /**
@@ -10184,6 +10287,10 @@ interface CreateIntegrationResponse {
10184
10287
  * URL of the [Integration](#schema_integration)
10185
10288
  */
10186
10289
  url: string;
10290
+ /**
10291
+ * Signing secret of the [Integration](#schema_integration). This field is only visible when creating a new integration or when rotating the signing secret of an existing integration.
10292
+ */
10293
+ signingSecret: string;
10187
10294
  /**
10188
10295
  * Name of the [Integration](#schema_integration)
10189
10296
  */
@@ -11264,6 +11371,10 @@ interface UpdateIntegrationResponse {
11264
11371
  * URL of the [Integration](#schema_integration)
11265
11372
  */
11266
11373
  url: string;
11374
+ /**
11375
+ * Signing secret of the [Integration](#schema_integration). This field is only visible when creating a new integration or when rotating the signing secret of an existing integration.
11376
+ */
11377
+ signingSecret: string;
11267
11378
  /**
11268
11379
  * Name of the [Integration](#schema_integration)
11269
11380
  */
@@ -11615,6 +11726,23 @@ interface UpdateIntegrationResponse {
11615
11726
  };
11616
11727
  }
11617
11728
 
11729
+ interface RotateIntegrationSigningSecretsRequestHeaders {
11730
+ }
11731
+ interface RotateIntegrationSigningSecretsRequestQuery {
11732
+ }
11733
+ interface RotateIntegrationSigningSecretsRequestParams {
11734
+ id: string;
11735
+ }
11736
+ interface RotateIntegrationSigningSecretsRequestBody {
11737
+ }
11738
+ type RotateIntegrationSigningSecretsInput = RotateIntegrationSigningSecretsRequestBody & RotateIntegrationSigningSecretsRequestHeaders & RotateIntegrationSigningSecretsRequestQuery & RotateIntegrationSigningSecretsRequestParams;
11739
+ interface RotateIntegrationSigningSecretsResponse {
11740
+ /**
11741
+ * The new signing secret that can be used immediately. The old signing secret(s) will continue to work for 24 hours after this operation to allow for a smooth transition.
11742
+ */
11743
+ newSigningSecret: string;
11744
+ }
11745
+
11618
11746
  interface ValidateIntegrationUpdateRequestHeaders {
11619
11747
  }
11620
11748
  interface ValidateIntegrationUpdateRequestQuery {
@@ -12119,6 +12247,10 @@ interface GetIntegrationResponse {
12119
12247
  * URL of the [Integration](#schema_integration)
12120
12248
  */
12121
12249
  url: string;
12250
+ /**
12251
+ * Signing secret of the [Integration](#schema_integration). This field is only visible when creating a new integration or when rotating the signing secret of an existing integration.
12252
+ */
12253
+ signingSecret: string;
12122
12254
  /**
12123
12255
  * Name of the [Integration](#schema_integration)
12124
12256
  */
@@ -12555,6 +12687,10 @@ interface GetIntegrationByNameResponse {
12555
12687
  * URL of the [Integration](#schema_integration)
12556
12688
  */
12557
12689
  url: string;
12690
+ /**
12691
+ * Signing secret of the [Integration](#schema_integration). This field is only visible when creating a new integration or when rotating the signing secret of an existing integration.
12692
+ */
12693
+ signingSecret: string;
12558
12694
  /**
12559
12695
  * Name of the [Integration](#schema_integration)
12560
12696
  */
@@ -18640,6 +18776,7 @@ declare class Client$1 {
18640
18776
  readonly getPublicInterface: (input: GetPublicInterfaceInput) => Promise<GetPublicInterfaceResponse>;
18641
18777
  readonly createBot: (input: CreateBotInput) => Promise<CreateBotResponse>;
18642
18778
  readonly updateBot: (input: UpdateBotInput) => Promise<UpdateBotResponse>;
18779
+ readonly rotateBotSigningSecrets: (input: RotateBotSigningSecretsInput) => Promise<RotateBotSigningSecretsResponse>;
18643
18780
  readonly transferBot: (input: TransferBotInput) => Promise<TransferBotResponse>;
18644
18781
  readonly listBots: (input: ListBotsInput) => Promise<ListBotsResponse>;
18645
18782
  readonly getBot: (input: GetBotInput) => Promise<GetBotResponse>;
@@ -18697,6 +18834,7 @@ declare class Client$1 {
18697
18834
  readonly createIntegration: (input: CreateIntegrationInput) => Promise<CreateIntegrationResponse>;
18698
18835
  readonly validateIntegrationCreation: (input: ValidateIntegrationCreationInput) => Promise<ValidateIntegrationCreationResponse>;
18699
18836
  readonly updateIntegration: (input: UpdateIntegrationInput) => Promise<UpdateIntegrationResponse>;
18837
+ readonly rotateIntegrationSigningSecrets: (input: RotateIntegrationSigningSecretsInput) => Promise<RotateIntegrationSigningSecretsResponse>;
18700
18838
  readonly validateIntegrationUpdate: (input: ValidateIntegrationUpdateInput) => Promise<ValidateIntegrationUpdateResponse>;
18701
18839
  readonly listIntegrations: (input: ListIntegrationsInput) => Promise<ListIntegrationsResponse>;
18702
18840
  readonly getIntegration: (input: GetIntegrationInput) => Promise<GetIntegrationResponse>;
@@ -18809,6 +18947,9 @@ declare class Client extends Client$1 implements IClient {
18809
18947
  };
18810
18948
  name?: string;
18811
18949
  pictureUrl?: string;
18950
+ attributes?: {
18951
+ [k: string]: string;
18952
+ };
18812
18953
  }>;
18813
18954
  events: (props: {
18814
18955
  status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
@@ -18872,6 +19013,9 @@ declare class Client extends Client$1 implements IClient {
18872
19013
  };
18873
19014
  name?: string;
18874
19015
  pictureUrl?: string;
19016
+ attributes?: {
19017
+ [k: string]: string;
19018
+ };
18875
19019
  }>;
18876
19020
  tasks: (props: {
18877
19021
  status?: ("timeout" | "pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "cancelled")[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cognitive",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "Wrapper around the Botpress Client to call LLMs",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",