@aws-amplify/interactions 4.1.6-unstable.2 → 4.1.6

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,14 @@
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
+ ## [4.1.6](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/interactions@4.1.5...@aws-amplify/interactions@4.1.6) (2022-10-25)
7
+
8
+ **Note:** Version bump only for package @aws-amplify/interactions
9
+
10
+
11
+
12
+
13
+
6
14
  ## [4.1.5](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/interactions@4.1.4...@aws-amplify/interactions@4.1.5) (2022-10-14)
7
15
 
8
16
  **Note:** Version bump only for package @aws-amplify/interactions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/interactions",
3
- "version": "4.1.6-unstable.2+89bdeb1e4",
3
+ "version": "4.1.6",
4
4
  "description": "Interactions category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "homepage": "https://aws-amplify.github.io/",
43
43
  "dependencies": {
44
- "@aws-amplify/core": "4.7.9-unstable.2+89bdeb1e4",
44
+ "@aws-amplify/core": "4.7.9",
45
45
  "@aws-sdk/client-lex-runtime-service": "3.186.0",
46
46
  "@aws-sdk/client-lex-runtime-v2": "3.186.0",
47
47
  "base-64": "1.0.0",
@@ -92,5 +92,5 @@
92
92
  "lib-esm"
93
93
  ]
94
94
  },
95
- "gitHead": "89bdeb1e4ec45c1a34e7dfe960b341de99906ed3"
95
+ "gitHead": "be5bf2dc68c9c011c3876f003c14bc98b392c82d"
96
96
  }
