tonightpass 0.0.237 → 0.0.238

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/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import {pathcat}from'pathcat';import Io from'redaxios';import'reflect-metadata';import {IsString,Matches,IsEnum,IsArray,ArrayMinSize,ValidateIf,ArrayMaxSize,IsOptional,Length,ValidatorConstraint,Validate,IsMongoId,IsNotEmpty,ValidateNested,IsLowercase,IsObject,IsUrl,IsNumber,Min,IsBoolean,IsDate,MinDate,IsEmail,IsPhoneNumber,registerDecorator}from'class-validator';import {Type,Transform}from'class-transformer';var So=Object.defineProperty;var o=(e,t)=>So(e,"name",{value:t,configurable:true});var Bt="https://api.tonightpass.com";var p={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-ZÀ-ÿ0-9-\s]+$/,SLUG:/^[a-z0-9_.]+$/,USERNAME:/^(?!\.)(?!.*\.\.)(?!.*\.$)[a-z0-9_.]{3,48}$/,PHONE:/^\+(?:[0-9] ?){6,14}[0-9]$/,PASSWORD:/^(?=.*[A-Z])(?=.*[a-z])(?=.*[\d\W]).{8,}$/,PASSWORD_MIN_LENGTH:/^.{8,}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i,ORGANIZATION_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//,ORGANIZATION_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//,EVENT_FLYER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,EVENT_FLYER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/|[\w-]+\.\w+$)/,EVENT_TRAILER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,EVENT_TRAILER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/|[\w-]+\.\w+$)/,USER_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//,USER_AVATAR_URL_CREATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(users\/[\w-]+\/avatars\/|temp\/users\/avatars\/)/,USER_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//,CHANNEL_MESSAGE_ATTACHMENT:/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,USER_POST_MEDIA_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/posts\/media\/|users\/[\w-]+\/posts\/[\w-]+\/media\/)/};var Js=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),f=function(e){return e.Owner="owner",e.Admin="admin",e.Manager="manager",e.Member="member",e}({});var ti=function(e){return e.Follow="follow",e}({});var oi=function(e){return e.Image="image",e.Video="video",e}({});var K=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var di=function(e){return e.Authentication="authentication",e.BookingTicket="booking_ticket",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation",e}({});var De=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),$=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),li=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Ye={[f.Owner]:3,[f.Admin]:2,[f.Manager]:1,[f.Member]:0},xi={[De.Admin]:2,[De.Developer]:1,[De.User]:0};var he=class{static{o(this,"CacheManager");}cache=new Map;options;constructor(t){this.options={enabled:t.enabled,ttl:t.ttl??6e4,methods:t.methods??["GET"]};}generateKey(t,n){return `${t}:${n}`}shouldCache(t){return this.options.enabled&&this.options.methods.includes(t)}isValid(t){return Date.now()-t.timestamp<this.options.ttl}get(t,n){if(!this.shouldCache(t))return null;let s=this.generateKey(t,n),i=this.cache.get(s);return i?this.isValid(i)?i.data:(this.cache.delete(s),null):null}set(t,n,s){if(!this.shouldCache(t))return;let i=this.generateKey(t,n);this.cache.set(i,{data:s,timestamp:Date.now()});}clear(){this.cache.clear();}stats(){return {size:this.cache.size,keys:Array.from(this.cache.keys())}}};var ce=typeof window<"u";function T(e,t){let n=new FormData,s=o(i=>i!==null&&typeof i=="object"&&"uri"in i&&"name"in i&&"type"in i,"isFileObject");return typeof File<"u"&&t instanceof File?n.append(e,t):typeof FileList<"u"&&t instanceof FileList?Array.from(t).forEach(i=>n.append(e,i)):s(t)?n.append(e,t):Array.isArray(t)&&t.forEach(i=>n.append(e,i)),n}o(T,"buildFileFormData");function Pi(e,t){return Ye[e]>=Ye[t]}o(Pi,"isMemberRoleAtLeast");var _o=Io.create({headers:{Accept:"application/json",...!ce&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[(e,t)=>{if(e instanceof FormData){if(t&&typeof t=="object"){let n={};for(let[s,i]of Object.entries(t)){let r=s.toLowerCase();r!=="content-type"&&(n[r]=i);}Object.keys(t).forEach(s=>delete t[s]),Object.assign(t,n);}return e}if(e!=null)return t&&(t["Content-Type"]="application/json"),JSON.stringify(e)}],withCredentials:ce}),Ft=o(async(e,t)=>{let{apiKey:n,accessToken:s,...i}=t||{},r={...i.headers,...n&&{"X-API-Key":n},...s&&{Authorization:`Bearer ${s}`}};return _o(e,{...i,headers:r}).then(c=>c).catch(c=>{throw c.data||console.error(c),c.data})},"request");var Je=class extends Error{static{o(this,"TonightPassAPIError");}response;data;status;constructor(t,n){super(n.message),this.response=t,this.data=n,this.status=t.status;}},Ue=class{static{o(this,"Client");}options;apiKey;accessToken;cacheManager;url;constructor(t){this.options=t,this.apiKey=t.apiKey,this.accessToken=t.accessToken,this.url=(n,s)=>{let i=this.options.baseURL||Bt;return pathcat(i,n,s)},t.cache?.enabled&&(this.cacheManager=new he(t.cache));}setOptions(t){this.options=t,this.apiKey=t.apiKey,this.accessToken=t.accessToken,t.cache?.enabled?this.cacheManager=new he(t.cache):this.cacheManager=void 0;}setAccessToken(t){this.accessToken=t;}clearCache(){this.cacheManager?.clear();}getCacheStats(){return this.cacheManager?.stats()}async get(t,n,s){return this.requester("GET",t,void 0,n,s)}async post(t,n,s,i){return this.requester("POST",t,n,s,i)}async put(t,n,s,i){return this.requester("PUT",t,n,s,i)}async patch(t,n,s,i){return this.requester("PATCH",t,n,s,i)}async delete(t,n,s,i){return this.requester("DELETE",t,n,s,i)}async requester(t,n,s,i={},r={}){let a=this.url(n,i);if(s!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");if(this.cacheManager){let Et=this.cacheManager.get(t,a);if(Et!==null)return Et}let c=await Ft(a,{method:t,data:s,apiKey:this.apiKey,accessToken:this.accessToken,...r}),q=c.data;if(!q.success)throw new Je(c,q);return this.cacheManager&&this.cacheManager.set(t,a,q.data),q.data}};function Oo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Oo,"_ts_decorate");function jo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(jo,"_ts_metadata");var Qe=class{static{o(this,"AddParticipantDto");}username};Oo([IsString(),Matches(p.USERNAME,{message:"user.username.format"}),jo("design:type",String)],Qe.prototype,"username",void 0);var Yi=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var Qi=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e}({});var Le=function(e){return e.Dislike="dislike",e.HarassmentSelf="harassment_self",e.HarassmentOther="harassment_other",e.SexualHarassmentSelf="sexual_harassment_self",e.NudesSelf="nudes_self",e.SexualContent="sexual_content",e.ChildInvolved="child_involved",e.ThreatTarget="threat_target",e.ViolentContent="violent_content",e.HateSpeech="hate_speech",e.Terrorism="terrorism",e.DrugSale="drug_sale",e.WeaponSale="weapon_sale",e.SelfHarmConcern="self_harm_concern",e.SelfHarmPromotion="self_harm_promotion",e.Other="other",e}({});var re=function(e){return e.Private="private",e.Group="group",e}({}),na=function(e){return e.Member="member",e.Admin="admin",e}({}),oa=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var X=function(e){return e.EUR="EUR",e.USD="USD",e.GBP="GBP",e.BGN="BGN",e.CZK="CZK",e.DKK="DKK",e.HUF="HUF",e.PLN="PLN",e.RON="RON",e.SEK="SEK",e.CHF="CHF",e.NOK="NOK",e.ISK="ISK",e.TRY="TRY",e.RUB="RUB",e.UAH="UAH",e.BAM="BAM",e.MKD="MKD",e.ALL="ALL",e.RSD="RSD",e.MDL="MDL",e.GEL="GEL",e.BYN="BYN",e}({});var aa=function(e){return e.AuthEmailAlreadyExists="auth.email-already-exists",e.AuthUsernameAlreadyExists="auth.username-already-exists",e.AuthPhoneNumberAlreadyExists="auth.phone-number-already-exists",e.AuthInvalidCredentials="auth.invalid-credentials",e.AuthUserNotFound="auth.user-not-found",e.AuthInvalidToken="auth.invalid-token",e.AuthTokenExpired="auth.token-expired",e.AuthUnauthorized="auth.unauthorized",e.AuthPasswordMismatch="auth.password-mismatch",e.AuthInvalidOAuth2Provider="auth.invalid-oauth2-provider",e.AuthOAuth2Error="auth.oauth2-error",e.UserNotFound="user.not-found",e.UserInvalidUsername="user.invalid-username",e.UserInvalidEmail="user.invalid-email",e.UserInvalidPhoneNumber="user.invalid-phone-number",e.UserInvalidPassword="user.invalid-password",e.UserInvalidBirthDate="user.invalid-birth-date",e.UserInvalidGender="user.invalid-gender",e.UserInvalidRole="user.invalid-role",e.UserInvalidPreferences="user.invalid-preferences",e.UserInvalidLocation="user.invalid-location",e.UserInvalidFile="user.invalid-file",e.UserFileTooLarge="user.file-too-large",e.UserUnsupportedFileType="user.unsupported-file-type",e.OrganizationNotFound="organization.not-found",e.OrganizationInvalidSlug="organization.invalid-slug",e.OrganizationInvalidName="organization.invalid-name",e.OrganizationInvalidDescription="organization.invalid-description",e.OrganizationInvalidLocation="organization.invalid-location",e.OrganizationInvalidSocialLink="organization.invalid-social-link",e.OrganizationAlreadyExists="organization.already-exists",e.OrganizationUnauthorized="organization.unauthorized",e.OrganizationMemberNotFound="organization.member-not-found",e.OrganizationMemberInvalidRole="organization.member-invalid-role",e.OrganizationMemberAlreadyExists="organization.member-already-exists",e.EventNotFound="event.not-found",e.EventInvalidTitle="event.invalid-title",e.EventInvalidDescription="event.invalid-description",e.EventInvalidLocation="event.invalid-location",e.EventInvalidDates="event.invalid-dates",e.EventInvalidTickets="event.invalid-tickets",e.EventInvalidStyles="event.invalid-styles",e.EventInvalidType="event.invalid-type",e.EventInvalidVisibility="event.invalid-visibility",e.EventUnavailable="event.unavailable",e.EventTicketNotFound="event.ticket-not-found",e.EventTicketUnavailable="event.ticket-unavailable",e.EventTicketInvalidQuantity="event.ticket-invalid-quantity",e.OrderNotFound="order.not-found",e.OrderInvalidStatus="order.invalid-status",e.OrderInvalidPayment="order.invalid-payment",e.OrderPaymentFailed="order.payment-failed",e.OrderAlreadyPaid="order.already-paid",e.OrderCancelled="order.cancelled",e.OrderRefunded="order.refunded",e.OrderExpired="order.expired",e.BookingNotFound="booking.not-found",e.BookingInvalidStatus="booking.invalid-status",e.BookingInvalidTickets="booking.invalid-tickets",e.BookingTicketNotFound="booking.ticket-not-found",e.BookingTicketInvalidToken="booking.ticket-invalid-token",e.BookingTicketExpired="booking.ticket-expired",e.BookingTicketUsed="booking.ticket-used",e.FileNotFound="file.not-found",e.FileInvalidType="file.invalid-type",e.FileTooLarge="file.too-large",e.FileUploadFailed="file.upload-failed",e.ValidationError="validation.error",e.DatabaseError="database.error",e.InternalServerError="server.internal-error",e.NotFound="not-found",e.BadRequest="bad-request",e.Unauthorized="unauthorized",e.Forbidden="forbidden",e.TooManyRequests="too-many-requests",e.ServiceUnavailable="service-unavailable",e.TooManyRequestsAuth="rate-limit.auth",e.TooManyRequestsApi="rate-limit.api",e.WebhookInvalidSignature="webhook.invalid-signature",e.WebhookInvalidEvent="webhook.invalid-event",e.WebhookProcessingFailed="webhook.processing-failed",e.PaymentRequired="payment.required",e.PaymentMethodRequired="payment.method-required",e.PaymentFailed="payment.failed",e.PaymentCancelled="payment.cancelled",e.PaymentRefunded="payment.refunded",e.BillingInvalidAccount="billing.invalid-account",e.BillingAccountRequired="billing.account-required",e.NotificationInvalidType="notification.invalid-type",e.NotificationSendingFailed="notification.sending-failed",e.CacheError="cache.error",e.CacheMiss="cache.miss",e.ExternalServiceError="external-service.error",e.ExternalServiceTimeout="external-service.timeout",e.ExternalServiceUnavailable="external-service.unavailable",e}({});var pa=function(e){return e.Following="following",e.Discover="discover",e}({});var fa=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Z=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),Y=function(e){return e.Entry="entry",e.Package="package",e.Meal="meal",e.Drink="drink",e.Parking="parking",e.Accommodation="accommodation",e.Camping="camping",e.Locker="locker",e.Shuttle="shuttle",e.Other="other",e}({});var J=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Festival="festival",e.HouseParty="house_party",e.FriendsParty="friends_party",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),Q=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),ua=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),ga=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var Ra=function(e){return e.InvitationLink="invitation_link",e}({});var Sa=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Pa=function(e){return e.User="user",e.Organization="organization",e}({});var Da=["\u{1F44D}","\u2764\uFE0F","\u{1F389}","\u{1F440}","\u{1F680}"],Ua=function(e){return e.ComingSoon="coming-soon",e.Shipped="shipped",e}({});var Ma=function(e){return e.FR="fr",e.EN="en",e}({});function tt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(tt,"_ts_decorate");function nt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(nt,"_ts_metadata");var ve=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};tt([IsEnum(re),nt("design:type",typeof re>"u"?Object:re)],ve.prototype,"type",void 0);tt([IsArray(),ArrayMinSize(1),ValidateIf(e=>e.type===re.Private),ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),ValidateIf(e=>e.type===re.Group),ArrayMinSize(3,{message:"Group channels must have at least 3 participants"}),ArrayMaxSize(50,{message:"Group channels can have at most 50 participants"}),IsString({each:true}),Matches(p.USERNAME,{each:true,message:"user.username.format"}),nt("design:type",Array)],ve.prototype,"participantUsernames",void 0);tt([IsOptional(),ValidateIf(e=>e.type===re.Group),IsString(),Length(1,100),nt("design:type",String)],ve.prototype,"name",void 0);function Mo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Mo,"_ts_decorate");function Eo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Eo,"_ts_metadata");var ot=class{static{o(this,"AddReactionDto");}emoji};Mo([IsString(),Length(1,10),Eo("design:type",String)],ot.prototype,"emoji",void 0);function Me(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Me,"_ts_decorate");function rt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(rt,"_ts_metadata");var be=class{static{o(this,"ContentOrAttachmentsConstraint");}validate(t,n){let s=n.object,i=!!(s.content&&s.content.trim().length>0),r=!!(s.attachments&&s.attachments.length>0);return i||r}defaultMessage(t){return "Either content or attachments must be provided"}};be=Me([ValidatorConstraint({name:"contentOrAttachments",async:false})],be);var Re=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Me([IsOptional(),IsString(),ValidateIf(e=>e.content!==void 0),Length(1,1024),rt("design:type",String)],Re.prototype,"content",void 0);Me([IsOptional(),IsArray(),ArrayMaxSize(10),Matches(p.CHANNEL_MESSAGE_ATTACHMENT,{each:true}),Validate(be),rt("design:type",Array)],Re.prototype,"attachments",void 0);Me([IsOptional(),IsMongoId(),rt("design:type",String)],Re.prototype,"replyToId",void 0);function Ct(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ct,"_ts_decorate");function Ht(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ht,"_ts_metadata");var Ee=class{static{o(this,"ReportChannelMessageDto");}reason;description};Ct([IsEnum(Le),Ht("design:type",typeof Le>"u"?Object:Le)],Ee.prototype,"reason",void 0);Ct([IsOptional(),IsString(),ValidateIf(e=>e.description&&e.description.trim().length>0),Length(1,500),Ht("design:type",String)],Ee.prototype,"description",void 0);function Qo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Qo,"_ts_decorate");function er(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(er,"_ts_metadata");var it=class{static{o(this,"UpdateChannelMessageDto");}content};Qo([IsOptional(),IsString(),Length(1,1024),er("design:type",String)],it.prototype,"content",void 0);function rr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(rr,"_ts_decorate");function sr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(sr,"_ts_metadata");var at=class{static{o(this,"UpdateChannelDto");}name};rr([IsOptional(),IsString(),Length(1,100),sr("design:type",String)],at.prototype,"name",void 0);function E(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(E,"_ts_decorate");function ee(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ee,"_ts_metadata");var ct=class{static{o(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[n,s]=t;return s>=-90&&s<=90&&n>=-180&&n<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};ct=E([ValidatorConstraint({name:"coordinatesRange",async:false})],ct);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};E([IsString(),IsNotEmpty(),ee("design:type",String)],z.prototype,"type",void 0);E([IsArray(),IsNotEmpty(),Validate(ct),ee("design:type",Array)],z.prototype,"coordinates",void 0);var x=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};E([IsOptional(),IsString(),Length(1,128),ee("design:type",String)],x.prototype,"name",void 0);E([IsString(),IsNotEmpty(),Length(1,256),ee("design:type",String)],x.prototype,"address",void 0);E([IsString(),IsNotEmpty(),Length(1,32),ee("design:type",String)],x.prototype,"zipCode",void 0);E([IsString(),IsNotEmpty(),Length(1,128),ee("design:type",String)],x.prototype,"city",void 0);E([IsString(),IsNotEmpty(),Length(1,128),ee("design:type",String)],x.prototype,"country",void 0);E([ValidateNested(),Type(()=>z),IsNotEmpty(),ee("design:type",typeof z>"u"?Object:z)],x.prototype,"geometry",void 0);function de(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(de,"_ts_decorate");function fe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(fe,"_ts_metadata");var S=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};de([IsOptional(),IsString(),Length(1,128),fe("design:type",String)],S.prototype,"name",void 0);de([IsOptional(),IsString(),Length(1,256),fe("design:type",String)],S.prototype,"address",void 0);de([IsOptional(),IsString(),Length(1,32),fe("design:type",String)],S.prototype,"zipCode",void 0);de([IsOptional(),IsString(),Length(1,128),fe("design:type",String)],S.prototype,"city",void 0);de([IsOptional(),IsString(),Length(1,128),fe("design:type",String)],S.prototype,"country",void 0);de([IsOptional(),ValidateNested(),Type(()=>z),fe("design:type",typeof z>"u"?Object:z)],S.prototype,"geometry",void 0);function F(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(F,"_ts_decorate");function V(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(V,"_ts_metadata");var me=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};F([IsOptional(),IsString(),IsLowercase(),Length(1,48),V("design:type",String)],me.prototype,"organizationSlug",void 0);F([IsObject(),V("design:type",typeof B>"u"?Object:B)],me.prototype,"identity",void 0);F([IsArray(),V("design:type",Array)],me.prototype,"members",void 0);F([IsOptional(),IsObject(),V("design:type",typeof Location>"u"?Object:Location)],me.prototype,"location",void 0);var B=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};F([IsString(),IsNotEmpty(),Length(1,32),V("design:type",String)],B.prototype,"displayName",void 0);F([IsString(),Length(16,1024),IsOptional(),V("design:type",String)],B.prototype,"description",void 0);F([Matches(p.ORGANIZATION_AVATAR_URL,{message:"organization.avatar.url.invalid"}),V("design:type",String)],B.prototype,"avatarUrl",void 0);F([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL,{message:"organization.banner.url.invalid"}),V("design:type",String)],B.prototype,"bannerUrl",void 0);F([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),V("design:type",Array)],B.prototype,"links",void 0);function P(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(P,"_ts_decorate");function N(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(N,"_ts_metadata");var l=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};P([IsString(),Length(1,128),N("design:type",String)],l.prototype,"name",void 0);P([IsString(),Length(0,1024),IsOptional(),N("design:type",String)],l.prototype,"description",void 0);P([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),N("design:type",Number)],l.prototype,"price",void 0);P([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),N("design:type",Number)],l.prototype,"quantity",void 0);P([IsEnum(Z),N("design:type",typeof Z>"u"?Object:Z)],l.prototype,"type",void 0);P([IsEnum(Y),N("design:type",typeof Y>"u"?Object:Y)],l.prototype,"category",void 0);P([IsEnum(X),N("design:type",typeof X>"u"?Object:X)],l.prototype,"currency",void 0);P([IsBoolean(),N("design:type",Boolean)],l.prototype,"isVisible",void 0);P([IsBoolean(),N("design:type",Boolean)],l.prototype,"isFeesIncluded",void 0);P([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),N("design:type",typeof Date>"u"?Object:Date)],l.prototype,"startAt",void 0);P([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),N("design:type",typeof Date>"u"?Object:Date)],l.prototype,"endAt",void 0);function D(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(D,"_ts_decorate");function U(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(U,"_ts_metadata");var m=class{static{o(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};D([IsString(),Length(1,128),IsOptional(),U("design:type",String)],m.prototype,"name",void 0);D([IsString(),Length(0,1024),IsOptional(),U("design:type",String)],m.prototype,"description",void 0);D([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),IsOptional(),U("design:type",Number)],m.prototype,"price",void 0);D([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),IsOptional(),U("design:type",Number)],m.prototype,"quantity",void 0);D([IsEnum(Z),IsOptional(),U("design:type",typeof Z>"u"?Object:Z)],m.prototype,"type",void 0);D([IsEnum(Y),IsOptional(),U("design:type",typeof Y>"u"?Object:Y)],m.prototype,"category",void 0);D([IsEnum(X),IsOptional(),U("design:type",typeof X>"u"?Object:X)],m.prototype,"currency",void 0);D([IsBoolean(),IsOptional(),U("design:type",Boolean)],m.prototype,"isVisible",void 0);D([IsBoolean(),IsOptional(),U("design:type",Boolean)],m.prototype,"isFeesIncluded",void 0);D([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),U("design:type",typeof Date>"u"?Object:Date)],m.prototype,"startAt",void 0);D([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),U("design:type",typeof Date>"u"?Object:Date)],m.prototype,"endAt",void 0);function b(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(b,"_ts_decorate");function I(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(I,"_ts_metadata");var Ae=class{static{o(this,"AtLeastOneMediaConstraint");}validate(t,n){let s=n.object,i=s.flyers||[],r=s.trailers||[];return i.length>0||r.length>0}defaultMessage(){return "At least one flyer or trailer must be provided"}};Ae=b([ValidatorConstraint({name:"atLeastOneMedia",async:false})],Ae);function jr(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:Ae});}}o(jr,"AtLeastOneMedia");var h=class{static{o(this,"BaseOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;styles;startAt;endAt};b([IsString(),IsNotEmpty(),Length(1,64),I("design:type",String)],h.prototype,"title",void 0);b([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.SLUG,{message:"organization.event.slug.format"}),I("design:type",String)],h.prototype,"slug",void 0);b([IsString(),IsNotEmpty(),Length(16,2048),I("design:type",String)],h.prototype,"description",void 0);b([IsEnum(J),IsNotEmpty(),I("design:type",typeof J>"u"?Object:J)],h.prototype,"type",void 0);b([IsEnum(Q),IsNotEmpty(),I("design:type",typeof Q>"u"?Object:Q)],h.prototype,"visibility",void 0);b([IsArray(),ArrayMaxSize(25),Matches(p.EVENT_FLYER_URL,{each:true,message:"organization.event.flyers.url.invalid"}),jr(),I("design:type",Array)],h.prototype,"flyers",void 0);b([IsArray(),ArrayMaxSize(25),Matches(p.EVENT_TRAILER_URL,{each:true,message:"organization.event.trailers.url.invalid"}),I("design:type",Array)],h.prototype,"trailers",void 0);b([IsObject(),ValidateNested(),Type(()=>x),IsNotEmpty(),I("design:type",typeof x>"u"?Object:x)],h.prototype,"location",void 0);b([IsArray(),IsString({each:true}),ArrayMinSize(1),I("design:type",Array)],h.prototype,"styles",void 0);b([Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),IsNotEmpty(),MinDate(new Date),I("design:type",typeof Date>"u"?Object:Date)],h.prototype,"startAt",void 0);b([Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),IsNotEmpty(),MinDate(new Date),I("design:type",typeof Date>"u"?Object:Date)],h.prototype,"endAt",void 0);var ut=class extends h{static{o(this,"CreateOrganizationEventDto");}tickets};b([IsArray(),ValidateNested({each:true}),Type(()=>l),IsNotEmpty(),I("design:type",Array)],ut.prototype,"tickets",void 0);function wr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(wr,"_ts_decorate");function zr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(zr,"_ts_metadata");var ht=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};wr([IsArray(),IsString({each:true}),zr("design:type",Array)],ht.prototype,"cart",void 0);var Ge=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var mn=class extends Ge{static{o(this,"UpdateOrganizationEventStyleDto");}};function R(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(R,"_ts_decorate");function _(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(_,"_ts_metadata");var Oe=class{static{o(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,n){let s=n.object;return s.flyers!==void 0&&s.trailers!==void 0?s.flyers.length>0||s.trailers.length>0:s.flyers!==void 0&&s.trailers===void 0?s.flyers.length>0:s.trailers!==void 0&&s.flyers===void 0?s.trailers.length>0:true}defaultMessage(){return "Cannot remove all media from event. At least one flyer or trailer must remain"}};Oe=R([ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],Oe);function Er(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:Oe});}}o(Er,"AtLeastOneMediaOnUpdate");var v=class{static{o(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};R([IsOptional(),IsString(),Length(1,64),_("design:type",String)],v.prototype,"title",void 0);R([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.SLUG,{message:"organization.event.slug.format"}),_("design:type",String)],v.prototype,"slug",void 0);R([IsOptional(),IsString(),Length(16,2048),_("design:type",String)],v.prototype,"description",void 0);R([IsOptional(),IsEnum(J),_("design:type",typeof J>"u"?Object:J)],v.prototype,"type",void 0);R([IsOptional(),IsEnum(Q),_("design:type",typeof Q>"u"?Object:Q)],v.prototype,"visibility",void 0);R([IsOptional(),IsArray(),Matches(p.EVENT_FLYER_URL_UPDATE,{each:true,message:"organization.event.flyers.url.invalid"}),Er(),_("design:type",Array)],v.prototype,"flyers",void 0);R([IsOptional(),IsArray(),Matches(p.EVENT_TRAILER_URL_UPDATE,{each:true,message:"organization.event.trailers.url.invalid"}),_("design:type",Array)],v.prototype,"trailers",void 0);R([IsOptional(),IsObject(),ValidateNested(),Type(()=>S),_("design:type",typeof S>"u"?Object:S)],v.prototype,"location",void 0);R([IsOptional(),IsArray(),ValidateNested({each:true}),Type(()=>m),_("design:type",Array)],v.prototype,"tickets",void 0);R([IsOptional(),IsArray(),IsString({each:true}),_("design:type",Array)],v.prototype,"styles",void 0);R([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),MinDate(new Date),_("design:type",typeof Date>"u"?Object:Date)],v.prototype,"startAt",void 0);R([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),MinDate(new Date),_("design:type",typeof Date>"u"?Object:Date)],v.prototype,"endAt",void 0);function Br(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Br,"_ts_decorate");function Fr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Fr,"_ts_metadata");var Rt=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Br([IsString(),IsNotEmpty(),Fr("design:type",String)],Rt.prototype,"token",void 0);function Rn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Rn,"_ts_decorate");function xn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(xn,"_ts_metadata");var We=class{static{o(this,"CreateOrganizationMemberDto");}user;role};Rn([IsString(),IsNotEmpty(),xn("design:type",String)],We.prototype,"user",void 0);Rn([IsEnum(f),IsNotEmpty(),xn("design:type",typeof f>"u"?Object:f)],We.prototype,"role",void 0);function Hr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Hr,"_ts_decorate");function Wr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Wr,"_ts_metadata");var xt=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};Hr([IsEnum(f),IsOptional(),Wr("design:type",typeof f>"u"?Object:f)],xt.prototype,"role",void 0);function $r(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o($r,"_ts_decorate");function Tr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Tr,"_ts_metadata");var St=class{static{o(this,"UpdateOrganizationMemberDto");}role};$r([IsEnum(f),IsNotEmpty(),Tr("design:type",typeof f>"u"?Object:f)],St.prototype,"role",void 0);function G(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(G,"_ts_decorate");function C(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(C,"_ts_metadata");var ue=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};G([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"organization.slug.format"}),C("design:type",String)],ue.prototype,"slug",void 0);G([IsObject(),IsOptional(),C("design:type",typeof k>"u"?Object:k)],ue.prototype,"identity",void 0);G([IsOptional(),IsArray(),C("design:type",Array)],ue.prototype,"members",void 0);G([IsOptional(),IsObject(),C("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var k=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};G([IsString(),IsNotEmpty(),Length(1,32),IsOptional(),C("design:type",String)],k.prototype,"displayName",void 0);G([IsString(),Length(16,1024),IsOptional(),C("design:type",String)],k.prototype,"description",void 0);G([IsOptional(),Matches(p.ORGANIZATION_AVATAR_URL),C("design:type",String)],k.prototype,"avatarUrl",void 0);G([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL),C("design:type",String)],k.prototype,"bannerUrl",void 0);G([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),C("design:type",Array)],k.prototype,"links",void 0);function O(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(O,"_ts_decorate");function j(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(j,"_ts_metadata");var je=class{static{o(this,"CreateUserDto");}identifier;identity;password};O([ValidateNested(),Type(()=>ge),j("design:type",typeof ge>"u"?Object:ge)],je.prototype,"identifier",void 0);O([ValidateNested(),Type(()=>M),j("design:type",typeof M>"u"?Object:M)],je.prototype,"identity",void 0);O([IsString(),Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),Matches(p.PASSWORD,{message:"Password must be secure."}),j("design:type",String)],je.prototype,"password",void 0);var ge=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};O([IsOptional(),IsString(),IsEmail(),j("design:type",String)],ge.prototype,"email",void 0);O([IsOptional(),IsString(),IsPhoneNumber(),j("design:type",String)],ge.prototype,"phoneNumber",void 0);O([IsString(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),j("design:type",String)],ge.prototype,"username",void 0);var M=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate;links};O([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"First name must be composed of letters only"}),j("design:type",String)],M.prototype,"firstName",void 0);O([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"Last name must be composed of letters only"}),j("design:type",String)],M.prototype,"lastName",void 0);O([IsEnum($),j("design:type",typeof $>"u"?Object:$)],M.prototype,"gender",void 0);O([IsOptional(),Matches(p.USER_AVATAR_URL_CREATE,{message:"user.avatar.url.invalid"}),j("design:type",String)],M.prototype,"avatarUrl",void 0);O([IsOptional(),Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),IsDate(),j("design:type",typeof Date>"u"?Object:Date)],M.prototype,"birthDate",void 0);O([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),j("design:type",Array)],M.prototype,"links",void 0);function ds(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(ds,"_ts_decorate");function fs(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(fs,"_ts_metadata");var jt=class{static{o(this,"GoogleOneTapDto");}credential};ds([IsNotEmpty(),IsString(),fs("design:type",String)],jt.prototype,"credential",void 0);function jn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(jn,"_ts_decorate");function wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(wn,"_ts_metadata");var qe=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};jn([IsString(),Length(1,280),wn("design:type",String)],qe.prototype,"content",void 0);jn([IsOptional(),IsString(),wn("design:type",String)],qe.prototype,"replyToId",void 0);function ys(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(ys,"_ts_decorate");function hs(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(hs,"_ts_metadata");var wt=class{static{o(this,"UpdateUserPostCommentDto");}content};ys([IsString(),Length(1,280),hs("design:type",String)],wt.prototype,"content",void 0);function zt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(zt,"_ts_decorate");function Pt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Pt,"_ts_metadata");var we=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};zt([IsOptional(),IsString(),Length(1,512),Pt("design:type",String)],we.prototype,"content",void 0);zt([IsArray(),ArrayMinSize(1),ArrayMaxSize(10),Matches(p.USER_POST_MEDIA_URL,{each:true}),Pt("design:type",Array)],we.prototype,"mediaUrls",void 0);zt([IsOptional(),IsEnum(K),Pt("design:type",typeof K>"u"?Object:K)],we.prototype,"visibility",void 0);function js(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(js,"_ts_decorate");function ws(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ws,"_ts_metadata");var Nt=class{static{o(this,"CreateUserPostRepostDto");}comment};js([IsOptional(),IsString(),Length(1,280),ws("design:type",String)],Nt.prototype,"comment",void 0);function Nn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Nn,"_ts_decorate");function Dn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Dn,"_ts_metadata");var Ke=class{static{o(this,"UpdateUserPostDto");}content;visibility};Nn([IsOptional(),IsString(),Length(1,512),Dn("design:type",String)],Ke.prototype,"content",void 0);Nn([IsOptional(),IsEnum(K),Dn("design:type",typeof K>"u"?Object:K)],Ke.prototype,"visibility",void 0);function Ms(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ms,"_ts_decorate");function Es(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Es,"_ts_metadata");var Dt=class{static{o(this,"RecoveryDto");}identifier};Ms([IsNotEmpty(),IsString(),Es("design:type",String)],Dt.prototype,"identifier",void 0);function Ut(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ut,"_ts_decorate");function Lt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Lt,"_ts_metadata");var ze=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};Ut([IsString(),IsNotEmpty(),Lt("design:type",String)],ze.prototype,"tokenId",void 0);Ut([IsString(),IsNotEmpty(),Lt("design:type",String)],ze.prototype,"tokenValue",void 0);Ut([Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),Matches(p.PASSWORD,{message:"Password must be secure."}),IsNotEmpty({message:"Password is required"}),Lt("design:type",String)],ze.prototype,"password",void 0);function Mn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Mn,"_ts_decorate");function En(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(En,"_ts_metadata");var Te=class{static{o(this,"SignInUserDto");}identifier;password};Mn([IsNotEmpty(),IsString(),En("design:type",String)],Te.prototype,"identifier",void 0);Mn([IsNotEmpty(),IsString(),En("design:type",String)],Te.prototype,"password",void 0);function u(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(u,"_ts_decorate");function g(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(g,"_ts_metadata");var Pe=class{static{o(this,"UpdateUserDto");}identifier;identity;password};u([IsOptional(),IsObject(),ValidateNested(),Type(()=>ye),g("design:type",typeof ye>"u"?Object:ye)],Pe.prototype,"identifier",void 0);u([IsOptional(),IsObject(),ValidateNested(),Type(()=>w),g("design:type",typeof w>"u"?Object:w)],Pe.prototype,"identity",void 0);u([IsOptional(),IsString(),Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),Matches(p.PASSWORD,{message:"Password must be secure."}),g("design:type",String)],Pe.prototype,"password",void 0);var ye=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};u([IsOptional(),IsString(),IsEmail(),g("design:type",String)],ye.prototype,"email",void 0);u([IsOptional(),IsString(),IsPhoneNumber(),g("design:type",String)],ye.prototype,"phoneNumber",void 0);u([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),g("design:type",String)],ye.prototype,"username",void 0);var w=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate;links};u([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"First name must be composed of letters only"}),g("design:type",String)],w.prototype,"firstName",void 0);u([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"Last name must be composed of letters only"}),g("design:type",String)],w.prototype,"lastName",void 0);u([IsOptional(),IsString(),Length(1,32),g("design:type",String)],w.prototype,"displayName",void 0);u([IsOptional(),IsString(),Length(1,128),g("design:type",String)],w.prototype,"description",void 0);u([IsOptional(),Matches(p.USER_AVATAR_URL),g("design:type",Object)],w.prototype,"avatarUrl",void 0);u([IsOptional(),Matches(p.USER_BANNER_URL),g("design:type",Object)],w.prototype,"bannerUrl",void 0);u([IsOptional(),IsEnum($),g("design:type",typeof $>"u"?Object:$)],w.prototype,"gender",void 0);u([IsOptional(),Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),IsDate(),g("design:type",typeof Date>"u"?Object:Date)],w.prototype,"birthDate",void 0);u([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),g("design:type",Array)],w.prototype,"links",void 0);function d(e){return e}o(d,"sdk");var Cn=e=>({getAll:o(async()=>e.get("/api-keys"),"getAll"),get:o(async t=>e.get("/api-keys/:apiKeyId",{apiKeyId:t}),"get"),create:o(async t=>e.post("/api-keys",t),"create"),update:o(async(t,n)=>e.put("/api-keys/:apiKeyId",n,{apiKeyId:t}),"update"),delete:o(async t=>e.delete("/api-keys/:apiKeyId",void 0,{apiKeyId:t}),"delete")});var Hn=e=>({signIn:o(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:o(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:o(async()=>e.post("/auth/sign-out",void 0),"signOut"),refreshToken:o(async()=>e.post("/auth/refresh-token",void 0),"refreshToken"),recovery:o(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:o(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),oauth2:{connect:o((t,n)=>e.url("/oauth2/:provider",{provider:t,...n}),"connect"),disconnect:o(async t=>e.delete("/oauth2/:provider",void 0,{provider:t}),"disconnect"),googleOneTap:o(async t=>e.post("/oauth2/google/one-tap",t),"googleOneTap")}});var Wn=e=>({categories:{getAll:o(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:o(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:o(async t=>e.get("/careers/jobs",t),"getAll"),get:o(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:o(async t=>e.get("/careers/offices",t),"getAll")}});var qn=e=>({getAll:o(async(t,n)=>e.get("/channels/~me/:channelId/messages",{channelId:t,...n}),"getAll"),getAllByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:n,...s}),"getAllByOrganization"),get:o(async(t,n)=>e.get("/channels/~me/:channelId/messages/:messageId",{channelId:t,messageId:n}),"get"),getByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:n,messageId:s}),"getByOrganization"),create:o(async(t,n)=>e.post("/channels/~me/:channelId/messages",n,{channelId:t}),"create"),createByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages",s,{organizationSlug:t,channelId:n}),"createByOrganization"),update:o(async(t,n,s)=>e.put("/channels/~me/:channelId/messages/:messageId",s,{channelId:t,messageId:n}),"update"),updateByOrganization:o(async(t,n,s,i)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",i,{organizationSlug:t,channelId:n,messageId:s}),"updateByOrganization"),delete:o(async(t,n)=>e.delete("/channels/~me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:n}),"delete"),deleteByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:n,messageId:s}),"deleteByOrganization"),addReaction:o(async(t,n,s)=>e.post("/channels/~me/:channelId/messages/:messageId/reactions",s,{channelId:t,messageId:n}),"addReaction"),addReactionByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",i,{organizationSlug:t,channelId:n,messageId:s}),"addReactionByOrganization"),removeReaction:o(async(t,n,s)=>e.delete("/channels/~me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:n,emoji:s}),"removeReaction"),removeReactionByOrganization:o(async(t,n,s,i)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:n,messageId:s,emoji:i}),"removeReactionByOrganization"),markAsRead:o(async(t,n)=>e.post("/channels/~me/:channelId/messages/:messageId/read",void 0,{channelId:t,messageId:n}),"markAsRead"),markAsReadByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",void 0,{organizationSlug:t,channelId:n,messageId:s}),"markAsReadByOrganization"),uploadFile:o(async(t,n)=>e.post("/channels/~me/:channelId/files",n,{channelId:t}),"uploadFile"),uploadFileByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/files",s,{organizationSlug:t,channelId:n}),"uploadFileByOrganization"),report:o(async(t,n,s)=>e.post("/channels/~me/:channelId/messages/:messageId/report",s,{channelId:t,messageId:n}),"report"),reportByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",i,{organizationSlug:t,channelId:n,messageId:s}),"reportByOrganization")});var Kn=e=>({me:o(async t=>e.get("/channels/~me",t),"me"),getByOrganization:o(async(t,n)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...n}),"getByOrganization"),countMe:o(async t=>e.get("/users/~me/channels/count",t),"countMe"),countByOrganization:o(async(t,n)=>e.get("/users/@:organizationSlug/channels/count",{organizationSlug:t,...n}),"countByOrganization"),get:o(async t=>e.get("/channels/~me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:o(async(t,n)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:n}),"getByOrganizationChannel"),create:o(async t=>e.post("/channels/~me",t),"create"),createByOrganization:o(async(t,n)=>e.post("/channels/:organizationSlug",n,{organizationSlug:t}),"createByOrganization"),update:o(async(t,n)=>e.put("/channels/~me/:channelId",n,{channelId:t}),"update"),updateByOrganization:o(async(t,n,s)=>e.put("/channels/:organizationSlug/:channelId",s,{organizationSlug:t,channelId:n}),"updateByOrganization"),delete:o(async t=>e.delete("/channels/~me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:o(async(t,n)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:n}),"deleteByOrganization"),addParticipant:o(async(t,n)=>e.post("/channels/~me/:channelId/participants",n,{channelId:t}),"addParticipant"),addParticipantByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/participants",s,{organizationSlug:t,channelId:n}),"addParticipantByOrganization"),removeParticipant:o(async(t,n)=>e.delete("/channels/~me/:channelId/participants/:username",void 0,{channelId:t,username:n}),"removeParticipant"),removeParticipantByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:n,username:s}),"removeParticipantByOrganization"),getMembers:o(async(t,n)=>e.get("/channels/~me/:channelId/members",{channelId:t,...n}),"getMembers"),getMembersByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:n,...s}),"getMembersByOrganization"),messages:qn(e)});var $n=e=>({getRates:o(()=>e.get("/currencies/rates"),"getRates"),convert:o(t=>e.post("/currencies/convert",t),"convert"),convertAmount:o((t,n,s)=>e.post("/currencies/convert",{from:t,to:n,amount:s}),"convertAmount")});var Tn=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var Xn=e=>({getAll:o(async()=>e.get("/health"),"getAll"),database:o(async()=>e.get("/health/database"),"database"),api:o(async()=>e.get("/health/api"),"api"),app:o(async()=>e.get("/health/app"),"app")});var Zn=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var Yn=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Jn=o(e=>({account:o(async t=>e.get("/organizations/@:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(ce)window.location.href=e.url("/organizations/@:organizationSlug/billing/link",{organizationSlug:t});else throw new Error("Billing link is only available in the browser")},"link"),dashboard:o(t=>{if(ce)window.location.href=e.url("/organizations/@:organizationSlug/billing/dashboard",{organizationSlug:t});else throw new Error("Billing dashboard is only available in the browser")},"dashboard")}),"organizationsBilling");var Qn=e=>({getAll:o(async t=>e.get("/organizations/@:organizationSlug/customers",{organizationSlug:t}),"getAll"),get:o(async(t,n)=>e.get("/organizations/@:organizationSlug/customers/:username",{organizationSlug:t,username:n}),"get")});var eo=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var to=o(e=>({getAll:o(async()=>e.get("/organizations/events/styles"),"getAll"),get:o(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:o(async t=>e.post("/organizations/events/styles",t),"create"),update:o(async(t,n)=>e.put("/organizations/events/styles/:styleSlug",n,{styleSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/events/styles/:styleSlug",void 0,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var no=o(e=>({getAll:o(async(t,n)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:n}),"getAll"),get:o(async(t,n,s)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:n,ticketId:s}),"get"),create:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/tickets",s,{organizationSlug:t,eventSlug:n}),"create"),update:o(async(t,n,s,i)=>e.put("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",i,{organizationSlug:t,eventSlug:n,ticketId:s}),"update"),delete:o(async(t,n,s)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:n,ticketId:s}),"delete")}),"organizationsEventsTickets");var oo=o(e=>({record:o(async(t,n)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var ro=o(e=>({search:o(async(t,n)=>e.get("/organizations/events/search",{q:t,...n}),"search"),getCalendar:o(async(t,n)=>e.get("/organizations/events/calendar/:year/:month",{year:t.toString(),month:n.toString()}),"getCalendar"),getAll:o(async(t,n)=>t?e.get("/organizations/@:organizationSlug/events",{organizationSlug:t,...n}):e.get("/organizations/events",n),"getAll"),getSuggestions:o(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:o(async t=>e.get("/organizations/events/nearby",t),"getNearby"),get:o(async(t,n)=>e.get("/organizations/@:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:n}),"get"),create:o(async(t,n)=>e.post("/organizations/@:organizationSlug/events",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/@:organizationSlug/events/:eventSlug",s,{organizationSlug:t,eventSlug:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug",void 0,{organizationSlug:t,eventSlug:n}),"delete"),uploadFile:o(async(t,n)=>e.post("/events/files/:eventFileType",T("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType",T("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:eo(e),styles:to(e),tickets:no(e),views:oo(e)}),"organizationsEvents");var so=o(e=>({getLinks:o(async t=>e.get("/organizations/@:organizationSlug/members/invitations/links",{organizationSlug:t}),"getLinks"),createLink:o(async(t,n={})=>e.post("/organizations/@:organizationSlug/members/invitations/links",n,{organizationSlug:t}),"createLink"),accept:o(async(t,n)=>e.post("/organizations/@:organizationSlug/members/invitations/accept",n,{organizationSlug:t}),"accept")}),"invitations");var io=o(e=>({me:o(async()=>e.get("/organizations/members/~me"),"me"),get:o(async t=>e.get("/organizations/@:organizationSlug/members",{organizationSlug:t}),"get"),create:o(async(t,n)=>e.post("/organizations/@:organizationSlug/members",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/@:organizationSlug/members/:username",s,{organizationSlug:t,username:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/@:organizationSlug/members/:username",void 0,{organizationSlug:t,username:n}),"delete"),invitations:so(e),accept:o(async t=>e.put("/organizations/@:organizationSlug/members/~me/accept",void 0,{organizationSlug:t}),"accept"),reject:o(async t=>e.delete("/organizations/@:organizationSlug/members/~me/reject",void 0,{organizationSlug:t}),"reject"),leave:o(async t=>e.delete("/organizations/@:organizationSlug/members/~me",void 0,{organizationSlug:t}),"leave")}),"organizationsMembers");var ao=e=>({getAll:o(async t=>e.get("/organizations/@:organizationSlug/orders",{organizationSlug:t}),"getAll"),get:o(async(t,n)=>e.get("/organizations/@:organizationSlug/orders/:orderId",{organizationSlug:t,orderId:n}),"get"),getAllByEvent:o(async(t,n)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/orders",{organizationSlug:t,eventSlug:n}),"getAllByEvent")});var co=e=>({search:o(async(t,n)=>e.get("/organizations/search",{q:t,limit:n}),"search"),getAll:o(async()=>e.get("/organizations"),"getAll"),get:o(async t=>e.get("/organizations/@:organizationSlug",{organizationSlug:t}),"get"),create:o(async t=>e.post("/organizations",t),"create"),update:o(async(t,n)=>e.put("/organizations/@:organizationSlug",n,{organizationSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/@:organizationSlug",void 0,{organizationSlug:t}),"delete"),uploadFile:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/files/:organizationFileType",T("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:Jn(e),events:ro(e),members:io(e),customers:Qn(e),orders:ao(e)});var po=e=>({follow:o(async t=>e.post("/profiles/@:username/relationships/follow",void 0,{username:t}),"follow"),unfollow:o(async t=>e.post("/profiles/@:username/relationships/unfollow",void 0,{username:t}),"unfollow"),getSuggestions:o(async t=>e.get("/profiles/~me/relationships/suggestions",t),"getSuggestions"),getFollowers:o(async(t,n)=>e.get("/profiles/@:username/relationships/followers",{username:t,...n}),"getFollowers")});var fo=e=>({getAll:o(async t=>e.get("/profiles",t),"getAll"),search:o(async(t,n)=>e.get("/profiles/search",{q:t,...n}),"search"),get:o(async t=>e.get("/profiles/@:username",{username:t}),"get"),relationships:po(e)});var lo=e=>({reactions:{get:o(async t=>e.get("/roadmap/reactions/:featureId",{featureId:t}),"get"),add:o(async(t,n)=>e.post("/roadmap/reactions/:featureId",{featureId:t,reaction:n}),"add")}});var mo=e=>({get:o(async t=>e.get("/users/bookings/tickets/:ticketId",{ticketId:t}),"get"),use:o(async(t,n,s)=>e.put("/users/bookings/tickets/:ticketId/use",{tokenId:n,tokenValue:s},{ticketId:t}),"use")});var uo=e=>({getAll:o(async()=>e.get("/users/bookings"),"getAll"),get:o(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:o(async()=>e.get("/users/~me/bookings"),"me"),tickets:mo(e)});var go=e=>({me:o(async()=>e.get("/users/~me/notifications"),"me"),count:o(async t=>e.get("/users/~me/notifications/count",t),"count"),read:o(async()=>e.put("/users/~me/notifications/read",void 0),"read")});var yo=o(e=>({record:o(async(t,n)=>e.post("/users/@:username/posts/:postId/views",void 0,{username:t,postId:n}),"record")}),"usersPostsViews");var ho=e=>({getByUsername:o(async(t,n)=>e.get("/users/@:username/posts",{username:t,...n}),"getByUsername"),getByUsernameAndId:o(async(t,n)=>e.get("/users/@:username/posts/:postId",{username:t,postId:n}),"getByUsernameAndId"),create:o(async t=>e.post("/users/~me/posts",t),"create"),update:o(async(t,n)=>e.put("/users/~me/posts/:postId",n,{postId:t}),"update"),delete:o(async t=>e.delete("/users/~me/posts/:postId",void 0,{postId:t}),"delete"),uploadMedia:o(async t=>e.post("/users/~me/posts/media",t),"uploadMedia"),views:yo(e)});var vo=e=>({getByPost:o(async(t,n,s)=>e.get("/users/@:username/posts/:postId/comments",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/~me/posts/:postId/comments",n,{postId:t}),"create"),update:o(async(t,n,s)=>e.put("/users/~me/posts/:postId/comments/:commentId",s,{postId:t,commentId:n}),"update"),delete:o(async(t,n)=>e.delete("/users/~me/posts/:postId/comments/:commentId",void 0,{postId:t,commentId:n}),"delete")});var bo=e=>({getByUsername:o(async(t,n)=>e.get("/users/@:username/reposts",{username:t,...n}),"getByUsername"),getByPost:o(async(t,n,s)=>e.get("/users/@:username/posts/:postId/reposts",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/~me/posts/:postId/reposts",n||{},{postId:t}),"create"),delete:o(async t=>e.delete("/users/~me/posts/:postId/reposts",void 0,{postId:t}),"delete")});var Ro=e=>({getAll:o(async()=>e.get("/users"),"getAll"),get:o(async t=>e.get("/users/@:userId",{userId:t}),"get"),me:o(async()=>e.get("/users/~me"),"me"),check:o(async(t,n)=>e.get("/users/check/:identifier",{identifier:t,suggestions:n}),"check"),update:o(async(t,n)=>e.put("/users/@:userId",n,{userId:t}),"update"),uploadFile:o(async(t,n,s)=>e.post("/users/@:userId/files/:userFileType",T("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",T("file",n),{userFileType:t}),"uploadTempFile"),bookings:uo(e),notifications:go(e),posts:ho(e),postsComments:vo(e),postsReposts:bo(e)});var xo=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;profiles;roadmap;users;notifications;constructor(t){this.client=new Ue(t),this.apiKeys=Cn(this.client),this.auth=Hn(this.client),this.careers=Wn(this.client),this.channels=Kn(this.client),this.currencies=$n(this.client),this.feed=Tn(this.client),this.health=Xn(this.client),this.orders=Yn(this.client),this.organizations=co(this.client),this.profiles=fo(this.client),this.roadmap=lo(this.client),this.users=Ro(this.client),this.notifications=Zn(this.client);}};var Xe=class{static{o(this,"WebSocketClient");}ws;options;reconnectAttempts=0;reconnectTimer;eventHandlers=new Map;isConnected=false;isReconnecting=false;constructor(t={}){this.options={baseURL:"wss://api.tonightpass.com",maxReconnectAttempts:3,reconnectInterval:1e3,debug:false,...t};}log(t,...n){this.options.debug&&console.log(`[WebSocketClient] ${t}`,...n);}getWebSocketURL(t,n){let s={};Object.entries(n).forEach(([r,a])=>{typeof a=="string"&&r!=="token"&&(s[r]=a);});let i=pathcat(t,s);return `${this.options.baseURL}${i}`}async connect(t,n){return new Promise((s,i)=>{try{let r=this.getWebSocketURL(t,n);this.log("Connecting to",r);let a=[];"token"in n&&typeof n.token=="string"&&a.push(`access_token.${n.token}`),this.ws=a.length>0?new WebSocket(r,a):new WebSocket(r),this.ws.onopen=()=>{this.log("Connected successfully"),this.isConnected=!0,this.isReconnecting=!1,this.reconnectAttempts=0,s();},this.ws.onmessage=c=>{try{let q=JSON.parse(c.data);this.handleEvent(q);}catch(q){this.log("Error parsing message:",q);}},this.ws.onclose=c=>{this.log("Connection closed",c.code),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,n);},this.ws.onerror=c=>{this.log("WebSocket error:",c),this.isConnected=!1,i(c);};}catch(r){i(r);}})}handleReconnect(t,n){if(this.reconnectAttempts>=this.options.maxReconnectAttempts){this.log("Max reconnect attempts reached");return}this.isReconnecting=true,this.reconnectAttempts++,this.log(`Attempting to reconnect (${this.reconnectAttempts}/${this.options.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.connect(t,n).catch(s=>{this.log("Reconnection failed:",s);});},this.options.reconnectInterval);}handleEvent(t){this.log("Received event:",t.type);let n=this.eventHandlers.get(t.type);n&&n.forEach(i=>i(t));let s=this.eventHandlers.get("*");s&&s.forEach(i=>i(t));}on(t,n){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set);let s=o(i=>{n(i);},"wrappedHandler");return this.eventHandlers.get(t)?.add(s),()=>{let i=this.eventHandlers.get(t);i&&(i.delete(s),i.size===0&&this.eventHandlers.delete(t));}}off(t,n){let s=this.eventHandlers.get(t);s&&(s.clear(),this.eventHandlers.delete(t));}send(t){this.ws&&this.isConnected?this.ws.send(JSON.stringify(t)):this.log("Cannot send data: WebSocket not connected");}disconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws&&(this.isConnected=false,this.isReconnecting=false,this.ws.close()),this.eventHandlers.clear();}get connected(){return this.isConnected}get reconnecting(){return this.isReconnecting}};var Ze=class extends Xe{static{o(this,"ChannelWebSocketClient");}async connectToChannel(t,n={}){return this.connect("/channels/~me/:channelId/ws",{...n,channelId:t})}async connectToOrganizationChannel(t,n,s={}){return this.connect("/channels/:organizationSlug/:channelId/ws",{...s,organizationSlug:t,channelId:n})}async connectToUserChannels(t={}){return this.connect("/channels/~me/ws",t)}async connectToOrganizationChannels(t,n={}){return this.connect("/channels/:organizationSlug/ws",{...n,organizationSlug:t})}onMessageCreate(t){return this.on("channel_message_create",t)}onMessageUpdate(t){return this.on("channel_message_update",t)}onMessageDelete(t){return this.on("channel_message_delete",t)}onChannelUpdate(t){return this.on("channel_update",t)}onChannelDelete(t){return this.on("channel_delete",t)}onMemberJoin(t){return this.on("channel_member_join",t)}onMemberLeave(t){return this.on("channel_member_leave",t)}onTypingStart(t){return this.on("typing_start",t)}onTypingStop(t){return this.on("typing_stop",t)}startTyping(t){this.send({type:"typing_start",data:{channelId:t}});}stopTyping(t){this.send({type:"typing_stop",data:{channelId:t}});}subscribeToChannel(t){this.send({type:"subscribe",data:{channelId:t}});}unsubscribeFromChannel(t){this.send({type:"unsubscribe",data:{channelId:t}});}};function vu(e){let t=new Ze(e);return {connect:o((n,s)=>t.connectToChannel(n,{token:s}),"connect"),connectToOrganization:o((n,s,i)=>t.connectToOrganizationChannel(n,s,{token:i}),"connectToOrganization"),connectToUserChannels:o(n=>t.connectToUserChannels({token:n}),"connectToUserChannels"),connectToOrganizationChannels:o((n,s)=>t.connectToOrganizationChannels(n,{token:s}),"connectToOrganizationChannels"),onMessageCreate:o(n=>t.onMessageCreate(n),"onMessageCreate"),onMessageUpdate:o(n=>t.onMessageUpdate(n),"onMessageUpdate"),onMessageDelete:o(n=>t.onMessageDelete(n),"onMessageDelete"),onChannelUpdate:o(n=>t.onChannelUpdate(n),"onChannelUpdate"),onChannelDelete:o(n=>t.onChannelDelete(n),"onChannelDelete"),onMemberJoin:o(n=>t.onMemberJoin(n),"onMemberJoin"),onMemberLeave:o(n=>t.onMemberLeave(n),"onMemberLeave"),onTypingStart:o(n=>t.onTypingStart(n),"onTypingStart"),onTypingStop:o(n=>t.onTypingStop(n),"onTypingStop"),onAny:o(n=>t.on("*",n),"onAny"),startTyping:o(n=>t.startTyping(n),"startTyping"),stopTyping:o(n=>t.stopTyping(n),"stopTyping"),subscribeToChannel:o(n=>t.subscribeToChannel(n),"subscribeToChannel"),unsubscribeFromChannel:o(n=>t.unsubscribeFromChannel(n),"unsubscribeFromChannel"),disconnect:o(()=>t.disconnect(),"disconnect"),get connected(){return t.connected},get reconnecting(){return t.reconnecting},client:t}}o(vu,"channelsWS");
2
- export{Rt as AcceptOrganizationMemberInvitationDto,Qe as AddParticipantDto,ot as AddReactionDto,Yi as ApiKeyTier,jr as AtLeastOneMedia,Ae as AtLeastOneMediaConstraint,Er as AtLeastOneMediaOnUpdate,Oe as AtLeastOneMediaOnUpdateConstraint,h as BaseOrganizationEventDto,he as CacheManager,na as ChannelMemberRole,Le as ChannelMessageReportReason,oa as ChannelStatus,re as ChannelType,Ze as ChannelWebSocketClient,Ue as Client,be as ContentOrAttachmentsConstraint,ve as CreateChannelDto,Re as CreateChannelMessageDto,x as CreateLocationDto,me as CreateOrganizationDto,ut as CreateOrganizationEventDto,ht as CreateOrganizationEventOrderDto,Ge as CreateOrganizationEventStyleDto,l as CreateOrganizationEventTicketDto,B as CreateOrganizationIdentityDto,We as CreateOrganizationMemberDto,xt as CreateOrganizationMemberInvitationLinkDto,je as CreateUserDto,M as CreateUserIdentityDto,qe as CreateUserPostCommentDto,we as CreateUserPostDto,Nt as CreateUserPostRepostDto,X as Currency,Bt as DEFAULT_API_URL,aa as ErrorType,pa as FeedType,z as GeoPointDto,jt as GoogleOneTapDto,Ma as Language,Qi as OAuth2Provider,ua as OrganizationEventFileType,ga as OrganizationEventStatus,fa as OrganizationEventStyleType,Y as OrganizationEventTicketCategory,Z as OrganizationEventTicketType,J as OrganizationEventType,Q as OrganizationEventVisibilityType,Sa as OrganizationFileType,f as OrganizationMemberRole,Ye as OrganizationMemberRolePower,Js as OrganizationMemberStatus,Ra as OrganizationTokenType,Pa as ProfileType,p as REGEX,Da as ROADMAP_REACTIONS,Dt as RecoveryDto,ze as RecoveryResetDto,Ee as ReportChannelMessageDto,Ua as RoadmapFeatureStatus,Te as SignInUserDto,xo as TonightPass,Je as TonightPassAPIError,at as UpdateChannelDto,it as UpdateChannelMessageDto,S as UpdateLocationDto,ue as UpdateOrganizationDto,v as UpdateOrganizationEventDto,mn as UpdateOrganizationEventStyleDto,m as UpdateOrganizationEventTicketDto,k as UpdateOrganizationIdentityDto,St as UpdateOrganizationMemberDto,Pe as UpdateUserDto,wt as UpdateUserPostCommentDto,Ke as UpdateUserPostDto,li as UserFileType,$ as UserIdentityGender,ti as UserNotificationType,oi as UserPostMediaType,K as UserPostVisibility,De as UserRole,xi as UserRolePower,di as UserTokenType,Xe as WebSocketClient,Cn as apiKeys,Hn as auth,T as buildFileFormData,Wn as careers,Kn as channels,vu as channelsWS,$n as currencies,Tn as feed,Xn as health,ce as isBrowser,Pi as isMemberRoleAtLeast,Zn as notifications,Yn as orders,co as organizations,fo as profiles,Ft as request,lo as roadmap,d as sdk,Ro as users};//# sourceMappingURL=index.mjs.map
1
+ import {pathcat}from'pathcat';import Io from'redaxios';import'reflect-metadata';import {IsString,Matches,IsEnum,IsArray,ArrayMinSize,ValidateIf,ArrayMaxSize,IsOptional,Length,ValidatorConstraint,Validate,IsMongoId,IsNotEmpty,ValidateNested,IsLowercase,IsObject,IsUrl,IsNumber,Min,IsBoolean,IsDate,MinDate,IsEmail,IsPhoneNumber,registerDecorator}from'class-validator';import {Type,Transform}from'class-transformer';var So=Object.defineProperty;var o=(e,t)=>So(e,"name",{value:t,configurable:true});var Bt="https://api.tonightpass.com";var p={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-ZÀ-ÿ0-9-\s]+$/,SLUG:/^[a-z0-9_.]+$/,USERNAME:/^(?!\.)(?!.*\.\.)(?!.*\.$)[a-z0-9_.]{3,48}$/,PHONE:/^\+(?:[0-9] ?){6,14}[0-9]$/,PASSWORD:/^(?=.*[A-Z])(?=.*[a-z])(?=.*[\d\W]).{8,}$/,PASSWORD_MIN_LENGTH:/^.{8,}$/,PASSWORD_UPPERCASE:/^(?=.*[A-Z])/,PASSWORD_LOWERCASE:/^(?=.*[a-z])/,PASSWORD_NUMBER_SPECIAL:/^(?=.*[\d\W])/,IMAGE_URL:/^(https:\/\/|http:\/\/)(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_+.~#?&//=]*)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)$/i,ORGANIZATION_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/avatars\//,ORGANIZATION_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/organizations\/[\w-]+\/banners\//,EVENT_FLYER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/)/,EVENT_FLYER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/flyers\/|organizations\/[\w-]+\/events\/[\w-]+\/flyers\/|[\w-]+\.\w+$)/,EVENT_TRAILER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/)/,EVENT_TRAILER_URL_UPDATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com|cdn\.payload\.tonightpass\.com)\/(temp\/events\/trailers\/|organizations\/[\w-]+\/events\/[\w-]+\/trailers\/|[\w-]+\.\w+$)/,USER_AVATAR_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/avatars\//,USER_AVATAR_URL_CREATE:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(users\/[\w-]+\/avatars\/|temp\/users\/avatars\/)/,USER_BANNER_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/users\/[\w-]+\/banners\//,CHANNEL_MESSAGE_ATTACHMENT:/^channels\/[\w-]+\/messages\/[\w-]+\/private\/[\w-]+$/,USER_POST_MEDIA_URL:/^https:\/\/(cdn\.staging\.tonightpass\.com|cdn\.tonightpass\.com)\/(temp\/posts\/media\/|users\/[\w-]+\/posts\/[\w-]+\/media\/)/};var Js=function(e){return e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected",e}({}),f=function(e){return e.Owner="owner",e.Admin="admin",e.Manager="manager",e.Member="member",e}({});var ti=function(e){return e.Follow="follow",e}({});var oi=function(e){return e.Image="image",e.Video="video",e}({});var K=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var di=function(e){return e.Authentication="authentication",e.BookingTicket="booking_ticket",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation",e}({});var De=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),$=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),li=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Ye={[f.Owner]:3,[f.Admin]:2,[f.Manager]:1,[f.Member]:0},xi={[De.Admin]:2,[De.Developer]:1,[De.User]:0};var he=class{static{o(this,"CacheManager");}cache=new Map;options;constructor(t){this.options={enabled:t.enabled,ttl:t.ttl??6e4,methods:t.methods??["GET"]};}generateKey(t,n){return `${t}:${n}`}shouldCache(t){return this.options.enabled&&this.options.methods.includes(t)}isValid(t){return Date.now()-t.timestamp<this.options.ttl}get(t,n){if(!this.shouldCache(t))return null;let s=this.generateKey(t,n),i=this.cache.get(s);return i?this.isValid(i)?i.data:(this.cache.delete(s),null):null}set(t,n,s){if(!this.shouldCache(t))return;let i=this.generateKey(t,n);this.cache.set(i,{data:s,timestamp:Date.now()});}clear(){this.cache.clear();}stats(){return {size:this.cache.size,keys:Array.from(this.cache.keys())}}};var ce=typeof window<"u";function T(e,t){let n=new FormData,s=o(i=>i!==null&&typeof i=="object"&&"uri"in i&&"name"in i&&"type"in i,"isFileObject");return typeof File<"u"&&t instanceof File?n.append(e,t):typeof FileList<"u"&&t instanceof FileList?Array.from(t).forEach(i=>n.append(e,i)):s(t)?n.append(e,t):Array.isArray(t)&&t.forEach(i=>n.append(e,i)),n}o(T,"buildFileFormData");function Pi(e,t){return Ye[e]>=Ye[t]}o(Pi,"isMemberRoleAtLeast");var _o=Io.create({headers:{Accept:"application/json",...!ce&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[(e,t)=>{if(e instanceof FormData){if(t&&typeof t=="object"){let n={};for(let[s,i]of Object.entries(t)){let r=s.toLowerCase();r!=="content-type"&&(n[r]=i);}Object.keys(t).forEach(s=>delete t[s]),Object.assign(t,n);}return e}if(e!=null)return t&&(t["Content-Type"]="application/json"),JSON.stringify(e)}],withCredentials:ce}),Ft=o(async(e,t)=>{let{apiKey:n,accessToken:s,...i}=t||{},r={...i.headers,...n&&{"X-API-Key":n},...s&&{Authorization:`Bearer ${s}`}};return _o(e,{...i,headers:r}).then(c=>c).catch(c=>{throw c.data||console.error(c),c.data})},"request");var Je=class extends Error{static{o(this,"TonightPassAPIError");}response;data;status;constructor(t,n){super(n.message),this.response=t,this.data=n,this.status=t.status;}},Ue=class{static{o(this,"Client");}options;apiKey;accessToken;cacheManager;url;constructor(t){this.options=t,this.apiKey=t.apiKey,this.accessToken=t.accessToken,this.url=(n,s)=>{let i=this.options.baseURL||Bt;return pathcat(i,n,s)},t.cache?.enabled&&(this.cacheManager=new he(t.cache));}setOptions(t){this.options=t,this.apiKey=t.apiKey,this.accessToken=t.accessToken,t.cache?.enabled?this.cacheManager=new he(t.cache):this.cacheManager=void 0;}setAccessToken(t){this.accessToken=t;}clearCache(){this.cacheManager?.clear();}getCacheStats(){return this.cacheManager?.stats()}async get(t,n,s){return this.requester("GET",t,void 0,n,s)}async post(t,n,s,i){return this.requester("POST",t,n,s,i)}async put(t,n,s,i){return this.requester("PUT",t,n,s,i)}async patch(t,n,s,i){return this.requester("PATCH",t,n,s,i)}async delete(t,n,s,i){return this.requester("DELETE",t,n,s,i)}async requester(t,n,s,i={},r={}){let a=this.url(n,i);if(s!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");if(this.cacheManager){let Et=this.cacheManager.get(t,a);if(Et!==null)return Et}let c=await Ft(a,{method:t,data:s,apiKey:this.apiKey,accessToken:this.accessToken,...r}),q=c.data;if(!q.success)throw new Je(c,q);return this.cacheManager&&this.cacheManager.set(t,a,q.data),q.data}};function Oo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Oo,"_ts_decorate");function jo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(jo,"_ts_metadata");var Qe=class{static{o(this,"AddParticipantDto");}username};Oo([IsString(),Matches(p.USERNAME,{message:"user.username.format"}),jo("design:type",String)],Qe.prototype,"username",void 0);var Yi=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var Qi=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e}({}),ea=function(e){return e.SignUp="signup",e.SignIn="signin",e}({});var Le=function(e){return e.Dislike="dislike",e.HarassmentSelf="harassment_self",e.HarassmentOther="harassment_other",e.SexualHarassmentSelf="sexual_harassment_self",e.NudesSelf="nudes_self",e.SexualContent="sexual_content",e.ChildInvolved="child_involved",e.ThreatTarget="threat_target",e.ViolentContent="violent_content",e.HateSpeech="hate_speech",e.Terrorism="terrorism",e.DrugSale="drug_sale",e.WeaponSale="weapon_sale",e.SelfHarmConcern="self_harm_concern",e.SelfHarmPromotion="self_harm_promotion",e.Other="other",e}({});var re=function(e){return e.Private="private",e.Group="group",e}({}),oa=function(e){return e.Member="member",e.Admin="admin",e}({}),ra=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var X=function(e){return e.EUR="EUR",e.USD="USD",e.GBP="GBP",e.BGN="BGN",e.CZK="CZK",e.DKK="DKK",e.HUF="HUF",e.PLN="PLN",e.RON="RON",e.SEK="SEK",e.CHF="CHF",e.NOK="NOK",e.ISK="ISK",e.TRY="TRY",e.RUB="RUB",e.UAH="UAH",e.BAM="BAM",e.MKD="MKD",e.ALL="ALL",e.RSD="RSD",e.MDL="MDL",e.GEL="GEL",e.BYN="BYN",e}({});var ca=function(e){return e.AuthEmailAlreadyExists="auth.email-already-exists",e.AuthUsernameAlreadyExists="auth.username-already-exists",e.AuthPhoneNumberAlreadyExists="auth.phone-number-already-exists",e.AuthInvalidCredentials="auth.invalid-credentials",e.AuthUserNotFound="auth.user-not-found",e.AuthInvalidToken="auth.invalid-token",e.AuthTokenExpired="auth.token-expired",e.AuthUnauthorized="auth.unauthorized",e.AuthPasswordMismatch="auth.password-mismatch",e.AuthInvalidOAuth2Provider="auth.invalid-oauth2-provider",e.AuthOAuth2Error="auth.oauth2-error",e.UserNotFound="user.not-found",e.UserInvalidUsername="user.invalid-username",e.UserInvalidEmail="user.invalid-email",e.UserInvalidPhoneNumber="user.invalid-phone-number",e.UserInvalidPassword="user.invalid-password",e.UserInvalidBirthDate="user.invalid-birth-date",e.UserInvalidGender="user.invalid-gender",e.UserInvalidRole="user.invalid-role",e.UserInvalidPreferences="user.invalid-preferences",e.UserInvalidLocation="user.invalid-location",e.UserInvalidFile="user.invalid-file",e.UserFileTooLarge="user.file-too-large",e.UserUnsupportedFileType="user.unsupported-file-type",e.OrganizationNotFound="organization.not-found",e.OrganizationInvalidSlug="organization.invalid-slug",e.OrganizationInvalidName="organization.invalid-name",e.OrganizationInvalidDescription="organization.invalid-description",e.OrganizationInvalidLocation="organization.invalid-location",e.OrganizationInvalidSocialLink="organization.invalid-social-link",e.OrganizationAlreadyExists="organization.already-exists",e.OrganizationUnauthorized="organization.unauthorized",e.OrganizationMemberNotFound="organization.member-not-found",e.OrganizationMemberInvalidRole="organization.member-invalid-role",e.OrganizationMemberAlreadyExists="organization.member-already-exists",e.EventNotFound="event.not-found",e.EventInvalidTitle="event.invalid-title",e.EventInvalidDescription="event.invalid-description",e.EventInvalidLocation="event.invalid-location",e.EventInvalidDates="event.invalid-dates",e.EventInvalidTickets="event.invalid-tickets",e.EventInvalidStyles="event.invalid-styles",e.EventInvalidType="event.invalid-type",e.EventInvalidVisibility="event.invalid-visibility",e.EventUnavailable="event.unavailable",e.EventTicketNotFound="event.ticket-not-found",e.EventTicketUnavailable="event.ticket-unavailable",e.EventTicketInvalidQuantity="event.ticket-invalid-quantity",e.OrderNotFound="order.not-found",e.OrderInvalidStatus="order.invalid-status",e.OrderInvalidPayment="order.invalid-payment",e.OrderPaymentFailed="order.payment-failed",e.OrderAlreadyPaid="order.already-paid",e.OrderCancelled="order.cancelled",e.OrderRefunded="order.refunded",e.OrderExpired="order.expired",e.BookingNotFound="booking.not-found",e.BookingInvalidStatus="booking.invalid-status",e.BookingInvalidTickets="booking.invalid-tickets",e.BookingTicketNotFound="booking.ticket-not-found",e.BookingTicketInvalidToken="booking.ticket-invalid-token",e.BookingTicketExpired="booking.ticket-expired",e.BookingTicketUsed="booking.ticket-used",e.FileNotFound="file.not-found",e.FileInvalidType="file.invalid-type",e.FileTooLarge="file.too-large",e.FileUploadFailed="file.upload-failed",e.ValidationError="validation.error",e.DatabaseError="database.error",e.InternalServerError="server.internal-error",e.NotFound="not-found",e.BadRequest="bad-request",e.Unauthorized="unauthorized",e.Forbidden="forbidden",e.TooManyRequests="too-many-requests",e.ServiceUnavailable="service-unavailable",e.TooManyRequestsAuth="rate-limit.auth",e.TooManyRequestsApi="rate-limit.api",e.WebhookInvalidSignature="webhook.invalid-signature",e.WebhookInvalidEvent="webhook.invalid-event",e.WebhookProcessingFailed="webhook.processing-failed",e.PaymentRequired="payment.required",e.PaymentMethodRequired="payment.method-required",e.PaymentFailed="payment.failed",e.PaymentCancelled="payment.cancelled",e.PaymentRefunded="payment.refunded",e.BillingInvalidAccount="billing.invalid-account",e.BillingAccountRequired="billing.account-required",e.NotificationInvalidType="notification.invalid-type",e.NotificationSendingFailed="notification.sending-failed",e.CacheError="cache.error",e.CacheMiss="cache.miss",e.ExternalServiceError="external-service.error",e.ExternalServiceTimeout="external-service.timeout",e.ExternalServiceUnavailable="external-service.unavailable",e}({});var da=function(e){return e.Following="following",e.Discover="discover",e}({});var la=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Z=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),Y=function(e){return e.Entry="entry",e.Package="package",e.Meal="meal",e.Drink="drink",e.Parking="parking",e.Accommodation="accommodation",e.Camping="camping",e.Locker="locker",e.Shuttle="shuttle",e.Other="other",e}({});var J=function(e){return e.Clubbing="clubbing",e.Concert="concert",e.Festival="festival",e.HouseParty="house_party",e.FriendsParty="friends_party",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Spectacle="spectacle",e.Cruise="cruise",e.OutsideAnimation="outside_animation",e.Sport="sport",e.Match="match",e.Seminar="seminar",e.Conference="conference",e.WellnessDay="wellness_day",e.Workshop="workshop",e.TradeFair="trade_fair",e.ConsumerShow="consumer_show",e.Membership="membership",e}({}),Q=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),ga=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),ya=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var xa=function(e){return e.InvitationLink="invitation_link",e}({});var Ia=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Na=function(e){return e.User="user",e.Organization="organization",e}({});var Ua=["\u{1F44D}","\u2764\uFE0F","\u{1F389}","\u{1F440}","\u{1F680}"],La=function(e){return e.ComingSoon="coming-soon",e.Shipped="shipped",e}({});var Ea=function(e){return e.FR="fr",e.EN="en",e}({});function tt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(tt,"_ts_decorate");function nt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(nt,"_ts_metadata");var ve=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};tt([IsEnum(re),nt("design:type",typeof re>"u"?Object:re)],ve.prototype,"type",void 0);tt([IsArray(),ArrayMinSize(1),ValidateIf(e=>e.type===re.Private),ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),ValidateIf(e=>e.type===re.Group),ArrayMinSize(3,{message:"Group channels must have at least 3 participants"}),ArrayMaxSize(50,{message:"Group channels can have at most 50 participants"}),IsString({each:true}),Matches(p.USERNAME,{each:true,message:"user.username.format"}),nt("design:type",Array)],ve.prototype,"participantUsernames",void 0);tt([IsOptional(),ValidateIf(e=>e.type===re.Group),IsString(),Length(1,100),nt("design:type",String)],ve.prototype,"name",void 0);function Mo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Mo,"_ts_decorate");function Eo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Eo,"_ts_metadata");var ot=class{static{o(this,"AddReactionDto");}emoji};Mo([IsString(),Length(1,10),Eo("design:type",String)],ot.prototype,"emoji",void 0);function Me(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Me,"_ts_decorate");function rt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(rt,"_ts_metadata");var be=class{static{o(this,"ContentOrAttachmentsConstraint");}validate(t,n){let s=n.object,i=!!(s.content&&s.content.trim().length>0),r=!!(s.attachments&&s.attachments.length>0);return i||r}defaultMessage(t){return "Either content or attachments must be provided"}};be=Me([ValidatorConstraint({name:"contentOrAttachments",async:false})],be);var Re=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Me([IsOptional(),IsString(),ValidateIf(e=>e.content!==void 0),Length(1,1024),rt("design:type",String)],Re.prototype,"content",void 0);Me([IsOptional(),IsArray(),ArrayMaxSize(10),Matches(p.CHANNEL_MESSAGE_ATTACHMENT,{each:true}),Validate(be),rt("design:type",Array)],Re.prototype,"attachments",void 0);Me([IsOptional(),IsMongoId(),rt("design:type",String)],Re.prototype,"replyToId",void 0);function Ct(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ct,"_ts_decorate");function Ht(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ht,"_ts_metadata");var Ee=class{static{o(this,"ReportChannelMessageDto");}reason;description};Ct([IsEnum(Le),Ht("design:type",typeof Le>"u"?Object:Le)],Ee.prototype,"reason",void 0);Ct([IsOptional(),IsString(),ValidateIf(e=>e.description&&e.description.trim().length>0),Length(1,500),Ht("design:type",String)],Ee.prototype,"description",void 0);function Qo(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Qo,"_ts_decorate");function er(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(er,"_ts_metadata");var it=class{static{o(this,"UpdateChannelMessageDto");}content};Qo([IsOptional(),IsString(),Length(1,1024),er("design:type",String)],it.prototype,"content",void 0);function rr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(rr,"_ts_decorate");function sr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(sr,"_ts_metadata");var at=class{static{o(this,"UpdateChannelDto");}name};rr([IsOptional(),IsString(),Length(1,100),sr("design:type",String)],at.prototype,"name",void 0);function E(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(E,"_ts_decorate");function ee(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ee,"_ts_metadata");var ct=class{static{o(this,"CoordinatesRangeConstraint");}validate(t){if(!Array.isArray(t)||t.length!==2)return false;let[n,s]=t;return s>=-90&&s<=90&&n>=-180&&n<=180}defaultMessage(){return "Coordinates must be within valid geographic ranges"}};ct=E([ValidatorConstraint({name:"coordinatesRange",async:false})],ct);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};E([IsString(),IsNotEmpty(),ee("design:type",String)],z.prototype,"type",void 0);E([IsArray(),IsNotEmpty(),Validate(ct),ee("design:type",Array)],z.prototype,"coordinates",void 0);var x=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};E([IsOptional(),IsString(),Length(1,128),ee("design:type",String)],x.prototype,"name",void 0);E([IsString(),IsNotEmpty(),Length(1,256),ee("design:type",String)],x.prototype,"address",void 0);E([IsString(),IsNotEmpty(),Length(1,32),ee("design:type",String)],x.prototype,"zipCode",void 0);E([IsString(),IsNotEmpty(),Length(1,128),ee("design:type",String)],x.prototype,"city",void 0);E([IsString(),IsNotEmpty(),Length(1,128),ee("design:type",String)],x.prototype,"country",void 0);E([ValidateNested(),Type(()=>z),IsNotEmpty(),ee("design:type",typeof z>"u"?Object:z)],x.prototype,"geometry",void 0);function de(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(de,"_ts_decorate");function fe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(fe,"_ts_metadata");var S=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};de([IsOptional(),IsString(),Length(1,128),fe("design:type",String)],S.prototype,"name",void 0);de([IsOptional(),IsString(),Length(1,256),fe("design:type",String)],S.prototype,"address",void 0);de([IsOptional(),IsString(),Length(1,32),fe("design:type",String)],S.prototype,"zipCode",void 0);de([IsOptional(),IsString(),Length(1,128),fe("design:type",String)],S.prototype,"city",void 0);de([IsOptional(),IsString(),Length(1,128),fe("design:type",String)],S.prototype,"country",void 0);de([IsOptional(),ValidateNested(),Type(()=>z),fe("design:type",typeof z>"u"?Object:z)],S.prototype,"geometry",void 0);function F(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(F,"_ts_decorate");function V(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(V,"_ts_metadata");var me=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};F([IsOptional(),IsString(),IsLowercase(),Length(1,48),V("design:type",String)],me.prototype,"organizationSlug",void 0);F([IsObject(),V("design:type",typeof B>"u"?Object:B)],me.prototype,"identity",void 0);F([IsArray(),V("design:type",Array)],me.prototype,"members",void 0);F([IsOptional(),IsObject(),V("design:type",typeof Location>"u"?Object:Location)],me.prototype,"location",void 0);var B=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};F([IsString(),IsNotEmpty(),Length(1,32),V("design:type",String)],B.prototype,"displayName",void 0);F([IsString(),Length(16,1024),IsOptional(),V("design:type",String)],B.prototype,"description",void 0);F([Matches(p.ORGANIZATION_AVATAR_URL,{message:"organization.avatar.url.invalid"}),V("design:type",String)],B.prototype,"avatarUrl",void 0);F([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL,{message:"organization.banner.url.invalid"}),V("design:type",String)],B.prototype,"bannerUrl",void 0);F([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),V("design:type",Array)],B.prototype,"links",void 0);function P(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(P,"_ts_decorate");function N(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(N,"_ts_metadata");var l=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};P([IsString(),Length(1,128),N("design:type",String)],l.prototype,"name",void 0);P([IsString(),Length(0,1024),IsOptional(),N("design:type",String)],l.prototype,"description",void 0);P([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),N("design:type",Number)],l.prototype,"price",void 0);P([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),N("design:type",Number)],l.prototype,"quantity",void 0);P([IsEnum(Z),N("design:type",typeof Z>"u"?Object:Z)],l.prototype,"type",void 0);P([IsEnum(Y),N("design:type",typeof Y>"u"?Object:Y)],l.prototype,"category",void 0);P([IsEnum(X),N("design:type",typeof X>"u"?Object:X)],l.prototype,"currency",void 0);P([IsBoolean(),N("design:type",Boolean)],l.prototype,"isVisible",void 0);P([IsBoolean(),N("design:type",Boolean)],l.prototype,"isFeesIncluded",void 0);P([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),N("design:type",typeof Date>"u"?Object:Date)],l.prototype,"startAt",void 0);P([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),N("design:type",typeof Date>"u"?Object:Date)],l.prototype,"endAt",void 0);function D(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(D,"_ts_decorate");function U(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(U,"_ts_metadata");var m=class{static{o(this,"UpdateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};D([IsString(),Length(1,128),IsOptional(),U("design:type",String)],m.prototype,"name",void 0);D([IsString(),Length(0,1024),IsOptional(),U("design:type",String)],m.prototype,"description",void 0);D([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),IsOptional(),U("design:type",Number)],m.prototype,"price",void 0);D([Transform(({value:e})=>Number(e)),IsNumber(),Min(0),IsOptional(),U("design:type",Number)],m.prototype,"quantity",void 0);D([IsEnum(Z),IsOptional(),U("design:type",typeof Z>"u"?Object:Z)],m.prototype,"type",void 0);D([IsEnum(Y),IsOptional(),U("design:type",typeof Y>"u"?Object:Y)],m.prototype,"category",void 0);D([IsEnum(X),IsOptional(),U("design:type",typeof X>"u"?Object:X)],m.prototype,"currency",void 0);D([IsBoolean(),IsOptional(),U("design:type",Boolean)],m.prototype,"isVisible",void 0);D([IsBoolean(),IsOptional(),U("design:type",Boolean)],m.prototype,"isFeesIncluded",void 0);D([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),U("design:type",typeof Date>"u"?Object:Date)],m.prototype,"startAt",void 0);D([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),U("design:type",typeof Date>"u"?Object:Date)],m.prototype,"endAt",void 0);function b(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(b,"_ts_decorate");function I(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(I,"_ts_metadata");var Ae=class{static{o(this,"AtLeastOneMediaConstraint");}validate(t,n){let s=n.object,i=s.flyers||[],r=s.trailers||[];return i.length>0||r.length>0}defaultMessage(){return "At least one flyer or trailer must be provided"}};Ae=b([ValidatorConstraint({name:"atLeastOneMedia",async:false})],Ae);function jr(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:Ae});}}o(jr,"AtLeastOneMedia");var h=class{static{o(this,"BaseOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;styles;startAt;endAt};b([IsString(),IsNotEmpty(),Length(1,64),I("design:type",String)],h.prototype,"title",void 0);b([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.SLUG,{message:"organization.event.slug.format"}),I("design:type",String)],h.prototype,"slug",void 0);b([IsString(),IsNotEmpty(),Length(16,2048),I("design:type",String)],h.prototype,"description",void 0);b([IsEnum(J),IsNotEmpty(),I("design:type",typeof J>"u"?Object:J)],h.prototype,"type",void 0);b([IsEnum(Q),IsNotEmpty(),I("design:type",typeof Q>"u"?Object:Q)],h.prototype,"visibility",void 0);b([IsArray(),ArrayMaxSize(25),Matches(p.EVENT_FLYER_URL,{each:true,message:"organization.event.flyers.url.invalid"}),jr(),I("design:type",Array)],h.prototype,"flyers",void 0);b([IsArray(),ArrayMaxSize(25),Matches(p.EVENT_TRAILER_URL,{each:true,message:"organization.event.trailers.url.invalid"}),I("design:type",Array)],h.prototype,"trailers",void 0);b([IsObject(),ValidateNested(),Type(()=>x),IsNotEmpty(),I("design:type",typeof x>"u"?Object:x)],h.prototype,"location",void 0);b([IsArray(),IsString({each:true}),ArrayMinSize(1),I("design:type",Array)],h.prototype,"styles",void 0);b([Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),IsNotEmpty(),MinDate(new Date),I("design:type",typeof Date>"u"?Object:Date)],h.prototype,"startAt",void 0);b([Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),IsNotEmpty(),MinDate(new Date),I("design:type",typeof Date>"u"?Object:Date)],h.prototype,"endAt",void 0);var ut=class extends h{static{o(this,"CreateOrganizationEventDto");}tickets};b([IsArray(),ValidateNested({each:true}),Type(()=>l),IsNotEmpty(),I("design:type",Array)],ut.prototype,"tickets",void 0);function wr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(wr,"_ts_decorate");function zr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(zr,"_ts_metadata");var ht=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};wr([IsArray(),IsString({each:true}),zr("design:type",Array)],ht.prototype,"cart",void 0);var Ge=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var mn=class extends Ge{static{o(this,"UpdateOrganizationEventStyleDto");}};function R(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(R,"_ts_decorate");function _(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(_,"_ts_metadata");var Oe=class{static{o(this,"AtLeastOneMediaOnUpdateConstraint");}validate(t,n){let s=n.object;return s.flyers!==void 0&&s.trailers!==void 0?s.flyers.length>0||s.trailers.length>0:s.flyers!==void 0&&s.trailers===void 0?s.flyers.length>0:s.trailers!==void 0&&s.flyers===void 0?s.trailers.length>0:true}defaultMessage(){return "Cannot remove all media from event. At least one flyer or trailer must remain"}};Oe=R([ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],Oe);function Er(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:Oe});}}o(Er,"AtLeastOneMediaOnUpdate");var v=class{static{o(this,"UpdateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};R([IsOptional(),IsString(),Length(1,64),_("design:type",String)],v.prototype,"title",void 0);R([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.SLUG,{message:"organization.event.slug.format"}),_("design:type",String)],v.prototype,"slug",void 0);R([IsOptional(),IsString(),Length(16,2048),_("design:type",String)],v.prototype,"description",void 0);R([IsOptional(),IsEnum(J),_("design:type",typeof J>"u"?Object:J)],v.prototype,"type",void 0);R([IsOptional(),IsEnum(Q),_("design:type",typeof Q>"u"?Object:Q)],v.prototype,"visibility",void 0);R([IsOptional(),IsArray(),Matches(p.EVENT_FLYER_URL_UPDATE,{each:true,message:"organization.event.flyers.url.invalid"}),Er(),_("design:type",Array)],v.prototype,"flyers",void 0);R([IsOptional(),IsArray(),Matches(p.EVENT_TRAILER_URL_UPDATE,{each:true,message:"organization.event.trailers.url.invalid"}),_("design:type",Array)],v.prototype,"trailers",void 0);R([IsOptional(),IsObject(),ValidateNested(),Type(()=>S),_("design:type",typeof S>"u"?Object:S)],v.prototype,"location",void 0);R([IsOptional(),IsArray(),ValidateNested({each:true}),Type(()=>m),_("design:type",Array)],v.prototype,"tickets",void 0);R([IsOptional(),IsArray(),IsString({each:true}),_("design:type",Array)],v.prototype,"styles",void 0);R([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),MinDate(new Date),_("design:type",typeof Date>"u"?Object:Date)],v.prototype,"startAt",void 0);R([IsOptional(),Transform(({value:e})=>e instanceof Date?e:new Date(e)),IsDate(),MinDate(new Date),_("design:type",typeof Date>"u"?Object:Date)],v.prototype,"endAt",void 0);function Br(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Br,"_ts_decorate");function Fr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Fr,"_ts_metadata");var Rt=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Br([IsString(),IsNotEmpty(),Fr("design:type",String)],Rt.prototype,"token",void 0);function Rn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Rn,"_ts_decorate");function xn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(xn,"_ts_metadata");var We=class{static{o(this,"CreateOrganizationMemberDto");}user;role};Rn([IsString(),IsNotEmpty(),xn("design:type",String)],We.prototype,"user",void 0);Rn([IsEnum(f),IsNotEmpty(),xn("design:type",typeof f>"u"?Object:f)],We.prototype,"role",void 0);function Hr(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Hr,"_ts_decorate");function Wr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Wr,"_ts_metadata");var xt=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};Hr([IsEnum(f),IsOptional(),Wr("design:type",typeof f>"u"?Object:f)],xt.prototype,"role",void 0);function $r(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o($r,"_ts_decorate");function Tr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Tr,"_ts_metadata");var St=class{static{o(this,"UpdateOrganizationMemberDto");}role};$r([IsEnum(f),IsNotEmpty(),Tr("design:type",typeof f>"u"?Object:f)],St.prototype,"role",void 0);function G(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(G,"_ts_decorate");function C(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(C,"_ts_metadata");var ue=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};G([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"organization.slug.format"}),C("design:type",String)],ue.prototype,"slug",void 0);G([IsObject(),IsOptional(),C("design:type",typeof k>"u"?Object:k)],ue.prototype,"identity",void 0);G([IsOptional(),IsArray(),C("design:type",Array)],ue.prototype,"members",void 0);G([IsOptional(),IsObject(),C("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var k=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};G([IsString(),IsNotEmpty(),Length(1,32),IsOptional(),C("design:type",String)],k.prototype,"displayName",void 0);G([IsString(),Length(16,1024),IsOptional(),C("design:type",String)],k.prototype,"description",void 0);G([IsOptional(),Matches(p.ORGANIZATION_AVATAR_URL),C("design:type",String)],k.prototype,"avatarUrl",void 0);G([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL),C("design:type",String)],k.prototype,"bannerUrl",void 0);G([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),C("design:type",Array)],k.prototype,"links",void 0);function O(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(O,"_ts_decorate");function j(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(j,"_ts_metadata");var je=class{static{o(this,"CreateUserDto");}identifier;identity;password};O([ValidateNested(),Type(()=>ge),j("design:type",typeof ge>"u"?Object:ge)],je.prototype,"identifier",void 0);O([ValidateNested(),Type(()=>M),j("design:type",typeof M>"u"?Object:M)],je.prototype,"identity",void 0);O([IsString(),Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),Matches(p.PASSWORD,{message:"Password must be secure."}),j("design:type",String)],je.prototype,"password",void 0);var ge=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};O([IsOptional(),IsString(),IsEmail(),j("design:type",String)],ge.prototype,"email",void 0);O([IsOptional(),IsString(),IsPhoneNumber(),j("design:type",String)],ge.prototype,"phoneNumber",void 0);O([IsString(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),j("design:type",String)],ge.prototype,"username",void 0);var M=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate;links};O([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"First name must be composed of letters only"}),j("design:type",String)],M.prototype,"firstName",void 0);O([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"Last name must be composed of letters only"}),j("design:type",String)],M.prototype,"lastName",void 0);O([IsEnum($),j("design:type",typeof $>"u"?Object:$)],M.prototype,"gender",void 0);O([IsOptional(),Matches(p.USER_AVATAR_URL_CREATE,{message:"user.avatar.url.invalid"}),j("design:type",String)],M.prototype,"avatarUrl",void 0);O([IsOptional(),Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),IsDate(),j("design:type",typeof Date>"u"?Object:Date)],M.prototype,"birthDate",void 0);O([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),j("design:type",Array)],M.prototype,"links",void 0);function ds(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(ds,"_ts_decorate");function fs(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(fs,"_ts_metadata");var jt=class{static{o(this,"GoogleOneTapDto");}credential};ds([IsNotEmpty(),IsString(),fs("design:type",String)],jt.prototype,"credential",void 0);function jn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(jn,"_ts_decorate");function wn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(wn,"_ts_metadata");var qe=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};jn([IsString(),Length(1,280),wn("design:type",String)],qe.prototype,"content",void 0);jn([IsOptional(),IsString(),wn("design:type",String)],qe.prototype,"replyToId",void 0);function ys(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(ys,"_ts_decorate");function hs(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(hs,"_ts_metadata");var wt=class{static{o(this,"UpdateUserPostCommentDto");}content};ys([IsString(),Length(1,280),hs("design:type",String)],wt.prototype,"content",void 0);function zt(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(zt,"_ts_decorate");function Pt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Pt,"_ts_metadata");var we=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};zt([IsOptional(),IsString(),Length(1,512),Pt("design:type",String)],we.prototype,"content",void 0);zt([IsArray(),ArrayMinSize(1),ArrayMaxSize(10),Matches(p.USER_POST_MEDIA_URL,{each:true}),Pt("design:type",Array)],we.prototype,"mediaUrls",void 0);zt([IsOptional(),IsEnum(K),Pt("design:type",typeof K>"u"?Object:K)],we.prototype,"visibility",void 0);function js(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(js,"_ts_decorate");function ws(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ws,"_ts_metadata");var Nt=class{static{o(this,"CreateUserPostRepostDto");}comment};js([IsOptional(),IsString(),Length(1,280),ws("design:type",String)],Nt.prototype,"comment",void 0);function Nn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Nn,"_ts_decorate");function Dn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Dn,"_ts_metadata");var Ke=class{static{o(this,"UpdateUserPostDto");}content;visibility};Nn([IsOptional(),IsString(),Length(1,512),Dn("design:type",String)],Ke.prototype,"content",void 0);Nn([IsOptional(),IsEnum(K),Dn("design:type",typeof K>"u"?Object:K)],Ke.prototype,"visibility",void 0);function Ms(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ms,"_ts_decorate");function Es(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Es,"_ts_metadata");var Dt=class{static{o(this,"RecoveryDto");}identifier};Ms([IsNotEmpty(),IsString(),Es("design:type",String)],Dt.prototype,"identifier",void 0);function Ut(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Ut,"_ts_decorate");function Lt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Lt,"_ts_metadata");var ze=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};Ut([IsString(),IsNotEmpty(),Lt("design:type",String)],ze.prototype,"tokenId",void 0);Ut([IsString(),IsNotEmpty(),Lt("design:type",String)],ze.prototype,"tokenValue",void 0);Ut([Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),Matches(p.PASSWORD,{message:"Password must be secure."}),IsNotEmpty({message:"Password is required"}),Lt("design:type",String)],ze.prototype,"password",void 0);function Mn(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(Mn,"_ts_decorate");function En(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(En,"_ts_metadata");var Te=class{static{o(this,"SignInUserDto");}identifier;password};Mn([IsNotEmpty(),IsString(),En("design:type",String)],Te.prototype,"identifier",void 0);Mn([IsNotEmpty(),IsString(),En("design:type",String)],Te.prototype,"password",void 0);function u(e,t,n,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,n,s);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(r=(i<3?a(r):i>3?a(t,n,r):a(t,n))||r);return i>3&&r&&Object.defineProperty(t,n,r),r}o(u,"_ts_decorate");function g(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(g,"_ts_metadata");var Pe=class{static{o(this,"UpdateUserDto");}identifier;identity;password};u([IsOptional(),IsObject(),ValidateNested(),Type(()=>ye),g("design:type",typeof ye>"u"?Object:ye)],Pe.prototype,"identifier",void 0);u([IsOptional(),IsObject(),ValidateNested(),Type(()=>w),g("design:type",typeof w>"u"?Object:w)],Pe.prototype,"identity",void 0);u([IsOptional(),IsString(),Matches(p.PASSWORD_MIN_LENGTH,{message:"Password must be at least 8 characters long."}),Matches(p.PASSWORD_UPPERCASE,{message:"Password must contain at least one uppercase letter."}),Matches(p.PASSWORD_LOWERCASE,{message:"Password must contain at least one lowercase letter."}),Matches(p.PASSWORD,{message:"Password must be secure."}),g("design:type",String)],Pe.prototype,"password",void 0);var ye=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};u([IsOptional(),IsString(),IsEmail(),g("design:type",String)],ye.prototype,"email",void 0);u([IsOptional(),IsString(),IsPhoneNumber(),g("design:type",String)],ye.prototype,"phoneNumber",void 0);u([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),g("design:type",String)],ye.prototype,"username",void 0);var w=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate;links};u([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"First name must be composed of letters only"}),g("design:type",String)],w.prototype,"firstName",void 0);u([IsOptional(),IsString(),Length(2,32),Matches(p.NAME,{message:"Last name must be composed of letters only"}),g("design:type",String)],w.prototype,"lastName",void 0);u([IsOptional(),IsString(),Length(1,32),g("design:type",String)],w.prototype,"displayName",void 0);u([IsOptional(),IsString(),Length(1,128),g("design:type",String)],w.prototype,"description",void 0);u([IsOptional(),Matches(p.USER_AVATAR_URL),g("design:type",Object)],w.prototype,"avatarUrl",void 0);u([IsOptional(),Matches(p.USER_BANNER_URL),g("design:type",Object)],w.prototype,"bannerUrl",void 0);u([IsOptional(),IsEnum($),g("design:type",typeof $>"u"?Object:$)],w.prototype,"gender",void 0);u([IsOptional(),Transform(({value:e})=>{if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t}),IsDate(),g("design:type",typeof Date>"u"?Object:Date)],w.prototype,"birthDate",void 0);u([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),g("design:type",Array)],w.prototype,"links",void 0);function d(e){return e}o(d,"sdk");var Cn=e=>({getAll:o(async()=>e.get("/api-keys"),"getAll"),get:o(async t=>e.get("/api-keys/:apiKeyId",{apiKeyId:t}),"get"),create:o(async t=>e.post("/api-keys",t),"create"),update:o(async(t,n)=>e.put("/api-keys/:apiKeyId",n,{apiKeyId:t}),"update"),delete:o(async t=>e.delete("/api-keys/:apiKeyId",void 0,{apiKeyId:t}),"delete")});var Hn=e=>({signIn:o(async t=>e.post("/auth/sign-in",t),"signIn"),signUp:o(async t=>e.post("/auth/sign-up",t),"signUp"),signOut:o(async()=>e.post("/auth/sign-out",void 0),"signOut"),refreshToken:o(async()=>e.post("/auth/refresh-token",void 0),"refreshToken"),recovery:o(async t=>e.post("/auth/recovery",t),"recovery"),recoveryReset:o(async t=>e.post("/auth/recovery/reset",t),"recoveryReset"),oauth2:{connect:o((t,n)=>e.url("/oauth2/:provider",{provider:t,...n}),"connect"),disconnect:o(async t=>e.delete("/oauth2/:provider",void 0,{provider:t}),"disconnect"),googleOneTap:o(async t=>e.post("/oauth2/google/one-tap",t),"googleOneTap")}});var Wn=e=>({categories:{getAll:o(async t=>e.get("/careers/categories",t),"getAll")},employmentTypes:{getAll:o(async t=>e.get("/careers/employmentTypes",t),"getAll")},jobs:{getAll:o(async t=>e.get("/careers/jobs",t),"getAll"),get:o(async t=>e.get("/careers/jobs/:jobId",{jobId:t}),"get")},offices:{getAll:o(async t=>e.get("/careers/offices",t),"getAll")}});var qn=e=>({getAll:o(async(t,n)=>e.get("/channels/~me/:channelId/messages",{channelId:t,...n}),"getAll"),getAllByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages",{organizationSlug:t,channelId:n,...s}),"getAllByOrganization"),get:o(async(t,n)=>e.get("/channels/~me/:channelId/messages/:messageId",{channelId:t,messageId:n}),"get"),getByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/messages/:messageId",{organizationSlug:t,channelId:n,messageId:s}),"getByOrganization"),create:o(async(t,n)=>e.post("/channels/~me/:channelId/messages",n,{channelId:t}),"create"),createByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages",s,{organizationSlug:t,channelId:n}),"createByOrganization"),update:o(async(t,n,s)=>e.put("/channels/~me/:channelId/messages/:messageId",s,{channelId:t,messageId:n}),"update"),updateByOrganization:o(async(t,n,s,i)=>e.put("/channels/:organizationSlug/:channelId/messages/:messageId",i,{organizationSlug:t,channelId:n,messageId:s}),"updateByOrganization"),delete:o(async(t,n)=>e.delete("/channels/~me/:channelId/messages/:messageId",void 0,{channelId:t,messageId:n}),"delete"),deleteByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId",void 0,{organizationSlug:t,channelId:n,messageId:s}),"deleteByOrganization"),addReaction:o(async(t,n,s)=>e.post("/channels/~me/:channelId/messages/:messageId/reactions",s,{channelId:t,messageId:n}),"addReaction"),addReactionByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/reactions",i,{organizationSlug:t,channelId:n,messageId:s}),"addReactionByOrganization"),removeReaction:o(async(t,n,s)=>e.delete("/channels/~me/:channelId/messages/:messageId/reactions/:emoji",void 0,{channelId:t,messageId:n,emoji:s}),"removeReaction"),removeReactionByOrganization:o(async(t,n,s,i)=>e.delete("/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji",void 0,{organizationSlug:t,channelId:n,messageId:s,emoji:i}),"removeReactionByOrganization"),markAsRead:o(async(t,n)=>e.post("/channels/~me/:channelId/messages/:messageId/read",void 0,{channelId:t,messageId:n}),"markAsRead"),markAsReadByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/read",void 0,{organizationSlug:t,channelId:n,messageId:s}),"markAsReadByOrganization"),uploadFile:o(async(t,n)=>e.post("/channels/~me/:channelId/files",n,{channelId:t}),"uploadFile"),uploadFileByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/files",s,{organizationSlug:t,channelId:n}),"uploadFileByOrganization"),report:o(async(t,n,s)=>e.post("/channels/~me/:channelId/messages/:messageId/report",s,{channelId:t,messageId:n}),"report"),reportByOrganization:o(async(t,n,s,i)=>e.post("/channels/:organizationSlug/:channelId/messages/:messageId/report",i,{organizationSlug:t,channelId:n,messageId:s}),"reportByOrganization")});var Kn=e=>({me:o(async t=>e.get("/channels/~me",t),"me"),getByOrganization:o(async(t,n)=>e.get("/channels/:organizationSlug",{organizationSlug:t,...n}),"getByOrganization"),countMe:o(async t=>e.get("/users/~me/channels/count",t),"countMe"),countByOrganization:o(async(t,n)=>e.get("/users/@:organizationSlug/channels/count",{organizationSlug:t,...n}),"countByOrganization"),get:o(async t=>e.get("/channels/~me/:channelId",{channelId:t}),"get"),getByOrganizationChannel:o(async(t,n)=>e.get("/channels/:organizationSlug/:channelId",{organizationSlug:t,channelId:n}),"getByOrganizationChannel"),create:o(async t=>e.post("/channels/~me",t),"create"),createByOrganization:o(async(t,n)=>e.post("/channels/:organizationSlug",n,{organizationSlug:t}),"createByOrganization"),update:o(async(t,n)=>e.put("/channels/~me/:channelId",n,{channelId:t}),"update"),updateByOrganization:o(async(t,n,s)=>e.put("/channels/:organizationSlug/:channelId",s,{organizationSlug:t,channelId:n}),"updateByOrganization"),delete:o(async t=>e.delete("/channels/~me/:channelId",void 0,{channelId:t}),"delete"),deleteByOrganization:o(async(t,n)=>e.delete("/channels/:organizationSlug/:channelId",void 0,{organizationSlug:t,channelId:n}),"deleteByOrganization"),addParticipant:o(async(t,n)=>e.post("/channels/~me/:channelId/participants",n,{channelId:t}),"addParticipant"),addParticipantByOrganization:o(async(t,n,s)=>e.post("/channels/:organizationSlug/:channelId/participants",s,{organizationSlug:t,channelId:n}),"addParticipantByOrganization"),removeParticipant:o(async(t,n)=>e.delete("/channels/~me/:channelId/participants/:username",void 0,{channelId:t,username:n}),"removeParticipant"),removeParticipantByOrganization:o(async(t,n,s)=>e.delete("/channels/:organizationSlug/:channelId/participants/:username",void 0,{organizationSlug:t,channelId:n,username:s}),"removeParticipantByOrganization"),getMembers:o(async(t,n)=>e.get("/channels/~me/:channelId/members",{channelId:t,...n}),"getMembers"),getMembersByOrganization:o(async(t,n,s)=>e.get("/channels/:organizationSlug/:channelId/members",{organizationSlug:t,channelId:n,...s}),"getMembersByOrganization"),messages:qn(e)});var $n=e=>({getRates:o(()=>e.get("/currencies/rates"),"getRates"),convert:o(t=>e.post("/currencies/convert",t),"convert"),convertAmount:o((t,n,s)=>e.post("/currencies/convert",{from:t,to:n,amount:s}),"convertAmount")});var Tn=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var Xn=e=>({getAll:o(async()=>e.get("/health"),"getAll"),database:o(async()=>e.get("/health/database"),"database"),api:o(async()=>e.get("/health/api"),"api"),app:o(async()=>e.get("/health/app"),"app")});var Zn=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var Yn=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Jn=o(e=>({account:o(async t=>e.get("/organizations/@:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(ce)window.location.href=e.url("/organizations/@:organizationSlug/billing/link",{organizationSlug:t});else throw new Error("Billing link is only available in the browser")},"link"),dashboard:o(t=>{if(ce)window.location.href=e.url("/organizations/@:organizationSlug/billing/dashboard",{organizationSlug:t});else throw new Error("Billing dashboard is only available in the browser")},"dashboard")}),"organizationsBilling");var Qn=e=>({getAll:o(async t=>e.get("/organizations/@:organizationSlug/customers",{organizationSlug:t}),"getAll"),get:o(async(t,n)=>e.get("/organizations/@:organizationSlug/customers/:username",{organizationSlug:t,username:n}),"get")});var eo=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var to=o(e=>({getAll:o(async()=>e.get("/organizations/events/styles"),"getAll"),get:o(async t=>e.get("/organizations/events/styles/:styleSlug",{styleSlug:t}),"get"),create:o(async t=>e.post("/organizations/events/styles",t),"create"),update:o(async(t,n)=>e.put("/organizations/events/styles/:styleSlug",n,{styleSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/events/styles/:styleSlug",void 0,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var no=o(e=>({getAll:o(async(t,n)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:n}),"getAll"),get:o(async(t,n,s)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:n,ticketId:s}),"get"),create:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/tickets",s,{organizationSlug:t,eventSlug:n}),"create"),update:o(async(t,n,s,i)=>e.put("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",i,{organizationSlug:t,eventSlug:n,ticketId:s}),"update"),delete:o(async(t,n,s)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:n,ticketId:s}),"delete")}),"organizationsEventsTickets");var oo=o(e=>({record:o(async(t,n)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var ro=o(e=>({search:o(async(t,n)=>e.get("/organizations/events/search",{q:t,...n}),"search"),getCalendar:o(async(t,n)=>e.get("/organizations/events/calendar/:year/:month",{year:t.toString(),month:n.toString()}),"getCalendar"),getAll:o(async(t,n)=>t?e.get("/organizations/@:organizationSlug/events",{organizationSlug:t,...n}):e.get("/organizations/events",n),"getAll"),getSuggestions:o(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:o(async t=>e.get("/organizations/events/nearby",t),"getNearby"),get:o(async(t,n)=>e.get("/organizations/@:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:n}),"get"),create:o(async(t,n)=>e.post("/organizations/@:organizationSlug/events",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/@:organizationSlug/events/:eventSlug",s,{organizationSlug:t,eventSlug:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/@:organizationSlug/events/:eventSlug",void 0,{organizationSlug:t,eventSlug:n}),"delete"),uploadFile:o(async(t,n)=>e.post("/events/files/:eventFileType",T("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType",T("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:eo(e),styles:to(e),tickets:no(e),views:oo(e)}),"organizationsEvents");var so=o(e=>({getLinks:o(async t=>e.get("/organizations/@:organizationSlug/members/invitations/links",{organizationSlug:t}),"getLinks"),createLink:o(async(t,n={})=>e.post("/organizations/@:organizationSlug/members/invitations/links",n,{organizationSlug:t}),"createLink"),accept:o(async(t,n)=>e.post("/organizations/@:organizationSlug/members/invitations/accept",n,{organizationSlug:t}),"accept")}),"invitations");var io=o(e=>({me:o(async()=>e.get("/organizations/members/~me"),"me"),get:o(async t=>e.get("/organizations/@:organizationSlug/members",{organizationSlug:t}),"get"),create:o(async(t,n)=>e.post("/organizations/@:organizationSlug/members",n,{organizationSlug:t}),"create"),update:o(async(t,n,s)=>e.put("/organizations/@:organizationSlug/members/:username",s,{organizationSlug:t,username:n}),"update"),delete:o(async(t,n)=>e.delete("/organizations/@:organizationSlug/members/:username",void 0,{organizationSlug:t,username:n}),"delete"),invitations:so(e),accept:o(async t=>e.put("/organizations/@:organizationSlug/members/~me/accept",void 0,{organizationSlug:t}),"accept"),reject:o(async t=>e.delete("/organizations/@:organizationSlug/members/~me/reject",void 0,{organizationSlug:t}),"reject"),leave:o(async t=>e.delete("/organizations/@:organizationSlug/members/~me",void 0,{organizationSlug:t}),"leave")}),"organizationsMembers");var ao=e=>({getAll:o(async t=>e.get("/organizations/@:organizationSlug/orders",{organizationSlug:t}),"getAll"),get:o(async(t,n)=>e.get("/organizations/@:organizationSlug/orders/:orderId",{organizationSlug:t,orderId:n}),"get"),getAllByEvent:o(async(t,n)=>e.get("/organizations/@:organizationSlug/events/:eventSlug/orders",{organizationSlug:t,eventSlug:n}),"getAllByEvent")});var co=e=>({search:o(async(t,n)=>e.get("/organizations/search",{q:t,limit:n}),"search"),getAll:o(async()=>e.get("/organizations"),"getAll"),get:o(async t=>e.get("/organizations/@:organizationSlug",{organizationSlug:t}),"get"),create:o(async t=>e.post("/organizations",t),"create"),update:o(async(t,n)=>e.put("/organizations/@:organizationSlug",n,{organizationSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/@:organizationSlug",void 0,{organizationSlug:t}),"delete"),uploadFile:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/files/:organizationFileType",T("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:Jn(e),events:ro(e),members:io(e),customers:Qn(e),orders:ao(e)});var po=e=>({follow:o(async t=>e.post("/profiles/@:username/relationships/follow",void 0,{username:t}),"follow"),unfollow:o(async t=>e.post("/profiles/@:username/relationships/unfollow",void 0,{username:t}),"unfollow"),getSuggestions:o(async t=>e.get("/profiles/~me/relationships/suggestions",t),"getSuggestions"),getFollowers:o(async(t,n)=>e.get("/profiles/@:username/relationships/followers",{username:t,...n}),"getFollowers")});var fo=e=>({getAll:o(async t=>e.get("/profiles",t),"getAll"),search:o(async(t,n)=>e.get("/profiles/search",{q:t,...n}),"search"),get:o(async t=>e.get("/profiles/@:username",{username:t}),"get"),relationships:po(e)});var lo=e=>({reactions:{get:o(async t=>e.get("/roadmap/reactions/:featureId",{featureId:t}),"get"),add:o(async(t,n)=>e.post("/roadmap/reactions/:featureId",{featureId:t,reaction:n}),"add")}});var mo=e=>({get:o(async t=>e.get("/users/bookings/tickets/:ticketId",{ticketId:t}),"get"),use:o(async(t,n,s)=>e.put("/users/bookings/tickets/:ticketId/use",{tokenId:n,tokenValue:s},{ticketId:t}),"use")});var uo=e=>({getAll:o(async()=>e.get("/users/bookings"),"getAll"),get:o(async t=>e.get("/users/bookings/:bookingId",{bookingId:t}),"get"),me:o(async()=>e.get("/users/~me/bookings"),"me"),tickets:mo(e)});var go=e=>({me:o(async()=>e.get("/users/~me/notifications"),"me"),count:o(async t=>e.get("/users/~me/notifications/count",t),"count"),read:o(async()=>e.put("/users/~me/notifications/read",void 0),"read")});var yo=o(e=>({record:o(async(t,n)=>e.post("/users/@:username/posts/:postId/views",void 0,{username:t,postId:n}),"record")}),"usersPostsViews");var ho=e=>({getByUsername:o(async(t,n)=>e.get("/users/@:username/posts",{username:t,...n}),"getByUsername"),getByUsernameAndId:o(async(t,n)=>e.get("/users/@:username/posts/:postId",{username:t,postId:n}),"getByUsernameAndId"),create:o(async t=>e.post("/users/~me/posts",t),"create"),update:o(async(t,n)=>e.put("/users/~me/posts/:postId",n,{postId:t}),"update"),delete:o(async t=>e.delete("/users/~me/posts/:postId",void 0,{postId:t}),"delete"),uploadMedia:o(async t=>e.post("/users/~me/posts/media",t),"uploadMedia"),views:yo(e)});var vo=e=>({getByPost:o(async(t,n,s)=>e.get("/users/@:username/posts/:postId/comments",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/~me/posts/:postId/comments",n,{postId:t}),"create"),update:o(async(t,n,s)=>e.put("/users/~me/posts/:postId/comments/:commentId",s,{postId:t,commentId:n}),"update"),delete:o(async(t,n)=>e.delete("/users/~me/posts/:postId/comments/:commentId",void 0,{postId:t,commentId:n}),"delete")});var bo=e=>({getByUsername:o(async(t,n)=>e.get("/users/@:username/reposts",{username:t,...n}),"getByUsername"),getByPost:o(async(t,n,s)=>e.get("/users/@:username/posts/:postId/reposts",{username:t,postId:n,...s}),"getByPost"),create:o(async(t,n)=>e.post("/users/~me/posts/:postId/reposts",n||{},{postId:t}),"create"),delete:o(async t=>e.delete("/users/~me/posts/:postId/reposts",void 0,{postId:t}),"delete")});var Ro=e=>({getAll:o(async()=>e.get("/users"),"getAll"),get:o(async t=>e.get("/users/@:userId",{userId:t}),"get"),me:o(async()=>e.get("/users/~me"),"me"),check:o(async(t,n)=>e.get("/users/check/:identifier",{identifier:t,suggestions:n}),"check"),update:o(async(t,n)=>e.put("/users/@:userId",n,{userId:t}),"update"),uploadFile:o(async(t,n,s)=>e.post("/users/@:userId/files/:userFileType",T("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",T("file",n),{userFileType:t}),"uploadTempFile"),bookings:uo(e),notifications:go(e),posts:ho(e),postsComments:vo(e),postsReposts:bo(e)});var xo=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;profiles;roadmap;users;notifications;constructor(t){this.client=new Ue(t),this.apiKeys=Cn(this.client),this.auth=Hn(this.client),this.careers=Wn(this.client),this.channels=Kn(this.client),this.currencies=$n(this.client),this.feed=Tn(this.client),this.health=Xn(this.client),this.orders=Yn(this.client),this.organizations=co(this.client),this.profiles=fo(this.client),this.roadmap=lo(this.client),this.users=Ro(this.client),this.notifications=Zn(this.client);}};var Xe=class{static{o(this,"WebSocketClient");}ws;options;reconnectAttempts=0;reconnectTimer;eventHandlers=new Map;isConnected=false;isReconnecting=false;constructor(t={}){this.options={baseURL:"wss://api.tonightpass.com",maxReconnectAttempts:3,reconnectInterval:1e3,debug:false,...t};}log(t,...n){this.options.debug&&console.log(`[WebSocketClient] ${t}`,...n);}getWebSocketURL(t,n){let s={};Object.entries(n).forEach(([r,a])=>{typeof a=="string"&&r!=="token"&&(s[r]=a);});let i=pathcat(t,s);return `${this.options.baseURL}${i}`}async connect(t,n){return new Promise((s,i)=>{try{let r=this.getWebSocketURL(t,n);this.log("Connecting to",r);let a=[];"token"in n&&typeof n.token=="string"&&a.push(`access_token.${n.token}`),this.ws=a.length>0?new WebSocket(r,a):new WebSocket(r),this.ws.onopen=()=>{this.log("Connected successfully"),this.isConnected=!0,this.isReconnecting=!1,this.reconnectAttempts=0,s();},this.ws.onmessage=c=>{try{let q=JSON.parse(c.data);this.handleEvent(q);}catch(q){this.log("Error parsing message:",q);}},this.ws.onclose=c=>{this.log("Connection closed",c.code),this.isConnected=!1,this.options.maxReconnectAttempts&&!this.isReconnecting&&this.handleReconnect(t,n);},this.ws.onerror=c=>{this.log("WebSocket error:",c),this.isConnected=!1,i(c);};}catch(r){i(r);}})}handleReconnect(t,n){if(this.reconnectAttempts>=this.options.maxReconnectAttempts){this.log("Max reconnect attempts reached");return}this.isReconnecting=true,this.reconnectAttempts++,this.log(`Attempting to reconnect (${this.reconnectAttempts}/${this.options.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.connect(t,n).catch(s=>{this.log("Reconnection failed:",s);});},this.options.reconnectInterval);}handleEvent(t){this.log("Received event:",t.type);let n=this.eventHandlers.get(t.type);n&&n.forEach(i=>i(t));let s=this.eventHandlers.get("*");s&&s.forEach(i=>i(t));}on(t,n){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set);let s=o(i=>{n(i);},"wrappedHandler");return this.eventHandlers.get(t)?.add(s),()=>{let i=this.eventHandlers.get(t);i&&(i.delete(s),i.size===0&&this.eventHandlers.delete(t));}}off(t,n){let s=this.eventHandlers.get(t);s&&(s.clear(),this.eventHandlers.delete(t));}send(t){this.ws&&this.isConnected?this.ws.send(JSON.stringify(t)):this.log("Cannot send data: WebSocket not connected");}disconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws&&(this.isConnected=false,this.isReconnecting=false,this.ws.close()),this.eventHandlers.clear();}get connected(){return this.isConnected}get reconnecting(){return this.isReconnecting}};var Ze=class extends Xe{static{o(this,"ChannelWebSocketClient");}async connectToChannel(t,n={}){return this.connect("/channels/~me/:channelId/ws",{...n,channelId:t})}async connectToOrganizationChannel(t,n,s={}){return this.connect("/channels/:organizationSlug/:channelId/ws",{...s,organizationSlug:t,channelId:n})}async connectToUserChannels(t={}){return this.connect("/channels/~me/ws",t)}async connectToOrganizationChannels(t,n={}){return this.connect("/channels/:organizationSlug/ws",{...n,organizationSlug:t})}onMessageCreate(t){return this.on("channel_message_create",t)}onMessageUpdate(t){return this.on("channel_message_update",t)}onMessageDelete(t){return this.on("channel_message_delete",t)}onChannelUpdate(t){return this.on("channel_update",t)}onChannelDelete(t){return this.on("channel_delete",t)}onMemberJoin(t){return this.on("channel_member_join",t)}onMemberLeave(t){return this.on("channel_member_leave",t)}onTypingStart(t){return this.on("typing_start",t)}onTypingStop(t){return this.on("typing_stop",t)}startTyping(t){this.send({type:"typing_start",data:{channelId:t}});}stopTyping(t){this.send({type:"typing_stop",data:{channelId:t}});}subscribeToChannel(t){this.send({type:"subscribe",data:{channelId:t}});}unsubscribeFromChannel(t){this.send({type:"unsubscribe",data:{channelId:t}});}};function bu(e){let t=new Ze(e);return {connect:o((n,s)=>t.connectToChannel(n,{token:s}),"connect"),connectToOrganization:o((n,s,i)=>t.connectToOrganizationChannel(n,s,{token:i}),"connectToOrganization"),connectToUserChannels:o(n=>t.connectToUserChannels({token:n}),"connectToUserChannels"),connectToOrganizationChannels:o((n,s)=>t.connectToOrganizationChannels(n,{token:s}),"connectToOrganizationChannels"),onMessageCreate:o(n=>t.onMessageCreate(n),"onMessageCreate"),onMessageUpdate:o(n=>t.onMessageUpdate(n),"onMessageUpdate"),onMessageDelete:o(n=>t.onMessageDelete(n),"onMessageDelete"),onChannelUpdate:o(n=>t.onChannelUpdate(n),"onChannelUpdate"),onChannelDelete:o(n=>t.onChannelDelete(n),"onChannelDelete"),onMemberJoin:o(n=>t.onMemberJoin(n),"onMemberJoin"),onMemberLeave:o(n=>t.onMemberLeave(n),"onMemberLeave"),onTypingStart:o(n=>t.onTypingStart(n),"onTypingStart"),onTypingStop:o(n=>t.onTypingStop(n),"onTypingStop"),onAny:o(n=>t.on("*",n),"onAny"),startTyping:o(n=>t.startTyping(n),"startTyping"),stopTyping:o(n=>t.stopTyping(n),"stopTyping"),subscribeToChannel:o(n=>t.subscribeToChannel(n),"subscribeToChannel"),unsubscribeFromChannel:o(n=>t.unsubscribeFromChannel(n),"unsubscribeFromChannel"),disconnect:o(()=>t.disconnect(),"disconnect"),get connected(){return t.connected},get reconnecting(){return t.reconnecting},client:t}}o(bu,"channelsWS");
2
+ export{Rt as AcceptOrganizationMemberInvitationDto,Qe as AddParticipantDto,ot as AddReactionDto,Yi as ApiKeyTier,jr as AtLeastOneMedia,Ae as AtLeastOneMediaConstraint,Er as AtLeastOneMediaOnUpdate,Oe as AtLeastOneMediaOnUpdateConstraint,ea as AuthFlow,h as BaseOrganizationEventDto,he as CacheManager,oa as ChannelMemberRole,Le as ChannelMessageReportReason,ra as ChannelStatus,re as ChannelType,Ze as ChannelWebSocketClient,Ue as Client,be as ContentOrAttachmentsConstraint,ve as CreateChannelDto,Re as CreateChannelMessageDto,x as CreateLocationDto,me as CreateOrganizationDto,ut as CreateOrganizationEventDto,ht as CreateOrganizationEventOrderDto,Ge as CreateOrganizationEventStyleDto,l as CreateOrganizationEventTicketDto,B as CreateOrganizationIdentityDto,We as CreateOrganizationMemberDto,xt as CreateOrganizationMemberInvitationLinkDto,je as CreateUserDto,M as CreateUserIdentityDto,qe as CreateUserPostCommentDto,we as CreateUserPostDto,Nt as CreateUserPostRepostDto,X as Currency,Bt as DEFAULT_API_URL,ca as ErrorType,da as FeedType,z as GeoPointDto,jt as GoogleOneTapDto,Ea as Language,Qi as OAuth2Provider,ga as OrganizationEventFileType,ya as OrganizationEventStatus,la as OrganizationEventStyleType,Y as OrganizationEventTicketCategory,Z as OrganizationEventTicketType,J as OrganizationEventType,Q as OrganizationEventVisibilityType,Ia as OrganizationFileType,f as OrganizationMemberRole,Ye as OrganizationMemberRolePower,Js as OrganizationMemberStatus,xa as OrganizationTokenType,Na as ProfileType,p as REGEX,Ua as ROADMAP_REACTIONS,Dt as RecoveryDto,ze as RecoveryResetDto,Ee as ReportChannelMessageDto,La as RoadmapFeatureStatus,Te as SignInUserDto,xo as TonightPass,Je as TonightPassAPIError,at as UpdateChannelDto,it as UpdateChannelMessageDto,S as UpdateLocationDto,ue as UpdateOrganizationDto,v as UpdateOrganizationEventDto,mn as UpdateOrganizationEventStyleDto,m as UpdateOrganizationEventTicketDto,k as UpdateOrganizationIdentityDto,St as UpdateOrganizationMemberDto,Pe as UpdateUserDto,wt as UpdateUserPostCommentDto,Ke as UpdateUserPostDto,li as UserFileType,$ as UserIdentityGender,ti as UserNotificationType,oi as UserPostMediaType,K as UserPostVisibility,De as UserRole,xi as UserRolePower,di as UserTokenType,Xe as WebSocketClient,Cn as apiKeys,Hn as auth,T as buildFileFormData,Wn as careers,Kn as channels,bu as channelsWS,$n as currencies,Tn as feed,Xn as health,ce as isBrowser,Pi as isMemberRoleAtLeast,Zn as notifications,Yn as orders,co as organizations,fo as profiles,Ft as request,lo as roadmap,d as sdk,Ro as users};//# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map