@botpress/client 0.30.1 → 0.30.2
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.
- package/.turbo/turbo-build.log +7 -7
- package/.turbo/turbo-generate.log +1 -1
- package/dist/bundle.cjs +11 -11
- package/dist/bundle.cjs.map +4 -4
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +65 -2
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +4 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1333,6 +1333,68 @@ type DeleteUserInput = DeleteUserRequestBody & DeleteUserRequestHeaders & Delete
|
|
|
1333
1333
|
interface DeleteUserResponse {
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
1336
|
+
interface SetStateExpiryRequestHeaders {
|
|
1337
|
+
}
|
|
1338
|
+
interface SetStateExpiryRequestQuery {
|
|
1339
|
+
}
|
|
1340
|
+
interface SetStateExpiryRequestParams {
|
|
1341
|
+
type: "conversation" | "user" | "bot" | "integration" | "task";
|
|
1342
|
+
id: string;
|
|
1343
|
+
name: string;
|
|
1344
|
+
}
|
|
1345
|
+
interface SetStateExpiryRequestBody {
|
|
1346
|
+
/**
|
|
1347
|
+
* Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.
|
|
1348
|
+
*/
|
|
1349
|
+
expiry: number | null;
|
|
1350
|
+
}
|
|
1351
|
+
type SetStateExpiryInput = SetStateExpiryRequestBody & SetStateExpiryRequestHeaders & SetStateExpiryRequestQuery & SetStateExpiryRequestParams;
|
|
1352
|
+
interface SetStateExpiryResponse {
|
|
1353
|
+
/**
|
|
1354
|
+
* The state object represents the current payload. A state is always linked to either a bot, a conversation or a user.
|
|
1355
|
+
*/
|
|
1356
|
+
state: {
|
|
1357
|
+
/**
|
|
1358
|
+
* Id of the [State](#schema_state)
|
|
1359
|
+
*/
|
|
1360
|
+
id: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* Creation date of the [State](#schema_state) in ISO 8601 format
|
|
1363
|
+
*/
|
|
1364
|
+
createdAt: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Updating date of the [State](#schema_state) in ISO 8601 format
|
|
1367
|
+
*/
|
|
1368
|
+
updatedAt: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Id of the [Bot](#schema_bot)
|
|
1371
|
+
*/
|
|
1372
|
+
botId: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* Id of the [Conversation](#schema_conversation)
|
|
1375
|
+
*/
|
|
1376
|
+
conversationId?: string;
|
|
1377
|
+
/**
|
|
1378
|
+
* Id of the [User](#schema_user)
|
|
1379
|
+
*/
|
|
1380
|
+
userId?: string;
|
|
1381
|
+
/**
|
|
1382
|
+
* Name of the [State](#schema_state) which is declared inside the bot definition
|
|
1383
|
+
*/
|
|
1384
|
+
name: string;
|
|
1385
|
+
/**
|
|
1386
|
+
* Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
|
|
1387
|
+
*/
|
|
1388
|
+
type: "conversation" | "user" | "bot" | "task" | "integration";
|
|
1389
|
+
/**
|
|
1390
|
+
* Payload is the content of the state defined by your bot.
|
|
1391
|
+
*/
|
|
1392
|
+
payload: {
|
|
1393
|
+
[k: string]: any;
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1336
1398
|
interface GetStateRequestHeaders {
|
|
1337
1399
|
}
|
|
1338
1400
|
interface GetStateRequestQuery {
|
|
@@ -1413,7 +1475,7 @@ interface SetStateRequestBody {
|
|
|
1413
1475
|
/**
|
|
1414
1476
|
* Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.
|
|
1415
1477
|
*/
|
|
1416
|
-
expiry?: number;
|
|
1478
|
+
expiry?: number | null;
|
|
1417
1479
|
}
|
|
1418
1480
|
type SetStateInput = SetStateRequestBody & SetStateRequestHeaders & SetStateRequestQuery & SetStateRequestParams;
|
|
1419
1481
|
interface SetStateResponse {
|
|
@@ -1481,7 +1543,7 @@ interface GetOrSetStateRequestBody {
|
|
|
1481
1543
|
/**
|
|
1482
1544
|
* Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.
|
|
1483
1545
|
*/
|
|
1484
|
-
expiry?: number;
|
|
1546
|
+
expiry?: number | null;
|
|
1485
1547
|
}
|
|
1486
1548
|
type GetOrSetStateInput = GetOrSetStateRequestBody & GetOrSetStateRequestHeaders & GetOrSetStateRequestQuery & GetOrSetStateRequestParams;
|
|
1487
1549
|
interface GetOrSetStateResponse {
|
|
@@ -11314,6 +11376,7 @@ declare class Client$1 {
|
|
|
11314
11376
|
readonly getOrCreateUser: (input: GetOrCreateUserInput) => Promise<GetOrCreateUserResponse>;
|
|
11315
11377
|
readonly updateUser: (input: UpdateUserInput) => Promise<UpdateUserResponse>;
|
|
11316
11378
|
readonly deleteUser: (input: DeleteUserInput) => Promise<DeleteUserResponse>;
|
|
11379
|
+
readonly setStateExpiry: (input: SetStateExpiryInput) => Promise<SetStateExpiryResponse>;
|
|
11317
11380
|
readonly getState: (input: GetStateInput) => Promise<GetStateResponse>;
|
|
11318
11381
|
readonly setState: (input: SetStateInput) => Promise<SetStateResponse>;
|
|
11319
11382
|
readonly getOrSetState: (input: GetOrSetStateInput) => Promise<GetOrSetStateResponse>;
|