@botpress/api 0.15.9 → 0.15.10

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/src/gen/state.ts CHANGED
@@ -16,7 +16,10 @@ export type State = opapi.State<
16
16
  | "Event"
17
17
  | "Message"
18
18
  | "State"
19
- | "File",
19
+ | "File"
20
+ | "Table"
21
+ | "Column"
22
+ | "Row",
20
23
  never,
21
24
  | "user"
22
25
  | "conversation"
@@ -34,6 +37,7 @@ export type State = opapi.State<
34
37
  | "usage"
35
38
  | "quotas"
36
39
  | "helper"
40
+ | "tables"
37
41
  >;
38
42
  export const state = {
39
43
  operations: {
@@ -593,7 +597,7 @@ export const state = {
593
597
  listEvents: {
594
598
  name: "listEvents",
595
599
  description:
596
- "Retreives a list of [Event](#schema_event) you’ve previously created. The events are returned in sorted order, with the most recent appearing first.",
600
+ "Retrieves a list of [Event](#schema_event) you’ve previously created. The events are returned in sorted order, with the most recent appearing first.",
597
601
  method: "get",
598
602
  path: "/v1/chat/events",
599
603
  section: "event",
@@ -1741,6 +1745,74 @@ export const state = {
1741
1745
  },
1742
1746
  },
1743
1747
  },
1748
+ setAccountPreference: {
1749
+ name: "setAccountPreference",
1750
+ description: "Set a preference for the account",
1751
+ method: "post",
1752
+ path: "/v1/admin/account/preferences/{key}",
1753
+ section: "account",
1754
+ disableDefaultParameters: {
1755
+ "x-workspace-id": true,
1756
+ },
1757
+ parameters: {
1758
+ key: {
1759
+ type: "string",
1760
+ description: "Preference key",
1761
+ in: "path",
1762
+ },
1763
+ },
1764
+ requestBody: {
1765
+ description: "Preference value",
1766
+ schema: {
1767
+ type: "object",
1768
+ properties: {
1769
+ value: {
1770
+ nullable: true,
1771
+ },
1772
+ },
1773
+ title: "setAccountPreferenceBody",
1774
+ additionalProperties: false,
1775
+ },
1776
+ },
1777
+ response: {
1778
+ description: "Success",
1779
+ schema: {
1780
+ type: "object",
1781
+ title: "setAccountPreferenceResponse",
1782
+ additionalProperties: false,
1783
+ },
1784
+ },
1785
+ },
1786
+ getAccountPreference: {
1787
+ name: "getAccountPreference",
1788
+ description: "Get a preference of the account",
1789
+ method: "get",
1790
+ path: "/v1/admin/account/preferences/{key}",
1791
+ section: "account",
1792
+ disableDefaultParameters: {
1793
+ "x-workspace-id": true,
1794
+ },
1795
+ parameters: {
1796
+ key: {
1797
+ type: "string",
1798
+ description: "Preference key",
1799
+ in: "path",
1800
+ },
1801
+ },
1802
+ response: {
1803
+ description: "Success",
1804
+ schema: {
1805
+ type: "object",
1806
+ properties: {
1807
+ value: {
1808
+ nullable: true,
1809
+ },
1810
+ },
1811
+ title: "getAccountPreferenceResponse",
1812
+ additionalProperties: false,
1813
+ },
1814
+ },
1815
+ },
1744
1816
  listPublicIntegrations: {
1745
1817
  name: "listPublicIntegrations",
1746
1818
  description: "List public integration",
@@ -2229,6 +2301,11 @@ export const state = {
2229
2301
  blocked: {
2230
2302
  type: "boolean",
2231
2303
  },
2304
+ alwaysAlive: {
2305
+ type: "boolean",
2306
+ description:
2307
+ "Indicates if the [Bot](#schema_bot) should be in always alive mode",
2308
+ },
2232
2309
  user: {
2233
2310
  type: "object",
2234
2311
  properties: {
@@ -2445,11 +2522,6 @@ export const state = {
2445
2522
  },
2446
2523
  description: "Media files associated with the [Bot](#schema_bot)",
2447
2524
  },
2448
- alwaysAlive: {
2449
- type: "boolean",
2450
- description:
2451
- "Indicates if the [Bot](#schema_bot) should be in always alive mode",
2452
- },
2453
2525
  },
2454
2526
  title: "updateBotBody",
2455
2527
  additionalProperties: false,
@@ -4837,6 +4909,14 @@ export const state = {
4837
4909
  },
4838
4910
  additionalProperties: false,
4839
4911
  },
4912
+ secrets: {
4913
+ type: "object",
4914
+ additionalProperties: {
4915
+ type: "string",
4916
+ },
4917
+ description:
4918
+ "Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing.",
4919
+ },
4840
4920
  code: {
4841
4921
  type: "string",
4842
4922
  description: "JavaScript code of the integration",
@@ -5215,6 +5295,15 @@ export const state = {
5215
5295
  },
5216
5296
  additionalProperties: false,
5217
5297
  },
5298
+ secrets: {
5299
+ type: "object",
5300
+ additionalProperties: {
5301
+ type: "string",
5302
+ nullable: true,
5303
+ },
5304
+ description:
5305
+ "Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing.",
5306
+ },
5218
5307
  code: {
5219
5308
  type: "string",
5220
5309
  description: "JavaScript code of the integration",
@@ -5895,7 +5984,7 @@ export const state = {
5895
5984
  title: "Botpress API",
5896
5985
  description: "API for Botpress Cloud",
5897
5986
  server: "https://api.botpress.cloud",
5898
- version: "0.15.9",
5987
+ version: "0.15.10",
5899
5988
  prefix: "v1",
5900
5989
  },
5901
5990
  errors: [
@@ -6034,6 +6123,7 @@ export const state = {
6034
6123
  configureIntegrationBody: true,
6035
6124
  runVrlBody: true,
6036
6125
  createPersonalAccessTokenBody: true,
6126
+ setAccountPreferenceBody: true,
6037
6127
  createBotBody: true,
6038
6128
  updateBotBody: true,
6039
6129
  transferBotBody: true,
@@ -6086,6 +6176,8 @@ export const state = {
6086
6176
  listPersonalAccessTokensResponse: true,
6087
6177
  createPersonalAccessTokenResponse: true,
6088
6178
  deletePersonalAccessTokenResponse: true,
6179
+ setAccountPreferenceResponse: true,
6180
+ getAccountPreferenceResponse: true,
6089
6181
  listPublicIntegrationsResponse: true,
6090
6182
  getPublicIntegrationByIdResponse: true,
6091
6183
  getPublicIntegrationResponse: true,
@@ -6153,6 +6245,9 @@ export const state = {
6153
6245
  Message: true,
6154
6246
  State: true,
6155
6247
  File: true,
6248
+ Table: true,
6249
+ Column: true,
6250
+ Row: true,
6156
6251
  },
6157
6252
  },
6158
6253
  schemas: {
@@ -6933,6 +7028,14 @@ export const state = {
6933
7028
  description:
6934
7029
  "URL of the readme of the integration. This is the readme that will be displayed in the UI",
6935
7030
  },
7031
+ secrets: {
7032
+ type: "array",
7033
+ items: {
7034
+ type: "string",
7035
+ },
7036
+ description:
7037
+ "Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing.",
7038
+ },
6936
7039
  },
6937
7040
  required: [
6938
7041
  "id",
@@ -6952,6 +7055,7 @@ export const state = {
6952
7055
  "description",
6953
7056
  "iconUrl",
6954
7057
  "readmeUrl",
7058
+ "secrets",
6955
7059
  ],
6956
7060
  additionalProperties: false,
6957
7061
  },
@@ -7559,6 +7663,141 @@ export const state = {
7559
7663
  additionalProperties: false,
7560
7664
  },
7561
7665
  },
7666
+ Table: {
7667
+ section: "tables",
7668
+ schema: {
7669
+ type: "object",
7670
+ properties: {
7671
+ id: {
7672
+ type: "string",
7673
+ description: "Unique identifier for the table",
7674
+ },
7675
+ name: {
7676
+ type: "string",
7677
+ description: "Required. This name is used to identify your table.",
7678
+ },
7679
+ factor: {
7680
+ default: 1,
7681
+ type: "number",
7682
+ minimum: 1,
7683
+ maximum: 30,
7684
+ description:
7685
+ "The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.",
7686
+ },
7687
+ columns: {
7688
+ type: "array",
7689
+ items: {
7690
+ type: "object",
7691
+ properties: {
7692
+ id: {
7693
+ type: "string",
7694
+ description: "Unique identifier for the column.",
7695
+ },
7696
+ name: {
7697
+ type: "string",
7698
+ minLength: 1,
7699
+ maxLength: 30,
7700
+ description:
7701
+ "Name of the column, must be within length limits.",
7702
+ },
7703
+ description: {
7704
+ type: "string",
7705
+ description: "Optional descriptive text about the column.",
7706
+ },
7707
+ searchable: {
7708
+ type: "boolean",
7709
+ description:
7710
+ "Indicates if the column is vectorized and searchable.",
7711
+ },
7712
+ type: {
7713
+ type: "string",
7714
+ enum: ["string", "number", "boolean", "date", "object"],
7715
+ description:
7716
+ 'Specifies the data type of the column. Use "object" for complex data structures.',
7717
+ },
7718
+ typings: {
7719
+ type: "string",
7720
+ description:
7721
+ 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"',
7722
+ },
7723
+ },
7724
+ required: ["id", "name", "type"],
7725
+ },
7726
+ maxItems: 20,
7727
+ description: "Array of columns in the table.",
7728
+ },
7729
+ },
7730
+ required: ["id", "name", "columns"],
7731
+ additionalProperties: false,
7732
+ },
7733
+ },
7734
+ Column: {
7735
+ section: "tables",
7736
+ schema: {
7737
+ type: "object",
7738
+ properties: {
7739
+ id: {
7740
+ type: "string",
7741
+ description: "Unique identifier for the column.",
7742
+ },
7743
+ name: {
7744
+ type: "string",
7745
+ minLength: 1,
7746
+ maxLength: 30,
7747
+ description: "Name of the column, must be within length limits.",
7748
+ },
7749
+ description: {
7750
+ type: "string",
7751
+ description: "Optional descriptive text about the column.",
7752
+ },
7753
+ searchable: {
7754
+ type: "boolean",
7755
+ description:
7756
+ "Indicates if the column is vectorized and searchable.",
7757
+ },
7758
+ type: {
7759
+ type: "string",
7760
+ enum: ["string", "number", "boolean", "date", "object"],
7761
+ description:
7762
+ 'Specifies the data type of the column. Use "object" for complex data structures.',
7763
+ },
7764
+ typings: {
7765
+ type: "string",
7766
+ description:
7767
+ 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"',
7768
+ },
7769
+ },
7770
+ required: ["id", "name", "type"],
7771
+ additionalProperties: false,
7772
+ },
7773
+ },
7774
+ Row: {
7775
+ section: "tables",
7776
+ schema: {
7777
+ type: "object",
7778
+ properties: {
7779
+ id: {
7780
+ type: "number",
7781
+ description: "Unique identifier for the row.",
7782
+ },
7783
+ createdAt: {
7784
+ type: "string",
7785
+ description: "Timestamp of row creation.",
7786
+ },
7787
+ updatedAt: {
7788
+ type: "string",
7789
+ description: "Timestamp of the last row update.",
7790
+ },
7791
+ similarity: {
7792
+ type: "number",
7793
+ description:
7794
+ "Optional numeric value indicating similarity, when using findTableRows.",
7795
+ },
7796
+ },
7797
+ required: ["id"],
7798
+ additionalProperties: true,
7799
+ },
7800
+ },
7562
7801
  },
7563
7802
  sections: [
7564
7803
  {
@@ -7730,6 +7969,8 @@ export const state = {
7730
7969
  "listPersonalAccessTokens",
7731
7970
  "createPersonalAccessToken",
7732
7971
  "deletePersonalAccessToken",
7972
+ "setAccountPreference",
7973
+ "getAccountPreference",
7733
7974
  ],
7734
7975
  schema: "Account",
7735
7976
  },
@@ -7752,6 +7993,13 @@ export const state = {
7752
7993
  name: "helper",
7753
7994
  operations: ["runVrl"],
7754
7995
  },
7996
+ {
7997
+ title: "Tables",
7998
+ description: "Operations related to table management.",
7999
+ name: "tables",
8000
+ operations: [],
8001
+ schema: "Table",
8002
+ },
7755
8003
  ],
7756
8004
  options: {
7757
8005
  allowUnions: false,