tonightpass 0.0.239 → 0.0.241
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.d.mts +77 -7
- package/dist/index.d.ts +77 -7
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {pathcat}from'pathcat';import Oo 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 {Transform,Type}from'class-transformer';var Ao=Object.defineProperty;var o=(e,t)=>Ao(e,"name",{value:t,configurable:true});var Vt="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 oi=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 ii=function(e){return e.Follow="follow",e}({});var ci=function(e){return e.Image="image",e.Video="video",e}({});var $=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var gi=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 Le=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),T=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),hi=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var et={[f.Owner]:3,[f.Admin]:2,[f.Manager]:1,[f.Member]:0},Oi={[Le.Admin]:2,[Le.Developer]:1,[Le.User]:0};var be=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 pe=typeof window<"u";function X(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(X,"buildFileFormData");function Mi(e,t){return et[e]>=et[t]}o(Mi,"isMemberRoleAtLeast");var wo=Oo.create({headers:{Accept:"application/json",...!pe&&{"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:pe}),kt=o(async(e,t)=>{let{apiKey:n,accessToken:s,...i}=t||{},r={...i.headers,...n&&{"X-API-Key":n},...s&&{Authorization:`Bearer ${s}`}};return wo(e,{...i,headers:r}).then(c=>c).catch(c=>{throw c.data||console.error(c),c.data})},"request");var tt=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;}},Me=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||Vt;return pathcat(i,n,s)},t.cache?.enabled&&(this.cacheManager=new be(t.cache));}setOptions(t){this.options=t,this.apiKey=t.apiKey,this.accessToken=t.accessToken,t.cache?.enabled?this.cacheManager=new be(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 ve=this.cacheManager.get(t,a);if(ve!==null)return ve}let c=await kt(a,{method:t,data:s,apiKey:this.apiKey,accessToken:this.accessToken,...r}),E=c.data;if(!E.success)throw new tt(c,E);return this.cacheManager&&this.cacheManager.set(t,a,E.data),E.data}};function zo(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(zo,"_ts_decorate");function Po(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Po,"_ts_metadata");var nt=class{static{o(this,"AddParticipantDto");}username};zo([IsString(),Matches(p.USERNAME,{message:"user.username.format"}),Po("design:type",String)],nt.prototype,"username",void 0);var na=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var ra=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e}({}),sa=function(e){return e.SignUp="signup",e.SignIn="signin",e}({});var Ee=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 se=function(e){return e.Private="private",e.Group="group",e}({}),ca=function(e){return e.Member="member",e.Admin="admin",e}({}),pa=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var Z=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 ma=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 ga=function(e){return e.Following="following",e.Discover="discover",e}({});var ha=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Y=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),J=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 Q=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}({}),ee=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),Ra=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),xa=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var Oa=function(e){return e.InvitationLink="invitation_link",e}({});var ja=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Ea=function(e){return e.User="user",e.Organization="organization",e}({});var Fa=["\u{1F44D}","\u2764\uFE0F","\u{1F389}","\u{1F440}","\u{1F680}"],Ca=function(e){return e.ComingSoon="coming-soon",e.Shipped="shipped",e}({});var ka=function(e){return e.FR="fr",e.EN="en",e}({});function rt(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(rt,"_ts_decorate");function st(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(st,"_ts_metadata");var Re=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};rt([IsEnum(se),st("design:type",typeof se>"u"?Object:se)],Re.prototype,"type",void 0);rt([IsArray(),ArrayMinSize(1),ValidateIf(e=>e.type===se.Private),ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),ValidateIf(e=>e.type===se.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"}),st("design:type",Array)],Re.prototype,"participantUsernames",void 0);rt([IsOptional(),ValidateIf(e=>e.type===se.Group),IsString(),Length(1,100),st("design:type",String)],Re.prototype,"name",void 0);function Fo(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(Fo,"_ts_decorate");function Co(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Co,"_ts_metadata");var it=class{static{o(this,"AddReactionDto");}emoji};Fo([IsString(),Length(1,10),Co("design:type",String)],it.prototype,"emoji",void 0);function Be(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(Be,"_ts_decorate");function at(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(at,"_ts_metadata");var xe=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"}};xe=Be([ValidatorConstraint({name:"contentOrAttachments",async:false})],xe);var Se=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Be([IsOptional(),IsString(),ValidateIf(e=>e.content!==void 0),Length(1,1024),at("design:type",String)],Se.prototype,"content",void 0);Be([IsOptional(),IsArray(),ArrayMaxSize(10),Matches(p.CHANNEL_MESSAGE_ATTACHMENT,{each:true}),Validate(xe),at("design:type",Array)],Se.prototype,"attachments",void 0);Be([IsOptional(),IsMongoId(),at("design:type",String)],Se.prototype,"replyToId",void 0);function qt(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(qt,"_ts_decorate");function Kt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Kt,"_ts_metadata");var Fe=class{static{o(this,"ReportChannelMessageDto");}reason;description};qt([IsEnum(Ee),Kt("design:type",typeof Ee>"u"?Object:Ee)],Fe.prototype,"reason",void 0);qt([IsOptional(),IsString(),ValidateIf(e=>e.description&&e.description.trim().length>0),Length(1,500),Kt("design:type",String)],Fe.prototype,"description",void 0);function nr(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(nr,"_ts_decorate");function or(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(or,"_ts_metadata");var pt=class{static{o(this,"UpdateChannelMessageDto");}content};nr([IsOptional(),IsString(),Length(1,1024),or("design:type",String)],pt.prototype,"content",void 0);function ar(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(ar,"_ts_decorate");function cr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(cr,"_ts_metadata");var dt=class{static{o(this,"UpdateChannelDto");}name};ar([IsOptional(),IsString(),Length(1,100),cr("design:type",String)],dt.prototype,"name",void 0);var Ce=o((e,t)=>{if(!e)return e;let n=e.split(",").map(K=>K.trim()),s=t.zipCode?.toLowerCase(),i=t.city?.toLowerCase(),r=t.country?.toLowerCase(),a=[s,i,r].filter(K=>!!K),c=s&&i?`${s} ${i}`:void 0,E=o(K=>{let Ct=K.toLowerCase();return !!(a.includes(Ct)||c&&Ct===c)},"isNoise"),ve=[];for(let K of n)E(K)||ve.push(K);return ve.join(", ").trim()||e},"normalizeAddress");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 te(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(te,"_ts_metadata");var ft=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"}};ft=B([ValidatorConstraint({name:"coordinatesRange",async:false})],ft);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};B([IsString(),IsNotEmpty(),te("design:type",String)],z.prototype,"type",void 0);B([IsArray(),IsNotEmpty(),Validate(ft),te("design:type",Array)],z.prototype,"coordinates",void 0);var x=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};B([IsOptional(),IsString(),Length(1,128),te("design:type",String)],x.prototype,"name",void 0);B([Transform(({value:e,obj:t})=>Ce(e,{zipCode:t.zipCode,city:t.city,country:t.country})),IsString(),IsNotEmpty(),Length(1,256),te("design:type",String)],x.prototype,"address",void 0);B([IsString(),IsNotEmpty(),Length(1,32),te("design:type",String)],x.prototype,"zipCode",void 0);B([IsString(),IsNotEmpty(),Length(1,128),te("design:type",String)],x.prototype,"city",void 0);B([IsString(),IsNotEmpty(),Length(1,128),te("design:type",String)],x.prototype,"country",void 0);B([ValidateNested(),Type(()=>z),IsNotEmpty(),te("design:type",typeof z>"u"?Object:z)],x.prototype,"geometry",void 0);function fe(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(fe,"_ts_decorate");function le(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(le,"_ts_metadata");var S=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};fe([IsOptional(),IsString(),Length(1,128),le("design:type",String)],S.prototype,"name",void 0);fe([IsOptional(),Transform(({value:e,obj:t})=>Ce(e,{zipCode:t.zipCode,city:t.city,country:t.country})),IsString(),Length(1,256),le("design:type",String)],S.prototype,"address",void 0);fe([IsOptional(),IsString(),Length(1,32),le("design:type",String)],S.prototype,"zipCode",void 0);fe([IsOptional(),IsString(),Length(1,128),le("design:type",String)],S.prototype,"city",void 0);fe([IsOptional(),IsString(),Length(1,128),le("design:type",String)],S.prototype,"country",void 0);fe([IsOptional(),ValidateNested(),Type(()=>z),le("design:type",typeof z>"u"?Object:z)],S.prototype,"geometry",void 0);function C(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(C,"_ts_decorate");function V(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(V,"_ts_metadata");var ue=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};C([IsOptional(),IsString(),IsLowercase(),Length(1,48),V("design:type",String)],ue.prototype,"organizationSlug",void 0);C([IsObject(),V("design:type",typeof F>"u"?Object:F)],ue.prototype,"identity",void 0);C([IsArray(),V("design:type",Array)],ue.prototype,"members",void 0);C([IsOptional(),IsObject(),V("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var F=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};C([IsString(),IsNotEmpty(),Length(1,32),V("design:type",String)],F.prototype,"displayName",void 0);C([IsString(),Length(16,1024),IsOptional(),V("design:type",String)],F.prototype,"description",void 0);C([Matches(p.ORGANIZATION_AVATAR_URL,{message:"organization.avatar.url.invalid"}),V("design:type",String)],F.prototype,"avatarUrl",void 0);C([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL,{message:"organization.banner.url.invalid"}),V("design:type",String)],F.prototype,"bannerUrl",void 0);C([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),V("design:type",Array)],F.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(Y),N("design:type",typeof Y>"u"?Object:Y)],l.prototype,"type",void 0);P([IsEnum(J),N("design:type",typeof J>"u"?Object:J)],l.prototype,"category",void 0);P([IsEnum(Z),N("design:type",typeof Z>"u"?Object:Z)],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(Y),IsOptional(),U("design:type",typeof Y>"u"?Object:Y)],m.prototype,"type",void 0);D([IsEnum(J),IsOptional(),U("design:type",typeof J>"u"?Object:J)],m.prototype,"category",void 0);D([IsEnum(Z),IsOptional(),U("design:type",typeof Z>"u"?Object:Z)],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 we=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"}};we=b([ValidatorConstraint({name:"atLeastOneMedia",async:false})],we);function Dr(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:we});}}o(Dr,"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(Q),IsNotEmpty(),I("design:type",typeof Q>"u"?Object:Q)],h.prototype,"type",void 0);b([IsEnum(ee),IsNotEmpty(),I("design:type",typeof ee>"u"?Object:ee)],h.prototype,"visibility",void 0);b([IsArray(),ArrayMaxSize(25),Matches(p.EVENT_FLYER_URL,{each:true,message:"organization.event.flyers.url.invalid"}),Dr(),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 ht=class extends h{static{o(this,"CreateOrganizationEventDto");}tickets};b([IsArray(),ValidateNested({each:true}),Type(()=>l),IsNotEmpty(),I("design:type",Array)],ht.prototype,"tickets",void 0);function Ur(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(Ur,"_ts_decorate");function Lr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Lr,"_ts_metadata");var Rt=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};Ur([IsArray(),IsString({each:true}),Lr("design:type",Array)],Rt.prototype,"cart",void 0);var We=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var yn=class extends We{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 je=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"}};je=R([ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],je);function kr(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:je});}}o(kr,"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(Q),_("design:type",typeof Q>"u"?Object:Q)],v.prototype,"type",void 0);R([IsOptional(),IsEnum(ee),_("design:type",typeof ee>"u"?Object:ee)],v.prototype,"visibility",void 0);R([IsOptional(),IsArray(),Matches(p.EVENT_FLYER_URL_UPDATE,{each:true,message:"organization.event.flyers.url.invalid"}),kr(),_("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 Gr(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(Gr,"_ts_decorate");function Hr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Hr,"_ts_metadata");var It=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Gr([IsString(),IsNotEmpty(),Hr("design:type",String)],It.prototype,"token",void 0);function In(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(In,"_ts_decorate");function _n(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(_n,"_ts_metadata");var $e=class{static{o(this,"CreateOrganizationMemberDto");}user;role};In([IsString(),IsNotEmpty(),_n("design:type",String)],$e.prototype,"user",void 0);In([IsEnum(f),IsNotEmpty(),_n("design:type",typeof f>"u"?Object:f)],$e.prototype,"role",void 0);function Tr(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(Tr,"_ts_decorate");function Xr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Xr,"_ts_metadata");var _t=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};Tr([IsEnum(f),IsOptional(),Xr("design:type",typeof f>"u"?Object:f)],_t.prototype,"role",void 0);function Jr(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(Jr,"_ts_decorate");function Qr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Qr,"_ts_metadata");var At=class{static{o(this,"UpdateOrganizationMemberDto");}role};Jr([IsEnum(f),IsNotEmpty(),Qr("design:type",typeof f>"u"?Object:f)],At.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 H(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(H,"_ts_metadata");var ge=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};G([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"organization.slug.format"}),H("design:type",String)],ge.prototype,"slug",void 0);G([IsObject(),IsOptional(),H("design:type",typeof k>"u"?Object:k)],ge.prototype,"identity",void 0);G([IsOptional(),IsArray(),H("design:type",Array)],ge.prototype,"members",void 0);G([IsOptional(),IsObject(),H("design:type",typeof Location>"u"?Object:Location)],ge.prototype,"location",void 0);var k=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};G([IsString(),IsNotEmpty(),Length(1,32),IsOptional(),H("design:type",String)],k.prototype,"displayName",void 0);G([IsString(),Length(16,1024),IsOptional(),H("design:type",String)],k.prototype,"description",void 0);G([IsOptional(),Matches(p.ORGANIZATION_AVATAR_URL),H("design:type",String)],k.prototype,"avatarUrl",void 0);G([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL),H("design:type",String)],k.prototype,"bannerUrl",void 0);G([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),H("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 w(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(w,"_ts_metadata");var ze=class{static{o(this,"CreateUserDto");}identifier;identity;password};O([ValidateNested(),Type(()=>ye),w("design:type",typeof ye>"u"?Object:ye)],ze.prototype,"identifier",void 0);O([ValidateNested(),Type(()=>M),w("design:type",typeof M>"u"?Object:M)],ze.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."}),w("design:type",String)],ze.prototype,"password",void 0);var ye=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};O([IsOptional(),IsString(),IsEmail(),w("design:type",String)],ye.prototype,"email",void 0);O([IsOptional(),IsString(),IsPhoneNumber(),w("design:type",String)],ye.prototype,"phoneNumber",void 0);O([IsString(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),w("design:type",String)],ye.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"}),w("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"}),w("design:type",String)],M.prototype,"lastName",void 0);O([IsEnum(T),w("design:type",typeof T>"u"?Object:T)],M.prototype,"gender",void 0);O([IsOptional(),Matches(p.USER_AVATAR_URL_CREATE,{message:"user.avatar.url.invalid"}),w("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(),w("design:type",typeof Date>"u"?Object:Date)],M.prototype,"birthDate",void 0);O([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),w("design:type",Array)],M.prototype,"links",void 0);function gs(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(gs,"_ts_decorate");function ys(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ys,"_ts_metadata");var Pt=class{static{o(this,"GoogleOneTapDto");}credential};gs([IsNotEmpty(),IsString(),ys("design:type",String)],Pt.prototype,"credential",void 0);function Pn(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(Pn,"_ts_decorate");function Nn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Nn,"_ts_metadata");var Te=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};Pn([IsString(),Length(1,280),Nn("design:type",String)],Te.prototype,"content",void 0);Pn([IsOptional(),IsString(),Nn("design:type",String)],Te.prototype,"replyToId",void 0);function xs(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(xs,"_ts_decorate");function Ss(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ss,"_ts_metadata");var Nt=class{static{o(this,"UpdateUserPostCommentDto");}content};xs([IsString(),Length(1,280),Ss("design:type",String)],Nt.prototype,"content",void 0);function Dt(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(Dt,"_ts_decorate");function Ut(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ut,"_ts_metadata");var Pe=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};Dt([IsOptional(),IsString(),Length(1,512),Ut("design:type",String)],Pe.prototype,"content",void 0);Dt([IsArray(),ArrayMinSize(1),ArrayMaxSize(10),Matches(p.USER_POST_MEDIA_URL,{each:true}),Ut("design:type",Array)],Pe.prototype,"mediaUrls",void 0);Dt([IsOptional(),IsEnum($),Ut("design:type",typeof $>"u"?Object:$)],Pe.prototype,"visibility",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 Us(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Us,"_ts_metadata");var Lt=class{static{o(this,"CreateUserPostRepostDto");}comment};Ds([IsOptional(),IsString(),Length(1,280),Us("design:type",String)],Lt.prototype,"comment",void 0);function Ln(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(Ln,"_ts_decorate");function Mn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Mn,"_ts_metadata");var Xe=class{static{o(this,"UpdateUserPostDto");}content;visibility};Ln([IsOptional(),IsString(),Length(1,512),Mn("design:type",String)],Xe.prototype,"content",void 0);Ln([IsOptional(),IsEnum($),Mn("design:type",typeof $>"u"?Object:$)],Xe.prototype,"visibility",void 0);function Vs(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(Vs,"_ts_decorate");function ks(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ks,"_ts_metadata");var Mt=class{static{o(this,"RecoveryDto");}identifier};Vs([IsNotEmpty(),IsString(),ks("design:type",String)],Mt.prototype,"identifier",void 0);function Et(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(Et,"_ts_decorate");function Bt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Bt,"_ts_metadata");var Ne=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};Et([IsString(),IsNotEmpty(),Bt("design:type",String)],Ne.prototype,"tokenId",void 0);Et([IsString(),IsNotEmpty(),Bt("design:type",String)],Ne.prototype,"tokenValue",void 0);Et([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"}),Bt("design:type",String)],Ne.prototype,"password",void 0);function Fn(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(Fn,"_ts_decorate");function Cn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Cn,"_ts_metadata");var Ye=class{static{o(this,"SignInUserDto");}identifier;password};Fn([IsNotEmpty(),IsString(),Cn("design:type",String)],Ye.prototype,"identifier",void 0);Fn([IsNotEmpty(),IsString(),Cn("design:type",String)],Ye.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 De=class{static{o(this,"UpdateUserDto");}identifier;identity;password};u([IsOptional(),IsObject(),ValidateNested(),Type(()=>he),g("design:type",typeof he>"u"?Object:he)],De.prototype,"identifier",void 0);u([IsOptional(),IsObject(),ValidateNested(),Type(()=>j),g("design:type",typeof j>"u"?Object:j)],De.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)],De.prototype,"password",void 0);var he=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};u([IsOptional(),IsString(),IsEmail(),g("design:type",String)],he.prototype,"email",void 0);u([IsOptional(),IsString(),IsPhoneNumber(),g("design:type",String)],he.prototype,"phoneNumber",void 0);u([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),g("design:type",String)],he.prototype,"username",void 0);var j=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)],j.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)],j.prototype,"lastName",void 0);u([IsOptional(),IsString(),Length(1,32),g("design:type",String)],j.prototype,"displayName",void 0);u([IsOptional(),IsString(),Length(1,128),g("design:type",String)],j.prototype,"description",void 0);u([IsOptional(),Matches(p.USER_AVATAR_URL),g("design:type",Object)],j.prototype,"avatarUrl",void 0);u([IsOptional(),Matches(p.USER_BANNER_URL),g("design:type",Object)],j.prototype,"bannerUrl",void 0);u([IsOptional(),IsEnum(T),g("design:type",typeof T>"u"?Object:T)],j.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)],j.prototype,"birthDate",void 0);u([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),g("design:type",Array)],j.prototype,"links",void 0);function d(e){return e}o(d,"sdk");var qn=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 Kn=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 $n=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 Tn=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 Xn=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:Tn(e)});var Zn=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 Yn=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var Jn=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 Qn=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var eo=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var to=o(e=>({account:o(async t=>e.get("/organizations/@:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(pe)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(pe)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 no=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 oo=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var ro=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 so=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 io=o(e=>({record:o(async(t,n)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record")}),"organizationsEventsViews");var ao=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",X("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType",X("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:oo(e),styles:ro(e),tickets:so(e),views:io(e)}),"organizationsEvents");var co=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 po=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:co(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 fo=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 lo=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",X("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:to(e),events:ao(e),members:po(e),customers:no(e),orders:fo(e)});var mo=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 uo=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:mo(e)});var go=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 yo=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 ho=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:yo(e)});var vo=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 bo=o(e=>({record:o(async(t,n)=>e.post("/users/@:username/posts/:postId/views",void 0,{username:t,postId:n}),"record")}),"usersPostsViews");var Ro=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:bo(e)});var xo=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 So=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 Io=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",X("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",X("file",n),{userFileType:t}),"uploadTempFile"),bookings:ho(e),notifications:vo(e),posts:Ro(e),postsComments:xo(e),postsReposts:So(e)});var _o=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;profiles;roadmap;users;notifications;constructor(t){this.client=new Me(t),this.apiKeys=qn(this.client),this.auth=Kn(this.client),this.careers=$n(this.client),this.channels=Xn(this.client),this.currencies=Zn(this.client),this.feed=Yn(this.client),this.health=Jn(this.client),this.orders=eo(this.client),this.organizations=lo(this.client),this.profiles=uo(this.client),this.roadmap=go(this.client),this.users=Io(this.client),this.notifications=Qn(this.client);}};var Je=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 E=JSON.parse(c.data);this.handleEvent(E);}catch(E){this.log("Error parsing message:",E);}},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 Qe=class extends Je{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 zu(e){let t=new Qe(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(zu,"channelsWS");
|
|
2
|
-
export{
|
|
1
|
+
import {pathcat}from'pathcat';import Do 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 {Transform,Type}from'class-transformer';var No=Object.defineProperty;var o=(e,t)=>No(e,"name",{value:t,configurable:true});var Ct="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 pi=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 li=function(e){return e.Follow="follow",e}({});var ui=function(e){return e.Image="image",e.Video="video",e}({});var $=function(e){return e.Public="public",e.Followers="followers",e.Private="private",e}({});var xi=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 Le=function(e){return e.User="user",e.Developer="developer",e.Admin="admin",e}({}),T=function(e){return e.Male="male",e.Female="female",e.NonBinary="non-binary",e}({}),Ii=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var tt={[f.Owner]:3,[f.Admin]:2,[f.Manager]:1,[f.Member]:0},Di={[Le.Admin]:2,[Le.Developer]:1,[Le.User]:0};var be=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 pe=typeof window<"u";function X(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(X,"buildFileFormData");function Ci(e,t){return tt[e]>=tt[t]}o(Ci,"isMemberRoleAtLeast");var Uo=Do.create({headers:{Accept:"application/json",...!pe&&{"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:pe}),Gt=o(async(e,t)=>{let{apiKey:n,accessToken:s,...i}=t||{},r={...i.headers,...n&&{"X-API-Key":n},...s&&{Authorization:`Bearer ${s}`}};return Uo(e,{...i,headers:r}).then(c=>c).catch(c=>{throw c.data||console.error(c),c.data})},"request");var nt=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;}},Me=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||Ct;return pathcat(i,n,s)},t.cache?.enabled&&(this.cacheManager=new be(t.cache));}setOptions(t){this.options=t,this.apiKey=t.apiKey,this.accessToken=t.accessToken,t.cache?.enabled?this.cacheManager=new be(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 ve=this.cacheManager.get(t,a);if(ve!==null)return ve}let c=await Gt(a,{method:t,data:s,apiKey:this.apiKey,accessToken:this.accessToken,...r}),E=c.data;if(!E.success)throw new nt(c,E);return this.cacheManager&&this.cacheManager.set(t,a,E.data),E.data}};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,"AddParticipantDto");}username};Mo([IsString(),Matches(p.USERNAME,{message:"user.username.format"}),Eo("design:type",String)],ot.prototype,"username",void 0);var ca=function(e){return e.PUBLIC="public",e.BUILD="build",e.PREMIUM="premium",e.INTERNAL="internal",e}({});var da=function(e){return e.Google="google",e.Facebook="facebook",e.Twitter="twitter",e}({}),fa=function(e){return e.SignUp="signup",e.SignIn="signin",e}({});var Ee=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 se=function(e){return e.Private="private",e.Group="group",e}({}),ua=function(e){return e.Member="member",e.Admin="admin",e}({}),ga=function(e){return e.Sent="sent",e.Delivered="delivered",e.Read="read",e.Received="received",e.Opened="opened",e}({});var Z=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 ba=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 xa=function(e){return e.Following="following",e.Discover="discover",e}({});var Ia=function(e){return e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art",e}({});var Y=function(e){return e.ETicket="e-ticket",e.Other="other",e}({}),J=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 Q=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}({}),ee=function(e){return e.Public="public",e.Unlisted="unlisted",e.Private="private",e}({}),Oa=function(e){return e.Flyer="flyer",e.Trailer="trailer",e}({}),wa=function(e){return e.Upcoming="upcoming",e.Ongoing="ongoing",e.Ended="ended",e}({});var Ua=function(e){return e.InvitationLink="invitation_link",e}({});var Ma=function(e){return e.Avatar="avatar",e.Banner="banner",e}({});var Ha=function(e){return e.User="user",e.Organization="organization",e}({});var qa=["\u{1F44D}","\u2764\uFE0F","\u{1F389}","\u{1F440}","\u{1F680}"],Ka=function(e){return e.ComingSoon="coming-soon",e.Shipped="shipped",e}({});var Ta=function(e){return e.FR="fr",e.EN="en",e}({});function st(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(st,"_ts_decorate");function it(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(it,"_ts_metadata");var Re=class{static{o(this,"CreateChannelDto");}type;participantUsernames;name};st([IsEnum(se),it("design:type",typeof se>"u"?Object:se)],Re.prototype,"type",void 0);st([IsArray(),ArrayMinSize(1),ValidateIf(e=>e.type===se.Private),ArrayMaxSize(2,{message:"Private channels can only have 2 participants"}),ValidateIf(e=>e.type===se.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"}),it("design:type",Array)],Re.prototype,"participantUsernames",void 0);st([IsOptional(),ValidateIf(e=>e.type===se.Group),IsString(),Length(1,100),it("design:type",String)],Re.prototype,"name",void 0);function Wo(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(Wo,"_ts_decorate");function qo(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(qo,"_ts_metadata");var at=class{static{o(this,"AddReactionDto");}emoji};Wo([IsString(),Length(1,10),qo("design:type",String)],at.prototype,"emoji",void 0);function Be(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(Be,"_ts_decorate");function ct(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ct,"_ts_metadata");var xe=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"}};xe=Be([ValidatorConstraint({name:"contentOrAttachments",async:false})],xe);var Se=class{static{o(this,"CreateChannelMessageDto");}content;attachments;replyToId};Be([IsOptional(),IsString(),ValidateIf(e=>e.content!==void 0),Length(1,1024),ct("design:type",String)],Se.prototype,"content",void 0);Be([IsOptional(),IsArray(),ArrayMaxSize(10),Matches(p.CHANNEL_MESSAGE_ATTACHMENT,{each:true}),Validate(xe),ct("design:type",Array)],Se.prototype,"attachments",void 0);Be([IsOptional(),IsMongoId(),ct("design:type",String)],Se.prototype,"replyToId",void 0);function Kt(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(Kt,"_ts_decorate");function $t(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o($t,"_ts_metadata");var Fe=class{static{o(this,"ReportChannelMessageDto");}reason;description};Kt([IsEnum(Ee),$t("design:type",typeof Ee>"u"?Object:Ee)],Fe.prototype,"reason",void 0);Kt([IsOptional(),IsString(),ValidateIf(e=>e.description&&e.description.trim().length>0),Length(1,500),$t("design:type",String)],Fe.prototype,"description",void 0);function cr(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(cr,"_ts_decorate");function pr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(pr,"_ts_metadata");var dt=class{static{o(this,"UpdateChannelMessageDto");}content};cr([IsOptional(),IsString(),Length(1,1024),pr("design:type",String)],dt.prototype,"content",void 0);function mr(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(mr,"_ts_decorate");function ur(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ur,"_ts_metadata");var ft=class{static{o(this,"UpdateChannelDto");}name};mr([IsOptional(),IsString(),Length(1,100),ur("design:type",String)],ft.prototype,"name",void 0);var Ve=o((e,t)=>{if(!e)return e;let n=e.split(",").map(K=>K.trim()),s=t.zipCode?.toLowerCase(),i=t.city?.toLowerCase(),r=t.country?.toLowerCase(),a=[s,i,r].filter(K=>!!K),c=s&&i?`${s} ${i}`:void 0,E=o(K=>{let kt=K.toLowerCase();return !!(a.includes(kt)||c&&kt===c)},"isNoise"),ve=[];for(let K of n)E(K)||ve.push(K);return ve.join(", ").trim()||e},"normalizeAddress");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 te(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(te,"_ts_metadata");var lt=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"}};lt=B([ValidatorConstraint({name:"coordinatesRange",async:false})],lt);var z=class{static{o(this,"GeoPointDto");}type;coordinates;constructor(){this.type="Point";}};B([IsString(),IsNotEmpty(),te("design:type",String)],z.prototype,"type",void 0);B([IsArray(),IsNotEmpty(),Validate(lt),te("design:type",Array)],z.prototype,"coordinates",void 0);var x=class{static{o(this,"CreateLocationDto");}name;address;zipCode;city;country;geometry};B([IsOptional(),IsString(),Length(1,128),te("design:type",String)],x.prototype,"name",void 0);B([Transform(({value:e,obj:t})=>Ve(e,{zipCode:t.zipCode,city:t.city,country:t.country})),IsString(),IsNotEmpty(),Length(1,256),te("design:type",String)],x.prototype,"address",void 0);B([IsString(),IsNotEmpty(),Length(1,32),te("design:type",String)],x.prototype,"zipCode",void 0);B([IsString(),IsNotEmpty(),Length(1,128),te("design:type",String)],x.prototype,"city",void 0);B([IsString(),IsNotEmpty(),Length(1,128),te("design:type",String)],x.prototype,"country",void 0);B([ValidateNested(),Type(()=>z),IsNotEmpty(),te("design:type",typeof z>"u"?Object:z)],x.prototype,"geometry",void 0);function fe(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(fe,"_ts_decorate");function le(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(le,"_ts_metadata");var S=class{static{o(this,"UpdateLocationDto");}name;address;zipCode;city;country;geometry};fe([IsOptional(),IsString(),Length(1,128),le("design:type",String)],S.prototype,"name",void 0);fe([IsOptional(),Transform(({value:e,obj:t})=>Ve(e,{zipCode:t.zipCode,city:t.city,country:t.country})),IsString(),Length(1,256),le("design:type",String)],S.prototype,"address",void 0);fe([IsOptional(),IsString(),Length(1,32),le("design:type",String)],S.prototype,"zipCode",void 0);fe([IsOptional(),IsString(),Length(1,128),le("design:type",String)],S.prototype,"city",void 0);fe([IsOptional(),IsString(),Length(1,128),le("design:type",String)],S.prototype,"country",void 0);fe([IsOptional(),ValidateNested(),Type(()=>z),le("design:type",typeof z>"u"?Object:z)],S.prototype,"geometry",void 0);function V(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(V,"_ts_decorate");function k(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(k,"_ts_metadata");var ue=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};V([IsOptional(),IsString(),IsLowercase(),Length(1,48),k("design:type",String)],ue.prototype,"organizationSlug",void 0);V([IsObject(),k("design:type",typeof F>"u"?Object:F)],ue.prototype,"identity",void 0);V([IsArray(),k("design:type",Array)],ue.prototype,"members",void 0);V([IsOptional(),IsObject(),k("design:type",typeof Location>"u"?Object:Location)],ue.prototype,"location",void 0);var F=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};V([IsString(),IsNotEmpty(),Length(1,32),k("design:type",String)],F.prototype,"displayName",void 0);V([IsString(),Length(16,1024),IsOptional(),k("design:type",String)],F.prototype,"description",void 0);V([Matches(p.ORGANIZATION_AVATAR_URL,{message:"organization.avatar.url.invalid"}),k("design:type",String)],F.prototype,"avatarUrl",void 0);V([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL,{message:"organization.banner.url.invalid"}),k("design:type",String)],F.prototype,"bannerUrl",void 0);V([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),k("design:type",Array)],F.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(Y),N("design:type",typeof Y>"u"?Object:Y)],l.prototype,"type",void 0);P([IsEnum(J),N("design:type",typeof J>"u"?Object:J)],l.prototype,"category",void 0);P([IsEnum(Z),N("design:type",typeof Z>"u"?Object:Z)],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(Y),IsOptional(),U("design:type",typeof Y>"u"?Object:Y)],m.prototype,"type",void 0);D([IsEnum(J),IsOptional(),U("design:type",typeof J>"u"?Object:J)],m.prototype,"category",void 0);D([IsEnum(Z),IsOptional(),U("design:type",typeof Z>"u"?Object:Z)],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 we=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"}};we=b([ValidatorConstraint({name:"atLeastOneMedia",async:false})],we);function Fr(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:we});}}o(Fr,"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(Q),IsNotEmpty(),I("design:type",typeof Q>"u"?Object:Q)],h.prototype,"type",void 0);b([IsEnum(ee),IsNotEmpty(),I("design:type",typeof ee>"u"?Object:ee)],h.prototype,"visibility",void 0);b([IsArray(),ArrayMaxSize(25),Matches(p.EVENT_FLYER_URL,{each:true,message:"organization.event.flyers.url.invalid"}),Fr(),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 vt=class extends h{static{o(this,"CreateOrganizationEventDto");}tickets};b([IsArray(),ValidateNested({each:true}),Type(()=>l),IsNotEmpty(),I("design:type",Array)],vt.prototype,"tickets",void 0);function Vr(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(Vr,"_ts_decorate");function kr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(kr,"_ts_metadata");var xt=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};Vr([IsArray(),IsString({each:true}),kr("design:type",Array)],xt.prototype,"cart",void 0);var We=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var hn=class extends We{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 je=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"}};je=R([ValidatorConstraint({name:"atLeastOneMediaOnUpdate",async:false})],je);function $r(e){return (t,n)=>{registerDecorator({target:t.constructor,propertyName:n,options:e,constraints:[],validator:je});}}o($r,"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(Q),_("design:type",typeof Q>"u"?Object:Q)],v.prototype,"type",void 0);R([IsOptional(),IsEnum(ee),_("design:type",typeof ee>"u"?Object:ee)],v.prototype,"visibility",void 0);R([IsOptional(),IsArray(),Matches(p.EVENT_FLYER_URL_UPDATE,{each:true,message:"organization.event.flyers.url.invalid"}),$r(),_("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 Tr(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(Tr,"_ts_decorate");function Xr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Xr,"_ts_metadata");var _t=class{static{o(this,"AcceptOrganizationMemberInvitationDto");}token};Tr([IsString(),IsNotEmpty(),Xr("design:type",String)],_t.prototype,"token",void 0);function _n(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(_n,"_ts_decorate");function An(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(An,"_ts_metadata");var $e=class{static{o(this,"CreateOrganizationMemberDto");}user;role};_n([IsString(),IsNotEmpty(),An("design:type",String)],$e.prototype,"user",void 0);_n([IsEnum(f),IsNotEmpty(),An("design:type",typeof f>"u"?Object:f)],$e.prototype,"role",void 0);function es(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(es,"_ts_decorate");function ts(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ts,"_ts_metadata");var At=class{static{o(this,"CreateOrganizationMemberInvitationLinkDto");}role};es([IsEnum(f),IsOptional(),ts("design:type",typeof f>"u"?Object:f)],At.prototype,"role",void 0);function rs(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(rs,"_ts_decorate");function ss(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ss,"_ts_metadata");var Ot=class{static{o(this,"UpdateOrganizationMemberDto");}role};rs([IsEnum(f),IsNotEmpty(),ss("design:type",typeof f>"u"?Object:f)],Ot.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 H(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(H,"_ts_metadata");var ge=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};G([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"organization.slug.format"}),H("design:type",String)],ge.prototype,"slug",void 0);G([IsObject(),IsOptional(),H("design:type",typeof C>"u"?Object:C)],ge.prototype,"identity",void 0);G([IsOptional(),IsArray(),H("design:type",Array)],ge.prototype,"members",void 0);G([IsOptional(),IsObject(),H("design:type",typeof Location>"u"?Object:Location)],ge.prototype,"location",void 0);var C=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;links};G([IsString(),IsNotEmpty(),Length(1,32),IsOptional(),H("design:type",String)],C.prototype,"displayName",void 0);G([IsString(),Length(16,1024),IsOptional(),H("design:type",String)],C.prototype,"description",void 0);G([IsOptional(),Matches(p.ORGANIZATION_AVATAR_URL),H("design:type",String)],C.prototype,"avatarUrl",void 0);G([IsOptional(),Matches(p.ORGANIZATION_BANNER_URL),H("design:type",String)],C.prototype,"bannerUrl",void 0);G([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),H("design:type",Array)],C.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 w(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(w,"_ts_metadata");var ze=class{static{o(this,"CreateUserDto");}identifier;identity;password};O([ValidateNested(),Type(()=>ye),w("design:type",typeof ye>"u"?Object:ye)],ze.prototype,"identifier",void 0);O([ValidateNested(),Type(()=>M),w("design:type",typeof M>"u"?Object:M)],ze.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."}),w("design:type",String)],ze.prototype,"password",void 0);var ye=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};O([IsOptional(),IsString(),IsEmail(),w("design:type",String)],ye.prototype,"email",void 0);O([IsOptional(),IsString(),IsPhoneNumber(),w("design:type",String)],ye.prototype,"phoneNumber",void 0);O([IsString(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),w("design:type",String)],ye.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"}),w("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"}),w("design:type",String)],M.prototype,"lastName",void 0);O([IsEnum(T),w("design:type",typeof T>"u"?Object:T)],M.prototype,"gender",void 0);O([IsOptional(),Matches(p.USER_AVATAR_URL_CREATE,{message:"user.avatar.url.invalid"}),w("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(),w("design:type",typeof Date>"u"?Object:Date)],M.prototype,"birthDate",void 0);O([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),w("design:type",Array)],M.prototype,"links",void 0);function xs(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(xs,"_ts_decorate");function Ss(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ss,"_ts_metadata");var Nt=class{static{o(this,"GoogleOneTapDto");}credential};xs([IsNotEmpty(),IsString(),Ss("design:type",String)],Nt.prototype,"credential",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 Te=class{static{o(this,"CreateUserPostCommentDto");}content;replyToId};Nn([IsString(),Length(1,280),Dn("design:type",String)],Te.prototype,"content",void 0);Nn([IsOptional(),IsString(),Dn("design:type",String)],Te.prototype,"replyToId",void 0);function ws(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(ws,"_ts_decorate");function js(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(js,"_ts_metadata");var Dt=class{static{o(this,"UpdateUserPostCommentDto");}content};ws([IsString(),Length(1,280),js("design:type",String)],Dt.prototype,"content",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 Pe=class{static{o(this,"CreateUserPostDto");}content;mediaUrls;visibility};Ut([IsOptional(),IsString(),Length(1,512),Lt("design:type",String)],Pe.prototype,"content",void 0);Ut([IsArray(),ArrayMinSize(1),ArrayMaxSize(10),Matches(p.USER_POST_MEDIA_URL,{each:true}),Lt("design:type",Array)],Pe.prototype,"mediaUrls",void 0);Ut([IsOptional(),IsEnum($),Lt("design:type",typeof $>"u"?Object:$)],Pe.prototype,"visibility",void 0);function Fs(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(Fs,"_ts_decorate");function Vs(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Vs,"_ts_metadata");var Mt=class{static{o(this,"CreateUserPostRepostDto");}comment};Fs([IsOptional(),IsString(),Length(1,280),Vs("design:type",String)],Mt.prototype,"comment",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 Xe=class{static{o(this,"UpdateUserPostDto");}content;visibility};Mn([IsOptional(),IsString(),Length(1,512),En("design:type",String)],Xe.prototype,"content",void 0);Mn([IsOptional(),IsEnum($),En("design:type",typeof $>"u"?Object:$)],Xe.prototype,"visibility",void 0);function Ks(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(Ks,"_ts_decorate");function $s(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o($s,"_ts_metadata");var Et=class{static{o(this,"RecoveryDto");}identifier};Ks([IsNotEmpty(),IsString(),$s("design:type",String)],Et.prototype,"identifier",void 0);function Bt(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(Bt,"_ts_decorate");function Ft(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ft,"_ts_metadata");var Ne=class{static{o(this,"RecoveryResetDto");}tokenId;tokenValue;password};Bt([IsString(),IsNotEmpty(),Ft("design:type",String)],Ne.prototype,"tokenId",void 0);Bt([IsString(),IsNotEmpty(),Ft("design:type",String)],Ne.prototype,"tokenValue",void 0);Bt([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"}),Ft("design:type",String)],Ne.prototype,"password",void 0);function Vn(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(Vn,"_ts_decorate");function kn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(kn,"_ts_metadata");var Ye=class{static{o(this,"SignInUserDto");}identifier;password};Vn([IsNotEmpty(),IsString(),kn("design:type",String)],Ye.prototype,"identifier",void 0);Vn([IsNotEmpty(),IsString(),kn("design:type",String)],Ye.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 De=class{static{o(this,"UpdateUserDto");}identifier;identity;password};u([IsOptional(),IsObject(),ValidateNested(),Type(()=>he),g("design:type",typeof he>"u"?Object:he)],De.prototype,"identifier",void 0);u([IsOptional(),IsObject(),ValidateNested(),Type(()=>j),g("design:type",typeof j>"u"?Object:j)],De.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)],De.prototype,"password",void 0);var he=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};u([IsOptional(),IsString(),IsEmail(),g("design:type",String)],he.prototype,"email",void 0);u([IsOptional(),IsString(),IsPhoneNumber(),g("design:type",String)],he.prototype,"phoneNumber",void 0);u([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(p.USERNAME,{message:"user.username.format"}),g("design:type",String)],he.prototype,"username",void 0);var j=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)],j.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)],j.prototype,"lastName",void 0);u([IsOptional(),IsString(),Length(1,32),g("design:type",String)],j.prototype,"displayName",void 0);u([IsOptional(),IsString(),Length(1,128),g("design:type",String)],j.prototype,"description",void 0);u([IsOptional(),Matches(p.USER_AVATAR_URL),g("design:type",Object)],j.prototype,"avatarUrl",void 0);u([IsOptional(),Matches(p.USER_BANNER_URL),g("design:type",Object)],j.prototype,"bannerUrl",void 0);u([IsOptional(),IsEnum(T),g("design:type",typeof T>"u"?Object:T)],j.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)],j.prototype,"birthDate",void 0);u([IsOptional(),IsArray(),IsUrl({},{each:true}),ArrayMaxSize(5),g("design:type",Array)],j.prototype,"links",void 0);function Kn(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(Kn,"_ts_decorate");function $n(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o($n,"_ts_metadata");var Je=class{static{o(this,"VerifyEmailConfirmDto");}tokenId;tokenValue};Kn([IsString(),IsNotEmpty(),$n("design:type",String)],Je.prototype,"tokenId",void 0);Kn([IsString(),IsNotEmpty(),$n("design:type",String)],Je.prototype,"tokenValue",void 0);function d(e){return e}o(d,"sdk");var Zn=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 Yn=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"),verifyEmail:{send:o(async()=>e.post("/auth/verify/email/send",void 0),"send"),confirm:o(async t=>e.post("/auth/verify/email/confirm",t),"confirm")},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 Jn=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 eo=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 to=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 no=e=>({getFollowing:o(async t=>e.get("/feed/following",t),"getFollowing"),getDiscover:o(async t=>e.get("/feed/discover",t),"getDiscover")});var oo=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 ro=e=>({registerToBeta:o(async t=>e.post("/notifications/subscribe/beta",{email:t}),"registerToBeta")});var so=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var io=o(e=>({account:o(async t=>e.get("/organizations/@:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(pe)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(pe)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 ao=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 co=o(e=>({create:o(async(t,n,s)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:n}),"create")}),"organizationsEventsOrders");var po=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 fo=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 lo=o(e=>({record:o(async(t,n)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/views",null,{organizationSlug:t,eventSlug:n}),"record"),getStreamUrl:o(t=>e.url("/organizations/events/views/stream",t),"getStreamUrl")}),"organizationsEventsViews");var mo=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",X("file",n),{eventFileType:t}),"uploadFile"),uploadOrganizationFile:o(async(t,n,s,i)=>e.post("/organizations/@:organizationSlug/events/:eventSlug/files/:eventFileType",X("file",i),{organizationSlug:t,eventSlug:n,eventFileType:s}),"uploadOrganizationFile"),orders:co(e),styles:po(e),tickets:fo(e),views:lo(e)}),"organizationsEvents");var uo=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 go=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:uo(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 yo=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 ho=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",X("file",s),{organizationSlug:t,organizationFileType:n}),"uploadFile"),billing:io(e),events:mo(e),members:go(e),customers:ao(e),orders:yo(e)});var vo=e=>({getAll:o(async t=>e.get("/places",t),"getAll"),getByCountry:o(async(t,n)=>e.get("/places/:countrySlug",{countrySlug:t,...n}),"getByCountry"),get:o(async(t,n)=>e.get("/places/:countrySlug/:citySlug",{countrySlug:t,citySlug:n}),"get"),search:o(async(t,n)=>e.get("/places/search",{q:t,...n}),"search")});var bo=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 Ro=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:bo(e)});var xo=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 So=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 Io=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:So(e)});var _o=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 Ao=o(e=>({record:o(async(t,n)=>e.post("/users/@:username/posts/:postId/views",void 0,{username:t,postId:n}),"record")}),"usersPostsViews");var Oo=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:Ao(e)});var wo=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 jo=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 zo=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",X("file",s),{userId:t,userFileType:n}),"uploadFile"),uploadTempFile:o(async(t,n)=>e.post("/users/files/:userFileType",X("file",n),{userFileType:t}),"uploadTempFile"),bookings:Io(e),notifications:_o(e),posts:Oo(e),postsComments:wo(e),postsReposts:jo(e)});var Po=class{static{o(this,"TonightPass");}client;apiKeys;auth;careers;channels;currencies;feed;health;orders;organizations;places;profiles;roadmap;users;notifications;constructor(t){this.client=new Me(t),this.apiKeys=Zn(this.client),this.auth=Yn(this.client),this.careers=Jn(this.client),this.channels=eo(this.client),this.currencies=to(this.client),this.feed=no(this.client),this.health=oo(this.client),this.orders=so(this.client),this.organizations=ho(this.client),this.places=vo(this.client),this.profiles=Ro(this.client),this.roadmap=xo(this.client),this.users=zo(this.client),this.notifications=ro(this.client);}};var Qe=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 E=JSON.parse(c.data);this.handleEvent(E);}catch(E){this.log("Error parsing message:",E);}},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 et=class extends Qe{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 qu(e){let t=new et(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(qu,"channelsWS");
|
|
2
|
+
export{_t as AcceptOrganizationMemberInvitationDto,ot as AddParticipantDto,at as AddReactionDto,ca as ApiKeyTier,Fr as AtLeastOneMedia,we as AtLeastOneMediaConstraint,$r as AtLeastOneMediaOnUpdate,je as AtLeastOneMediaOnUpdateConstraint,fa as AuthFlow,h as BaseOrganizationEventDto,be as CacheManager,ua as ChannelMemberRole,Ee as ChannelMessageReportReason,ga as ChannelStatus,se as ChannelType,et as ChannelWebSocketClient,Me as Client,xe as ContentOrAttachmentsConstraint,Re as CreateChannelDto,Se as CreateChannelMessageDto,x as CreateLocationDto,ue as CreateOrganizationDto,vt as CreateOrganizationEventDto,xt as CreateOrganizationEventOrderDto,We as CreateOrganizationEventStyleDto,l as CreateOrganizationEventTicketDto,F as CreateOrganizationIdentityDto,$e as CreateOrganizationMemberDto,At as CreateOrganizationMemberInvitationLinkDto,ze as CreateUserDto,M as CreateUserIdentityDto,Te as CreateUserPostCommentDto,Pe as CreateUserPostDto,Mt as CreateUserPostRepostDto,Z as Currency,Ct as DEFAULT_API_URL,ba as ErrorType,xa as FeedType,z as GeoPointDto,Nt as GoogleOneTapDto,Ta as Language,da as OAuth2Provider,Oa as OrganizationEventFileType,wa as OrganizationEventStatus,Ia as OrganizationEventStyleType,J as OrganizationEventTicketCategory,Y as OrganizationEventTicketType,Q as OrganizationEventType,ee as OrganizationEventVisibilityType,Ma as OrganizationFileType,f as OrganizationMemberRole,tt as OrganizationMemberRolePower,pi as OrganizationMemberStatus,Ua as OrganizationTokenType,Ha as ProfileType,p as REGEX,qa as ROADMAP_REACTIONS,Et as RecoveryDto,Ne as RecoveryResetDto,Fe as ReportChannelMessageDto,Ka as RoadmapFeatureStatus,Ye as SignInUserDto,Po as TonightPass,nt as TonightPassAPIError,ft as UpdateChannelDto,dt as UpdateChannelMessageDto,S as UpdateLocationDto,ge as UpdateOrganizationDto,v as UpdateOrganizationEventDto,hn as UpdateOrganizationEventStyleDto,m as UpdateOrganizationEventTicketDto,C as UpdateOrganizationIdentityDto,Ot as UpdateOrganizationMemberDto,De as UpdateUserDto,Dt as UpdateUserPostCommentDto,Xe as UpdateUserPostDto,Ii as UserFileType,T as UserIdentityGender,li as UserNotificationType,ui as UserPostMediaType,$ as UserPostVisibility,Le as UserRole,Di as UserRolePower,xi as UserTokenType,Je as VerifyEmailConfirmDto,Qe as WebSocketClient,Zn as apiKeys,Yn as auth,X as buildFileFormData,Jn as careers,eo as channels,qu as channelsWS,to as currencies,no as feed,oo as health,pe as isBrowser,Ci as isMemberRoleAtLeast,Ve as normalizeAddress,ro as notifications,so as orders,ho as organizations,vo as places,Ro as profiles,Gt as request,xo as roadmap,d as sdk,zo as users};//# sourceMappingURL=index.mjs.map
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|