botframework-schema
Advanced tools
Comparing version 4.22.0-dev.20231109.6abfddf to 4.22.0-dev.20231113.45d7dda
@@ -21,3 +21,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StatusCodes = exports.Channels = exports.SemanticActionStateTypes = exports.InstallationUpdateActionTypes = exports.ContactRelationUpdateActionTypes = exports.DeliveryModes = exports.ActivityImportance = exports.EndOfConversationCodes = exports.ActionTypes = exports.InputHints = exports.MessageReactionTypes = exports.AttachmentLayoutTypes = exports.TextFormatTypes = exports.ActivityTypes = exports.ActivityEventNames = exports.RoleTypes = exports.isActivity = exports.assertActivity = exports.isSemanticAction = exports.assertSemanticAction = exports.isConversationReference = exports.assertConversationReference = exports.isEntity = exports.assertEntity = exports.isAttachment = exports.assertAttachment = exports.isSuggestedActions = exports.assertSuggestedActions = exports.isCardAction = exports.assertCardAction = exports.isMessageReaction = exports.assertMessageReaction = exports.isConversationAccount = exports.assertConversationAccount = exports.isChannelAccount = exports.assertChannelAccount = exports.isAttachmentInfo = exports.assertAttachmentInfo = exports.isAttachmentView = exports.assertAttachmentView = exports.SpeechConstants = exports.CallerIdConstants = void 0; | ||
exports.StatusCodes = exports.Channels = exports.SemanticActionStateTypes = exports.InstallationUpdateActionTypes = exports.ContactRelationUpdateActionTypes = exports.DeliveryModes = exports.ActivityImportance = exports.EndOfConversationCodes = exports.ActionTypes = exports.InputHints = exports.MessageReactionTypes = exports.AttachmentLayoutTypes = exports.TextFormatTypes = exports.ActivityTypes = exports.ActivityEventNames = exports.RoleTypes = exports.conversationParametersObject = exports.isActivity = exports.assertActivity = exports.isSemanticAction = exports.assertSemanticAction = exports.isConversationReference = exports.assertConversationReference = exports.isEntity = exports.assertEntity = exports.isAttachment = exports.assertAttachment = exports.isSuggestedActions = exports.assertSuggestedActions = exports.isCardAction = exports.assertCardAction = exports.isMessageReaction = exports.assertMessageReaction = exports.isConversationAccount = exports.assertConversationAccount = exports.isChannelAccount = exports.assertChannelAccount = exports.isAttachmentInfo = exports.assertAttachmentInfo = exports.isAttachmentView = exports.assertAttachmentView = exports.SpeechConstants = exports.CallerIdConstants = void 0; | ||
const z = require("zod"); | ||
@@ -49,3 +49,3 @@ __exportStar(require("./activityInterfaces"), exports); | ||
function isAttachmentView(val) { | ||
return attachmentView.check(val); | ||
return attachmentView.safeParse(val).success; | ||
} | ||
@@ -69,3 +69,3 @@ exports.isAttachmentView = isAttachmentView; | ||
function isAttachmentInfo(val) { | ||
return attachmentInfo.check(val); | ||
return attachmentInfo.safeParse(val).success; | ||
} | ||
@@ -90,3 +90,3 @@ exports.isAttachmentInfo = isAttachmentInfo; | ||
function isChannelAccount(val) { | ||
return channelAccount.check(val); | ||
return channelAccount.safeParse(val).success; | ||
} | ||
@@ -115,3 +115,3 @@ exports.isChannelAccount = isChannelAccount; | ||
function isConversationAccount(val) { | ||
return conversationAccount.check(val); | ||
return conversationAccount.safeParse(val).success; | ||
} | ||
@@ -133,3 +133,3 @@ exports.isConversationAccount = isConversationAccount; | ||
function isMessageReaction(val) { | ||
return messageReaction.check(val); | ||
return messageReaction.safeParse(val).success; | ||
} | ||
@@ -158,3 +158,3 @@ exports.isMessageReaction = isMessageReaction; | ||
function isCardAction(val) { | ||
return cardAction.check(val); | ||
return cardAction.safeParse(val).success; | ||
} | ||
@@ -177,3 +177,3 @@ exports.isCardAction = isCardAction; | ||
function isSuggestedActions(val) { | ||
return suggestedActions.check(val); | ||
return suggestedActions.safeParse(val).success; | ||
} | ||
@@ -199,3 +199,3 @@ exports.isSuggestedActions = isSuggestedActions; | ||
function isAttachment(val) { | ||
return attachment.check(val); | ||
return attachment.safeParse(val).success; | ||
} | ||
@@ -215,3 +215,3 @@ exports.isAttachment = isAttachment; | ||
function isEntity(val) { | ||
return entity.check(val); | ||
return entity.safeParse(val).success; | ||
} | ||
@@ -239,3 +239,3 @@ exports.isEntity = isEntity; | ||
function isConversationReference(val) { | ||
return conversationReference.check(val); | ||
return conversationReference.safeParse(val).success; | ||
} | ||
@@ -263,3 +263,3 @@ exports.isConversationReference = isConversationReference; | ||
function isSemanticAction(val) { | ||
return semanticAction.check(val); | ||
return semanticAction.safeParse(val).success; | ||
} | ||
@@ -321,5 +321,14 @@ exports.isSemanticAction = isSemanticAction; | ||
function isActivity(val) { | ||
return activity.check(val); | ||
return activity.safeParse(val).success; | ||
} | ||
exports.isActivity = isActivity; | ||
exports.conversationParametersObject = z.object({ | ||
isGroup: z.boolean(), | ||
bot: channelAccount, | ||
members: z.array(channelAccount).optional(), | ||
topicName: z.string().optional(), | ||
tenantId: z.string().optional(), | ||
activity: activity, | ||
channelData: z.unknown().optional(), | ||
}); | ||
/** | ||
@@ -326,0 +335,0 @@ * Defines values for RoleTypes. |
@@ -5,3 +5,3 @@ { | ||
"description": "Activity schema for the Microsoft Bot Framework.", | ||
"version": "4.22.0-dev.20231109.6abfddf", | ||
"version": "4.22.0-dev.20231113.45d7dda", | ||
"license": "MIT", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"uuid": "^8.3.2", | ||
"zod": "~1.11.17", | ||
"zod": "^3.22.4", | ||
"adaptivecards": "1.2.3" | ||
@@ -35,0 +35,0 @@ }, |
@@ -53,3 +53,3 @@ /** | ||
export function isAttachmentView(val: unknown): val is AttachmentView { | ||
return attachmentView.check(val); | ||
return attachmentView.safeParse(val).success; | ||
} | ||
@@ -92,3 +92,3 @@ | ||
export function isAttachmentInfo(val: unknown): val is AttachmentInfo { | ||
return attachmentInfo.check(val); | ||
return attachmentInfo.safeParse(val).success; | ||
} | ||
@@ -180,3 +180,3 @@ | ||
export function isChannelAccount(val: unknown): val is ChannelAccount { | ||
return channelAccount.check(val); | ||
return channelAccount.safeParse(val).success; | ||
} | ||
@@ -247,3 +247,3 @@ | ||
export function isConversationAccount(val: unknown): val is ConversationAccount { | ||
return conversationAccount.check(val); | ||
return conversationAccount.safeParse(val).success; | ||
} | ||
@@ -276,3 +276,3 @@ | ||
export function isMessageReaction(val: unknown): val is MessageReaction { | ||
return messageReaction.check(val); | ||
return messageReaction.safeParse(val).success; | ||
} | ||
@@ -342,3 +342,3 @@ | ||
export function isCardAction(val: unknown): val is CardAction { | ||
return cardAction.check(val); | ||
return cardAction.safeParse(val).success; | ||
} | ||
@@ -377,3 +377,3 @@ | ||
export function isSuggestedActions(val: unknown): val is SuggestedActions { | ||
return suggestedActions.check(val); | ||
return suggestedActions.safeParse(val).success; | ||
} | ||
@@ -426,3 +426,3 @@ | ||
export function isAttachment(val: unknown): val is Attachment { | ||
return attachment.check(val); | ||
return attachment.safeParse(val).success; | ||
} | ||
@@ -457,3 +457,3 @@ | ||
export function isEntity(val: unknown): val is Entity { | ||
return entity.check(val); | ||
return entity.safeParse(val).success; | ||
} | ||
@@ -520,3 +520,3 @@ | ||
export function isConversationReference(val: unknown): val is ConversationReference { | ||
return conversationReference.check(val); | ||
return conversationReference.safeParse(val).success; | ||
} | ||
@@ -578,3 +578,3 @@ | ||
export function isSemanticAction(val: unknown): val is SemanticAction { | ||
return semanticAction.check(val); | ||
return semanticAction.safeParse(val).success; | ||
} | ||
@@ -830,3 +830,3 @@ | ||
export function isActivity(val: unknown): val is Activity { | ||
return activity.check(val); | ||
return activity.safeParse(val).success; | ||
} | ||
@@ -845,2 +845,12 @@ | ||
export const conversationParametersObject = z.object({ | ||
isGroup: z.boolean(), | ||
bot: channelAccount, | ||
members: z.array(channelAccount).optional(), | ||
topicName: z.string().optional(), | ||
tenantId: z.string().optional(), | ||
activity: activity, | ||
channelData: z.unknown().optional(), | ||
}); | ||
/** | ||
@@ -847,0 +857,0 @@ * Parameters for creating a new conversation |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
794619
23462
+ Addedzod@3.24.1(transitive)
- Removedzod@1.11.17(transitive)
Updatedzod@^3.22.4