@@ -1,24 +0,0 @@
1
- import { InteractionsOptions, InteractionsProvider, InteractionsMessage, InteractionsResponse } from './types';
2
- export declare class InteractionsClass {
3
- private _options;
4
- private _pluggables;
5
- /**
6
- * Initialize PubSub with AWS configurations
7
- *
8
- * @param {InteractionsOptions} options - Configuration object for Interactions
9
- */
10
- constructor(options?: InteractionsOptions);
11
- getModuleName(): string;
12
- /**
13
- *
14
- * @param {InteractionsOptions} options - Configuration object for Interactions
15
- * @return {InteractionsOptions} - The current configuration
16
- */
17
- configure(options: InteractionsOptions): InteractionsOptions;
18
- addPluggable(pluggable: InteractionsProvider): void;
19
- send(botname: string, message: string): Promise<InteractionsResponse>;
20
- send(botname: string, message: InteractionsMessage): Promise<InteractionsResponse>;
21
- send(botname: string, message: object): Promise<InteractionsResponse>;
22
- onComplete(botname: string, callback: (err: any, confirmation: any) => void): void;
23
- }
24
- export declare const Interactions: InteractionsClass;
@@ -1,24 +0,0 @@
1
- import { AbstractInteractionsProvider } from './InteractionsProvider';
2
- import { InteractionsOptions, AWSLexProviderOptions, InteractionsResponse, InteractionsMessage } from '../types';
3
- import { PostTextCommandOutput, PostContentCommandOutput } from '@aws-sdk/client-lex-runtime-service';
4
- interface PostContentCommandOutputFormatted extends Omit<PostContentCommandOutput, 'audioStream'> {
5
- audioStream?: Uint8Array;
6
- }
7
- declare type AWSLexProviderSendResponse = PostTextCommandOutput | PostContentCommandOutputFormatted;
8
- export declare class AWSLexProvider extends AbstractInteractionsProvider {
9
- private lexRuntimeServiceClient;
10
- private _botsCompleteCallback;
11
- constructor(options?: InteractionsOptions);
12
- getProviderName(): string;
13
- configure(config?: AWSLexProviderOptions): AWSLexProviderOptions;
14
- /**
15
- * @private
16
- * @deprecated
17
- * This is used internally by 'sendMessage' to call onComplete callback
18
- * for a bot if configured
19
- */
20
- reportBotStatus(data: AWSLexProviderSendResponse, botname: string): void;
21
- sendMessage(botname: string, message: string | InteractionsMessage): Promise<InteractionsResponse>;
22
- onComplete(botname: string, callback: (err: any, confirmation: any) => void): void;
23
- }
24
- export {};
@@ -1 +0,0 @@
1
- export declare const unGzipBase64AsJson: (gzipBase64: string) => Promise<any>;
@@ -1,3 +0,0 @@
1
- export declare const convert: (stream: object) => Promise<Uint8Array>;
2
- export declare const base64ToArrayBuffer: (base64: string) => Uint8Array;
3
- export declare const gzipDecompressToString: (data: Uint8Array) => Promise<string>;
@@ -1,3 +0,0 @@
1
- export declare const convert: (stream: object) => Promise<Uint8Array>;
2
- export declare const base64ToArrayBuffer: (base64: string) => Uint8Array;
3
- export declare const gzipDecompressToString: (data: Uint8Array) => Promise<string>;
@@ -1,58 +0,0 @@
1
- import { AbstractInteractionsProvider } from './InteractionsProvider';
2
- import { InteractionsOptions, AWSLexV2ProviderOptions, InteractionsResponse, InteractionsMessage } from '../types';
3
- export declare class AWSLexV2Provider extends AbstractInteractionsProvider {
4
- private _lexRuntimeServiceV2Client;
5
- private _botsCompleteCallback;
6
- /**
7
- * Initialize Interactions with AWS configurations
8
- * @param {InteractionsOptions} options - Configuration object for Interactions
9
- */
10
- constructor(options?: InteractionsOptions);
11
- /**
12
- * get provider name of the plugin
13
- * @returns {string} name of the provider
14
- */
15
- getProviderName(): string;
16
- /**
17
- * Configure Interactions part with aws configuration
18
- * @param {AWSLexV2ProviderOptions} config - Configuration of the Interactions
19
- * @return {AWSLexV2ProviderOptions} - Current configuration
20
- */
21
- configure(config?: AWSLexV2ProviderOptions): AWSLexV2ProviderOptions;
22
- /**
23
- * Send a message to a bot
24
- * @async
25
- * @param {string} botname - Bot name to send the message
26
- * @param {string | InteractionsMessage} message - message to send to the bot
27
- * @return {Promise<InteractionsResponse>} A promise resolves to the response from the bot
28
- */
29
- sendMessage(botname: string, message: string | InteractionsMessage): Promise<InteractionsResponse>;
30
- /**
31
- * Attach a onComplete callback function to a bot.
32
- * The callback is called once the bot's intent is fulfilled
33
- * @param {string} botname - Bot name to attach the onComplete callback
34
- * @param {(err: Error | null, confirmation: InteractionsResponse) => void} callback - called when Intent Fulfilled
35
- */
36
- onComplete(botname: string, callback: (err: Error | null, confirmation: InteractionsResponse) => void): void;
37
- /**
38
- * @private
39
- * call onComplete callback for a bot if configured
40
- */
41
- private _reportBotStatus;
42
- /**
43
- * Format UtteranceCommandOutput's response
44
- * decompress attributes
45
- * update audioStream format
46
- */
47
- private _formatUtteranceCommandOutput;
48
- /**
49
- * handle client's `RecognizeTextCommand`
50
- * used for sending simple text message
51
- */
52
- private _handleRecognizeTextCommand;
53
- /**
54
- * handle client's `RecognizeUtteranceCommand`
55
- * used for obj text or obj voice message
56
- */
57
- private _handleRecognizeUtteranceCommand;
58
- }
@@ -1,11 +0,0 @@
1
- import { InteractionsProvider, InteractionsOptions, InteractionsResponse } from '../types';
2
- export declare abstract class AbstractInteractionsProvider implements InteractionsProvider {
3
- protected _config: InteractionsOptions;
4
- constructor(options?: InteractionsOptions);
5
- configure(config?: InteractionsOptions): InteractionsOptions;
6
- getCategory(): string;
7
- abstract getProviderName(): string;
8
- protected get options(): InteractionsOptions;
9
- abstract sendMessage(botname: string, message: string | Object): Promise<object>;
10
- abstract onComplete(botname: string, callback: (err: any, confirmation: InteractionsResponse) => void): any;
11
- }
@@ -1,3 +0,0 @@
1
- export * from './AWSLexProvider';
2
- export * from './AWSLexV2Provider';
3
- export * from './InteractionsProvider';
package/lib/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { Interactions } from './Interactions';
2
- /**
3
- * @deprecated use named import
4
- */
5
- export default Interactions;
6
- export * from './types';
7
- export * from './Providers/InteractionsProvider';
8
- export * from './Providers/AWSLexProvider';
9
- export * from './Providers/AWSLexV2Provider';
10
- export { Interactions };
@@ -1,16 +0,0 @@
1
- export interface InteractionsOptions {
2
- [key: string]: any;
3
- }
4
- export declare type InteractionsTextMessage = {
5
- content: string;
6
- options: {
7
- messageType: 'text';
8
- };
9
- };
10
- export declare type InteractionsVoiceMessage = {
11
- content: object;
12
- options: {
13
- messageType: 'voice';
14
- };
15
- };
16
- export declare type InteractionsMessage = InteractionsTextMessage | InteractionsVoiceMessage;
@@ -1,12 +0,0 @@
1
- import { InteractionsOptions } from './Interactions';
2
- import { InteractionsResponse } from './Response';
3
- export interface InteractionsProvider {
4
- configure(config: InteractionsOptions): InteractionsOptions;
5
- getCategory(): string;
6
- getProviderName(): string;
7
- sendMessage(botname: string, message: string | Object): Promise<object>;
8
- onComplete(botname: string, callback: (err: any, confirmation: InteractionsResponse) => void): any;
9
- }
10
- export interface InteractionsProviders {
11
- [key: string]: InteractionsProvider;
12
- }
@@ -1,10 +0,0 @@
1
- export interface AWSLexProviderOption {
2
- name: string;
3
- alias: string;
4
- region: string;
5
- providerName?: string;
6
- onComplete?(botname: string, callback: (err: any, confirmation: any) => void): void;
7
- }
8
- export interface AWSLexProviderOptions {
9
- [key: string]: AWSLexProviderOption;
10
- }
@@ -1,12 +0,0 @@
1
- export interface AWSLexV2ProviderOption {
2
- name: string;
3
- botId: string;
4
- aliasId: string;
5
- localeId: string;
6
- region: string;
7
- providerName: string;
8
- onComplete?(botname: string, callback: (err: any, confirmation: any) => void): void;
9
- }
10
- export interface AWSLexV2ProviderOptions {
11
- [key: string]: AWSLexV2ProviderOption;
12
- }
@@ -1,3 +0,0 @@
1
- export declare type InteractionsResponse = {
2
- [key: string]: any;
3
- };
@@ -1,5 +0,0 @@
1
- export * from './Interactions';
2
- export * from './Provider';
3
- export * from './Providers/AWSLexProvider';
4
- export * from './Providers/AWSLexV2Provider';
5
- export * from './Response';