@botpress/cognitive 0.3.13 → 0.3.15

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.13 build /home/runner/work/botpress/botpress/packages/cognitive
2
+ > @botpress/cognitive@0.3.15 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.13 build:type /home/runner/work/botpress/botpress/packages/cognitive
6
+ > @botpress/cognitive@0.3.15 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 7148ms
14
- DTS dist/index.d.ts 669.01 KB
13
+ DTS ⚡️ Build success in 6935ms
14
+ DTS dist/index.d.ts 660.05 KB
15
15
 
16
- > @botpress/cognitive@0.3.13 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
16
+ > @botpress/cognitive@0.3.15 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
@@ -1385,7 +1385,8 @@ interface CreateConversationResponse {
1385
1385
  */
1386
1386
  id: string;
1387
1387
  /**
1388
- * Id of the current [Task](#schema_task)
1388
+ * @deprecated
1389
+ * Unused. This field will be removed in the future.
1389
1390
  */
1390
1391
  currentTaskId?: string;
1391
1392
  /**
@@ -1437,7 +1438,8 @@ interface GetConversationResponse {
1437
1438
  */
1438
1439
  id: string;
1439
1440
  /**
1440
- * Id of the current [Task](#schema_task)
1441
+ * @deprecated
1442
+ * Unused. This field will be removed in the future.
1441
1443
  */
1442
1444
  currentTaskId?: string;
1443
1445
  /**
@@ -1496,7 +1498,8 @@ interface ListConversationsResponse {
1496
1498
  */
1497
1499
  id: string;
1498
1500
  /**
1499
- * Id of the current [Task](#schema_task)
1501
+ * @deprecated
1502
+ * Unused. This field will be removed in the future.
1500
1503
  */
1501
1504
  currentTaskId?: string;
1502
1505
  /**
@@ -1572,7 +1575,8 @@ interface GetOrCreateConversationResponse {
1572
1575
  */
1573
1576
  id: string;
1574
1577
  /**
1575
- * Id of the current [Task](#schema_task)
1578
+ * @deprecated
1579
+ * Unused. This field will be removed in the future.
1576
1580
  */
1577
1581
  currentTaskId?: string;
1578
1582
  /**
@@ -1612,6 +1616,10 @@ interface UpdateConversationRequestParams {
1612
1616
  id: string;
1613
1617
  }
1614
1618
  interface UpdateConversationRequestBody {
1619
+ /**
1620
+ * @deprecated
1621
+ * Unused. This parameter will be ignored if provided and should not be used when updating a conversation.
1622
+ */
1615
1623
  currentTaskId?: string;
1616
1624
  /**
1617
1625
  * Tags for the [Conversation](#schema_conversation)
@@ -1631,7 +1639,8 @@ interface UpdateConversationResponse {
1631
1639
  */
1632
1640
  id: string;
1633
1641
  /**
1634
- * Id of the current [Task](#schema_task)
1642
+ * @deprecated
1643
+ * Unused. This field will be removed in the future.
1635
1644
  */
1636
1645
  currentTaskId?: string;
1637
1646
  /**
@@ -1715,6 +1724,12 @@ interface ListParticipantsResponse {
1715
1724
  * Picture URL of the [User](#schema_user)
1716
1725
  */
1717
1726
  pictureUrl?: string;
1727
+ /**
1728
+ * Optional attributes
1729
+ */
1730
+ attributes?: {
1731
+ [k: string]: string;
1732
+ };
1718
1733
  }[];
1719
1734
  meta: {
1720
1735
  /**
@@ -1769,6 +1784,12 @@ interface AddParticipantResponse {
1769
1784
  * Picture URL of the [User](#schema_user)
1770
1785
  */
1771
1786
  pictureUrl?: string;
1787
+ /**
1788
+ * Optional attributes
1789
+ */
1790
+ attributes?: {
1791
+ [k: string]: string;
1792
+ };
1772
1793
  };
1773
1794
  }
1774
1795
 
@@ -1814,6 +1835,12 @@ interface GetParticipantResponse {
1814
1835
  * Picture URL of the [User](#schema_user)
1815
1836
  */
1816
1837
  pictureUrl?: string;
1838
+ /**
1839
+ * Optional attributes
1840
+ */
1841
+ attributes?: {
1842
+ [k: string]: string;
1843
+ };
1817
1844
  };
1818
1845
  }
1819
1846
 
