@botpress/client
Advanced tools
Comparing version 0.18.0 to 0.18.2
@@ -1,2 +0,3 @@ | ||
import { AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
import { AxiosInstance } from 'axios'; | ||
import { toAxiosRequest } from './to-axios'; | ||
import * as createConversation from './operations/createConversation'; | ||
@@ -59,2 +60,3 @@ import * as getConversation from './operations/getConversation'; | ||
import * as getBotAnalytics from './operations/getBotAnalytics'; | ||
import * as getBotIssue from './operations/getBotIssue'; | ||
import * as listBotIssues from './operations/listBotIssues'; | ||
@@ -178,2 +180,3 @@ import * as deleteBotIssue from './operations/deleteBotIssue'; | ||
export * as getBotAnalytics from './operations/getBotAnalytics'; | ||
export * as getBotIssue from './operations/getBotIssue'; | ||
export * as listBotIssues from './operations/listBotIssues'; | ||
@@ -239,5 +242,9 @@ export * as deleteBotIssue from './operations/deleteBotIssue'; | ||
export * as upsertTableRows from './operations/upsertTableRows'; | ||
export type ClientProps = { | ||
toAxiosRequest: typeof toAxiosRequest; | ||
}; | ||
export declare class Client { | ||
private axiosInstance; | ||
constructor(axiosInstance: AxiosInstance); | ||
private props; | ||
constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps>); | ||
readonly createConversation: (input: createConversation.CreateConversationInput) => Promise<createConversation.CreateConversationResponse>; | ||
@@ -300,2 +307,3 @@ readonly getConversation: (input: getConversation.GetConversationInput) => Promise<getConversation.GetConversationResponse>; | ||
readonly getBotAnalytics: (input: getBotAnalytics.GetBotAnalyticsInput) => Promise<getBotAnalytics.GetBotAnalyticsResponse>; | ||
readonly getBotIssue: (input: getBotIssue.GetBotIssueInput) => Promise<getBotIssue.GetBotIssueResponse>; | ||
readonly listBotIssues: (input: listBotIssues.ListBotIssuesInput) => Promise<listBotIssues.ListBotIssuesResponse>; | ||
@@ -362,16 +370,1 @@ readonly deleteBotIssue: (input: deleteBotIssue.DeleteBotIssueInput) => Promise<deleteBotIssue.DeleteBotIssueResponse>; | ||
} | ||
type Primitive = string | number | boolean; | ||
type Value<P extends Primitive> = P | P[] | Record<string, P>; | ||
type QueryValue = Value<string> | Value<boolean> | Value<number> | undefined; | ||
type AnyQueryParams = Record<string, QueryValue>; | ||
type HeaderValue = string | undefined; | ||
type AnyHeaderParams = Record<string, HeaderValue>; | ||
type AnyBodyParams = Record<string, any>; | ||
type ParsedRequest = { | ||
method: string; | ||
path: string; | ||
query: AnyQueryParams; | ||
headers: AnyHeaderParams; | ||
body: AnyBodyParams; | ||
}; | ||
export declare const toAxiosRequest: (req: ParsedRequest) => AxiosRequestConfig; |
@@ -569,3 +569,2 @@ export interface Bot { | ||
botCount: number; | ||
accountType: "free" | "premium"; | ||
billingVersion: "v1" | "v2"; | ||
@@ -1148,15 +1147,15 @@ plan: "community" | "team" | "enterprise"; | ||
/** | ||
* Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully. | ||
* Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully. | ||
* | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped). | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped). | ||
* | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field. | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field. | ||
*/ | ||
status: "UPLOAD_PENDING" | "UPLOAD_FAILED" | "UPLOAD_COMPLETED" | "INDEXING_PENDING" | "INDEXING_FAILED" | "INDEXING_COMPLETED"; | ||
status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed"; | ||
/** | ||
* If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure. | ||
* If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure. | ||
*/ | ||
failedStatusReason?: string; | ||
} |
@@ -90,13 +90,13 @@ export interface CreateFileRequestHeaders { | ||
/** | ||
* Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully. | ||
* Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully. | ||
* | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped). | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped). | ||
* | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field. | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field. | ||
*/ | ||
status: "UPLOAD_PENDING" | "UPLOAD_FAILED" | "UPLOAD_COMPLETED" | "INDEXING_PENDING" | "INDEXING_FAILED" | "INDEXING_COMPLETED"; | ||
status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed"; | ||
/** | ||
* If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure. | ||
* If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure. | ||
*/ | ||
@@ -103,0 +103,0 @@ failedStatusReason?: string; |
@@ -27,3 +27,2 @@ export interface CreateWorkspaceRequestHeaders { | ||
botCount: number; | ||
accountType: "free" | "premium"; | ||
billingVersion: "v1" | "v2"; | ||
@@ -30,0 +29,0 @@ plan: "community" | "team" | "enterprise"; |
@@ -71,13 +71,13 @@ export interface GetFileRequestHeaders { | ||
/** | ||
* Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully. | ||
* Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully. | ||
* | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped). | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped). | ||
* | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field. | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field. | ||
*/ | ||
status: "UPLOAD_PENDING" | "UPLOAD_FAILED" | "UPLOAD_COMPLETED" | "INDEXING_PENDING" | "INDEXING_FAILED" | "INDEXING_COMPLETED"; | ||
status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed"; | ||
/** | ||
* If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure. | ||
* If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure. | ||
*/ | ||
@@ -84,0 +84,0 @@ failedStatusReason?: string; |
@@ -27,3 +27,2 @@ export interface GetWorkspaceRequestHeaders { | ||
botCount: number; | ||
accountType: "free" | "premium"; | ||
billingVersion: "v1" | "v2"; | ||
@@ -30,0 +29,0 @@ plan: "community" | "team" | "enterprise"; |
@@ -74,13 +74,13 @@ export interface ListFilesRequestHeaders { | ||
/** | ||
* Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully. | ||
* Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully. | ||
* | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped). | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped). | ||
* | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field. | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field. | ||
*/ | ||
status: "UPLOAD_PENDING" | "UPLOAD_FAILED" | "UPLOAD_COMPLETED" | "INDEXING_PENDING" | "INDEXING_FAILED" | "INDEXING_COMPLETED"; | ||
status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed"; | ||
/** | ||
* If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure. | ||
* If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure. | ||
*/ | ||
@@ -87,0 +87,0 @@ failedStatusReason?: string; |
@@ -36,3 +36,2 @@ export interface ListWorkspacesRequestHeaders { | ||
botCount: number; | ||
accountType: "free" | "premium"; | ||
billingVersion: "v1" | "v2"; | ||
@@ -39,0 +38,0 @@ plan: "community" | "team" | "enterprise"; |
@@ -81,13 +81,13 @@ export interface UpdateFileRequestHeaders { | ||
/** | ||
* Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully. | ||
* Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully. | ||
* | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file. | ||
* | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped). | ||
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped). | ||
* | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field. | ||
* Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field. | ||
*/ | ||
status: "UPLOAD_PENDING" | "UPLOAD_FAILED" | "UPLOAD_COMPLETED" | "INDEXING_PENDING" | "INDEXING_FAILED" | "INDEXING_COMPLETED"; | ||
status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed"; | ||
/** | ||
* If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure. | ||
* If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure. | ||
*/ | ||
@@ -94,0 +94,0 @@ failedStatusReason?: string; |
@@ -39,3 +39,2 @@ export interface UpdateWorkspaceRequestHeaders { | ||
botCount: number; | ||
accountType: "free" | "premium"; | ||
billingVersion: "v1" | "v2"; | ||
@@ -42,0 +41,0 @@ plan: "community" | "team" | "enterprise"; |
{ | ||
"name": "@botpress/client", | ||
"version": "0.18.0", | ||
"version": "0.18.2", | ||
"description": "Botpress Client", | ||
@@ -33,3 +33,3 @@ "main": "./dist/index.cjs", | ||
"devDependencies": { | ||
"@botpress/api": "0.27.17", | ||
"@botpress/api": "0.29.3", | ||
"@types/qs": "^6.9.7", | ||
@@ -36,0 +36,0 @@ "esbuild": "^0.16.12", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
3452050
141
13422
16