@botpress/api 0.5.6 → 0.6.0
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/gen/state.d.ts +69 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +107 -32
- package/package.json +2 -2
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +96 -21
package/dist/gen/state.d.ts
CHANGED
|
@@ -1157,6 +1157,46 @@ export declare const state: {
|
|
|
1157
1157
|
};
|
|
1158
1158
|
parameters: {};
|
|
1159
1159
|
};
|
|
1160
|
+
getAccount: {
|
|
1161
|
+
name: string;
|
|
1162
|
+
description: string;
|
|
1163
|
+
method: "get";
|
|
1164
|
+
path: string;
|
|
1165
|
+
section: "account";
|
|
1166
|
+
disableDefaultParameters: {
|
|
1167
|
+
"x-workspace-id": boolean;
|
|
1168
|
+
};
|
|
1169
|
+
response: {
|
|
1170
|
+
description: string;
|
|
1171
|
+
schema: {
|
|
1172
|
+
type: "object";
|
|
1173
|
+
properties: {
|
|
1174
|
+
account: {
|
|
1175
|
+
type: "object";
|
|
1176
|
+
properties: {
|
|
1177
|
+
id: {
|
|
1178
|
+
type: "string";
|
|
1179
|
+
};
|
|
1180
|
+
email: {
|
|
1181
|
+
type: "string";
|
|
1182
|
+
};
|
|
1183
|
+
createdAt: {
|
|
1184
|
+
type: "string";
|
|
1185
|
+
format: string;
|
|
1186
|
+
description: string;
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
required: string[];
|
|
1190
|
+
additionalProperties: false;
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
required: string[];
|
|
1194
|
+
title: string;
|
|
1195
|
+
additionalProperties: false;
|
|
1196
|
+
};
|
|
1197
|
+
};
|
|
1198
|
+
parameters: {};
|
|
1199
|
+
};
|
|
1160
1200
|
listPublicIntegrations: {
|
|
1161
1201
|
name: string;
|
|
1162
1202
|
description: string;
|
|
@@ -3949,6 +3989,7 @@ export declare const state: {
|
|
|
3949
3989
|
patchStateResponse: true;
|
|
3950
3990
|
callActionResponse: true;
|
|
3951
3991
|
configureIntegrationResponse: true;
|
|
3992
|
+
getAccountResponse: true;
|
|
3952
3993
|
listPublicIntegrationsResponse: true;
|
|
3953
3994
|
getPublicIntegrationByIdResponse: true;
|
|
3954
3995
|
getPublicIntegrationResponse: true;
|
|
@@ -3991,6 +4032,7 @@ export declare const state: {
|
|
|
3991
4032
|
Integration: true;
|
|
3992
4033
|
Workspace: true;
|
|
3993
4034
|
WorkspaceMember: true;
|
|
4035
|
+
Account: true;
|
|
3994
4036
|
User: true;
|
|
3995
4037
|
Conversation: true;
|
|
3996
4038
|
Event: true;
|
|
@@ -4689,6 +4731,27 @@ export declare const state: {
|
|
|
4689
4731
|
additionalProperties: false;
|
|
4690
4732
|
};
|
|
4691
4733
|
};
|
|
4734
|
+
Account: {
|
|
4735
|
+
section: "account";
|
|
4736
|
+
schema: {
|
|
4737
|
+
type: "object";
|
|
4738
|
+
properties: {
|
|
4739
|
+
id: {
|
|
4740
|
+
type: "string";
|
|
4741
|
+
};
|
|
4742
|
+
email: {
|
|
4743
|
+
type: "string";
|
|
4744
|
+
};
|
|
4745
|
+
createdAt: {
|
|
4746
|
+
type: "string";
|
|
4747
|
+
format: string;
|
|
4748
|
+
description: string;
|
|
4749
|
+
};
|
|
4750
|
+
};
|
|
4751
|
+
required: string[];
|
|
4752
|
+
additionalProperties: false;
|
|
4753
|
+
};
|
|
4754
|
+
};
|
|
4692
4755
|
User: {
|
|
4693
4756
|
section: "user";
|
|
4694
4757
|
schema: {
|
|
@@ -5003,5 +5066,11 @@ export declare const state: {
|
|
|
5003
5066
|
name: "workspaceMember";
|
|
5004
5067
|
operations: string[];
|
|
5005
5068
|
schema: string;
|
|
5069
|
+
} | {
|
|
5070
|
+
description: string;
|
|
5071
|
+
title: string;
|
|
5072
|
+
name: "account";
|
|
5073
|
+
operations: string[];
|
|
5074
|
+
schema: string;
|
|
5006
5075
|
})[];
|
|
5007
5076
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const api: {
|
|
2
|
-
getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "User" | "Conversation" | "Event" | "Message" | "State" | "File") => import("@bpinternal/opapi").OpenApiZodAny;
|
|
3
|
-
addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember", Path, "zod-schema">) => void;
|
|
2
|
+
getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "User" | "Conversation" | "Event" | "Message" | "State" | "File") => import("@bpinternal/opapi").OpenApiZodAny;
|
|
3
|
+
addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account", Path, "zod-schema">) => void;
|
|
4
4
|
exportClient: (dir: string | undefined, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined) => Promise<void>;
|
|
5
5
|
exportTypesBySection: (dir?: string | undefined) => Promise<void>;
|
|
6
6
|
exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -258872,7 +258872,7 @@ __export(src_exports, {
|
|
|
258872
258872
|
});
|
|
258873
258873
|
module.exports = __toCommonJS(src_exports);
|
|
258874
258874
|
|
|
258875
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.
|
|
258875
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
258876
258876
|
var import_zod_openapi = __toESM(require_src(), 1);
|
|
258877
258877
|
var import_zod_openapi2 = __toESM(require_src(), 1);
|
|
258878
258878
|
var import_chalk = __toESM(require_source(), 1);
|
|
@@ -258916,7 +258916,7 @@ var title = (str2) => {
|
|
|
258916
258916
|
return str2.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => capitalize(s.toLowerCase())).join(" ");
|
|
258917
258917
|
};
|
|
258918
258918
|
|
|
258919
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.
|
|
258919
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
258920
258920
|
var import_decompress = __toESM(require_decompress(), 1);
|
|
258921
258921
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
258922
258922
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
@@ -265905,7 +265905,7 @@ async function openapiTS(schema3, options = {}) {
|
|
|
265905
265905
|
}
|
|
265906
265906
|
var dist_default = openapiTS;
|
|
265907
265907
|
|
|
265908
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.
|
|
265908
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
265909
265909
|
var import_zod_openapi3 = __toESM(require_src(), 1);
|
|
265910
265910
|
var import_openapi3_ts = __toESM(require_dist3(), 1);
|
|
265911
265911
|
var import_verror2 = __toESM(require_verror(), 1);
|
|
@@ -269500,7 +269500,7 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
269500
269500
|
ZodError
|
|
269501
269501
|
});
|
|
269502
269502
|
|
|
269503
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.
|
|
269503
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.3.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
269504
269504
|
var import_openapi_parser = __toESM(require_lib11(), 1);
|
|
269505
269505
|
var import_json_schema_to_typescript = __toESM(require_src3(), 1);
|
|
269506
269506
|
var import_zod_openapi4 = __toESM(require_src(), 1);
|
|
@@ -424926,18 +424926,23 @@ ${Object.entries(codes).map(([name, code]) => ` ${name}: ${code},`).join("\n")}
|
|
|
424926
424926
|
type ErrorCode = typeof codes[keyof typeof codes]
|
|
424927
424927
|
|
|
424928
424928
|
declare const window: any
|
|
424929
|
-
type CryptoLib = { getRandomValues(array: Uint8Array):
|
|
424929
|
+
type CryptoLib = { getRandomValues(array: Uint8Array): Uint8Array }
|
|
424930
|
+
|
|
424931
|
+
const cryptoLibPolyfill: CryptoLib = {
|
|
424932
|
+
// Fallback in case crypto isn't available.
|
|
424933
|
+
getRandomValues: (array: Uint8Array) => new Uint8Array(array.map(() => Math.floor(Math.random() * 256))),
|
|
424934
|
+
}
|
|
424930
424935
|
|
|
424931
424936
|
let cryptoLib: CryptoLib =
|
|
424932
424937
|
typeof window !== 'undefined' && typeof window.document !== 'undefined'
|
|
424933
|
-
? window.crypto
|
|
424934
|
-
? window.crypto // Note: On browsers we need to use window.crypto instead of the imported crypto module as the latter is externalized and doesn't have getRandomValues().
|
|
424935
|
-
: {
|
|
424936
|
-
// Fallback in case crypto isn't available.
|
|
424937
|
-
getRandomValues: (array: Uint8Array) => new Uint8Array(array.map(() => Math.floor(Math.random() * 256))),
|
|
424938
|
-
}
|
|
424938
|
+
? window.crypto // Note: On browsers we need to use window.crypto instead of the imported crypto module as the latter is externalized and doesn't have getRandomValues().
|
|
424939
424939
|
: crypto
|
|
424940
424940
|
|
|
424941
|
+
if (!cryptoLib.getRandomValues) {
|
|
424942
|
+
// Use a polyfill in older environments that have a crypto implementaton missing getRandomValues()
|
|
424943
|
+
cryptoLib = cryptoLibPolyfill
|
|
424944
|
+
}
|
|
424945
|
+
|
|
424941
424946
|
abstract class BaseApiError<Code extends ErrorCode, Type extends string, Description extends string> extends Error {
|
|
424942
424947
|
public readonly isApiError = true
|
|
424943
424948
|
|
|
@@ -426990,6 +426995,46 @@ var state = {
|
|
|
426990
426995
|
},
|
|
426991
426996
|
parameters: {}
|
|
426992
426997
|
},
|
|
426998
|
+
getAccount: {
|
|
426999
|
+
name: "getAccount",
|
|
427000
|
+
description: "Get details of the account authenticating with this endpoint.",
|
|
427001
|
+
method: "get",
|
|
427002
|
+
path: "/v1/admin/account/me",
|
|
427003
|
+
section: "account",
|
|
427004
|
+
disableDefaultParameters: {
|
|
427005
|
+
"x-workspace-id": true
|
|
427006
|
+
},
|
|
427007
|
+
response: {
|
|
427008
|
+
description: "Success",
|
|
427009
|
+
schema: {
|
|
427010
|
+
type: "object",
|
|
427011
|
+
properties: {
|
|
427012
|
+
account: {
|
|
427013
|
+
type: "object",
|
|
427014
|
+
properties: {
|
|
427015
|
+
id: {
|
|
427016
|
+
type: "string"
|
|
427017
|
+
},
|
|
427018
|
+
email: {
|
|
427019
|
+
type: "string"
|
|
427020
|
+
},
|
|
427021
|
+
createdAt: {
|
|
427022
|
+
type: "string",
|
|
427023
|
+
format: "date-time",
|
|
427024
|
+
description: "Creation date of the [Account](#schema_account) in ISO 8601 format"
|
|
427025
|
+
}
|
|
427026
|
+
},
|
|
427027
|
+
required: ["id", "email", "createdAt"],
|
|
427028
|
+
additionalProperties: false
|
|
427029
|
+
}
|
|
427030
|
+
},
|
|
427031
|
+
required: ["account"],
|
|
427032
|
+
title: "getAccountResponse",
|
|
427033
|
+
additionalProperties: false
|
|
427034
|
+
}
|
|
427035
|
+
},
|
|
427036
|
+
parameters: {}
|
|
427037
|
+
},
|
|
426993
427038
|
listPublicIntegrations: {
|
|
426994
427039
|
name: "listPublicIntegrations",
|
|
426995
427040
|
description: "List public integration",
|
|
@@ -427041,12 +427086,12 @@ var state = {
|
|
|
427041
427086
|
createdAt: {
|
|
427042
427087
|
type: "string",
|
|
427043
427088
|
format: "date-time",
|
|
427044
|
-
description: "Creation date of the [Integration](#schema_integration) in
|
|
427089
|
+
description: "Creation date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
427045
427090
|
},
|
|
427046
427091
|
updatedAt: {
|
|
427047
427092
|
type: "string",
|
|
427048
427093
|
format: "date-time",
|
|
427049
|
-
description: "Updating date of the [Integration](#schema_integration) in
|
|
427094
|
+
description: "Updating date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
427050
427095
|
},
|
|
427051
427096
|
title: {
|
|
427052
427097
|
type: "string",
|
|
@@ -427737,12 +427782,12 @@ var state = {
|
|
|
427737
427782
|
createdAt: {
|
|
427738
427783
|
type: "string",
|
|
427739
427784
|
format: "date-time",
|
|
427740
|
-
description: "Creation date of the [Bot](#schema_bot) in
|
|
427785
|
+
description: "Creation date of the [Bot](#schema_bot) in ISO 8601 format"
|
|
427741
427786
|
},
|
|
427742
427787
|
updatedAt: {
|
|
427743
427788
|
type: "string",
|
|
427744
427789
|
format: "date-time",
|
|
427745
|
-
description: "Updating date of the [Bot](#schema_bot) in
|
|
427790
|
+
description: "Updating date of the [Bot](#schema_bot) in ISO 8601 format"
|
|
427746
427791
|
},
|
|
427747
427792
|
name: {
|
|
427748
427793
|
type: "string"
|
|
@@ -429417,12 +429462,12 @@ var state = {
|
|
|
429417
429462
|
createdAt: {
|
|
429418
429463
|
type: "string",
|
|
429419
429464
|
format: "date-time",
|
|
429420
|
-
description: "Creation date of the [Integration](#schema_integration) in
|
|
429465
|
+
description: "Creation date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
429421
429466
|
},
|
|
429422
429467
|
updatedAt: {
|
|
429423
429468
|
type: "string",
|
|
429424
429469
|
format: "date-time",
|
|
429425
|
-
description: "Updating date of the [Integration](#schema_integration) in
|
|
429470
|
+
description: "Updating date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
429426
429471
|
},
|
|
429427
429472
|
title: {
|
|
429428
429473
|
type: "string",
|
|
@@ -429813,7 +429858,7 @@ var state = {
|
|
|
429813
429858
|
title: "Botpress API",
|
|
429814
429859
|
description: "API for Botpress Cloud",
|
|
429815
429860
|
server: "https://api.botpress.cloud",
|
|
429816
|
-
version: "0.
|
|
429861
|
+
version: "0.6.0",
|
|
429817
429862
|
prefix: "v1"
|
|
429818
429863
|
},
|
|
429819
429864
|
errors: [
|
|
@@ -429970,6 +430015,7 @@ var state = {
|
|
|
429970
430015
|
patchStateResponse: true,
|
|
429971
430016
|
callActionResponse: true,
|
|
429972
430017
|
configureIntegrationResponse: true,
|
|
430018
|
+
getAccountResponse: true,
|
|
429973
430019
|
listPublicIntegrationsResponse: true,
|
|
429974
430020
|
getPublicIntegrationByIdResponse: true,
|
|
429975
430021
|
getPublicIntegrationResponse: true,
|
|
@@ -430012,6 +430058,7 @@ var state = {
|
|
|
430012
430058
|
Integration: true,
|
|
430013
430059
|
Workspace: true,
|
|
430014
430060
|
WorkspaceMember: true,
|
|
430061
|
+
Account: true,
|
|
430015
430062
|
User: true,
|
|
430016
430063
|
Conversation: true,
|
|
430017
430064
|
Event: true,
|
|
@@ -430034,12 +430081,12 @@ var state = {
|
|
|
430034
430081
|
createdAt: {
|
|
430035
430082
|
type: "string",
|
|
430036
430083
|
format: "date-time",
|
|
430037
|
-
description: "Creation date of the [Bot](#schema_bot) in
|
|
430084
|
+
description: "Creation date of the [Bot](#schema_bot) in ISO 8601 format"
|
|
430038
430085
|
},
|
|
430039
430086
|
updatedAt: {
|
|
430040
430087
|
type: "string",
|
|
430041
430088
|
format: "date-time",
|
|
430042
|
-
description: "Updating date of the [Bot](#schema_bot) in
|
|
430089
|
+
description: "Updating date of the [Bot](#schema_bot) in ISO 8601 format"
|
|
430043
430090
|
},
|
|
430044
430091
|
signingSecret: {
|
|
430045
430092
|
type: "string",
|
|
@@ -430090,12 +430137,12 @@ var state = {
|
|
|
430090
430137
|
createdAt: {
|
|
430091
430138
|
type: "string",
|
|
430092
430139
|
format: "date-time",
|
|
430093
|
-
description: "Creation date of the [Integration](#schema_integration) in
|
|
430140
|
+
description: "Creation date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
430094
430141
|
},
|
|
430095
430142
|
updatedAt: {
|
|
430096
430143
|
type: "string",
|
|
430097
430144
|
format: "date-time",
|
|
430098
|
-
description: "Updating date of the [Integration](#schema_integration) in
|
|
430145
|
+
description: "Updating date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
430099
430146
|
},
|
|
430100
430147
|
title: {
|
|
430101
430148
|
type: "string",
|
|
@@ -430382,12 +430429,12 @@ var state = {
|
|
|
430382
430429
|
createdAt: {
|
|
430383
430430
|
type: "string",
|
|
430384
430431
|
format: "date-time",
|
|
430385
|
-
description: "Creation date of the [Integration](#schema_integration) in
|
|
430432
|
+
description: "Creation date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
430386
430433
|
},
|
|
430387
430434
|
updatedAt: {
|
|
430388
430435
|
type: "string",
|
|
430389
430436
|
format: "date-time",
|
|
430390
|
-
description: "Updating date of the [Integration](#schema_integration) in
|
|
430437
|
+
description: "Updating date of the [Integration](#schema_integration) in ISO 8601 format"
|
|
430391
430438
|
},
|
|
430392
430439
|
name: {
|
|
430393
430440
|
type: "string",
|
|
@@ -430781,6 +430828,27 @@ var state = {
|
|
|
430781
430828
|
additionalProperties: false
|
|
430782
430829
|
}
|
|
430783
430830
|
},
|
|
430831
|
+
Account: {
|
|
430832
|
+
section: "account",
|
|
430833
|
+
schema: {
|
|
430834
|
+
type: "object",
|
|
430835
|
+
properties: {
|
|
430836
|
+
id: {
|
|
430837
|
+
type: "string"
|
|
430838
|
+
},
|
|
430839
|
+
email: {
|
|
430840
|
+
type: "string"
|
|
430841
|
+
},
|
|
430842
|
+
createdAt: {
|
|
430843
|
+
type: "string",
|
|
430844
|
+
format: "date-time",
|
|
430845
|
+
description: "Creation date of the [Account](#schema_account) in ISO 8601 format"
|
|
430846
|
+
}
|
|
430847
|
+
},
|
|
430848
|
+
required: ["id", "email", "createdAt"],
|
|
430849
|
+
additionalProperties: false
|
|
430850
|
+
}
|
|
430851
|
+
},
|
|
430784
430852
|
User: {
|
|
430785
430853
|
section: "user",
|
|
430786
430854
|
schema: {
|
|
@@ -430793,12 +430861,12 @@ var state = {
|
|
|
430793
430861
|
createdAt: {
|
|
430794
430862
|
type: "string",
|
|
430795
430863
|
format: "date-time",
|
|
430796
|
-
description: "Creation date of the [User](#schema_user) in
|
|
430864
|
+
description: "Creation date of the [User](#schema_user) in ISO 8601 format"
|
|
430797
430865
|
},
|
|
430798
430866
|
updatedAt: {
|
|
430799
430867
|
type: "string",
|
|
430800
430868
|
format: "date-time",
|
|
430801
|
-
description: "Updating date of the [User](#schema_user) in
|
|
430869
|
+
description: "Updating date of the [User](#schema_user) in ISO 8601 format"
|
|
430802
430870
|
},
|
|
430803
430871
|
tags: {
|
|
430804
430872
|
type: "object",
|
|
@@ -430825,12 +430893,12 @@ var state = {
|
|
|
430825
430893
|
createdAt: {
|
|
430826
430894
|
type: "string",
|
|
430827
430895
|
format: "date-time",
|
|
430828
|
-
description: "Creation date of the [Conversation](#schema_conversation) in
|
|
430896
|
+
description: "Creation date of the [Conversation](#schema_conversation) in ISO 8601 format"
|
|
430829
430897
|
},
|
|
430830
430898
|
updatedAt: {
|
|
430831
430899
|
type: "string",
|
|
430832
430900
|
format: "date-time",
|
|
430833
|
-
description: "Updating date of the [Conversation](#schema_conversation) in
|
|
430901
|
+
description: "Updating date of the [Conversation](#schema_conversation) in ISO 8601 format"
|
|
430834
430902
|
},
|
|
430835
430903
|
channel: {
|
|
430836
430904
|
type: "string",
|
|
@@ -430872,7 +430940,7 @@ var state = {
|
|
|
430872
430940
|
createdAt: {
|
|
430873
430941
|
type: "string",
|
|
430874
430942
|
format: "date-time",
|
|
430875
|
-
description: "Creation date of the [Event](#schema_event) in
|
|
430943
|
+
description: "Creation date of the [Event](#schema_event) in ISO 8601 format"
|
|
430876
430944
|
},
|
|
430877
430945
|
type: {
|
|
430878
430946
|
type: "string",
|
|
@@ -430901,7 +430969,7 @@ var state = {
|
|
|
430901
430969
|
createdAt: {
|
|
430902
430970
|
type: "string",
|
|
430903
430971
|
format: "date-time",
|
|
430904
|
-
description: "Creation date of the [Message](#schema_message) in
|
|
430972
|
+
description: "Creation date of the [Message](#schema_message) in ISO 8601 format"
|
|
430905
430973
|
},
|
|
430906
430974
|
type: {
|
|
430907
430975
|
type: "string",
|
|
@@ -430959,12 +431027,12 @@ var state = {
|
|
|
430959
431027
|
createdAt: {
|
|
430960
431028
|
type: "string",
|
|
430961
431029
|
format: "date-time",
|
|
430962
|
-
description: "Creation date of the [State](#schema_state) in
|
|
431030
|
+
description: "Creation date of the [State](#schema_state) in ISO 8601 format"
|
|
430963
431031
|
},
|
|
430964
431032
|
updatedAt: {
|
|
430965
431033
|
type: "string",
|
|
430966
431034
|
format: "date-time",
|
|
430967
|
-
description: "Updating date of the [State](#schema_state) in
|
|
431035
|
+
description: "Updating date of the [State](#schema_state) in ISO 8601 format"
|
|
430968
431036
|
},
|
|
430969
431037
|
botId: {
|
|
430970
431038
|
type: "string",
|
|
@@ -431191,6 +431259,13 @@ var state = {
|
|
|
431191
431259
|
"updateWorkspaceMember"
|
|
431192
431260
|
],
|
|
431193
431261
|
schema: "WorkspaceMember"
|
|
431262
|
+
},
|
|
431263
|
+
{
|
|
431264
|
+
description: "",
|
|
431265
|
+
title: "Account",
|
|
431266
|
+
name: "account",
|
|
431267
|
+
operations: ["getAccount"],
|
|
431268
|
+
schema: "Account"
|
|
431194
431269
|
}
|
|
431195
431270
|
]
|
|
431196
431271
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"zod": "^3.20.6"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@bpinternal/opapi": "0.3.
|
|
25
|
+
"@bpinternal/opapi": "0.3.3"
|
|
26
26
|
}
|
|
27
27
|
}
|
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"],"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":"File","name":"file","operations":["createFile","getFile","downloadFile","deleteFile","listFiles"],"schema":"File"},{"description":"","title":"State","name":"state","operations":["getState","setState","patchState"],"schema":"State"},{"description":"","title":"Hub","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Bot","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics"],"schema":"Bot"},{"description":"","title":"Integration","name":"integration","operations":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"description":"","title":"Workspace","name":"workspace","operations":["createWorkspace","getWorkspace","updateWorkspace","listWorkspaces","changeWorkspacePlan","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"description":"","title":"Workspace Member","name":"workspaceMember","operations":["listWorkspaceMembers","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"}],"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 not related with another resource. This is usually caused when providing two resources that aren't linked together."},{"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."}]}
|
|
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"],"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":"File","name":"file","operations":["createFile","getFile","downloadFile","deleteFile","listFiles"],"schema":"File"},{"description":"","title":"State","name":"state","operations":["getState","setState","patchState"],"schema":"State"},{"description":"","title":"Hub","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Bot","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics"],"schema":"Bot"},{"description":"","title":"Integration","name":"integration","operations":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"description":"","title":"Workspace","name":"workspace","operations":["createWorkspace","getWorkspace","updateWorkspace","listWorkspaces","changeWorkspacePlan","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"description":"","title":"Workspace Member","name":"workspaceMember","operations":["listWorkspaceMembers","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"description":"","title":"Account","name":"account","operations":["getAccount"],"schema":"Account"}],"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 not related with another resource. This is usually caused when providing two resources that aren't linked together."},{"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."}]}
|