@@ -2500,6 +2527,12 @@ interface InitializeIncomingMessageRequestBody {
2500
2527
  * URI of the user picture
2501
2528
  */
2502
2529
  pictureUrl?: string;
2530
+ /**
2531
+ * EXPERIMENTAL - Optional shared attributes that can be accessed and modified by both the bot and any of its integrations.
2532
+ */
2533
+ attributes?: {
2534
+ [k: string]: string;
2535
+ };
2503
2536
  /**
2504
2537
  * 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
2538
  */
@@ -2583,6 +2616,12 @@ interface InitializeIncomingMessageResponse {
2583
2616
  * Picture URL of the [User](#schema_user)
2584
2617
  */
2585
2618
  pictureUrl?: string;
2619
+ /**
2620
+ * Optional attributes
2621
+ */
2622
+ attributes?: {
2623
+ [k: string]: string;
2624
+ };
2586
2625
  };
2587
2626
  /**
2588
2627
  * 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.
@@ -2593,7 +2632,8 @@ interface InitializeIncomingMessageResponse {
2593
2632
  */
2594
2633
  id: string;
2595
2634
  /**
2596
- * Id of the current [Task](#schema_task)
2635
+ * @deprecated
2636
+ * Unused. This field will be removed in the future.
2597
2637
  */
2598
2638
  currentTaskId?: string;
2599
2639
  /**
@@ -2795,6 +2835,12 @@ interface CreateUserRequestBody {
2795
2835
  * URI of the user picture
2796
2836
  */
2797
2837
  pictureUrl?: string;
2838
+ /**
2839
+ * EXPERIMENTAL - Optional shared attributes that can be accessed and modified by both the bot and any of its integrations.
2840
+ */
2841
+ attributes?: {
2842
+ [k: string]: string;
2843
+ };
2798
2844
  }
2799
2845
  type CreateUserInput = CreateUserRequestBody & CreateUserRequestHeaders & CreateUserRequestQuery & CreateUserRequestParams;
2800
2846
  interface CreateUserResponse {
@@ -2828,6 +2874,12 @@ interface CreateUserResponse {
2828
2874
  * Picture URL of the [User](#schema_user)
2829
2875
  */
2830
2876
  pictureUrl?: string;
2877
+ /**
2878
+ * Optional attributes
2879
+ */
2880
+ attributes?: {
2881
+ [k: string]: string;
2882
+ };
2831
2883
  };
2832
2884
  }
2833
2885
 
@@ -2872,6 +2924,12 @@ interface GetUserResponse {
2872
2924
  * Picture URL of the [User](#schema_user)
2873
2925
  */
2874
2926
  pictureUrl?: string;
2927
+ /**
2928
+ * Optional attributes
2929
+ */
2930
+ attributes?: {
2931
+ [k: string]: string;
2932
+ };
2875
2933
  };
2876
2934
  }
2877
2935
 
@@ -2922,6 +2980,12 @@ interface ListUsersResponse {
2922
2980
  * Picture URL of the [User](#schema_user)
2923
2981
  */
2924
2982
  pictureUrl?: string;
2983
+ /**
2984
+ * Optional attributes
2985
+ */
2986
+ attributes?: {
2987
+ [k: string]: string;
2988
+ };
2925
2989
  }[];
2926
2990
  meta: {
2927
2991
  /**
@@ -2957,6 +3021,12 @@ interface GetOrCreateUserRequestBody {
2957
3021
  * URI of the user picture
2958
3022
  */
2959
3023
  pictureUrl?: string;
3024
+ /**
3025
+ * EXPERIMENTAL - Optional shared attributes that can be accessed and modified by both the bot and any of its integrations.
3026
+ */
3027
+ attributes?: {
3028
+ [k: string]: string;
3029
+ };
2960
3030
  /**
2961
3031
  * 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
3032
  */
@@ -2994,6 +3064,12 @@ interface GetOrCreateUserResponse {
2994
3064
  * Picture URL of the [User](#schema_user)
2995
3065
  */
2996
3066
  pictureUrl?: string;
3067
+ /**
3068
+ * Optional attributes
3069
+ */
3070
+ attributes?: {
3071
+ [k: string]: string;
3072
+ };
2997
3073
  };
2998
3074
  }
2999
3075
 
@@ -3019,6 +3095,12 @@ interface UpdateUserRequestBody {
3019
3095
  * URI of the user picture
3020
3096
  */
3021
3097
  pictureUrl?: string | null;
3098
+ /**
3099
+ * EXPERIMENTAL - Optional shared attributes that can be accessed and modified by both the bot and any of its integrations. Set individual attributes to null to remove them.
3100
+ */
3101
+ attributes?: {
3102
+ [k: string]: string | null;
3103
+ };
3022
3104
  }
3023
3105
  type UpdateUserInput = UpdateUserRequestBody & UpdateUserRequestHeaders & UpdateUserRequestQuery & UpdateUserRequestParams;
3024
3106
  interface UpdateUserResponse {
@@ -3052,6 +3134,12 @@ interface UpdateUserResponse {
3052
3134
  * Picture URL of the [User](#schema_user)
3053
3135
  */
3054
3136
  pictureUrl?: string;
3137
+ /**
3138
+ * Optional attributes
3139
+ */
3140
+ attributes?: {
3141
+ [k: string]: string;
3142
+ };
3055
3143
  };
3056
3144
  }
3057
3145
 
@@ -3073,7 +3161,7 @@ interface SetStateExpiryRequestHeaders {
3073
3161
  interface SetStateExpiryRequestQuery {
3074
3162
  }
3075
3163
  interface SetStateExpiryRequestParams {
3076
- type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
3164
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3077
3165
  id: string;
3078
3166
  name: string;
3079
3167
  }
@@ -3118,9 +3206,9 @@ interface SetStateExpiryResponse {
3118
3206
  */
3119
3207
  name: string;
3120
3208
  /**
3121
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
3209
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `integration` or `workflow`) that the state is related to
3122
3210
  */
3123
- type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
3211
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3124
3212
  /**
3125
3213
  * Payload is the content of the state defined by your bot.
3126
3214
  */
@@ -3135,7 +3223,7 @@ interface GetStateRequestHeaders {
3135
3223
  interface GetStateRequestQuery {
3136
3224
  }
3137
3225
  interface GetStateRequestParams {
3138
- type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
3226
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3139
3227
  id: string;
3140
3228
  name: string;
3141
3229
  }
@@ -3176,9 +3264,9 @@ interface GetStateResponse {
3176
3264
  */
3177
3265
  name: string;
3178
3266
  /**
3179
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
3267
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `integration` or `workflow`) that the state is related to
3180
3268
  */
3181
- type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
3269
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3182
3270
  /**
3183
3271
  * Payload is the content of the state defined by your bot.
3184
3272
  */
@@ -3196,7 +3284,7 @@ interface SetStateRequestHeaders {
3196
3284
  interface SetStateRequestQuery {
3197
3285
  }
3198
3286
  interface SetStateRequestParams {
3199
- type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
3287
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3200
3288
  id: string;
3201
3289
  name: string;
3202
3290
  }
@@ -3247,9 +3335,9 @@ interface SetStateResponse {
3247
3335
  */
3248
3336
  name: string;
3249
3337
  /**
3250
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
3338
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `integration` or `workflow`) that the state is related to
3251
3339
  */
3252
- type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
3340
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3253
3341
  /**
3254
3342
  * Payload is the content of the state defined by your bot.
3255
3343
  */
@@ -3264,7 +3352,7 @@ interface GetOrSetStateRequestHeaders {
3264
3352
  interface GetOrSetStateRequestQuery {
3265
3353
  }
3266
3354
  interface GetOrSetStateRequestParams {
3267
- type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
3355
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3268
3356
  id: string;
3269
3357
  name: string;
3270
3358
  }
@@ -3315,9 +3403,9 @@ interface GetOrSetStateResponse {
3315
3403
  */
3316
3404
  name: string;
3317
3405
  /**
3318
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
3406
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `integration` or `workflow`) that the state is related to
3319
3407
  */
3320
- type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
3408
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3321
3409
  /**
3322
3410
  * Payload is the content of the state defined by your bot.
3323
3411
  */
@@ -3335,7 +3423,7 @@ interface PatchStateRequestHeaders {
3335
3423
  interface PatchStateRequestQuery {
3336
3424
  }
3337
3425
  interface PatchStateRequestParams {
3338
- type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
3426
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3339
3427
  id: string;
3340
3428
  name: string;
3341
3429
  }
@@ -3382,9 +3470,9 @@ interface PatchStateResponse {
3382
3470
  */
3383
3471
  name: string;
3384
3472
  /**
3385
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
3473
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `integration` or `workflow`) that the state is related to
3386
3474
  */
3387
- type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
3475
+ type: "conversation" | "user" | "bot" | "integration" | "workflow";
3388
3476
  /**
3389
3477
  * Payload is the content of the state defined by your bot.
3390
3478
  */
@@ -3449,409 +3537,6 @@ type ConfigureIntegrationInput = ConfigureIntegrationRequestBody & ConfigureInte
3449
3537
  interface ConfigureIntegrationResponse {
3450
3538
  }
3451
3539
 
3452
- interface GetTaskRequestHeaders {
3453
- }
3454
- interface GetTaskRequestQuery {
3455
- }
3456
- interface GetTaskRequestParams {
3457
- id: string;
3458
- }
3459
- interface GetTaskRequestBody {
3460
- }
3461
- type GetTaskInput = GetTaskRequestBody & GetTaskRequestHeaders & GetTaskRequestQuery & GetTaskRequestParams;
3462
- interface GetTaskResponse {
3463
- /**
3464
- * Task definition
3465
- */
3466
- task: {
3467
- /**
3468
- * Id of the [Task](#schema_task)
3469
- */
3470
- id: string;
3471
- /**
3472
- * Title describing the task
3473
- */
3474
- title: string;
3475
- /**
3476
- * All the notes related to the execution of the current task
3477
- */
3478
- description: string;
3479
- /**
3480
- * Type of the task
3481
- */
3482
- type: string;
3483
- /**
3484
- * Content related to the task
3485
- */
3486
- data: {
3487
- [k: string]: any;
3488
- };
3489
- /**
3490
- * Status of the task
3491
- */
3492
- status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
3493
- /**
3494
- * Parent task id is the parent task that created this task
3495
- */
3496
- parentTaskId?: string;
3497
- /**
3498
- * Conversation id related to this task
3499
- */
3500
- conversationId?: string;
3501
- /**
3502
- * Specific user related to this task
3503
- */
3504
- userId?: string;
3505
- /**
3506
- * The timeout date where the task should be failed in the ISO 8601 format
3507
- */
3508
- timeoutAt: string;
3509
- /**
3510
- * Creation date of the task in ISO 8601 format
3511
- */
3512
- createdAt: string;
3513
- /**
3514
- * Updating date of the task in ISO 8601 format
3515
- */
3516
- updatedAt: string;
3517
- /**
3518
- * If the task fails this is the reason behind it
3519
- */
3520
- failureReason?: string;
3521
- /**
3522
- * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Task](#schema_task). Individual keys can be unset by posting an empty value to them.
3523
- */
3524
- tags: {
3525
- [k: string]: string;
3526
- };
3527
- };
3528
- }
3529
-
3530
- interface CreateTaskRequestHeaders {
3531
- }
3532
- interface CreateTaskRequestQuery {
3533
- }
3534
- interface CreateTaskRequestParams {
3535
- }
3536
- interface CreateTaskRequestBody {
3537
- /**
3538
- * Title describing the task
3539
- */
3540
- title?: string;
3541
- /**
3542
- * All the notes related to the execution of the current task
3543
- */
3544
- description?: string;
3545
- /**
3546
- * Type of the task
3547
- */
3548
- type: string;
3549
- /**
3550
- * Content related to the task
3551
- */
3552
- data?: {
3553
- [k: string]: any;
3554
- };
3555
- /**
3556
- * Parent task id is the parent task that created this task
3557
- */
3558
- parentTaskId?: string;
3559
- /**
3560
- * Conversation id related to this task
3561
- */
3562
- conversationId: string;
3563
- /**
3564
- * Specific user related to this task
3565
- */
3566
- userId?: string;
3567
- /**
3568
- * The timeout date where the task should be failed in the ISO 8601 format
3569
- */
3570
- timeoutAt?: string;
3571
- /**
3572
- * Tags for the [Task](#schema_task)
3573
- */
3574
- tags?: {
3575
- [k: string]: string;
3576
- };
3577
- }
3578
- type CreateTaskInput = CreateTaskRequestBody & CreateTaskRequestHeaders & CreateTaskRequestQuery & CreateTaskRequestParams;
3579
- interface CreateTaskResponse {
3580
- /**
3581
- * Task definition
3582
- */
3583
- task: {
3584
- /**
3585
- * Id of the [Task](#schema_task)
3586
- */
3587
- id: string;
3588
- /**
3589
- * Title describing the task
3590
- */
3591
- title: string;
3592
- /**
3593
- * All the notes related to the execution of the current task
3594
- */
3595
- description: string;
3596
- /**
3597
- * Type of the task
3598
- */
3599
- type: string;
3600
- /**
3601
- * Content related to the task
3602
- */
3603
- data: {
3604
- [k: string]: any;
3605
- };
3606
- /**
3607
- * Status of the task
3608
- */
3609
- status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
3610
- /**
3611
- * Parent task id is the parent task that created this task
3612
- */
3613
- parentTaskId?: string;
3614
- /**
3615
- * Conversation id related to this task
3616
- */
3617
- conversationId?: string;
3618
- /**
3619
- * Specific user related to this task
3620
- */
3621
- userId?: string;
3622
- /**
3623
- * The timeout date where the task should be failed in the ISO 8601 format
3624
- */
3625
- timeoutAt: string;
3626
- /**
3627
- * Creation date of the task in ISO 8601 format
3628
- */
3629
- createdAt: string;
3630
- /**
3631
- * Updating date of the task in ISO 8601 format
3632
- */
3633
- updatedAt: string;
3634
- /**
3635
- * If the task fails this is the reason behind it
3636
- */
3637
- failureReason?: string;
3638
- /**
3639
- * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Task](#schema_task). Individual keys can be unset by posting an empty value to them.
3640
- */
3641
- tags: {
3642
- [k: string]: string;
3643
- };
3644
- };
3645
- }
3646
-
3647
- interface UpdateTaskRequestHeaders {
3648
- }
3649
- interface UpdateTaskRequestQuery {
3650
- }
3651
- interface UpdateTaskRequestParams {
3652
- id: string;
3653
- }
3654
- interface UpdateTaskRequestBody {
3655
- /**
3656
- * Title describing the task
3657
- */
3658
- title?: string;
3659
- /**
3660
- * All the notes related to the execution of the current task
3661
- */
3662
- description?: string;
3663
- /**
3664
- * Content related to the task
3665
- */
3666
- data?: {
3667
- [k: string]: any;
3668
- };
3669
- /**
3670
- * The timeout date where the task should be failed in the ISO 8601 format
3671
- */
3672
- timeoutAt?: string;
3673
- /**
3674
- * Status of the task
3675
- */
3676
- status?: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
3677
- /**
3678
- * Tags for the [Task](#schema_task)
3679
- */
3680
- tags?: {
3681
- [k: string]: string;
3682
- };
3683
- }
3684
- type UpdateTaskInput = UpdateTaskRequestBody & UpdateTaskRequestHeaders & UpdateTaskRequestQuery & UpdateTaskRequestParams;
3685
- interface UpdateTaskResponse {
3686
- /**
3687
- * Task definition
3688
- */
3689
- task: {
3690
- /**
3691
- * Id of the [Task](#schema_task)
3692
- */
3693
- id: string;
3694
- /**
3695
- * Title describing the task
3696
- */
3697
- title: string;
3698
- /**
3699
- * All the notes related to the execution of the current task
3700
- */
3701
- description: string;
3702
- /**
3703
- * Type of the task
3704
- */
3705
- type: string;
3706
- /**
3707
- * Content related to the task
3708
- */
3709
- data: {
3710
- [k: string]: any;
3711
- };
3712
- /**
3713
- * Status of the task
3714
- */
3715
- status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
3716
- /**
3717
- * Parent task id is the parent task that created this task
3718
- */
3719
- parentTaskId?: string;
3720
- /**
3721
- * Conversation id related to this task
3722
- */
3723
- conversationId?: string;
3724
- /**
3725
- * Specific user related to this task
3726
- */
3727
- userId?: string;
3728
- /**
3729
- * The timeout date where the task should be failed in the ISO 8601 format
3730
- */
3731
- timeoutAt: string;
3732
- /**
3733
- * Creation date of the task in ISO 8601 format
3734
- */
3735
- createdAt: string;
3736
- /**
3737
- * Updating date of the task in ISO 8601 format
3738
- */
3739
- updatedAt: string;
3740
- /**
3741
- * If the task fails this is the reason behind it
3742
- */
3743
- failureReason?: string;
3744
- /**
3745
- * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Task](#schema_task). Individual keys can be unset by posting an empty value to them.
3746
- */
3747
- tags: {
3748
- [k: string]: string;
3749
- };
3750
- };
3751
- }
3752
-
3753
- interface DeleteTaskRequestHeaders {
3754
- }
3755
- interface DeleteTaskRequestQuery {
3756
- }
3757
- interface DeleteTaskRequestParams {
3758
- id: string;
3759
- }
3760
- interface DeleteTaskRequestBody {
3761
- }
3762
- type DeleteTaskInput = DeleteTaskRequestBody & DeleteTaskRequestHeaders & DeleteTaskRequestQuery & DeleteTaskRequestParams;
3763
- interface DeleteTaskResponse {
3764
- }
3765
-
3766
- interface ListTasksRequestHeaders {
3767
- }
3768
- interface ListTasksRequestQuery {
3769
- nextToken?: string;
3770
- tags?: {
3771
- [k: string]: string;
3772
- };
3773
- conversationId?: string;
3774
- userId?: string;
3775
- parentTaskId?: string;
3776
- status?: ("pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled")[];
3777
- type?: string;
3778
- }
3779
- interface ListTasksRequestParams {
3780
- }
3781
- interface ListTasksRequestBody {
3782
- }
3783
- type ListTasksInput = ListTasksRequestBody & ListTasksRequestHeaders & ListTasksRequestQuery & ListTasksRequestParams;
3784
- interface ListTasksResponse {
3785
- tasks: {
3786
- /**
3787
- * Id of the [Task](#schema_task)
3788
- */
3789
- id: string;
3790
- /**
3791
- * Title describing the task
3792
- */
3793
- title: string;
3794
- /**
3795
- * All the notes related to the execution of the current task
3796
- */
3797
- description: string;
3798
- /**
3799
- * Type of the task
3800
- */
3801
- type: string;
3802
- /**
3803
- * Content related to the task
3804
- */
3805
- data: {
3806
- [k: string]: any;
3807
- };
3808
- /**
3809
- * Status of the task
3810
- */
3811
- status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
3812
- /**
3813
- * Parent task id is the parent task that created this task
3814
- */
3815
- parentTaskId?: string;
3816
- /**
3817
- * Conversation id related to this task
3818
- */
3819
- conversationId?: string;
3820
- /**
3821
- * Specific user related to this task
3822
- */
3823
- userId?: string;
3824
- /**
3825
- * The timeout date where the task should be failed in the ISO 8601 format
3826
- */
3827
- timeoutAt: string;
3828
- /**
3829
- * Creation date of the task in ISO 8601 format
3830
- */
3831
- createdAt: string;
3832
- /**
3833
- * Updating date of the task in ISO 8601 format
3834
- */
3835
- updatedAt: string;
3836
- /**
3837
- * If the task fails this is the reason behind it
3838
- */
3839
- failureReason?: string;
3840
- /**
3841
- * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Task](#schema_task). Individual keys can be unset by posting an empty value to them.
3842
- */
3843
- tags: {
3844
- [k: string]: string;
3845
- };
3846
- }[];
3847
- meta: {
3848
- /**
3849
- * 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.
3850
- */
3851
- nextToken?: string;
3852
- };
3853
- }
3854
-
3855
3540
  interface CreateWorkflowRequestHeaders {
3856
3541
  }
3857
3542
  interface CreateWorkflowRequestQuery {
@@ -4433,6 +4118,10 @@ interface CaptureObservationRequestQuery {
4433
4118
  interface CaptureObservationRequestParams {
4434
4119
  }
4435
4120
  interface CaptureObservationRequestBody {
4121
+ /**
4122
+ * Caller-defined identifier for the observation (e.g. llmz context ID). Uniqueness is not enforced nor guaranteed.
4123
+ */
4124
+ id?: string;
4436
4125
  /**
4437
4126
  * Name of the observation
4438
4127
  */
@@ -4741,6 +4430,12 @@ interface ListPublicIntegrationsResponse {
4741
4430
  */
4742
4431
  interfaces?: string[];
4743
4432
  };
4433
+ /**
4434
+ * Optional key-value attributes from the integration definition
4435
+ */
4436
+ attributes?: {
4437
+ [k: string]: string;
4438
+ };
4744
4439
  }[];
4745
4440
  meta: {
4746
4441
  /**
@@ -5715,9 +5410,9 @@ interface GetPublicPluginByIdResponse {
5715
5410
  states: {
5716
5411
  [k: string]: {
5717
5412
  /**
5718
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
5413
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
5719
5414
  */
5720
- type: "conversation" | "user" | "bot" | "task";
5415
+ type: "conversation" | "user" | "bot";
5721
5416
  /**
5722
5417
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
5723
5418
  */
@@ -5944,9 +5639,9 @@ interface GetDereferencedPublicPluginByIdResponse {
5944
5639
  states: {
5945
5640
  [k: string]: {
5946
5641
  /**
5947
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
5642
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
5948
5643
  */
5949
- type: "conversation" | "user" | "bot" | "task";
5644
+ type: "conversation" | "user" | "bot";
5950
5645
  /**
5951
5646
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
5952
5647
  */
@@ -6165,9 +5860,9 @@ interface GetPublicPluginResponse {
6165
5860
  states: {
6166
5861
  [k: string]: {
6167
5862
  /**
6168
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
5863
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
6169
5864
  */
6170
- type: "conversation" | "user" | "bot" | "task";
5865
+ type: "conversation" | "user" | "bot";
6171
5866
  /**
6172
5867
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
6173
5868
  */
@@ -6753,9 +6448,9 @@ interface CreateBotRequestBody {
6753
6448
  states?: {
6754
6449
  [k: string]: {
6755
6450
  /**
6756
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
6451
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
6757
6452
  */
6758
- type: "conversation" | "user" | "bot" | "task";
6453
+ type: "conversation" | "user" | "bot";
6759
6454
  /**
6760
6455
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
6761
6456
  */
@@ -7191,9 +6886,9 @@ interface CreateBotResponse {
7191
6886
  states: {
7192
6887
  [k: string]: {
7193
6888
  /**
7194
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
6889
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
7195
6890
  */
7196
- type: "conversation" | "user" | "bot" | "task";
6891
+ type: "conversation" | "user" | "bot";
7197
6892
  /**
7198
6893
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
7199
6894
  */
@@ -7519,9 +7214,9 @@ interface UpdateBotRequestBody {
7519
7214
  states?: {
7520
7215
  [k: string]: {
7521
7216
  /**
7522
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
7217
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
7523
7218
  */
7524
- type: "conversation" | "user" | "bot" | "task";
7219
+ type: "conversation" | "user" | "bot";
7525
7220
  /**
7526
7221
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
7527
7222
  */
@@ -7871,9 +7566,9 @@ interface UpdateBotResponse {
7871
7566
  states: {
7872
7567
  [k: string]: {
7873
7568
  /**
7874
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
7569
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
7875
7570
  */
7876
- type: "conversation" | "user" | "bot" | "task";
7571
+ type: "conversation" | "user" | "bot";
7877
7572
  /**
7878
7573
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
7879
7574
  */
@@ -8379,9 +8074,9 @@ interface GetBotResponse {
8379
8074
  states: {
8380
8075
  [k: string]: {
8381
8076
  /**
8382
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
8077
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
8383
8078
  */
8384
- type: "conversation" | "user" | "bot" | "task";
8079
+ type: "conversation" | "user" | "bot";
8385
8080
  /**
8386
8081
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
8387
8082
  */
@@ -9624,7 +9319,7 @@ interface GetAuditRecordsResponse {
9624
9319
  resourceId: string | null;
9625
9320
  resourceName?: string | null;
9626
9321
  value?: string | null;
9627
- 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";
9322
+ 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";
9628
9323
  }[];
9629
9324
  meta: {
9630
9325
  /**
@@ -12105,6 +11800,12 @@ interface ListIntegrationsResponse {
12105
11800
  handle: string | null;
12106
11801
  name: string;
12107
11802
  };
11803
+ /**
11804
+ * Optional key-value attributes from the integration definition
11805
+ */
11806
+ attributes?: {
11807
+ [k: string]: string;
11808
+ };
12108
11809
  }[];
12109
11810
  meta: {
12110
11811
  /**
@@ -14027,9 +13728,9 @@ interface CreatePluginRequestBody {
14027
13728
  states?: {
14028
13729
  [k: string]: {
14029
13730
  /**
14030
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
13731
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
14031
13732
  */
14032
- type: "conversation" | "user" | "bot" | "task";
13733
+ type: "conversation" | "user" | "bot";
14033
13734
  /**
14034
13735
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
14035
13736
  */
@@ -14267,9 +13968,9 @@ interface CreatePluginResponse {
14267
13968
  states: {
14268
13969
  [k: string]: {
14269
13970
  /**
14270
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
13971
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
14271
13972
  */
14272
- type: "conversation" | "user" | "bot" | "task";
13973
+ type: "conversation" | "user" | "bot";
14273
13974
  /**
14274
13975
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
14275
13976
  */
@@ -14487,9 +14188,9 @@ interface GetPluginResponse {
14487
14188
  states: {
14488
14189
  [k: string]: {
14489
14190
  /**
14490
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
14191
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
14491
14192
  */
14492
- type: "conversation" | "user" | "bot" | "task";
14193
+ type: "conversation" | "user" | "bot";
14493
14194
  /**
14494
14195
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
14495
14196
  */
@@ -14716,9 +14417,9 @@ interface GetDereferencedPluginResponse {
14716
14417
  states: {
14717
14418
  [k: string]: {
14718
14419
  /**
14719
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
14420
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
14720
14421
  */
14721
- type: "conversation" | "user" | "bot" | "task";
14422
+ type: "conversation" | "user" | "bot";
14722
14423
  /**
14723
14424
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
14724
14425
  */
@@ -14937,9 +14638,9 @@ interface GetPluginByNameResponse {
14937
14638
  states: {
14938
14639
  [k: string]: {
14939
14640
  /**
14940
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
14641
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
14941
14642
  */
14942
- type: "conversation" | "user" | "bot" | "task";
14643
+ type: "conversation" | "user" | "bot";
14943
14644
  /**
14944
14645
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
14945
14646
  */
@@ -15133,9 +14834,9 @@ interface UpdatePluginRequestBody {
15133
14834
  states?: {
15134
14835
  [k: string]: {
15135
14836
  /**
15136
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
14837
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
15137
14838
  */
15138
- type: "conversation" | "user" | "bot" | "task";
14839
+ type: "conversation" | "user" | "bot";
15139
14840
  /**
15140
14841
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
15141
14842
  */
@@ -15361,9 +15062,9 @@ interface UpdatePluginResponse {
15361
15062
  states: {
15362
15063
  [k: string]: {
15363
15064
  /**
15364
- * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
15065
+ * Type of the [State](#schema_state) (`conversation`, `user` or `bot`)
15365
15066
  */
15366
- type: "conversation" | "user" | "bot" | "task";
15067
+ type: "conversation" | "user" | "bot";
15367
15068
  /**
15368
15069
  * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
15369
15070
  */
@@ -18662,11 +18363,6 @@ declare class Client$1 {
18662
18363
  readonly patchState: (input: PatchStateInput) => Promise<PatchStateResponse>;
18663
18364
  readonly callAction: (input: CallActionInput) => Promise<CallActionResponse>;
18664
18365
  readonly configureIntegration: (input: ConfigureIntegrationInput) => Promise<ConfigureIntegrationResponse>;
18665
- readonly getTask: (input: GetTaskInput) => Promise<GetTaskResponse>;
18666
- readonly createTask: (input: CreateTaskInput) => Promise<CreateTaskResponse>;
18667
- readonly updateTask: (input: UpdateTaskInput) => Promise<UpdateTaskResponse>;
18668
- readonly deleteTask: (input: DeleteTaskInput) => Promise<DeleteTaskResponse>;
18669
- readonly listTasks: (input: ListTasksInput) => Promise<ListTasksResponse>;
18670
18366
  readonly createWorkflow: (input: CreateWorkflowInput) => Promise<CreateWorkflowResponse>;
18671
18367
  readonly getWorkflow: (input: GetWorkflowInput) => Promise<GetWorkflowResponse>;
18672
18368
  readonly updateWorkflow: (input: UpdateWorkflowInput) => Promise<UpdateWorkflowResponse>;
@@ -18869,6 +18565,9 @@ declare class Client extends Client$1 implements IClient {
18869
18565
  };
18870
18566
  name?: string;
18871
18567
  pictureUrl?: string;
18568
+ attributes?: {
18569
+ [k: string]: string;
18570
+ };
18872
18571
  }>;
18873
18572
  events: (props: {
18874
18573
  status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
@@ -18932,33 +18631,7 @@ declare class Client extends Client$1 implements IClient {
18932
18631
  };
18933
18632
  name?: string;
18934
18633
  pictureUrl?: string;
18935
- }>;
18936
- tasks: (props: {
18937
- status?: ("timeout" | "pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "cancelled")[] | undefined;
18938
- tags?: {
18939
- [x: string]: string;
18940
- } | undefined;
18941
- type?: string | undefined;
18942
- userId?: string | undefined;
18943
- conversationId?: string | undefined;
18944
- parentTaskId?: string | undefined;
18945
- }) => AsyncCollection<{
18946
- id: string;
18947
- title: string;
18948
- description: string;
18949
- type: string;
18950
- data: {
18951
- [k: string]: any;
18952
- };
18953
- status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
18954
- parentTaskId?: string;
18955
- conversationId?: string;
18956
- userId?: string;
18957
- timeoutAt: string;
18958
- createdAt: string;
18959
- updatedAt: string;
18960
- failureReason?: string;
18961
- tags: {
18634
+ attributes?: {
18962
18635
  [k: string]: string;
18963
18636
  };
18964
18637
  }>;
@@ -19002,6 +18675,9 @@ declare class Client extends Client$1 implements IClient {
19002
18675
  actions?: string[];
19003
18676
  interfaces?: string[];
19004
18677
  };
18678
+ attributes?: {
18679
+ [k: string]: string;
18680
+ };
19005
18681
  }>;
19006
18682
  bots: (props: {
19007
18683
  tags?: {
@@ -19085,6 +18761,9 @@ declare class Client extends Client$1 implements IClient {
19085
18761
  handle: string | null;
19086
18762
  name: string;
19087
18763
  };
18764
+ attributes?: {
18765
+ [k: string]: string;
18766
+ };
19088
18767
  }>;
19089
18768
  interfaces: (props: {
19090
18769
  name?: string | undefined;
@@ -19262,7 +18941,7 @@ declare class Client extends Client$1 implements IClient {
19262
18941
  conversationId?: string | undefined;
19263
18942
  name?: string | undefined;
19264
18943
  parentWorkflowId?: string | undefined;
19265
- statuses?: ("pending" | "failed" | "in_progress" | "completed" | "paused" | "cancelled" | "listening" | "timedout")[] | undefined;
18944
+ statuses?: ("pending" | "failed" | "in_progress" | "listening" | "completed" | "paused" | "timedout" | "cancelled")[] | undefined;
19266
18945
  }) => AsyncCollection<{
19267
18946
  id: string;
19268
18947
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cognitive",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "Wrapper around the Botpress Client to call LLMs",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",