@voiceflow/sdk-runtime 1.3.4 → 1.4.1

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,18 @@
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.4.1](https://github.com/voiceflow/adapters/compare/@voiceflow/sdk-runtime@1.4.0...@voiceflow/sdk-runtime@1.4.1) (2022-10-21)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **deps:** update dependency @voiceflow/base-types to v2.71.1 (vf-000) ([#47](https://github.com/voiceflow/adapters/issues/47)) ([e984f2d](https://github.com/voiceflow/adapters/commit/e984f2dac58507a31eda1b2c05f3bdeddf3c9ef9))
11
+
12
+ # [1.4.0](https://github.com/voiceflow/adapters/compare/@voiceflow/sdk-runtime@1.3.4...@voiceflow/sdk-runtime@1.4.0) (2022-10-17)
13
+
14
+ ### Features
15
+
16
+ * add publishing field (CT-000) ([#45](https://github.com/voiceflow/adapters/issues/45)) ([53e7d89](https://github.com/voiceflow/adapters/commit/53e7d8942c5a511ad29c0b14c3808dc117ae6066))
17
+
6
18
  ## [1.3.4](https://github.com/voiceflow/adapters/compare/@voiceflow/sdk-runtime@1.3.3...@voiceflow/sdk-runtime@1.3.4) (2022-10-06)
7
19
 
8
20
  ### Bug Fixes
@@ -4,5 +4,6 @@ export declare class AuthRuntimeService extends RuntimeService {
4
4
  private readonly authorization;
5
5
  constructor(options: RuntimeOptions<AuthVerify>);
6
6
  interact(request: RuntimeInteractRequest): Promise<RuntimeInteractResponse>;
7
+ getPublishing(): Promise<{}>;
7
8
  }
8
9
  //# sourceMappingURL=runtime.service.auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.service.auth.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAEpB,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC;IAMzC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAazF"}
1
+ {"version":3,"file":"runtime.service.auth.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAEpB,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC;IAMzC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAe3E,aAAa;CAG3B"}
@@ -19,5 +19,9 @@ class AuthRuntimeService extends runtime_service_1.RuntimeService {
19
19
  params: new URLSearchParams({ verbose: 'true' }),
20
20
  });
21
21
  }
22
+ // TODO: expose authenticated publishing
23
+ async getPublishing() {
24
+ return {};
25
+ }
22
26
  }
23
27
  exports.AuthRuntimeService = AuthRuntimeService;
@@ -3,6 +3,9 @@ export declare abstract class RuntimeService {
3
3
  private readonly options;
4
4
  private readonly fetch;
5
5
  constructor(options: RuntimeOptions);
6
+ abstract getPublishing(request: {
7
+ versionID?: string;
8
+ }): Promise<Record<string, unknown>>;
6
9
  abstract interact(request: RuntimeInteractRequest): Promise<Partial<RuntimeInteractResponse> & Pick<RuntimeInteractResponse, 'trace'>>;
7
10
  protected send<T>(path: string, args?: RuntimeHttpRequest): Promise<T>;
8
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,8BAAsB,cAAc;IAGf,OAAO,CAAC,QAAQ,CAAC,OAAO;IAF3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;gBAEZ,OAAO,EAAE,cAAc;aAO3C,QAAQ,CACtB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;cAErE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,CAAC;CAoBjF"}
1
+ {"version":3,"file":"runtime.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,8BAAsB,cAAc;IAGf,OAAO,CAAC,QAAQ,CAAC,OAAO;IAF3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;gBAEZ,OAAO,EAAE,cAAc;aAO3C,aAAa,CAAC,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aAEhF,QAAQ,CACtB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;cAErE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,CAAC;CAoBjF"}
@@ -4,5 +4,8 @@ export declare class PublicRuntimeService extends RuntimeService {
4
4
  private readonly projectID;
5
5
  constructor(options: RuntimeOptions<PublicVerify>);
6
6
  interact(request: RuntimeInteractRequest): Promise<Pick<RuntimeInteractResponse, 'trace'>>;
7
+ getPublishing(request: {
8
+ versionID?: string;
9
+ }): Promise<Record<string, unknown>>;
7
10
  }
8
11
  //# sourceMappingURL=runtime.service.public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.service.public.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEhB,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;IAM3C,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;CAcxG"}
1
+ {"version":3,"file":"runtime.service.public.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEhB,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;IAM3C,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAe1F,aAAa,CAAC,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAU9F"}
@@ -17,5 +17,14 @@ class PublicRuntimeService extends runtime_service_1.RuntimeService {
17
17
  },
18
18
  });
