@botpress/api 0.41.0 → 0.41.1
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/dist/index.js +73 -1
- package/dist/src/gen/state.d.ts +61 -0
- package/package.json +1 -1
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +73 -1
package/dist/index.js
CHANGED
|
@@ -283871,6 +283871,73 @@ var state = {
|
|
|
283871
283871
|
}
|
|
283872
283872
|
}
|
|
283873
283873
|
},
|
|
283874
|
+
"setStateExpiry": {
|
|
283875
|
+
"name": "setStateExpiry",
|
|
283876
|
+
"description": "Updates the [State](#schema_state) expiry.",
|
|
283877
|
+
"method": "post",
|
|
283878
|
+
"path": "/v1/chat/states/{type}/{id}/{name}/expiry",
|
|
283879
|
+
"parameters": {
|
|
283880
|
+
"type": {
|
|
283881
|
+
"in": "path",
|
|
283882
|
+
"type": "string",
|
|
283883
|
+
"description": "State type",
|
|
283884
|
+
"enum": [
|
|
283885
|
+
"conversation",
|
|
283886
|
+
"user",
|
|
283887
|
+
"bot",
|
|
283888
|
+
"integration",
|
|
283889
|
+
"task"
|
|
283890
|
+
]
|
|
283891
|
+
},
|
|
283892
|
+
"id": {
|
|
283893
|
+
"in": "path",
|
|
283894
|
+
"type": "string",
|
|
283895
|
+
"description": "State id"
|
|
283896
|
+
},
|
|
283897
|
+
"name": {
|
|
283898
|
+
"in": "path",
|
|
283899
|
+
"type": "string",
|
|
283900
|
+
"description": "State name"
|
|
283901
|
+
}
|
|
283902
|
+
},
|
|
283903
|
+
"requestBody": {
|
|
283904
|
+
"description": "State expiry",
|
|
283905
|
+
"schema": {
|
|
283906
|
+
"type": "object",
|
|
283907
|
+
"properties": {
|
|
283908
|
+
"expiry": {
|
|
283909
|
+
"type": "number",
|
|
283910
|
+
"minimum": 1,
|
|
283911
|
+
"maximum": 2592e6,
|
|
283912
|
+
"nullable": true,
|
|
283913
|
+
"description": "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."
|
|
283914
|
+
}
|
|
283915
|
+
},
|
|
283916
|
+
"required": [
|
|
283917
|
+
"expiry"
|
|
283918
|
+
],
|
|
283919
|
+
"title": "setStateExpiryBody",
|
|
283920
|
+
"additionalProperties": false
|
|
283921
|
+
}
|
|
283922
|
+
},
|
|
283923
|
+
"section": "state",
|
|
283924
|
+
"response": {
|
|
283925
|
+
"description": "Returns the updated [State](#schema_state) object if a valid identifier was provided. Returns an [an error](#errors) otherwise",
|
|
283926
|
+
"schema": {
|
|
283927
|
+
"type": "object",
|
|
283928
|
+
"properties": {
|
|
283929
|
+
"state": {
|
|
283930
|
+
"$ref": "#/components/schemas/State"
|
|
283931
|
+
}
|
|
283932
|
+
},
|
|
283933
|
+
"required": [
|
|
283934
|
+
"state"
|
|
283935
|
+
],
|
|
283936
|
+
"title": "setStateExpiryResponse",
|
|
283937
|
+
"additionalProperties": false
|
|
283938
|
+
}
|
|
283939
|
+
}
|
|
283940
|
+
},
|
|
283874
283941
|
"getState": {
|
|
283875
283942
|
"name": "getState",
|
|
283876
283943
|
"description": "Retrieves the [State](#schema_state) object for a valid identifiers.",
|
|
@@ -283975,6 +284042,7 @@ var state = {
|
|
|
283975
284042
|
"type": "number",
|
|
283976
284043
|
"minimum": 1,
|
|
283977
284044
|
"maximum": 2592e6,
|
|
284045
|
+
"nullable": true,
|
|
283978
284046
|
"description": "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."
|
|
283979
284047
|
}
|
|
283980
284048
|
},
|
|
@@ -284046,6 +284114,7 @@ var state = {
|
|
|
284046
284114
|
"type": "number",
|
|
284047
284115
|
"minimum": 1,
|
|
284048
284116
|
"maximum": 2592e6,
|
|
284117
|
+
"nullable": true,
|
|
284049
284118
|
"description": "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."
|
|
284050
284119
|
}
|
|
284051
284120
|
},
|
|
@@ -294071,7 +294140,7 @@ var state = {
|
|
|
294071
294140
|
"title": "Botpress API",
|
|
294072
294141
|
"description": "API for Botpress Cloud",
|
|
294073
294142
|
"server": "https://api.botpress.cloud",
|
|
294074
|
-
"version": "0.41.
|
|
294143
|
+
"version": "0.41.1",
|
|
294075
294144
|
"prefix": "v1"
|
|
294076
294145
|
},
|
|
294077
294146
|
"errors": [
|
|
@@ -294210,6 +294279,7 @@ var state = {
|
|
|
294210
294279
|
"createUserBody": true,
|
|
294211
294280
|
"getOrCreateUserBody": true,
|
|
294212
294281
|
"updateUserBody": true,
|
|
294282
|
+
"setStateExpiryBody": true,
|
|
294213
294283
|
"setStateBody": true,
|
|
294214
294284
|
"getOrSetStateBody": true,
|
|
294215
294285
|
"patchStateBody": true,
|
|
@@ -294281,6 +294351,7 @@ var state = {
|
|
|
294281
294351
|
"getOrCreateUserResponse": true,
|
|
294282
294352
|
"updateUserResponse": true,
|
|
294283
294353
|
"deleteUserResponse": true,
|
|
294354
|
+
"setStateExpiryResponse": true,
|
|
294284
294355
|
"getStateResponse": true,
|
|
294285
294356
|
"setStateResponse": true,
|
|
294286
294357
|
"getOrSetStateResponse": true,
|
|
@@ -297058,6 +297129,7 @@ var state = {
|
|
|
297058
297129
|
"title": "State",
|
|
297059
297130
|
"name": "state",
|
|
297060
297131
|
"operations": [
|
|
297132
|
+
"setStateExpiry",
|
|
297061
297133
|
"getState",
|
|
297062
297134
|
"setState",
|
|
297063
297135
|
"getOrSetState",
|
package/dist/src/gen/state.d.ts
CHANGED
|
@@ -1196,6 +1196,63 @@ export declare const state: {
|
|
|
1196
1196
|
};
|
|
1197
1197
|
};
|
|
1198
1198
|
};
|
|
1199
|
+
setStateExpiry: {
|
|
1200
|
+
name: string;
|
|
1201
|
+
description: string;
|
|
1202
|
+
method: "post";
|
|
1203
|
+
path: string;
|
|
1204
|
+
parameters: {
|
|
1205
|
+
type: {
|
|
1206
|
+
in: "path";
|
|
1207
|
+
type: "string";
|
|
1208
|
+
description: string;
|
|
1209
|
+
enum: string[];
|
|
1210
|
+
};
|
|
1211
|
+
id: {
|
|
1212
|
+
in: "path";
|
|
1213
|
+
type: "string";
|
|
1214
|
+
description: string;
|
|
1215
|
+
};
|
|
1216
|
+
name: {
|
|
1217
|
+
in: "path";
|
|
1218
|
+
type: "string";
|
|
1219
|
+
description: string;
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1222
|
+
requestBody: {
|
|
1223
|
+
description: string;
|
|
1224
|
+
schema: {
|
|
1225
|
+
type: "object";
|
|
1226
|
+
properties: {
|
|
1227
|
+
expiry: {
|
|
1228
|
+
type: "number";
|
|
1229
|
+
minimum: number;
|
|
1230
|
+
maximum: number;
|
|
1231
|
+
nullable: true;
|
|
1232
|
+
description: string;
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
required: string[];
|
|
1236
|
+
title: string;
|
|
1237
|
+
additionalProperties: false;
|
|
1238
|
+
};
|
|
1239
|
+
};
|
|
1240
|
+
section: "state";
|
|
1241
|
+
response: {
|
|
1242
|
+
description: string;
|
|
1243
|
+
schema: {
|
|
1244
|
+
type: "object";
|
|
1245
|
+
properties: {
|
|
1246
|
+
state: {
|
|
1247
|
+
$ref: string;
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
required: string[];
|
|
1251
|
+
title: string;
|
|
1252
|
+
additionalProperties: false;
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1199
1256
|
getState: {
|
|
1200
1257
|
name: string;
|
|
1201
1258
|
description: string;
|
|
@@ -1283,6 +1340,7 @@ export declare const state: {
|
|
|
1283
1340
|
type: "number";
|
|
1284
1341
|
minimum: number;
|
|
1285
1342
|
maximum: number;
|
|
1343
|
+
nullable: true;
|
|
1286
1344
|
description: string;
|
|
1287
1345
|
};
|
|
1288
1346
|
};
|
|
@@ -1344,6 +1402,7 @@ export declare const state: {
|
|
|
1344
1402
|
type: "number";
|
|
1345
1403
|
minimum: number;
|
|
1346
1404
|
maximum: number;
|
|
1405
|
+
nullable: true;
|
|
1347
1406
|
description: string;
|
|
1348
1407
|
};
|
|
1349
1408
|
};
|
|
@@ -10176,6 +10235,7 @@ export declare const state: {
|
|
|
10176
10235
|
createUserBody: true;
|
|
10177
10236
|
getOrCreateUserBody: true;
|
|
10178
10237
|
updateUserBody: true;
|
|
10238
|
+
setStateExpiryBody: true;
|
|
10179
10239
|
setStateBody: true;
|
|
10180
10240
|
getOrSetStateBody: true;
|
|
10181
10241
|
patchStateBody: true;
|
|
@@ -10247,6 +10307,7 @@ export declare const state: {
|
|
|
10247
10307
|
getOrCreateUserResponse: true;
|
|
10248
10308
|
updateUserResponse: true;
|
|
10249
10309
|
deleteUserResponse: true;
|
|
10310
|
+
setStateExpiryResponse: true;
|
|
10250
10311
|
getStateResponse: true;
|
|
10251
10312
|
setStateResponse: true;
|
|
10252
10313
|
getOrSetStateResponse: true;
|
package/package.json
CHANGED
package/src/gen/metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sections":[{"description":"","title":"User","name":"user","operations":["createUser","getUser","listUsers","getOrCreateUser","updateUser","deleteUser"],"schema":"User"},{"description":"","title":"Conversation","name":"conversation","operations":["createConversation","getConversation","listConversations","getOrCreateConversation","updateConversation","deleteConversation","listParticipants","addParticipant","getParticipant","removeParticipant"],"schema":"Conversation"},{"description":"","title":"Event","name":"event","operations":["createEvent","getEvent","listEvents"],"schema":"Event"},{"description":"","title":"Message","name":"message","operations":["createMessage","getOrCreateMessage","getMessage","updateMessage","listMessages","deleteMessage"],"schema":"Message"},{"description":"","title":"State","name":"state","operations":["getState","setState","getOrSetState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Task","name":"task","operations":["getTask","createTask","updateTask","deleteTask","listTasks"],"schema":"Task"},{"title":"Bot","description":"","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","getBotIssue","listBotIssues","deleteBotIssue","listBotIssueEvents","listBotVersions","getBotVersion","createBotVersion","deployBotVersion"],"schema":"Bot"},{"title":"Integration","description":"","name":"integration","operations":["listIntegrationApiKeys","createIntegrationApiKey","deleteIntegrationApiKey","createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration","requestIntegrationVerification"],"schema":"Integration"},{"title":"Interface","description":"","name":"interface","operations":["createInterface","getInterface","getInterfaceByName","updateInterface","deleteInterface","listInterfaces"],"schema":"Interface"},{"title":"Workspace","description":"","name":"workspace","operations":["setWorkspacePaymentMethod","listWorkspaceInvoices","getUpcomingInvoice","chargeWorkspaceUnpaidInvoices","createWorkspace","getPublicWorkspace","getWorkspace","listWorkspaceUsages","breakDownWorkspaceUsageByBot","getAllWorkspaceQuotaCompletion","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","checkHandleAvailability","listWorkspaces","listPublicWorkspaces","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","getWorkspaceMember","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"title":"Account","description":"","name":"account","operations":["getAccount","updateAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken","setAccountPreference","getAccountPreference"],"schema":"Account"},{"title":"Usage","description":"","name":"usage","operations":["getUsage","getMultipleUsages"],"schema":"Usage"},{"title":"Quotas","description":"","name":"quotas","operations":["changeAISpendQuota"]},{"title":"Helper","description":"","name":"helper","operations":["runVrl"]},{"title":"Activity","description":"","name":"activity","operations":["listActivities"],"schema":"Activity"},{"title":"Tables","description":"Manage and interact with table structures, including creation, updates, and querying of tables and their rows.","name":"tables","operations":["listTables","getTable","getOrCreateTable","createTable","duplicateTable","updateTable","renameTableColumn","deleteTable","getTableRow","findTableRows","createTableRows","deleteTableRows","updateTableRows","upsertTableRows"],"schema":"Table"},{"title":"Files","description":"The Files API allows you to create, manage, and index files that can be used by your bots and integrations. Files can be in any text or binary format, and documents (such as PDF, Microsoft Word, HTML, Markdown, etc.) can be indexed to be used for semantic search in RAG (Retrieval Augmented Generation) implementations. Files are private by default but can be made publicly accessible through a permanent URL that's unique for each file.","name":"files","operations":["upsertFile","deleteFile","listFiles","getFile","updateFileMetadata","searchFiles","listFilePassages"],"schema":"File"}],"errors":[{"status":500,"type":"Unknown","description":"An unknown error occurred"},{"status":500,"type":"Internal","description":"An internal error occurred"},{"status":401,"type":"Unauthorized","description":"The request requires to be authenticated."},{"status":403,"type":"Forbidden","description":"The requested action can't be peform by this resource."},{"status":413,"type":"PayloadTooLarge","description":"The request payload is too large."},{"status":400,"type":"InvalidPayload","description":"The request payload is invalid."},{"status":415,"type":"UnsupportedMediaType","description":"The request is invalid because the content-type is not supported."},{"status":405,"type":"MethodNotFound","description":"The requested method does not exist."},{"status":404,"type":"ResourceNotFound","description":"The requested resource does not exist."},{"status":400,"type":"InvalidJsonSchema","description":"The provided JSON schema is invalid."},{"status":400,"type":"InvalidDataFormat","description":"The provided data doesn't respect the provided JSON schema."},{"status":400,"type":"InvalidIdentifier","description":"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters."},{"status":409,"type":"RelationConflict","description":"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together."},{"status":409,"type":"ReferenceConstraint","description":"The resource cannot be deleted because it's referenced by another resource"},{"status":409,"type":"ResourceLockedConflict","description":"The resource is current locked and cannot be operated on until the lock is released."},{"status":400,"type":"ReferenceNotFound","description":"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."},{"status":400,"type":"InvalidQuery","description":"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."},{"status":400,"type":"Runtime","description":"An error happened during the execution of a runtime (bot or integration)."},{"status":409,"type":"AlreadyExists","description":"The record attempted to be created already exists."},{"status":429,"type":"RateLimited","description":"The request has been rate limited."},{"status":402,"type":"PaymentRequired","description":"A payment is required to perform this request."},{"status":403,"type":"QuotaExceeded","description":"The request exceeds the allowed quota. Quotas are a soft limit that can be increased."},{"status":413,"type":"LimitExceeded","description":"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."},{"status":400,"type":"BreakingChanges","description":"Request payload contains breaking changes which is not allowed for this resource without a version increment."}]}
|
|
1
|
+
{"sections":[{"description":"","title":"User","name":"user","operations":["createUser","getUser","listUsers","getOrCreateUser","updateUser","deleteUser"],"schema":"User"},{"description":"","title":"Conversation","name":"conversation","operations":["createConversation","getConversation","listConversations","getOrCreateConversation","updateConversation","deleteConversation","listParticipants","addParticipant","getParticipant","removeParticipant"],"schema":"Conversation"},{"description":"","title":"Event","name":"event","operations":["createEvent","getEvent","listEvents"],"schema":"Event"},{"description":"","title":"Message","name":"message","operations":["createMessage","getOrCreateMessage","getMessage","updateMessage","listMessages","deleteMessage"],"schema":"Message"},{"description":"","title":"State","name":"state","operations":["setStateExpiry","getState","setState","getOrSetState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Task","name":"task","operations":["getTask","createTask","updateTask","deleteTask","listTasks"],"schema":"Task"},{"title":"Bot","description":"","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","getBotIssue","listBotIssues","deleteBotIssue","listBotIssueEvents","listBotVersions","getBotVersion","createBotVersion","deployBotVersion"],"schema":"Bot"},{"title":"Integration","description":"","name":"integration","operations":["listIntegrationApiKeys","createIntegrationApiKey","deleteIntegrationApiKey","createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration","requestIntegrationVerification"],"schema":"Integration"},{"title":"Interface","description":"","name":"interface","operations":["createInterface","getInterface","getInterfaceByName","updateInterface","deleteInterface","listInterfaces"],"schema":"Interface"},{"title":"Workspace","description":"","name":"workspace","operations":["setWorkspacePaymentMethod","listWorkspaceInvoices","getUpcomingInvoice","chargeWorkspaceUnpaidInvoices","createWorkspace","getPublicWorkspace","getWorkspace","listWorkspaceUsages","breakDownWorkspaceUsageByBot","getAllWorkspaceQuotaCompletion","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","checkHandleAvailability","listWorkspaces","listPublicWorkspaces","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","getWorkspaceMember","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"title":"Account","description":"","name":"account","operations":["getAccount","updateAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken","setAccountPreference","getAccountPreference"],"schema":"Account"},{"title":"Usage","description":"","name":"usage","operations":["getUsage","getMultipleUsages"],"schema":"Usage"},{"title":"Quotas","description":"","name":"quotas","operations":["changeAISpendQuota"]},{"title":"Helper","description":"","name":"helper","operations":["runVrl"]},{"title":"Activity","description":"","name":"activity","operations":["listActivities"],"schema":"Activity"},{"title":"Tables","description":"Manage and interact with table structures, including creation, updates, and querying of tables and their rows.","name":"tables","operations":["listTables","getTable","getOrCreateTable","createTable","duplicateTable","updateTable","renameTableColumn","deleteTable","getTableRow","findTableRows","createTableRows","deleteTableRows","updateTableRows","upsertTableRows"],"schema":"Table"},{"title":"Files","description":"The Files API allows you to create, manage, and index files that can be used by your bots and integrations. Files can be in any text or binary format, and documents (such as PDF, Microsoft Word, HTML, Markdown, etc.) can be indexed to be used for semantic search in RAG (Retrieval Augmented Generation) implementations. Files are private by default but can be made publicly accessible through a permanent URL that's unique for each file.","name":"files","operations":["upsertFile","deleteFile","listFiles","getFile","updateFileMetadata","searchFiles","listFilePassages"],"schema":"File"}],"errors":[{"status":500,"type":"Unknown","description":"An unknown error occurred"},{"status":500,"type":"Internal","description":"An internal error occurred"},{"status":401,"type":"Unauthorized","description":"The request requires to be authenticated."},{"status":403,"type":"Forbidden","description":"The requested action can't be peform by this resource."},{"status":413,"type":"PayloadTooLarge","description":"The request payload is too large."},{"status":400,"type":"InvalidPayload","description":"The request payload is invalid."},{"status":415,"type":"UnsupportedMediaType","description":"The request is invalid because the content-type is not supported."},{"status":405,"type":"MethodNotFound","description":"The requested method does not exist."},{"status":404,"type":"ResourceNotFound","description":"The requested resource does not exist."},{"status":400,"type":"InvalidJsonSchema","description":"The provided JSON schema is invalid."},{"status":400,"type":"InvalidDataFormat","description":"The provided data doesn't respect the provided JSON schema."},{"status":400,"type":"InvalidIdentifier","description":"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters."},{"status":409,"type":"RelationConflict","description":"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together."},{"status":409,"type":"ReferenceConstraint","description":"The resource cannot be deleted because it's referenced by another resource"},{"status":409,"type":"ResourceLockedConflict","description":"The resource is current locked and cannot be operated on until the lock is released."},{"status":400,"type":"ReferenceNotFound","description":"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."},{"status":400,"type":"InvalidQuery","description":"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."},{"status":400,"type":"Runtime","description":"An error happened during the execution of a runtime (bot or integration)."},{"status":409,"type":"AlreadyExists","description":"The record attempted to be created already exists."},{"status":429,"type":"RateLimited","description":"The request has been rate limited."},{"status":402,"type":"PaymentRequired","description":"A payment is required to perform this request."},{"status":403,"type":"QuotaExceeded","description":"The request exceeds the allowed quota. Quotas are a soft limit that can be increased."},{"status":413,"type":"LimitExceeded","description":"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."},{"status":400,"type":"BreakingChanges","description":"Request payload contains breaking changes which is not allowed for this resource without a version increment."}]}
|