@botpress/client 0.29.3 → 0.30.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/client",
3
- "version": "0.29.3",
3
+ "version": "0.30.0",
4
4
  "description": "Botpress Client",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -31,7 +31,7 @@
31
31
  "type-fest": "^3.4.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@botpress/api": "0.40.1",
34
+ "@botpress/api": "0.41.0",
35
35
  "@types/qs": "^6.9.7",
36
36
  "esbuild": "^0.16.12",
37
37
  "lodash": "^4.17.21",
@@ -72,4 +72,17 @@ describe('uploadFile', () => {
72
72
  const download = await fetch(response.file.url)
73
73
  expect(download.status).toBe(200)
74
74
  })
75
+
76
+ it('public URL is immediately accessible when requested', async () => {
77
+ const sourceUrl = 'https://docs.botpress.cloud/docs/content/whatsapp-banner.png'
78
+
79
+ const response = await client.uploadFile({
80
+ key: 'whatsapp-banner.png',
81
+ url: sourceUrl,
82
+ publicContentImmediatelyAccessible: true,
83
+ })
84
+
85
+ const download = await fetch(response.file.url)
86
+ expect(download.status).toBe(200)
87
+ })
75
88
  })