19
19
  }
20
+ async getPublishing(request) {
21
+ const { versionID } = request;
22
+ return this.send(`public/${this.projectID}/publishing`, {
23
+ method: 'GET',
24
+ headers: {
25
+ ...(versionID ? { versionID } : {}),
26
+ },
27
+ });
28
+ }
20
29
  }
21
30
  exports.PublicRuntimeService = PublicRuntimeService;
@@ -1,4 +1,4 @@
1
- import type { IntentActionPayload, RuntimeInteractRequest } from '../runtime';
1
+ import type { RuntimeInteractRequest, RuntimeService } from '../runtime';
2
2
  import type { TraceDeclaration } from '../trace/trace.interface.js';
3
3
  import type { VoiceflowRuntimeOptions } from './sdk.interface.js';
4
4
  export declare class VoiceflowRuntime<T> {
@@ -7,10 +7,6 @@ export declare class VoiceflowRuntime<T> {
7
7
  constructor(options: VoiceflowRuntimeOptions<T>);
8
8
  registerStep(step: TraceDeclaration<T, any>): this;
9
9
  interact(context: T, request: RuntimeInteractRequest): Promise<T>;
10
- intent(request: {
11
- context: T;
12
- sessionID: string;
13
- payload: IntentActionPayload;
14
- }): Promise<T>;
10
+ getPublishing(...options: Parameters<RuntimeService['getPublishing']>): Promise<Record<string, unknown>>;
15
11
  }
16
12
  //# sourceMappingURL=sdk.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.service.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAkB,MAAM,WAAW,CAAC;AAQ7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IAEzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;gBAErB,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAY/C,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,GAAG,CAAC;IAKrC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKvE,MAAM,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,CAAC,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,mBAAmB,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,CAAC;CAMpG"}
1
+ {"version":3,"file":"sdk.service.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IAEzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;gBAErB,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAY/C,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,GAAG,CAAC;IAKrC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKjE,aAAa,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;CAGnF"}
@@ -24,11 +24,8 @@ class VoiceflowRuntime {
24
24
  const response = await this.runtime.interact(request);
25
25
  return this.trace.processTrace(context, response);
26
26
  }
27
- intent(request) {
28
- return this.interact(request.context, {
29
- action: (0, runtime_1.createIntentAction)(request.payload),
30
- sessionID: request.sessionID,
31
- });
27
+ async getPublishing(...options) {
28
+ return this.runtime.getPublishing(...options);
32
29
  }
33
30
  }
34
31
  exports.VoiceflowRuntime = VoiceflowRuntime;
@@ -4,5 +4,6 @@ export declare class AuthRuntimeService extends RuntimeService {
4
4
  private readonly authorization;
5
5
  constructor(options: RuntimeOptions<AuthVerify>);
6
6
  interact(request: RuntimeInteractRequest): Promise<RuntimeInteractResponse>;
7
+ getPublishing(): Promise<{}>;
7
8
  }
8
9
  //# sourceMappingURL=runtime.service.auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.service.auth.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAEpB,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC;IAMzC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAazF"}
1
+ {"version":3,"file":"runtime.service.auth.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAEpB,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC;IAMzC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAe3E,aAAa;CAG3B"}
@@ -16,4 +16,8 @@ export class AuthRuntimeService extends RuntimeService {
16
16
  params: new URLSearchParams({ verbose: 'true' }),
17
17
  });
18
18
  }
19
+ // TODO: expose authenticated publishing
20
+ async getPublishing() {
21
+ return {};
22
+ }
19
23
  }
