Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@livescale/types

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livescale/types - npm Package Compare versions

Comparing version 3.0.0 to 3.2.0

2

dist/index.cjs.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var zod=require("zod");const AnalyticEvent=zod.z.object({uuid:zod.z.string(),event:zod.z.string(),isPractice:zod.z.optional(zod.z.boolean()),hashedEventId:zod.z.string(),timestamp:zod.z.union([zod.z.string(),zod.z.date()]),metadata:zod.z.record(zod.z.any()),member:zod.z.object({session:zod.z.string(),username:zod.z.optional(zod.z.string()),role:zod.z.string()}),geolocalization:zod.z.optional(zod.z.object({city:zod.z.string(),continent:zod.z.string(),continent_code:zod.z.string(),country:zod.z.string(),country_code:zod.z.string(),country_alpha_2_code:zod.z.string(),country_alpha_3_code:zod.z.string(),location:zod.z.object({latitude:zod.z.number(),longitude:zod.z.number(),timeZone:zod.z.string()}),ip_address:zod.z.string()})),device:zod.z.optional(zod.z.object({ua:zod.z.string(),browserInfo:zod.z.object({ua:zod.z.string(),browser:zod.z.object({name:zod.z.string(),version:zod.z.string(),major:zod.z.string()}),engine:zod.z.object({name:zod.z.string(),version:zod.z.string()}),os:zod.z.object({name:zod.z.string(),version:zod.z.string()}),device:zod.z.record(zod.z.any()),cpu:zod.z.record(zod.z.any())})}))});var index$2=Object.freeze({__proto__:null,AnalyticEvent});const locales=["en","fr"],localesEnum=zod.z.enum(["en","fr"]);var locales$1=Object.freeze({__proto__:null,locales,localesEnum});const type$c="chat-announcement",text=zod.z.string(),status$2=zod.z.enum(["published","unpublished","complete"]),payload$c=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),status:status$2,text}),output$c=zod.z.object({type:zod.z.literal(type$c),payload:payload$c}),ChatAnnouncement={type:type$c,payload:payload$c,output:output$c},username=zod.z.string().min(2).max(20),session_id=zod.z.string(),SocketUserSchema=zod.z.object({session_id,role:zod.z.union([zod.z.literal("member"),zod.z.literal("moderator")])}),SocketLoggedUserSchema=SocketUserSchema.extend({username}),type$b="chat-emotion",emotion=zod.z.enum(["like"]),input$9=zod.z.object({emotion}),payload$b=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),emotion,from:SocketUserSchema,count:zod.z.number()}),output$b=zod.z.object({type:zod.z.literal(type$b),payload:payload$b}),ChatEmotion={type:type$b,input:input$9,payload:payload$b,output:output$b},type$a="chat-message",input$8=zod.z.object({message:zod.z.string().nonempty()}),payload$a=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),message:zod.z.string(),from:SocketLoggedUserSchema}),output$a=zod.z.object({type:zod.z.literal(type$a),payload:payload$a}),elasticsearch_payload=payload$a.extend({hashed_event_id:zod.z.string()}),ChatMessage={type:type$a,input:input$8,payload:payload$a,output:output$a,elasticsearch_payload},type$9="chat-load-room",input$7=zod.z.object({}),payload$9=zod.z.object({last_messages:zod.z.array(ChatMessage.payload)}),output$9=zod.z.object({type:zod.z.literal(type$9),payload:payload$9}),ChatLoadRoom={type:type$9,input:input$7,payload:payload$9,output:output$9},type$8="chat-message-delete",input$6=zod.z.object({message_id:zod.z.string()}),payload$8=zod.z.object({id:zod.z.string(),created_at:zod.z.number()}),output$8=zod.z.object({type:zod.z.literal(type$8),payload:payload$8}),ChatMessageDelete={type:type$8,input:input$6,payload:payload$8,output:output$8},type$7="chat-product-highlight",status$1=zod.z.enum(["published","unpublished","shared"]),payload$7=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),status:status$1}),output$7=zod.z.object({type:zod.z.literal(type$7),payload:payload$7}),ChatProductHighlight={type:type$7,payload:payload$7,output:output$7},type$6="chat-room-status",input$5=zod.z.undefined(),payload$6=zod.z.object({live_viewers:zod.z.number().nonnegative(),total_viewers:zod.z.number().nonnegative(),emotions:zod.z.object({like:zod.z.number().nonnegative()})}),output$6=zod.z.object({type:zod.z.literal(type$6),payload:payload$6}),ChatRoomStatus={type:type$6,input:input$5,payload:payload$6,output:output$6},ChatSurveyAnswerRedisKey=(t,e,o)=>`event:${t}:surveys:${e}:answers:${o}`,type$5="chat-survey-answer",input$4=zod.z.object({question_id:zod.z.string(),choice_id:zod.z.string()}),payload$5=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),question:zod.z.string().nonempty(),choices:zod.z.array(zod.z.object({id:zod.z.string(),label:zod.z.string().nonempty(),count:zod.z.number()})),total_votes:zod.z.number()}),output$5=zod.z.object({type:zod.z.literal(type$5),payload:payload$5}),ChatSurveyAnswer={type:type$5,input:input$4,payload:payload$5,output:output$5},type$4="chat-survey",status=zod.z.enum(["published","unpublished","shared"]),question=zod.z.string().nonempty(),choicesOutput=zod.z.array(zod.z.object({id:zod.z.string(),label:zod.z.string().nonempty()})),payload$4=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),status,question,choices:choicesOutput}),output$4=zod.z.object({type:zod.z.literal(type$4),payload:payload$4}),ChatSurvey={type:type$4,payload:payload$4,output:output$4},type$3="chat-user-ban",input$3=zod.z.object({user_session_id:session_id}),payload$3=zod.z.object({user_session_id:zod.z.string(),created_at:zod.z.number()}),output$3=zod.z.object({type:zod.z.literal(type$3),payload:payload$3}),ChatUserBan={type:type$3,input:input$3,payload:payload$3,output:output$3},type$2="chat-username",input$2=zod.z.object({username}),payload$2=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),from:SocketLoggedUserSchema,chat_members:zod.z.number().nonnegative(),live_viewers:zod.z.number().nonnegative()}),output$2=zod.z.object({type:zod.z.literal(type$2),payload:payload$2}),ChatUsername={type:type$2,input:input$2,payload:payload$2,output:output$2},type$1="chat-winner-email",input$1=zod.z.object({id:zod.z.string(),email:zod.z.string().email()}),payload$1=zod.z.undefined(),output$1=zod.z.undefined(),ChatWinnerEmail={type:type$1,input:input$1,payload:payload$1,output:output$1},type="chat-winner",input=zod.z.object({id:zod.z.string(),chat_session_id:zod.z.string()}),payload=zod.z.object({id:zod.z.string(),chat_session_id:zod.z.string()}),output=zod.z.object({type:zod.z.literal(type),payload}),ChatWinner={type,input,payload,output};var index$1=Object.freeze({__proto__:null,ChatAnnouncement,ChatEmotion,ChatLoadRoom,ChatMessageDelete,ChatMessage,ChatProductHighlight,ChatRoomStatus,ChatSurveyAnswerRedisKey,ChatSurveyAnswer,ChatSurvey,ChatUserBan,ChatUsername,ChatWinnerEmail,ChatWinner,username,session_id,SocketUserSchema,SocketLoggedUserSchema});const EventGenerateAnalytics=zod.z.object({type:zod.z.literal("events/generate-analytics"),payload:zod.z.object({event_id:zod.z.string()})}),EmailShopifyUninstall=zod.z.object({type:zod.z.literal("emails/shopify-uninstall"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({dashboard_url:zod.z.string().url()})})}),EmailForgotPassword=zod.z.object({type:zod.z.literal("emails/forgot-password"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({token:zod.z.string().length(32)})})}),EmailRoleChange=zod.z.object({type:zod.z.literal("emails/role-change"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({shop_name:zod.z.string(),new_role:zod.z.string()})})}),EmailStripeCancellation=zod.z.object({type:zod.z.literal("emails/stripe-cancellation"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({})})}),WorkerJob=zod.z.union([EventGenerateAnalytics,EmailShopifyUninstall,EmailForgotPassword,EmailRoleChange,EmailStripeCancellation]);var index=Object.freeze({__proto__:null,WorkerJob,EventGenerateAnalytics,EmailShopifyUninstall,EmailForgotPassword,EmailRoleChange,EmailStripeCancellation});exports.AnalyticEvent=AnalyticEvent,exports.AnalyticEvents=index$2,exports.ChatAnnouncement=ChatAnnouncement,exports.ChatEmotion=ChatEmotion,exports.ChatLoadRoom=ChatLoadRoom,exports.ChatMessage=ChatMessage,exports.ChatMessageDelete=ChatMessageDelete,exports.ChatProductHighlight=ChatProductHighlight,exports.ChatRoomStatus=ChatRoomStatus,exports.ChatSurvey=ChatSurvey,exports.ChatSurveyAnswer=ChatSurveyAnswer,exports.ChatSurveyAnswerRedisKey=ChatSurveyAnswerRedisKey,exports.ChatUserBan=ChatUserBan,exports.ChatUsername=ChatUsername,exports.ChatWinner=ChatWinner,exports.ChatWinnerEmail=ChatWinnerEmail,exports.EmailForgotPassword=EmailForgotPassword,exports.EmailRoleChange=EmailRoleChange,exports.EmailShopifyUninstall=EmailShopifyUninstall,exports.EmailStripeCancellation=EmailStripeCancellation,exports.EventGenerateAnalytics=EventGenerateAnalytics,exports.Locales=locales$1,exports.SocketLoggedUserSchema=SocketLoggedUserSchema,exports.SocketUserSchema=SocketUserSchema,exports.WebsocketEvents=index$1,exports.WorkerJob=WorkerJob,exports.WorkerJobs=index,exports.locales=locales,exports.localesEnum=localesEnum,exports.session_id=session_id,exports.username=username;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var zod=require("zod");const AnalyticEvent=zod.z.object({uuid:zod.z.string(),event:zod.z.string(),isPractice:zod.z.optional(zod.z.boolean()),hashedEventId:zod.z.string(),timestamp:zod.z.union([zod.z.string(),zod.z.date()]),metadata:zod.z.record(zod.z.any()),member:zod.z.object({session:zod.z.string(),username:zod.z.optional(zod.z.string()),role:zod.z.string()}),geolocalization:zod.z.optional(zod.z.object({city:zod.z.string(),continent:zod.z.string(),continent_code:zod.z.string(),country:zod.z.string(),country_code:zod.z.string(),country_alpha_2_code:zod.z.string(),country_alpha_3_code:zod.z.string(),location:zod.z.object({latitude:zod.z.number(),longitude:zod.z.number(),timeZone:zod.z.string()}),ip_address:zod.z.string()})),device:zod.z.optional(zod.z.object({ua:zod.z.string(),browserInfo:zod.z.object({ua:zod.z.string(),browser:zod.z.object({name:zod.z.string(),version:zod.z.string(),major:zod.z.string()}),engine:zod.z.object({name:zod.z.string(),version:zod.z.string()}),os:zod.z.object({name:zod.z.string(),version:zod.z.string()}),device:zod.z.record(zod.z.any()),cpu:zod.z.record(zod.z.any())})}))}).deepPartial();var index$2=Object.freeze({__proto__:null,AnalyticEvent});const locales=["en","fr"],localesEnum=zod.z.enum(["en","fr"]);var locales$1=Object.freeze({__proto__:null,locales,localesEnum});const type$c="chat-announcement",text=zod.z.string(),status$2=zod.z.enum(["published","unpublished","complete"]),payload$c=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),status:status$2,text}),output$c=zod.z.object({type:zod.z.literal(type$c),payload:payload$c}),ChatAnnouncement={type:type$c,payload:payload$c,output:output$c},username=zod.z.string().min(2).max(20),session_id=zod.z.string(),SocketUserSchema=zod.z.object({session_id,role:zod.z.union([zod.z.literal("member"),zod.z.literal("moderator")])}),SocketLoggedUserSchema=SocketUserSchema.extend({username}),type$b="chat-emotion",emotion=zod.z.enum(["like"]),input$9=zod.z.object({emotion}),payload$b=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),emotion,from:SocketUserSchema,count:zod.z.number()}),output$b=zod.z.object({type:zod.z.literal(type$b),payload:payload$b}),ChatEmotion={type:type$b,input:input$9,payload:payload$b,output:output$b},type$a="chat-message",input$8=zod.z.object({message:zod.z.string().nonempty()}),payload$a=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),message:zod.z.string(),from:SocketLoggedUserSchema}),output$a=zod.z.object({type:zod.z.literal(type$a),payload:payload$a}),elasticsearch_payload=payload$a.extend({hashed_event_id:zod.z.string()}),ChatMessage={type:type$a,input:input$8,payload:payload$a,output:output$a,elasticsearch_payload},type$9="chat-load-room",input$7=zod.z.object({}),payload$9=zod.z.object({last_messages:zod.z.array(ChatMessage.payload)}),output$9=zod.z.object({type:zod.z.literal(type$9),payload:payload$9}),ChatLoadRoom={type:type$9,input:input$7,payload:payload$9,output:output$9},type$8="chat-message-delete",input$6=zod.z.object({message_id:zod.z.string()}),payload$8=zod.z.object({id:zod.z.string(),created_at:zod.z.number()}),output$8=zod.z.object({type:zod.z.literal(type$8),payload:payload$8}),ChatMessageDelete={type:type$8,input:input$6,payload:payload$8,output:output$8},type$7="chat-product-highlight",status$1=zod.z.enum(["published","unpublished","shared"]),payload$7=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),status:status$1}),output$7=zod.z.object({type:zod.z.literal(type$7),payload:payload$7}),ChatProductHighlight={type:type$7,payload:payload$7,output:output$7},type$6="chat-room-status",input$5=zod.z.undefined(),payload$6=zod.z.object({live_viewers:zod.z.number().nonnegative(),total_viewers:zod.z.number().nonnegative(),emotions:zod.z.object({like:zod.z.number().nonnegative()})}),output$6=zod.z.object({type:zod.z.literal(type$6),payload:payload$6}),ChatRoomStatus={type:type$6,input:input$5,payload:payload$6,output:output$6},ChatSurveyAnswerRedisKey=(t,e,o)=>`event:${t}:surveys:${e}:answers:${o}`,type$5="chat-survey-answer",input$4=zod.z.object({question_id:zod.z.string(),choice_id:zod.z.string()}),payload$5=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),question:zod.z.string().nonempty(),choices:zod.z.array(zod.z.object({id:zod.z.string(),label:zod.z.string().nonempty(),count:zod.z.number()})),total_votes:zod.z.number()}),output$5=zod.z.object({type:zod.z.literal(type$5),payload:payload$5}),ChatSurveyAnswer={type:type$5,input:input$4,payload:payload$5,output:output$5},type$4="chat-survey",status=zod.z.enum(["published","unpublished","shared"]),question=zod.z.string().nonempty(),choicesOutput=zod.z.array(zod.z.object({id:zod.z.string(),label:zod.z.string().nonempty()})),payload$4=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),status,question,choices:choicesOutput}),output$4=zod.z.object({type:zod.z.literal(type$4),payload:payload$4}),ChatSurvey={type:type$4,payload:payload$4,output:output$4},type$3="chat-user-ban",input$3=zod.z.object({user_session_id:session_id}),payload$3=zod.z.object({user_session_id:zod.z.string(),created_at:zod.z.number()}),output$3=zod.z.object({type:zod.z.literal(type$3),payload:payload$3}),ChatUserBan={type:type$3,input:input$3,payload:payload$3,output:output$3},type$2="chat-username",input$2=zod.z.object({username}),payload$2=zod.z.object({id:zod.z.string(),created_at:zod.z.number(),from:SocketLoggedUserSchema,chat_members:zod.z.number().nonnegative(),live_viewers:zod.z.number().nonnegative()}),output$2=zod.z.object({type:zod.z.literal(type$2),payload:payload$2}),ChatUsername={type:type$2,input:input$2,payload:payload$2,output:output$2},type$1="chat-winner-email",input$1=zod.z.object({id:zod.z.string(),email:zod.z.string().email()}),payload$1=zod.z.undefined(),output$1=zod.z.undefined(),ChatWinnerEmail={type:type$1,input:input$1,payload:payload$1,output:output$1},type="chat-winner",input=zod.z.object({id:zod.z.string(),chat_session_id:zod.z.string()}),payload=zod.z.object({id:zod.z.string(),chat_session_id:zod.z.string()}),output=zod.z.object({type:zod.z.literal(type),payload}),ChatWinner={type,input,payload,output};var index$1=Object.freeze({__proto__:null,ChatAnnouncement,ChatEmotion,ChatLoadRoom,ChatMessageDelete,ChatMessage,ChatProductHighlight,ChatRoomStatus,ChatSurveyAnswerRedisKey,ChatSurveyAnswer,ChatSurvey,ChatUserBan,ChatUsername,ChatWinnerEmail,ChatWinner,username,session_id,SocketUserSchema,SocketLoggedUserSchema});const EventGenerateAnalytics=zod.z.object({type:zod.z.literal("events/generate-analytics"),payload:zod.z.object({event_id:zod.z.string()})}),EmailShopifyUninstall=zod.z.object({type:zod.z.literal("emails/shopify-uninstall"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({dashboard_url:zod.z.string().url()})})}),EmailForgotPassword=zod.z.object({type:zod.z.literal("emails/forgot-password"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({token:zod.z.string().length(32)})})}),EmailRoleChange=zod.z.object({type:zod.z.literal("emails/role-change"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({shop_name:zod.z.string(),new_role:zod.z.string()})})}),EmailStripeCancellation=zod.z.object({type:zod.z.literal("emails/stripe-cancellation"),payload:zod.z.object({locale:localesEnum,to:zod.z.string().email(),data:zod.z.object({})})}),WorkerJob=zod.z.union([EventGenerateAnalytics,EmailShopifyUninstall,EmailForgotPassword,EmailRoleChange,EmailStripeCancellation]);var index=Object.freeze({__proto__:null,WorkerJob,EventGenerateAnalytics,EmailShopifyUninstall,EmailForgotPassword,EmailRoleChange,EmailStripeCancellation});exports.AnalyticEvent=AnalyticEvent,exports.AnalyticEvents=index$2,exports.ChatAnnouncement=ChatAnnouncement,exports.ChatEmotion=ChatEmotion,exports.ChatLoadRoom=ChatLoadRoom,exports.ChatMessage=ChatMessage,exports.ChatMessageDelete=ChatMessageDelete,exports.ChatProductHighlight=ChatProductHighlight,exports.ChatRoomStatus=ChatRoomStatus,exports.ChatSurvey=ChatSurvey,exports.ChatSurveyAnswer=ChatSurveyAnswer,exports.ChatSurveyAnswerRedisKey=ChatSurveyAnswerRedisKey,exports.ChatUserBan=ChatUserBan,exports.ChatUsername=ChatUsername,exports.ChatWinner=ChatWinner,exports.ChatWinnerEmail=ChatWinnerEmail,exports.EmailForgotPassword=EmailForgotPassword,exports.EmailRoleChange=EmailRoleChange,exports.EmailShopifyUninstall=EmailShopifyUninstall,exports.EmailStripeCancellation=EmailStripeCancellation,exports.EventGenerateAnalytics=EventGenerateAnalytics,exports.Locales=locales$1,exports.SocketLoggedUserSchema=SocketLoggedUserSchema,exports.SocketUserSchema=SocketUserSchema,exports.WebsocketEvents=index$1,exports.WorkerJob=WorkerJob,exports.WorkerJobs=index,exports.locales=locales,exports.localesEnum=localesEnum,exports.session_id=session_id,exports.username=username;
{
"name": "@livescale/types",
"version": "3.0.0",
"version": "3.2.0",
"main": "dist/index.cjs.js",

@@ -5,0 +5,0 @@ "module": "dist/index.es.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc