@voiceflow/sdk-runtime 1.5.28 → 1.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.6.0](https://github.com/voiceflow/adapters/compare/@voiceflow/sdk-runtime@1.5.28...@voiceflow/sdk-runtime@1.6.0) (2023-06-06)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **deps:** update dependency @voiceflow/base-types to v2.81.12 (vf-000) ([#87](https://github.com/voiceflow/adapters/issues/87)) ([5b8aa56](https://github.com/voiceflow/adapters/commit/5b8aa56b3269673c8e137a422cc6fd21e2295323))
|
|
11
|
+
* **deps:** update dependency @voiceflow/base-types to v2.81.13 (vf-000) ([#88](https://github.com/voiceflow/adapters/issues/88)) ([381e145](https://github.com/voiceflow/adapters/commit/381e14536e56168f71839cc738d593d43a44968e))
|
|
12
|
+
* **deps:** update dependency @voiceflow/base-types to v2.81.14 (vf-000) ([#89](https://github.com/voiceflow/adapters/issues/89)) ([ceec206](https://github.com/voiceflow/adapters/commit/ceec206fbd6dd0a9dec05b48e840a275b2a7c668))
|
|
13
|
+
* **deps:** update dependency @voiceflow/base-types to v2.81.7 (vf-000) ([#84](https://github.com/voiceflow/adapters/issues/84)) ([9689b5a](https://github.com/voiceflow/adapters/commit/9689b5adf8b02d75123eafa8a1646af89a3164a9))
|
|
14
|
+
* **deps:** update dependency @voiceflow/base-types to v2.81.9 (vf-000) ([#85](https://github.com/voiceflow/adapters/issues/85)) ([309ec41](https://github.com/voiceflow/adapters/commit/309ec4186373e8458b092a762c17692e4633a6f4))
|
|
15
|
+
* **deps:** update dependency @voiceflow/base-types to v2.82.0 (vf-000) ([#90](https://github.com/voiceflow/adapters/issues/90)) ([96d8397](https://github.com/voiceflow/adapters/commit/96d8397ef4423b46581c184cf1bfc4c084425ad3))
|
|
16
|
+
* **deps:** update dependency @voiceflow/base-types to v2.83.1 (vf-000) ([#91](https://github.com/voiceflow/adapters/issues/91)) ([2c72e11](https://github.com/voiceflow/adapters/commit/2c72e11e4e0926092fc6238963596d47109f89e0))
|
|
17
|
+
* **deps:** update dependency @voiceflow/base-types to v2.83.2 (vf-000) ([#92](https://github.com/voiceflow/adapters/issues/92)) ([d6ce499](https://github.com/voiceflow/adapters/commit/d6ce499f892a6bb59f5a1bda914c71ea8751ce78))
|
|
18
|
+
* **deps:** update dependency @voiceflow/base-types to v2.83.3 (vf-000) ([#93](https://github.com/voiceflow/adapters/issues/93)) ([15efa08](https://github.com/voiceflow/adapters/commit/15efa08659aa8cccef10acb9d1966e4f90987cca))
|
|
19
|
+
* **deps:** update dependency @voiceflow/base-types to v2.84.0 (vf-000) ([#94](https://github.com/voiceflow/adapters/issues/94)) ([0cabe66](https://github.com/voiceflow/adapters/commit/0cabe6615d1c3be28ea28461510330101ea0f123))
|
|
20
|
+
* **deps:** update dependency @voiceflow/base-types to v2.84.3 (vf-000) ([#95](https://github.com/voiceflow/adapters/issues/95)) ([83d4914](https://github.com/voiceflow/adapters/commit/83d491413d220b2c8c9ba2ed190c85dff449e334))
|
|
21
|
+
* **deps:** update voiceflow dependencies (automerge) (vf-000) ([#86](https://github.com/voiceflow/adapters/issues/86)) ([727444f](https://github.com/voiceflow/adapters/commit/727444f96430378109dc42ec3c76cec449774a9a))
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* implement new public feedback endpoint (CT-2052) ([#96](https://github.com/voiceflow/adapters/issues/96)) ([78184e7](https://github.com/voiceflow/adapters/commit/78184e741fa9f8609911f305db065a68162eb8bb))
|
|
26
|
+
|
|
6
27
|
## [1.5.28](https://github.com/voiceflow/adapters/compare/@voiceflow/sdk-runtime@1.5.27...@voiceflow/sdk-runtime@1.5.28) (2023-04-03)
|
|
7
28
|
|
|
8
29
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/sdk-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"import": "./build/esm/main.js",
|
|
@@ -30,17 +30,16 @@
|
|
|
30
30
|
"extends": "@voiceflow-meta/eslint-config"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@voiceflow/base-types": "2.
|
|
33
|
+
"@voiceflow/base-types": "2.85.0",
|
|
34
34
|
"http-errors": "2.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/http-errors": "^1.8.2",
|
|
38
|
-
"@voiceflow-meta/eslint-config": "
|
|
39
|
-
"@voiceflow-meta/prettier-config": "
|
|
40
|
-
"@voiceflow-meta/typescript-config": "
|
|
38
|
+
"@voiceflow-meta/eslint-config": "workspace:*",
|
|
39
|
+
"@voiceflow-meta/prettier-config": "workspace:*",
|
|
40
|
+
"@voiceflow-meta/typescript-config": "workspace:*"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
|
-
}
|
|
45
|
-
"gitHead": "b1967820bb7bf3d3f5b8882416ad3c164348d9ec"
|
|
44
|
+
}
|
|
46
45
|
}
|
|
@@ -43,6 +43,14 @@ export interface RuntimeInteractRequest {
|
|
|
43
43
|
config?: any;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
export interface RuntimeFeedbackRequest {
|
|
47
|
+
name: string;
|
|
48
|
+
sessionID: string;
|
|
49
|
+
versionID?: string;
|
|
50
|
+
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}
|
|
53
|
+
|
|
46
54
|
export interface RuntimeInteractResponse {
|
|
47
55
|
state: RuntimeState;
|
|
48
56
|
request: RuntimeAction;
|
|
@@ -30,6 +30,10 @@ export class AuthRuntimeService extends RuntimeService {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
public async feedback() {
|
|
34
|
+
return Promise.reject(new Error('not implemented'));
|
|
35
|
+
}
|
|
36
|
+
|
|
33
37
|
// TODO: expose authenticated publishing
|
|
34
38
|
public getPublishing() {
|
|
35
39
|
return Promise.reject(new Error('not implemented'));
|
|
@@ -2,6 +2,7 @@ import type { BaseModels } from '@voiceflow/base-types';
|
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
4
|
PublicVerify,
|
|
5
|
+
RuntimeFeedbackRequest,
|
|
5
6
|
RuntimeInteractRequest,
|
|
6
7
|
RuntimeInteractResponse,
|
|
7
8
|
RuntimeOptions,
|
|
@@ -33,6 +34,19 @@ export class PublicRuntimeService extends RuntimeService {
|
|
|
33
34
|
);
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
public async feedback(request: RuntimeFeedbackRequest): Promise<void> {
|
|
38
|
+
const { versionID, sessionID, ...body } = request;
|
|
39
|
+
|
|
40
|
+
await this.send(`feedback/${this.projectID}/user/${sessionID}`, {
|
|
41
|
+
method: 'POST',
|
|
42
|
+
body,
|
|
43
|
+
headers: {
|
|
44
|
+
sessionID,
|
|
45
|
+
...(versionID && { versionID }),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
public async getPublishing(request: { versionID?: string }): Promise<Record<string, unknown>> {
|
|
37
51
|
const { versionID } = request;
|
|
38
52
|
|
|
@@ -2,6 +2,7 @@ import type { BaseModels } from '@voiceflow/base-types';
|
|
|
2
2
|
import createHTTPError from 'http-errors';
|
|
3
3
|
|
|
4
4
|
import type {
|
|
5
|
+
RuntimeFeedbackRequest,
|
|
5
6
|
RuntimeHttpRequest,
|
|
6
7
|
RuntimeInteractRequest,
|
|
7
8
|
RuntimeInteractResponse,
|
|
@@ -37,6 +38,8 @@ export abstract class RuntimeService {
|
|
|
37
38
|
request: RuntimeInteractRequest
|
|
38
39
|
): Promise<Partial<RuntimeInteractResponse> & Pick<RuntimeInteractResponse, 'trace'>>;
|
|
39
40
|
|
|
41
|
+
public abstract feedback(request: RuntimeFeedbackRequest): Promise<void>;
|
|
42
|
+
|
|
40
43
|
protected async send<T>(path: string, args: RuntimeHttpRequest = {}): Promise<T> {
|
|
41
44
|
const url = new URL(path, this.options.url);
|
|
42
45
|
if (args.params) url.search = args.params.toString();
|
package/src/sdk/sdk.service.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RuntimeInteractRequest, RuntimeService } from '@/runtime';
|
|
1
|
+
import type { RuntimeFeedbackRequest, RuntimeInteractRequest, RuntimeService } from '@/runtime';
|
|
2
2
|
import { AuthRuntimeService, isAuthRuntimeOptions, isPublicRuntimeOptions, PublicRuntimeService } from '@/runtime';
|
|
3
3
|
import type { TraceDeclaration } from '@/trace/trace.interface.js';
|
|
4
4
|
import { TraceService } from '@/trace/trace.service.js';
|
|
@@ -32,6 +32,10 @@ export class VoiceflowRuntime<T> {
|
|
|
32
32
|
return this.trace.processTrace(context, response);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
public async feedback(request: RuntimeFeedbackRequest) {
|
|
36
|
+
return this.runtime.feedback(request);
|
|
37
|
+
}
|
|
38
|
+
|
|
35
39
|
public async getPublishing(...options: Parameters<RuntimeService['getPublishing']>) {
|
|
36
40
|
return this.runtime.getPublishing(...options);
|
|
37
41
|
}
|