@@ -3,6 +3,9 @@ export declare abstract class RuntimeService {
3
3
  private readonly options;
4
4
  private readonly fetch;
5
5
  constructor(options: RuntimeOptions);
6
+ abstract getPublishing(request: {
7
+ versionID?: string;
8
+ }): Promise<Record<string, unknown>>;
6
9
  abstract interact(request: RuntimeInteractRequest): Promise<Partial<RuntimeInteractResponse> & Pick<RuntimeInteractResponse, 'trace'>>;
7
10
  protected send<T>(path: string, args?: RuntimeHttpRequest): Promise<T>;
8
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,8BAAsB,cAAc;IAGf,OAAO,CAAC,QAAQ,CAAC,OAAO;IAF3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;gBAEZ,OAAO,EAAE,cAAc;aAO3C,QAAQ,CACtB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;cAErE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,CAAC;CAoBjF"}
1
+ {"version":3,"file":"runtime.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,8BAAsB,cAAc;IAGf,OAAO,CAAC,QAAQ,CAAC,OAAO;IAF3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;gBAEZ,OAAO,EAAE,cAAc;aAO3C,aAAa,CAAC,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aAEhF,QAAQ,CACtB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;cAErE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,CAAC;CAoBjF"}
@@ -4,5 +4,8 @@ export declare class PublicRuntimeService extends RuntimeService {
4
4
  private readonly projectID;
5
5
  constructor(options: RuntimeOptions<PublicVerify>);
6
6
  interact(request: RuntimeInteractRequest): Promise<Pick<RuntimeInteractResponse, 'trace'>>;
7
+ getPublishing(request: {
8
+ versionID?: string;
9
+ }): Promise<Record<string, unknown>>;
7
10
  }
8
11
  //# sourceMappingURL=runtime.service.public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.service.public.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEhB,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;IAM3C,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;CAcxG"}
1
+ {"version":3,"file":"runtime.service.public.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime.service.public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEhB,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;IAM3C,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAe1F,aAAa,CAAC,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAU9F"}
@@ -14,4 +14,13 @@ export class PublicRuntimeService extends RuntimeService {
14
14
  },
15
15
  });
16
16
  }
17
+ async getPublishing(request) {
18
+ const { versionID } = request;
19
+ return this.send(`public/${this.projectID}/publishing`, {
20
+ method: 'GET',
21
+ headers: {
22
+ ...(versionID ? { versionID } : {}),
23
+ },
24
+ });
25
+ }
17
26
  }
@@ -1,4 +1,4 @@
1
- import type { IntentActionPayload, RuntimeInteractRequest } from '../runtime/index.js';
1
+ import type { RuntimeInteractRequest, RuntimeService } from '../runtime/index.js';
2
2
  import type { TraceDeclaration } from '../trace/trace.interface.js';
3
3
  import type { VoiceflowRuntimeOptions } from './sdk.interface.js';
