stentor-models 1.56.126 → 1.57.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/lib/Action/Types.d.ts +1 -1
- package/lib/App/App.d.ts +1 -1
- package/lib/App/AppDataStreams.d.ts +11 -11
- package/lib/App/AppStatus.d.ts +14 -14
- package/lib/Channel/Channel.d.ts +2 -2
- package/lib/Channel/Channeled.d.ts +17 -0
- package/lib/Channel/Channeled.js +4 -0
- package/lib/Channel/Channeled.js.map +1 -0
- package/lib/Channel/index.d.ts +1 -0
- package/lib/Channel/index.js +1 -0
- package/lib/Channel/index.js.map +1 -1
- package/lib/Conditional.d.ts +1 -1
- package/lib/Context.d.ts +1 -1
- package/lib/Contextual.d.ts +1 -1
- package/lib/DateTime/Duration.d.ts +1 -1
- package/lib/DateTime/Expiration.d.ts +1 -1
- package/lib/DateTime/LastActive.d.ts +4 -4
- package/lib/DateTime/RelativeDateTime.d.ts +2 -2
- package/lib/DateTime/Schedulable.d.ts +1 -1
- package/lib/DateTime/TimeContextual.d.ts +1 -1
- package/lib/DelegatingHandler/DelegatedHandlerMethod.d.ts +1 -1
- package/lib/DelegatingHandler/DelegatedRequestMethod.d.ts +1 -1
- package/lib/Device.d.ts +1 -1
- package/lib/Display/Types.d.ts +1 -1
- package/lib/Events/Types.d.ts +7 -7
- package/lib/Handler/Types.d.ts +6 -6
- package/lib/History.d.ts +1 -1
- package/lib/Intent/Intent.d.ts +1 -1
- package/lib/Intent/Types.d.ts +25 -25
- package/lib/JSONDependent.d.ts +1 -1
- package/lib/Locale/Locale.d.ts +3 -3
- package/lib/Locale/Localizable.d.ts +1 -1
- package/lib/Match.d.ts +1 -1
- package/lib/Media/OnDemand.d.ts +1 -1
- package/lib/Media/PlayableMedia.d.ts +1 -1
- package/lib/Media/RSSFeedItem.d.ts +1 -1
- package/lib/Media/SocialRadio.d.ts +1 -1
- package/lib/Media/Types.d.ts +22 -22
- package/lib/Path/Path.d.ts +8 -8
- package/lib/Pii.d.ts +2 -2
- package/lib/Request/AudioPlayerRequest.d.ts +7 -7
- package/lib/Request/IntentRequest.d.ts +1 -1
- package/lib/Request/PlaybackControlRequest.d.ts +5 -5
- package/lib/Request/Request.d.ts +1 -1
- package/lib/Request/RequestDependent.d.ts +1 -1
- package/lib/Request/SystemDependent.d.ts +2 -2
- package/lib/Request/Types.d.ts +23 -23
- package/lib/Response/AbstractResponseBuilder.d.ts +1 -1
- package/lib/Response/AbstractResponseBuilder.js +5 -5
- package/lib/Response/AbstractResponseBuilder.js.map +1 -1
- package/lib/Response/Response.d.ts +10 -9
- package/lib/Response/ResponseOutput.d.ts +1 -1
- package/lib/Response/ResponseSegment.d.ts +6 -6
- package/lib/Response/Transactions.d.ts +11 -11
- package/lib/Runtime/RuntimeCallback.d.ts +1 -1
- package/lib/Slot/SlotDependent.d.ts +1 -1
- package/lib/Storage/KeyValueStore.d.ts +1 -1
- package/lib/Storage/StorageAction.d.ts +1 -1
- package/lib/Storage/StorageDependent.d.ts +1 -1
- package/lib/Storage/Types.d.ts +7 -7
- package/lib/Suggestion.d.ts +3 -3
- package/lib/UserData.d.ts +1 -1
- package/package.json +3 -3
package/lib/Action/Types.d.ts
CHANGED
package/lib/App/App.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface FullAppStatus extends AppStatus {
|
|
|
18
18
|
/**
|
|
19
19
|
* An app locale is a description of an app as it will appear to users in other countries.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type LocaleSpecificApp = Partial<Pick<App, "name" | "summary" | "description" | "alexaCategory" | "invocationName" | "examplePhrases" | "keywords" | "icon" | "smallIcon" | "largeIcon" | "termsOfUseUrl" | "privacyPolicyUrl">>;
|
|
22
22
|
export interface AppRuntimeData {
|
|
23
23
|
/**
|
|
24
24
|
* The title of the app.
|
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Analytics
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
5
|
+
export type BespokenDataStreamType = "bespoken";
|
|
6
|
+
export type DashbotDataStreamType = "dashbot";
|
|
7
|
+
export type VoiceLabsDataStreamType = "voiceLabs";
|
|
8
|
+
export type GoogleAnalyticsDataStreamType = "googleAnalytics";
|
|
9
|
+
export type ChatbaseDataStreamType = "chatbase";
|
|
10
10
|
/**
|
|
11
11
|
* NLU services
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
14
|
-
export
|
|
13
|
+
export type LuisType = "luis";
|
|
14
|
+
export type DialogflowType = "dialogflow";
|
|
15
15
|
/**
|
|
16
16
|
* Types
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
19
|
-
export
|
|
18
|
+
export type AppDataStreamTypes = BespokenDataStreamType | VoiceLabsDataStreamType | GoogleAnalyticsDataStreamType | ChatbaseDataStreamType | LuisType | DialogflowType | DashbotDataStreamType;
|
|
19
|
+
export type AppDataStreamsMap = {
|
|
20
20
|
[dataStream in AppDataStreamTypes]?: AppDataStream;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type AppDataStreamsRepo = {
|
|
23
23
|
[appId in string]?: AppDataStreamsMap;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Third (or first) party providers of analytics, metrics, and monitoring
|
|
27
27
|
* that are hooked up to receive transactional information about the app.
|
|
28
28
|
*/
|
|
29
|
-
export
|
|
29
|
+
export type AppDataStream = BespokenDataStream | ChatbaseDataStream | GoogleAnalyticsStream | VoiceLabsDataStream | LuisDataStream | DialogflowDataStream | DashbotDataStream;
|
|
30
30
|
/**
|
|
31
31
|
* Base data stream all data streams extend.
|
|
32
32
|
*/
|
package/lib/App/AppStatus.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
2
|
+
export type AppStatusUnknown = "Unknown";
|
|
3
3
|
export declare const APP_STATUS_UNKNOWN: AppStatusUnknown;
|
|
4
|
-
export
|
|
4
|
+
export type AppStatusIncomplete = "Incomplete";
|
|
5
5
|
export declare const APP_STATUS_INCOMPLETE: AppStatusIncomplete;
|
|
6
|
-
export
|
|
6
|
+
export type AppStatusSubmittedForReview = "Submitted For Review";
|
|
7
7
|
export declare const APP_STATUS_SUBMITTED_FOR_REVIEW: AppStatusSubmittedForReview;
|
|
8
|
-
export
|
|
8
|
+
export type AppStatusUnderReview = "Under Review";
|
|
9
9
|
export declare const APP_STATUS_UNDER_REVIEW: AppStatusUnderReview;
|
|
10
|
-
export
|
|
10
|
+
export type AppStatusInCertification = "In Certification";
|
|
11
11
|
export declare const APP_STATUS_IN_CERTIFICATION: AppStatusInCertification;
|
|
12
|
-
export
|
|
12
|
+
export type AppStatusRequiresPublish = "Needs publish";
|
|
13
13
|
export declare const APP_STATUS_REQUIRES_PUBLISH: AppStatusRequiresPublish;
|
|
14
|
-
export
|
|
14
|
+
export type AppStatusLive = "Live";
|
|
15
15
|
export declare const APP_STATUS_LIVE: AppStatusLive;
|
|
16
|
-
export
|
|
16
|
+
export type AppStatusRequiresAttention = "Requires Attention";
|
|
17
17
|
export declare const APP_STATUS_REQUIRES_ATTENTION: AppStatusRequiresAttention;
|
|
18
|
-
export
|
|
18
|
+
export type AppStatusArchived = "Archived";
|
|
19
19
|
export declare const APP_STATUS_ARCHIVED: AppStatusArchived;
|
|
20
|
-
export
|
|
20
|
+
export type AppStatusLiveRequiresCert = "Live: Requires Cert";
|
|
21
21
|
export declare const APP_STATUS_LIVE_AND_REQUIRES_CERT: AppStatusLiveRequiresCert;
|
|
22
|
-
export
|
|
22
|
+
export type AppStatusLiveInCert = "Live: In Certification";
|
|
23
23
|
export declare const APP_STATUS_LIVE_AND_IN_CERT: AppStatusLiveInCert;
|
|
24
|
-
export
|
|
24
|
+
export type AppStatusLiveAndRequiresPublish = "Live: Requires Publish";
|
|
25
25
|
export declare const APP_STATUS_LIVE_AND_REQUIRES_PUBLISH: AppStatusLiveAndRequiresPublish;
|
|
26
|
-
export
|
|
26
|
+
export type AppStatusLiveAndRequiresAttention = "Live: Requires Attention";
|
|
27
27
|
export declare const APP_STATUS_LIVE_AND_REQUIRES_ATTENTION: AppStatusLiveAndRequiresAttention;
|
|
28
|
-
export
|
|
28
|
+
export type AppStatusType = AppStatusUnknown | AppStatusIncomplete | AppStatusSubmittedForReview | AppStatusUnderReview | AppStatusInCertification | AppStatusRequiresPublish | AppStatusLive | AppStatusRequiresAttention | AppStatusArchived | AppStatusLiveRequiresCert | AppStatusLiveInCert | AppStatusLiveAndRequiresPublish | AppStatusLiveAndRequiresAttention;
|
|
29
29
|
/**
|
|
30
30
|
* The status of the App
|
|
31
31
|
*/
|
package/lib/Channel/Channel.d.ts
CHANGED
|
@@ -6,12 +6,12 @@ import { Request } from "../Request";
|
|
|
6
6
|
import { AbstractResponseBuilder, Response } from "../Response";
|
|
7
7
|
import { Hooks, RuntimeContext } from "../Runtime";
|
|
8
8
|
import { UserStorageService } from "../Services";
|
|
9
|
-
export
|
|
9
|
+
export type Callback<TResult = any> = (error?: Error | string | null, result?: TResult) => void;
|
|
10
10
|
export interface RequestResponse {
|
|
11
11
|
request: Request;
|
|
12
12
|
response: Response;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ChannelHooks = Pick<Hooks, "preExecution" | "postRequestTranslation" | "preResponseTranslation">;
|
|
15
15
|
export interface Channel {
|
|
16
16
|
/**
|
|
17
17
|
* The name of the channel.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*! Copyright (c) 2022, XAPP AI */
|
|
2
|
+
/**
|
|
3
|
+
* Interface to use on objects to help filter by channels.
|
|
4
|
+
*/
|
|
5
|
+
export interface Channeled {
|
|
6
|
+
/**
|
|
7
|
+
* Description of the channel that will be
|
|
8
|
+
*/
|
|
9
|
+
channel: {
|
|
10
|
+
/**
|
|
11
|
+
* String to match with the name of the channel that will match. It can either be the exact name of the
|
|
12
|
+
* channel or a regex string to match multiple.
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type Channelable<T> = T & Channeled;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Channeled.js","sourceRoot":"","sources":["../../src/Channel/Channeled.ts"],"names":[],"mappings":";AAAA,kCAAkC"}
|
package/lib/Channel/index.d.ts
CHANGED
package/lib/Channel/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
18
18
|
__exportStar(require("./Channel"), exports);
|
|
19
19
|
__exportStar(require("./ChannelData"), exports);
|
|
20
|
+
__exportStar(require("./Channeled"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/lib/Channel/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Channel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oCAAoC;AACpC,4CAA0B;AAC1B,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Channel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oCAAoC;AACpC,4CAA0B;AAC1B,gDAA8B;AAC9B,8CAA4B"}
|
package/lib/Conditional.d.ts
CHANGED
package/lib/Context.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface UserDataValue {
|
|
|
16
16
|
userProfile?: UserProfile;
|
|
17
17
|
requestStatus: UserDataRequestStatus;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type UserData = (userDataType: UserDataType) => Promise<UserDataRequestStatus>;
|
|
20
20
|
/**
|
|
21
21
|
* These we want to make available for custom handlers
|
|
22
22
|
*/
|
package/lib/Contextual.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { JSONDependent } from "./JSONDependent";
|
|
|
4
4
|
import { RequestDependent, SystemDependent } from "./Request";
|
|
5
5
|
import { SlotDependent } from "./Slot";
|
|
6
6
|
import { StorageDependent } from "./Storage";
|
|
7
|
-
export
|
|
7
|
+
export type Contexts = ActiveWithinable | FirstTimeable | HaveNotSeenWithinable | JSONDependent | RequestDependent | Schedulable | SlotDependent | StorageDependent | SystemDependent;
|
|
8
8
|
/**
|
|
9
9
|
* Currently not in use, for discussion.
|
|
10
10
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This is the same as the moment.js duration format.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type DurationFormat = "year" | "years" | "y" | "quarter" | "quarters" | "Q" | "month" | "months" | "M" | "week" | "weeks" | "w" | "day" | "days" | "d" | "hour" | "hours" | "h" | "minute" | "minutes" | "m" | "second" | "seconds" | "s" | "millisecond" | "milliseconds" | "ms";
|
|
8
8
|
/**
|
|
9
9
|
* Duration, amount and format.
|
|
10
10
|
*/
|
|
@@ -3,13 +3,13 @@ import { Duration } from "./Duration";
|
|
|
3
3
|
export interface ActiveWithinable {
|
|
4
4
|
activeWithin: Duration;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type ActiveWithin<T> = T & ActiveWithinable;
|
|
7
7
|
export interface HaveNotSeenWithinable {
|
|
8
8
|
haveNotSeenWithin: Duration;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type HaveNotSeenWithin<T> = T & HaveNotSeenWithinable;
|
|
11
11
|
export interface FirstTimeable {
|
|
12
12
|
firstTime: boolean;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
15
|
-
export
|
|
14
|
+
export type FirstTime<T> = T & FirstTimeable;
|
|
15
|
+
export type LastActive<T> = FirstTime<T> | HaveNotSeenWithin<T> | ActiveWithin<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type RelativeDateType = "LAST_FRIDAY" | "LAST_MONDAY" | "LAST_SATURDAY" | "LAST_SUNDAY" | "LAST_THURSDAY" | "LAST_TUESDAY" | "LAST_WEDNESDAY" | "YESTERDAY" | "THIS_FRIDAY" | "THIS_MONDAY" | "THIS_SATURDAY" | "THIS_SUNDAY" | "THIS_THURSDAY" | "THIS_TUESDAY" | "THIS_WEDNESDAY" | "TODAY" | "NEXT_FRIDAY" | "NEXT_MONDAY" | "NEXT_SATURDAY" | "NEXT_SUNDAY" | "NEXT_THURSDAY" | "NEXT_TUESDAY" | "NEXT_WEDNESDAY" | "TOMORROW";
|
|
3
|
+
export type RelativeDateRangeType = "LAST_MONTH" | "LAST_WEEK" | "LAST_WEEKEND" | "LAST_YEAR" | "THIS_MONTH" | "THIS_WEEK" | "THIS_WEEKEND" | "THIS_YEAR" | "NEXT_MONTH" | "NEXT_WEEK" | "NEXT_WEEKEND" | "NEXT_YEAR";
|
|
4
4
|
/**
|
|
5
5
|
* A relative date time contains data about relative dates such as "yesterday" or "last year".
|
|
6
6
|
*
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Context } from "../Context";
|
|
3
3
|
import { Content, Data } from "../Handler";
|
|
4
4
|
import { Request } from "../Request";
|
|
5
|
-
export
|
|
5
|
+
export type DelegatedHandlerMethod = (request: Request, context: Context, content: Content, data: Data) => Promise<void>;
|
package/lib/Device.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface MediaPlayerStatus {
|
|
|
8
8
|
/**
|
|
9
9
|
* The hardware type (screen) if we have it
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type DisplayShape = "RECTANGLE" | "ROUND";
|
|
12
12
|
/**
|
|
13
13
|
* Describes the capability of the device where the
|
|
14
14
|
* request originated.
|
package/lib/Display/Types.d.ts
CHANGED
package/lib/Events/Types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
2
|
+
export type LambdaFailureEventType = "LambdaErrorEvent";
|
|
3
|
+
export type LambdaSuccessEventType = "LambdaSuccessEvent";
|
|
4
|
+
export type MessageEventType = "MessageEvent";
|
|
5
|
+
export type RequestEventType = "REQUEST";
|
|
6
|
+
export type AnalyticsEvent = "AnalyticsEvent";
|
|
7
|
+
export type ErrorEventType = "ERROR";
|
|
8
|
+
export type EventType = LambdaFailureEventType | LambdaSuccessEventType | MessageEventType | RequestEventType | AnalyticsEvent | ErrorEventType;
|
package/lib/Handler/Types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
2
|
+
export type InputUnknownStrategyGlobal = "GLOBAL";
|
|
3
|
+
export type InputUnknownStrategyGoogle = "GOOGLE";
|
|
4
|
+
export type InputUnknownStrategyReprompt = "REPROMPT";
|
|
5
|
+
export type BaseHandlerType = "HandlerIntent";
|
|
6
|
+
export type ConversationHandlerType = "InSessionIntent";
|
|
7
|
+
export type DelegatingHandlerType = "DelegatingHandlerType";
|
package/lib/History.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface PlayableHistoryData {
|
|
|
28
28
|
*/
|
|
29
29
|
lastPlayed: number;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type HistoryData = PlayableHistoryData | {};
|
|
32
32
|
/**
|
|
33
33
|
* History is a map to store information about recent activity for the user by some hashed token that
|
|
34
34
|
* links back to the content.
|
package/lib/Intent/Intent.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Locale, Localizable } from "../Locale";
|
|
3
3
|
import { Slot, SlotTypeMap } from "../Slot";
|
|
4
4
|
import { LangCode } from "./Types";
|
|
5
|
-
export
|
|
5
|
+
export type LocaleSpecificIntent = Partial<Pick<Intent, "slots" | "utterancePatterns" | "substitutions">>;
|
|
6
6
|
/**
|
|
7
7
|
* These are coordinates for the placement of the intent when
|
|
8
8
|
* placed in a graph with other intents.
|
package/lib/Intent/Types.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
2
|
+
export type LangCodeEnUs = "en-US";
|
|
3
|
+
export type LangCode = LangCodeEnUs;
|
|
4
|
+
export type CancelIntent = "CancelIntent";
|
|
5
|
+
export type FirstIntent = "FirstIntent";
|
|
6
|
+
export type HelpIntent = "HelpIntent";
|
|
7
|
+
export type LatestIntent = "LatestIntent";
|
|
8
|
+
export type LoopOffIntent = "LoopOffIntent";
|
|
9
|
+
export type LoopOnIntent = "LoopOnIntent";
|
|
10
|
+
export type NextIntent = "NextIntent";
|
|
11
|
+
export type NoIntent = "NoIntent";
|
|
12
|
+
export type PauseIntent = "PauseIntent";
|
|
13
|
+
export type PreviousIntent = "PreviousIntent";
|
|
14
|
+
export type RepeatIntent = "RepeatIntent";
|
|
15
|
+
export type ResumeIntent = "ResumeIntent";
|
|
16
|
+
export type ShuffleOffIntent = "ShuffleOffIntent";
|
|
17
|
+
export type ShuffleOnIntent = "ShuffleOnIntent";
|
|
18
|
+
export type StartOverIntent = "StartOverIntent";
|
|
19
|
+
export type StopIntent = "StopIntent";
|
|
20
|
+
export type YesIntent = "YesIntent";
|
|
21
|
+
export type InputUnknown = "InputUnknown";
|
|
22
|
+
export type BuiltInIntents = CancelIntent | FirstIntent | HelpIntent | LatestIntent | InputUnknown | LoopOffIntent | LoopOnIntent | NextIntent | NoIntent | PauseIntent | PreviousIntent | RepeatIntent | ResumeIntent | ShuffleOffIntent | ShuffleOnIntent | StartOverIntent | StopIntent | YesIntent;
|
|
23
|
+
export type PlayIntent = "PlayIntent";
|
|
24
|
+
export type PlayPodcastTitle = "PlayPodcastTitleIntent";
|
|
25
|
+
export type PlayTopicIntent = "PlayTopicIntent";
|
|
26
|
+
export type PlayTitleIntent = "PlayTitleIntent";
|
package/lib/JSONDependent.d.ts
CHANGED
package/lib/Locale/Locale.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type LanguageTag = "de-DE" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-US" | "es-419" | "es-ES" | "es-MX" | "fr-CA" | "fr-FR" | "it-IT" | "ja-JP" | "pt-BR" | "zh-CH" | "zh-HK" | "zh-TW";
|
|
3
|
+
export type Language = "da" | "de" | "en" | "es" | "fr" | "it" | "ja" | "nl" | "no" | "pt" | "ru" | "sv" | "th" | "tr" | "uk" | "zh";
|
|
4
4
|
/**
|
|
5
5
|
* The different kinds of locales that can be assigned in Stentor.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type Locale = LanguageTag | Language;
|
package/lib/Match.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
2
|
+
export type MatchOperation = "==" | "===" | ">" | ">=" | "<" | "=<" | "!=" | "!==" | "includes" | "!includes";
|
|
3
3
|
/**
|
|
4
4
|
* Match is an interface that describes
|
|
5
5
|
* how to compare two different values.
|
package/lib/Media/OnDemand.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Audio } from "./Audio";
|
|
|
3
3
|
import { ReportableAudio, ReportableSong } from "./ReportableAudio";
|
|
4
4
|
import { Song } from "./Song";
|
|
5
5
|
import { OnDemandType } from "./Types";
|
|
6
|
-
export
|
|
6
|
+
export type OnDemandAudio = ReportableSong | Song | ReportableAudio | Audio;
|
|
7
7
|
export interface OnDemand {
|
|
8
8
|
type: OnDemandType;
|
|
9
9
|
apiKey: string;
|
|
@@ -6,7 +6,7 @@ export interface SocialRadio extends OnDemand {
|
|
|
6
6
|
type: SocialRadioType;
|
|
7
7
|
channel?: string;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type SocialRadioAudio = SocialRadioTrack | SocialRadioSong;
|
|
10
10
|
/**
|
|
11
11
|
* Tracks in SocialRadio are typically filler audio used
|
|
12
12
|
* for station identification.
|
package/lib/Media/Types.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
2
|
+
export type UnspecifiedMediaType = "Media";
|
|
3
|
+
export type MultimediaType = "Multimedia";
|
|
4
|
+
export type ImageType = "Image";
|
|
5
|
+
export type VideoLiveStreamType = "VideoLiveStream";
|
|
6
|
+
export type GenericVideoType = "Video";
|
|
7
|
+
export type VideoType = GenericVideoType | VideoLiveStreamType;
|
|
8
|
+
export type AudioLiveStreamType = "LiveStream";
|
|
9
|
+
export type PodcastEpisodeType = "PodcastEpisode";
|
|
10
|
+
export type SongType = "Song";
|
|
11
|
+
export type GenericAudioType = "Audio";
|
|
12
|
+
export type LiveStreamType = AudioLiveStreamType | VideoLiveStreamType;
|
|
13
13
|
/**
|
|
14
14
|
* AudioType is the combination of all types of audio
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type AudioType = PodcastEpisodeType | SongType | AudioLiveStreamType | GenericAudioType;
|
|
17
17
|
/**
|
|
18
18
|
* MediaType is the combination of Audio, Video, and Images
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
20
|
+
export type MediaType = AudioType | VideoType | ImageType | UnspecifiedMediaType;
|
|
21
|
+
export type PodcastType = "Podcast";
|
|
22
|
+
export type GenericRSSFeedType = "RSSFeed";
|
|
23
|
+
export type RSSFeedType = GenericRSSFeedType | PodcastType;
|
|
24
|
+
export type GenericMediaPlaylistType = "MediaPlaylist";
|
|
25
|
+
export type MediaPlaylistType = GenericMediaPlaylistType | RSSFeedType;
|
|
26
|
+
export type PlaylistType = RSSFeedType | MediaPlaylistType;
|
|
27
|
+
export type SocialRadioType = "SocialRadio";
|
|
28
|
+
export type OnDemandType = SocialRadioType;
|
|
29
|
+
export type MediaSourceType = OnDemandType | PlaylistType | AudioLiveStreamType | VideoLiveStreamType;
|
package/lib/Path/Path.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { JSONDependable } from "../JSONDependent";
|
|
|
5
5
|
import { RequestDependable, RequestSlotMap, SystemDependable } from "../Request";
|
|
6
6
|
import { SlotDependable } from "../Slot";
|
|
7
7
|
import { StorageDependable } from "../Storage";
|
|
8
|
-
export
|
|
8
|
+
export type PathType = "START";
|
|
9
9
|
/**
|
|
10
10
|
* An executable path defines exactly where an incoming request will be routed to.
|
|
11
11
|
*/
|
|
@@ -70,33 +70,33 @@ export interface SharedPath extends Partial<Actionable>, Partial<Conditioned> {
|
|
|
70
70
|
/**
|
|
71
71
|
* Compilable paths
|
|
72
72
|
*/
|
|
73
|
-
export
|
|
73
|
+
export type CompilablePath = HistoricalPath | PreviousHandlerPath;
|
|
74
74
|
/**
|
|
75
75
|
* Path used if a particular key-value pair on the
|
|
76
76
|
* user's storage matches.
|
|
77
77
|
*/
|
|
78
|
-
export
|
|
78
|
+
export type JSONDependentPath = JSONDependable<ExecutablePath | CompilablePath>;
|
|
79
79
|
/**
|
|
80
80
|
* Path used if a particular key-value pair on the
|
|
81
81
|
* user's storage matches.
|
|
82
82
|
*/
|
|
83
|
-
export
|
|
83
|
+
export type StorageDependentPath = StorageDependable<ExecutablePath | CompilablePath>;
|
|
84
84
|
/**
|
|
85
85
|
* Path used if a slot on the incoming intent matches
|
|
86
86
|
* the compare value.
|
|
87
87
|
*/
|
|
88
|
-
export
|
|
88
|
+
export type SlotDependentPath = SlotDependable<ExecutablePath | CompilablePath>;
|
|
89
89
|
/**
|
|
90
90
|
* Path that is dependent on a system request.
|
|
91
91
|
*/
|
|
92
|
-
export
|
|
92
|
+
export type RequestDependentPath = RequestDependable<ExecutablePath | CompilablePath>;
|
|
93
93
|
/**
|
|
94
94
|
* Path that is dependent on a system request.
|
|
95
95
|
*/
|
|
96
|
-
export
|
|
96
|
+
export type SystemDependentPath = SystemDependable<ExecutablePath | CompilablePath>;
|
|
97
97
|
/**
|
|
98
98
|
* A path determines where to redirect or forward an incoming request. They can either
|
|
99
99
|
* be predetermined (ExecutablePath) or determined at runtime (CompilablePath). Additionally,
|
|
100
100
|
* they can have rules associated with them to only apply them at certain situations.
|
|
101
101
|
*/
|
|
102
|
-
export
|
|
102
|
+
export type Path = ExecutablePath | CompilablePath | RequestDependentPath | SlotDependentPath | StorageDependentPath | JSONDependentPath | SystemDependentPath;
|
package/lib/Pii.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { EmailDescription } from "./Email";
|
|
3
3
|
import { SmsDescription } from "./SMS";
|
|
4
|
-
export
|
|
4
|
+
export type OptStatus = "OPTIN" | "OPTOUT" | "PENDING";
|
|
5
5
|
export interface Pii {
|
|
6
6
|
token?: string;
|
|
7
7
|
appId?: string;
|
|
@@ -22,4 +22,4 @@ export interface Pii {
|
|
|
22
22
|
pendingSmsJobs?: SmsDescription[];
|
|
23
23
|
pendingEmailJobs?: EmailDescription[];
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export type CommFieldType = "phoneNumber" | "emailAddress";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { BaseRequest } from "./Request";
|
|
3
3
|
import { AudioPlayerRequestType } from "./Types";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
4
|
+
export type AudioPlayerPlaybackStartedEvent = "AudioPlayerPlaybackStarted";
|
|
5
|
+
export type AudioPlayerPlaybackFinishedEvent = "AudioPlayerPlaybackFinished";
|
|
6
|
+
export type AudioPlayerPlaybackStoppedEvent = "AudioPlayerPlaybackStopped";
|
|
7
|
+
export type AudioPlayerPlaybackNearlyFinishedEvent = "AudioPlayerPlaybackNearlyFinished";
|
|
8
|
+
export type AudioPlayerPlaybackFailedEvent = "AudioPlayerPlaybackFailed";
|
|
9
|
+
export type AudioPlayerSystemExceptionEvent = "AudioPlayerSystemException";
|
|
10
|
+
export type AudioPlayerEvent = AudioPlayerPlaybackStartedEvent | AudioPlayerPlaybackFinishedEvent | AudioPlayerPlaybackStoppedEvent | AudioPlayerPlaybackNearlyFinishedEvent | AudioPlayerPlaybackFailedEvent | AudioPlayerSystemExceptionEvent;
|
|
11
11
|
/**
|
|
12
12
|
* AudioPlayer requests handle audio life-cycle events such as playback started, playback stopped,
|
|
13
13
|
* playback failed, etc.
|
|
@@ -4,7 +4,7 @@ import { Data } from "../Handler";
|
|
|
4
4
|
import { BaseRequest, SentimentedRequest } from "./Request";
|
|
5
5
|
import { IntentRequestType } from "./Types";
|
|
6
6
|
import { KnowledgeAnswer, KnowledgeBaseResult } from "./KnowledgeBase";
|
|
7
|
-
export
|
|
7
|
+
export type RequestSlotValues = string | number | object | DateTimeRange | DateTime | Duration | (string)[];
|
|
8
8
|
export interface RequestAttachment {
|
|
9
9
|
/**
|
|
10
10
|
* Url to the uploaded file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { BaseRequest } from "./Request";
|
|
3
3
|
import { PlaybackControlRequestType } from "./Types";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
4
|
+
export type PlaybackControlNextEvent = "PlaybackControlNextEvent";
|
|
5
|
+
export type PlaybackControlPreviousEvent = "PlaybackControlPreviousEvent";
|
|
6
|
+
export type PlaybackControlPauseEvent = "PlaybackControlPauseEvent";
|
|
7
|
+
export type PlaybackControlPlayEvent = "PlaybackControlPlayEvent";
|
|
8
|
+
export type PlaybackControlEvent = PlaybackControlNextEvent | PlaybackControlPauseEvent | PlaybackControlPreviousEvent | PlaybackControlPlayEvent;
|
|
9
9
|
/**
|
|
10
10
|
* Playback control requests come from either remote control buttons or
|
|
11
11
|
* on screen buttons. These are events like next, previous, resume & pause.
|
package/lib/Request/Request.d.ts
CHANGED
|
@@ -143,4 +143,4 @@ export interface ApiAccessData {
|
|
|
143
143
|
apiBaseUrl: string;
|
|
144
144
|
apiAuthToken: string;
|
|
145
145
|
}
|
|
146
|
-
export
|
|
146
|
+
export type Request = LaunchRequest | SessionEndedRequest | InputUnknownRequest | IntentRequest | AudioPlayerRequest | PlaybackControlRequest | PermissionRequest | SurfaceChangeRequest | NotificationPermissionRequest | SignInRequest | OptionSelectRequest | RawQueryRequest | DeliveryAddressRequest | TransactionDecisionRequest | TransactionRequirementCheckRequest;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
2
|
+
export type SystemConditionType = "!ACCOUNT_LINKED" | "ACCOUNT_LINKED" | "!HEALTH_CHECK" | "HEALTH_CHECK" | "!BARGE_IN" | "BARGE_IN" | "OPTION_SELECT" | "!OPTION_SELECT" | "PERMISSION_GRANTED" | "!PERMISSION_GRANTED" | "SURFACE_CHANGED" | "!SURFACE_CHANGED" | "NOTIFICATION_PERMISSION_GRANTED" | "!NOTIFICATION_PERMISSION_GRANTED";
|
|
3
3
|
export interface SystemDependent {
|
|
4
4
|
/**
|
|
5
5
|
* "System state". This is something that is not in slots, session or perm. data.
|
|
6
6
|
*/
|
|
7
7
|
systemCondition: SystemConditionType;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type SystemDependable<T> = T & SystemDependent;
|
package/lib/Request/Types.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
2
|
+
export type AudioPlayerRequestType = "AUDIO_PLAYER_REQUEST";
|
|
3
|
+
export type InputUnknownRequestType = "INPUT_UNKNOWN_REQUEST";
|
|
4
|
+
export type IntentRequestType = "INTENT_REQUEST";
|
|
5
|
+
export type LaunchRequestType = "LAUNCH_REQUEST";
|
|
6
|
+
export type NotificationPermissionRequestType = "NOTIFICATION_PERMISSION_REQUEST_TYPE";
|
|
7
|
+
export type OptionSelectRequestType = "OPTION_SELECT_REQUEST";
|
|
8
|
+
export type PermissionRequestType = "PERMISSION_GRANT";
|
|
9
|
+
export type PlaybackControlRequestType = "PLAYBACK_CONTROL_REQUEST";
|
|
10
|
+
export type RawQueryRequestType = "RAW_QUERY_REQUEST";
|
|
11
|
+
export type SessionEndedRequestType = "SESSION_ENDED_REQUEST";
|
|
12
|
+
export type SignInRequestType = "SIGN_IN_REQUEST";
|
|
13
|
+
export type SurfaceChangeRequestType = "SURFACE_CHANGE_REQUEST";
|
|
14
|
+
export type TransactionRequirementCheckType = "TRANSACTION_REQUIREMENT_CHECK_REQUEST";
|
|
15
|
+
export type TransactionDecisionType = "TRANSACTION_DECISION_REQUEST";
|
|
16
|
+
export type TransactionDeliveryAddressType = "TRANSACTION_DELIVERY_ADDRESS_REQUEST";
|
|
17
|
+
export type RequestTypes = AudioPlayerRequestType | InputUnknownRequestType | IntentRequestType | LaunchRequestType | NotificationPermissionRequestType | OptionSelectRequestType | PermissionRequestType | PlaybackControlRequestType | RawQueryRequestType | SessionEndedRequestType | SignInRequestType | SurfaceChangeRequestType | TransactionRequirementCheckType | TransactionDecisionType | TransactionDeliveryAddressType;
|
|
18
|
+
export type LaunchRequestID = "LaunchRequest";
|
|
19
|
+
export type PermissionGrantID = "PermissionGrant";
|
|
20
|
+
export type InputUnknownID = "InputUnknown";
|
|
21
|
+
export type OptionSelectID = "OptionSelect";
|
|
22
|
+
export type SignInID = "SignIn";
|
|
23
|
+
export type KnowledgeAnswerID = "KnowledgeAnswer";
|
|
24
|
+
export type AttachmentRequestID = "AttachmentRequest";
|
|
@@ -12,7 +12,7 @@ import { ResponseOutput } from "./ResponseOutput";
|
|
|
12
12
|
import { OrderDescription, PaymentParameters } from "./Transactions";
|
|
13
13
|
export interface ResponseBuilderProps {
|
|
14
14
|
/**
|
|
15
|
-
* Capabilities of the current device
|
|
15
|
+
* Capabilities of the current device used by the builder
|
|
16
16
|
*/
|
|
17
17
|
device: Readonly<Device>;
|
|
18
18
|
/**
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AbstractResponseBuilder = void 0;
|
|
4
4
|
class AbstractResponseBuilder {
|
|
5
|
-
constructor(props) {
|
|
6
|
-
this.tag = undefined;
|
|
7
|
-
this.device = props.device;
|
|
8
|
-
this._response = {};
|
|
9
|
-
}
|
|
10
5
|
/**
|
|
11
6
|
* The response that will be communicated to the user
|
|
12
7
|
*
|
|
@@ -15,6 +10,11 @@ class AbstractResponseBuilder {
|
|
|
15
10
|
get response() {
|
|
16
11
|
return this._response;
|
|
17
12
|
}
|
|
13
|
+
constructor(props) {
|
|
14
|
+
this.tag = undefined;
|
|
15
|
+
this.device = props.device;
|
|
16
|
+
this._response = {};
|
|
17
|
+
}
|
|
18
18
|
/**
|
|
19
19
|
* The number of playables that can be sent at once. Override it if the platform handles more.
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractResponseBuilder.js","sourceRoot":"","sources":["../../src/Response/AbstractResponseBuilder.ts"],"names":[],"mappings":";;;AAgCA,MAAsB,uBAAuB;
|
|
1
|
+
{"version":3,"file":"AbstractResponseBuilder.js","sourceRoot":"","sources":["../../src/Response/AbstractResponseBuilder.ts"],"names":[],"mappings":";;;AAgCA,MAAsB,uBAAuB;IAoBzC;;;;OAIG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAWD,YAAmB,KAA2B;QAC1C,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,CAAC;IAqHD;;OAEG;IACI,cAAc;QACjB,OAAO,CAAC,CAAC;IACb,CAAC;CAoFJ;AAxPD,0DAwPC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { Actionable } from "../Action";
|
|
3
|
+
import { Channeled } from "../Channel/Channeled";
|
|
3
4
|
import { Conditioned } from "../Conditional";
|
|
4
5
|
import { LastActive, Scheduled } from "../DateTime";
|
|
5
6
|
import { Display } from "../Display";
|
|
@@ -73,7 +74,7 @@ export interface ResponseData {
|
|
|
73
74
|
/**
|
|
74
75
|
* A response that expects a user's input.
|
|
75
76
|
*/
|
|
76
|
-
export interface SimpleResponse<T = string | ResponseOutput> extends Partial<Actionable>, Partial<Conditioned> {
|
|
77
|
+
export interface SimpleResponse<T = string | ResponseOutput> extends Partial<Actionable>, Partial<Conditioned>, Partial<Channeled> {
|
|
77
78
|
/**
|
|
78
79
|
* Name of the response.
|
|
79
80
|
*
|
|
@@ -134,33 +135,33 @@ export interface SimpleResponse<T = string | ResponseOutput> extends Partial<Act
|
|
|
134
135
|
/**
|
|
135
136
|
* A response that can be scheduled.
|
|
136
137
|
*/
|
|
137
|
-
export
|
|
138
|
+
export type SchedulableResponse<T = string | ResponseOutput> = Scheduled<SimpleResponse<T>>;
|
|
138
139
|
/**
|
|
139
140
|
* A response that is contextual, it knows about your past interactions.
|
|
140
141
|
*/
|
|
141
|
-
export
|
|
142
|
+
export type LastActiveResponse<T = string | ResponseOutput> = LastActive<SimpleResponse<T>>;
|
|
142
143
|
/**
|
|
143
144
|
* A response that is dependent on a slot value in the current request.
|
|
144
145
|
*/
|
|
145
|
-
export
|
|
146
|
+
export type SlotDependentResponse<T = string | ResponseOutput> = SlotDependable<SimpleResponse<T>>;
|
|
146
147
|
/**
|
|
147
148
|
* A response that is dependent on a value on user storage.
|
|
148
149
|
*/
|
|
149
|
-
export
|
|
150
|
+
export type StorageDependentResponse<T = string | ResponseOutput> = StorageDependable<SimpleResponse<T>>;
|
|
150
151
|
/**
|
|
151
152
|
* A response that is dependent on a value on the request.
|
|
152
153
|
*/
|
|
153
|
-
export
|
|
154
|
+
export type RequestDependentResponse<T = string | ResponseOutput> = RequestDependable<SimpleResponse<T>>;
|
|
154
155
|
/**
|
|
155
156
|
* A response that is dependent on a system state such as if the user has linked their account.
|
|
156
157
|
*/
|
|
157
|
-
export
|
|
158
|
+
export type SystemDependentResponse<T = string | ResponseOutput> = SystemDependable<SimpleResponse<T>>;
|
|
158
159
|
/**
|
|
159
160
|
* A response that is dependent on a particular JSON path matcher.
|
|
160
161
|
*/
|
|
161
|
-
export
|
|
162
|
+
export type JSONDependableResponse<T = string | ResponseOutput> = JSONDependable<SimpleResponse<T>>;
|
|
162
163
|
/**
|
|
163
164
|
* A response is a possible response back to a user; it includes a prompt, reprompt, and visual
|
|
164
165
|
* assets.
|
|
165
166
|
*/
|
|
166
|
-
export
|
|
167
|
+
export type Response<T = string | ResponseOutput> = JSONDependableResponse<T> | LastActiveResponse<T> | RequestDependentResponse<T> | SchedulableResponse<T> | SimpleResponse<T> | SlotDependentResponse<T> | StorageDependentResponse<T> | SystemDependentResponse<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { Locale, Localizable } from "../Locale";
|
|
3
3
|
import { SuggestionTypes } from "../Suggestion";
|
|
4
|
-
export
|
|
4
|
+
export type LocaleSpecificResponseOutput = Partial<Pick<ResponseOutput, "displayText" | "ssml" | "textToSpeech" | "suggestions">>;
|
|
5
5
|
/**
|
|
6
6
|
* A response object which contains all the necessary information to communicate
|
|
7
7
|
* a particular response for multiple surfaces.
|
|
@@ -20,24 +20,24 @@ export interface SimpleSegment extends Partial<Conditioned> {
|
|
|
20
20
|
/**
|
|
21
21
|
* A segment that can be scheduled.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type ScheduledSegment = Scheduled<SimpleSegment>;
|
|
24
24
|
/**
|
|
25
25
|
* A segment that is contextual, it knows about your past interactions.
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export type LastActiveSegment = LastActive<SimpleSegment>;
|
|
28
28
|
/**
|
|
29
29
|
* A segment that is dependent on a slot value in the current request.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type SlotDependentSegment = SlotDependable<SimpleSegment>;
|
|
32
32
|
/**
|
|
33
33
|
* A segment that is dependent on a value on user storage.
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export type StorageDependentSegment = StorageDependable<SimpleSegment>;
|
|
36
36
|
/**
|
|
37
37
|
* A segment that is dependent on a value on the request.
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
40
|
-
export
|
|
39
|
+
export type RequestDependentSegment = RequestDependable<SimpleSegment>;
|
|
40
|
+
export type ResponseSegment = SimpleSegment | ScheduledSegment | LastActiveSegment | SlotDependentSegment | RequestDependentSegment | StorageDependentSegment;
|
|
41
41
|
/**
|
|
42
42
|
* Map of response segments where the key is name within the template.
|
|
43
43
|
*
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
This is a more common sense (more user-friendly), de-googlified version of the Google inputs.
|
|
5
5
|
This transaction API could change in the future as we gain more experience.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
7
|
+
export type PaymentType = "PAYMENT_TYPE_UNSPECIFIED" | "PAYMENT_CARD" | "BANK" | "LOYALTY_PROGRAM" | "CASH" | "GIFT_CARD" | "WALLET";
|
|
8
|
+
export type PaymentMethodStatusType = "STATUS_UNSPECIFIED" | "STATUS_OK" | "STATUS_REQUIRE_FIX" | "STATUS_INAPPLICABLE";
|
|
9
|
+
export type PurchaseStatus = "PURCHASE_STATUS_UNSPECIFIED" | "READY_FOR_PICKUP" | "SHIPPED" | "DELIVERED" | "OUT_OF_STOCK" | "IN_PREPARATION" | "CREATED" | "CONFIRMED" | "REJECTED" | "RETURNED" | "CANCELLED" | "CHANGE_REQUESTED";
|
|
10
|
+
export type PurchaseType = "PURCHASE_TYPE_UNSPECIFIED" | "RETAIL" | "FOOD" | "GROCERY" | "MOBILE_RECHARGE";
|
|
11
|
+
export type FulfillmentType = "TYPE_UNSPECIFIED" | "DELIVERY" | "PICKUP";
|
|
12
|
+
export type PickupType = "UNSPECIFIED" | "INSTORE" | "CURBSIDE";
|
|
13
|
+
export type FollowUpActionType = "VIEW_DETAILS" | "CALL" | "EMAIL";
|
|
14
|
+
export type PriceType = "UNIT" | "TOTAL" | "SUBTOTAL" | "DELIVERY" | "TAX";
|
|
15
|
+
export type PriceState = "ESTIMATE" | "ACTUAL";
|
|
16
|
+
export type ProvenanceType = "PAYMENT_METHOD_PROVENANCE_MERCHANT" | "PAYMENT_METHOD_PROVENANCE_UNSPECIFIED" | "PAYMENT_METHOD_PROVENANCE_GOOGLE";
|
|
17
|
+
export type PurchaseLocationType = "ONLINE_PURCHASE" | "UNSPECIFIED_LOCATION" | "INSTORE_PURCHASE";
|
|
18
18
|
export interface PaymentMethodDisplayInfo {
|
|
19
19
|
paymentType: PaymentType;
|
|
20
20
|
paymentMethodDisplayName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { Request } from "../Request";
|
|
3
3
|
import { Response } from "../Response";
|
|
4
|
-
export
|
|
4
|
+
export type RuntimeCallback<Result extends object = object> = (error?: Error | null | string, result?: Result, request?: Request, response?: Response) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { KeyValue } from "./KeyValueStore";
|
|
3
3
|
import { StorageActionType } from "./Types";
|
|
4
|
-
export
|
|
4
|
+
export type StorageType = "SESSION" | "PERMANENT";
|
|
5
5
|
export interface StorageAction extends KeyValue {
|
|
6
6
|
/**
|
|
7
7
|
* The type of action to be performed on the storage.
|
package/lib/Storage/Types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { KeyValue, KeyValueStore } from "./KeyValueStore";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
3
|
+
export type StorageActionAdd = "ADD";
|
|
4
|
+
export type StorageActionAppend = "APPEND";
|
|
5
|
+
export type StorageActionDelete = "DELETE";
|
|
6
|
+
export type StorageActionSet = "SET";
|
|
7
|
+
export type StorageActionSubtract = "SUBTRACT";
|
|
8
|
+
export type StorageActionType = StorageActionAdd | StorageActionAppend | StorageActionDelete | StorageActionSet | StorageActionSubtract;
|
|
9
|
+
export type StorageActionExecutor<S extends KeyValueStore = KeyValueStore> = (storage: S, keyValue: KeyValue) => S;
|
package/lib/Suggestion.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type SuggestionTypes = SimpleSuggestion | SuggestionObjectTypes;
|
|
3
|
+
export type SuggestionObjectTypes = Suggestion | LinkOutSuggestion;
|
|
4
|
+
export type SimpleSuggestion = string;
|
|
5
5
|
/**
|
|
6
6
|
* Suggested responses that a user can tap.
|
|
7
7
|
*
|
package/lib/UserData.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
|
-
export
|
|
2
|
+
export type UserDataType = "EMAIL" | "NAME" | "DEVICE_COARSE_LOCATION" | "DEVICE_PRECISE_LOCATION" | "PHONE_NUMBER" | "LIST";
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.57.1",
|
|
8
8
|
"description": "Models for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"typings": "lib/index",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@xapp/config": "0.2.3",
|
|
23
23
|
"rollup": "3.3.0",
|
|
24
24
|
"tslib": "2.4.1",
|
|
25
|
-
"typescript": "4.
|
|
25
|
+
"typescript": "4.9.3"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"api": "api-extractor run --local",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@xapp/patterns": "1.40.343"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "09019818f24aeb1882fe2e8a73f43a01a0cc2789"
|
|
37
37
|
}
|