4
4
  export declare class VoiceflowRuntime<T> {
@@ -7,10 +7,6 @@ export declare class VoiceflowRuntime<T> {
7
7
  constructor(options: VoiceflowRuntimeOptions<T>);
8
8
  registerStep(step: TraceDeclaration<T, any>): this;
9
9
  interact(context: T, request: RuntimeInteractRequest): Promise<T>;
10
- intent(request: {
11
- context: T;
12
- sessionID: string;
13
- payload: IntentActionPayload;
14
- }): Promise<T>;
10
+ getPublishing(...options: Parameters<RuntimeService['getPublishing']>): Promise<Record<string, unknown>>;
15
11
  }
16
12
  //# sourceMappingURL=sdk.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.service.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAkB,MAAM,WAAW,CAAC;AAQ7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IAEzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;gBAErB,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAY/C,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,GAAG,CAAC;IAKrC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKvE,MAAM,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,CAAC,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,mBAAmB,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,CAAC;CAMpG"}
1
+ {"version":3,"file":"sdk.service.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IAEzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;gBAErB,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAY/C,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,GAAG,CAAC;IAKrC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKjE,aAAa,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;CAGnF"}
@@ -1,4 +1,4 @@
1
- import { AuthRuntimeService, createIntentAction, isAuthRuntimeOptions, isPublicRuntimeOptions, PublicRuntimeService, } from '../runtime/index.js';
1
+ import { AuthRuntimeService, isAuthRuntimeOptions, isPublicRuntimeOptions, PublicRuntimeService } from '../runtime/index.js';
2
2
  import { TraceService } from '../trace/trace.service.js';
3
3
  export class VoiceflowRuntime {
4
4
  constructor(options) {
@@ -21,10 +21,7 @@ export class VoiceflowRuntime {
21
21
  const response = await this.runtime.interact(request);
22
22
  return this.trace.processTrace(context, response);
23
23
  }
24
- intent(request) {
25
- return this.interact(request.context, {
26
- action: createIntentAction(request.payload),
27
- sessionID: request.sessionID,
28
- });
24
+ async getPublishing(...options) {
25
+ return this.runtime.getPublishing(...options);
29
26
  }
30
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voiceflow/sdk-runtime",
3
- "version": "1.3.4",
3
+ "version": "1.4.1",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./build/esm/main.js",
@@ -30,7 +30,7 @@
30
30
  "extends": "@voiceflow-meta/eslint-config"
31
31
  },
32
32
  "dependencies": {
33
- "@voiceflow/base-types": "2.71.0",
33
+ "@voiceflow/base-types": "2.71.1",
34
34
  "http-errors": "2.0.0"
35
35
  },
36
36
  "devDependencies": {
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "ad69be352248e69d08a6026d9cb3c325c4b4f217"
45
+ "gitHead": "bb9170e004b44e9af5338137056dacb22cf6cf85"
46
46
  }
@@ -28,4 +28,9 @@ export class AuthRuntimeService extends RuntimeService {
28
28
  params: new URLSearchParams({ verbose: 'true' }),
29
29
  });
30
30
  }
31
+
32
+ // TODO: expose authenticated publishing
33
+ public async getPublishing() {
34
+ return {};
35
+ }
31
36
  }
@@ -29,4 +29,15 @@ export class PublicRuntimeService extends RuntimeService {
29
29
  }
30
30
  );
31
31
  }
32
+
33
+ public async getPublishing(request: { versionID?: string }): Promise<Record<string, unknown>> {
34
+ const { versionID } = request;
35
+
36
+ return this.send<Record<string, unknown>>(`public/${this.projectID}/publishing`, {
37
+ method: 'GET',
38
+ headers: {
39
+ ...(versionID ? { versionID } : {}),
40
+ },
41
+ });
42
+ }
32
43
  }
@@ -17,6 +17,8 @@ export abstract class RuntimeService {
17
17
  }
18
18
  }
19
19
 
20
+ public abstract getPublishing(request: { versionID?: string }): Promise<Record<string, unknown>>;
21
+
20
22
  public abstract interact(
21
23
  request: RuntimeInteractRequest
22
24
  ): Promise<Partial<RuntimeInteractResponse> & Pick<RuntimeInteractResponse, 'trace'>>;
@@ -1,11 +1,5 @@
1
- import type { IntentActionPayload, RuntimeInteractRequest, RuntimeService } from '@/runtime';
2
- import {
3
- AuthRuntimeService,
4
- createIntentAction,
5
- isAuthRuntimeOptions,
6
- isPublicRuntimeOptions,
7
- PublicRuntimeService,
8
- } from '@/runtime';
1
+ import type { RuntimeInteractRequest, RuntimeService } from '@/runtime';
2
+ import { AuthRuntimeService, isAuthRuntimeOptions, isPublicRuntimeOptions, PublicRuntimeService } from '@/runtime';
9
3
  import type { TraceDeclaration } from '@/trace/trace.interface.js';
10
4
  import { TraceService } from '@/trace/trace.service.js';
11
5
 
@@ -38,10 +32,7 @@ export class VoiceflowRuntime<T> {
38
32
  return this.trace.processTrace(context, response);
39
33
  }
40
34
 
41
- public intent(request: { context: T; sessionID: string; payload: IntentActionPayload }): Promise<T> {
42
- return this.interact(request.context, {
43
- action: createIntentAction(request.payload),
44
- sessionID: request.sessionID,
45
- });
35
+ public async getPublishing(...options: Parameters<RuntimeService['getPublishing']>) {
36
+ return this.runtime.getPublishing(...options);
46
37
  }
47
38
  }