tonightpass 0.0.71 → 0.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import 'reflect-metadata';
2
2
  import { IsOptional, IsString, IsLowercase, Length, IsObject, IsArray, IsNotEmpty, IsUrl, Matches, IsNumber, Min, IsEnum, IsBoolean, IsDateString, IsEmail, IsPhoneNumber, ValidateNested, MinLength, MaxLength } from 'class-validator';
3
3
  import { Type } from 'class-transformer';
4
- import Bt from 'redaxios';
4
+ import Gt from 'redaxios';
5
5
  import { pathcat } from 'pathcat';
6
6
 
7
- var ft=Object.defineProperty;var o=(e,t)=>ft(e,"name",{value:t,configurable:!0});var de="https://api.tonightpass.com";var m={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-Z0-9 ]+$/,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};function w(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(w,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(R,"_ts_metadata");var M=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};w([IsOptional(),IsString(),IsLowercase(),Length(1,48),R("design:type",String)],M.prototype,"organizationSlug",void 0);w([IsObject(),R("design:type",typeof S>"u"?Object:S)],M.prototype,"identity",void 0);w([IsArray(),R("design:type",Array)],M.prototype,"members",void 0);w([IsOptional(),IsObject(),R("design:type",typeof Location>"u"?Object:Location)],M.prototype,"location",void 0);var S=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};w([IsString(),IsNotEmpty(),Length(1,32),R("design:type",String)],S.prototype,"displayName",void 0);w([IsString(),Length(16,1024),IsOptional(),R("design:type",String)],S.prototype,"description",void 0);w([IsUrl({protocols:["http","https"]}),R("design:type",String)],S.prototype,"avatarUrl",void 0);w([IsOptional(),IsUrl({protocols:["http","https"]}),R("design:type",String)],S.prototype,"bannerUrl",void 0);w([IsOptional(),IsArray(),R("design:type",Array)],S.prototype,"socialLinks",void 0);function A(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(A,"_ts_decorate");function I(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(I,"_ts_metadata");var B=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};A([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(m.USERNAME),I("design:type",String)],B.prototype,"slug",void 0);A([IsObject(),IsOptional(),I("design:type",typeof j>"u"?Object:j)],B.prototype,"identity",void 0);A([IsOptional(),IsArray(),I("design:type",Array)],B.prototype,"members",void 0);A([IsOptional(),IsObject(),I("design:type",typeof Location>"u"?Object:Location)],B.prototype,"location",void 0);var j=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};A([IsString(),IsNotEmpty(),Length(1,32),IsOptional(),I("design:type",String)],j.prototype,"displayName",void 0);A([IsString(),Length(16,1024),IsOptional(),I("design:type",String)],j.prototype,"description",void 0);A([IsUrl({protocols:["http","https"]}),IsOptional(),I("design:type",String)],j.prototype,"avatarUrl",void 0);A([IsOptional(),IsUrl({protocols:["http","https"]}),I("design:type",String)],j.prototype,"bannerUrl",void 0);A([IsOptional(),IsArray(),I("design:type",Array)],j.prototype,"socialLinks",void 0);var ve=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};var C=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var xe=class extends C{static{o(this,"UpdateOrganizationEventStyleDto");}};var G;(function(e){e.ETicket="e-ticket",e.Other="other";})(G||(G={}));var F;(function(e){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";})(F||(F={}));var Se;(function(e){e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art";})(Se||(Se={}));var k;(function(e){e.Clubbing="clubbing",e.Concert="concert",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Festival="festival",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";})(k||(k={}));var q;(function(e){e.Public="public",e.Unlisted="unlisted",e.Private="private";})(q||(q={}));var we;(function(e){e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected";})(we||(we={}));var b;(function(e){e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner";})(b||(b={}));var Re;(function(e){e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website";})(Re||(Re={}));var je;(function(e){e.Authentication="authentication",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation";})(je||(je={}));var Ae;(function(e){e.User="user",e.Developer="developer",e.Admin="admin";})(Ae||(Ae={}));var v;(function(e){e.Male="male",e.Female="female",e.NonBinary="non-binary";})(v||(v={}));var W;(function(e){e.EUR="EUR",e.USD="USD",e.GBP="GBP";})(W||(W={}));var Ie;(function(e){e.FR="fr",e.EN="en";})(Ie||(Ie={}));function u(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}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 f=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};u([IsString(),Length(1,128),g("design:type",String)],f.prototype,"name",void 0);u([IsString(),Length(1,1024),g("design:type",String)],f.prototype,"description",void 0);u([IsNumber(),Min(0),g("design:type",Number)],f.prototype,"price",void 0);u([IsNumber(),Min(0),g("design:type",Number)],f.prototype,"quantity",void 0);u([IsEnum(G),g("design:type",typeof G>"u"?Object:G)],f.prototype,"type",void 0);u([IsEnum(F),g("design:type",typeof F>"u"?Object:F)],f.prototype,"category",void 0);u([IsEnum(W),g("design:type",typeof W>"u"?Object:W)],f.prototype,"currency",void 0);u([IsBoolean(),g("design:type",Boolean)],f.prototype,"isVisible",void 0);u([IsBoolean(),g("design:type",Boolean)],f.prototype,"isFeesIncluded",void 0);u([IsDateString(),IsOptional(),g("design:type",typeof Date>"u"?Object:Date)],f.prototype,"startAt",void 0);u([IsDateString(),IsOptional(),g("design:type",typeof Date>"u"?Object:Date)],f.prototype,"endAt",void 0);var Oe=class extends f{static{o(this,"UpdateOrganizationEventTicketDto");}};function U(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(U,"_ts_decorate");function D(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(D,"_ts_metadata");var y=class{static{o(this,"CreateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};U([IsString(),Length(1,64),D("design:type",String)],y.prototype,"title",void 0);U([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(m.SLUG),D("design:type",String)],y.prototype,"slug",void 0);U([IsString(),Length(16,2048),D("design:type",String)],y.prototype,"description",void 0);U([IsEnum(k),D("design:type",typeof k>"u"?Object:k)],y.prototype,"type",void 0);U([IsEnum(q),D("design:type",typeof q>"u"?Object:q)],y.prototype,"visibility",void 0);U([IsDateString(),D("design:type",typeof Date>"u"?Object:Date)],y.prototype,"startAt",void 0);U([IsDateString(),D("design:type",typeof Date>"u"?Object:Date)],y.prototype,"endAt",void 0);var Be=class extends y{static{o(this,"UpdateOrganizationEventDto");}};function Ge(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(Ge,"_ts_decorate");function Fe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Fe,"_ts_metadata");var J=class{static{o(this,"CreateOrganizationMemberDto");}user;role};Ge([IsString(),IsNotEmpty(),Fe("design:type",String)],J.prototype,"user",void 0);Ge([IsEnum(b),IsNotEmpty(),Fe("design:type",typeof b>"u"?Object:b)],J.prototype,"role",void 0);function xt(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(xt,"_ts_decorate");function St(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(St,"_ts_metadata");var ie=class{static{o(this,"UpdateOrganizationMemberDto");}role};xt([IsEnum(b),IsNotEmpty(),St("design:type",typeof b>"u"?Object:b)],ie.prototype,"role",void 0);function N(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(N,"_ts_decorate");function E(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(E,"_ts_metadata");var pe=class{static{o(this,"CreateUserDto");}identifier;identity;password};N([IsString(),Matches(m.PASSWORD,{message:"Password must be secure."}),E("design:type",String)],pe.prototype,"password",void 0);var fe=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};N([IsOptional(),IsString(),IsEmail(),E("design:type",String)],fe.prototype,"email",void 0);N([IsOptional(),IsString(),IsPhoneNumber(),E("design:type",String)],fe.prototype,"phoneNumber",void 0);N([IsString(),IsString(),IsLowercase(),Length(3,48),Matches(m.USERNAME),E("design:type",String)],fe.prototype,"username",void 0);var z=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate};N([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"First name must be composed of letters only"}),E("design:type",String)],z.prototype,"firstName",void 0);N([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"Last name must be composed of letters only"}),E("design:type",String)],z.prototype,"lastName",void 0);N([IsEnum(v),E("design:type",typeof v>"u"?Object:v)],z.prototype,"gender",void 0);N([IsOptional(),IsUrl({protocols:["http","https"]}),E("design:type",String)],z.prototype,"avatarUrl",void 0);N([IsOptional(),IsDateString(),E("design:type",typeof Date>"u"?Object:Date)],z.prototype,"birthDate",void 0);var qe=class{static{o(this,"SignInUserDto");}identifier;password};function c(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(p=e[a])&&(s=(i<3?p(s):i>3?p(t,r,s):p(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(c,"_ts_decorate");function l(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(l,"_ts_metadata");var Z=class{static{o(this,"UpdateUserDto");}identifier;identity;password};c([IsOptional(),IsObject(),ValidateNested(),Type(()=>V),l("design:type",typeof V>"u"?Object:V)],Z.prototype,"identifier",void 0);c([IsOptional(),IsObject(),ValidateNested(),Type(()=>h),l("design:type",typeof h>"u"?Object:h)],Z.prototype,"identity",void 0);c([IsOptional(),IsString(),MinLength(8),MaxLength(128),l("design:type",String)],Z.prototype,"password",void 0);var V=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};c([IsOptional(),IsString(),IsEmail(),l("design:type",String)],V.prototype,"email",void 0);c([IsOptional(),IsString(),IsPhoneNumber(),l("design:type",String)],V.prototype,"phoneNumber",void 0);c([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(m.USERNAME),l("design:type",String)],V.prototype,"username",void 0);var h=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};c([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"First name must be composed of letters only"}),l("design:type",String)],h.prototype,"firstName",void 0);c([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"Last name must be composed of letters only"}),l("design:type",String)],h.prototype,"lastName",void 0);c([IsOptional(),IsString(),Length(1,32),l("design:type",String)],h.prototype,"displayName",void 0);c([IsOptional(),IsString(),Length(1,128),l("design:type",String)],h.prototype,"description",void 0);c([IsOptional(),IsUrl(),l("design:type",Object)],h.prototype,"avatarUrl",void 0);c([IsOptional(),IsUrl(),l("design:type",Object)],h.prototype,"bannerUrl",void 0);c([IsOptional(),IsEnum(v),l("design:type",typeof v>"u"?Object:v)],h.prototype,"gender",void 0);c([IsOptional(),IsDateString(),l("design:type",typeof Date>"u"?Object:Date)],h.prototype,"birthDate",void 0);var x=typeof window<"u";var Gt=Bt.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!x&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e){return JSON.stringify(e)}],withCredentials:x}),Ze=o(async(e,t)=>Gt(e,{...t}).then(n=>n).catch(n=>{throw n.data||console.error(n),n.data}),"request");var le=class extends Error{static{o(this,"TonightPassAPIError");}response;data;status;constructor(t,r){super(r.message),this.response=t,this.data=r,this.status=t.status;}},K=class{static{o(this,"Client");}options;url;constructor(t){this.options=t,this.url=(r,n)=>{let i=this.options.baseURL||de;return pathcat(i,r,n)};}setOptions(t){this.options=t;}async get(t,r,n){return this.requester("GET",t,void 0,r,n)}async post(t,r,n,i){return this.requester("POST",t,r,n,i)}async put(t,r,n,i){return this.requester("PUT",t,r,n,i)}async patch(t,r,n,i){return this.requester("PATCH",t,r,n,i)}async delete(t,r,n,i){return this.requester("DELETE",t,r,n,i)}async requester(t,r,n,i={},s={}){let p=this.url(r,i);if(n!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let a=await Ze(p,{method:t,data:n,...s}),Q=a.data;if(!Q.success)throw new le(a,Q);return Q.data}};function L(e){return e}o(L,"sdk");var He=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",null),"signOut"),refreshToken:o(async()=>e.post("/auth/refresh-token",null),"refreshToken"),oauth2:{google:{connect:o(t=>{if(x)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")},"connect")},twitter:{connect:o(t=>{if(x)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")},"connect")},facebook:{connect:o(t=>{if(x)window.location.href=e.url("/oauth2/facebook",t||{});else throw new Error("Facebook OAuth2 is only available in the browser")},"connect")}}});var Ce=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 Je=e=>({getAll:o(async()=>e.get("/health"),"getAll"),database:o(async()=>e.get("/health/database"),"database"),http:o(async()=>e.get("/health/http"),"http")});var Ye=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Ke=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(x)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(x)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 Qe=o(e=>({create:o(async(t,r,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",n,{organizationSlug:t,eventSlug:r}),"create")}),"organizationsEventsOrders");var Te=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,r)=>e.put("/organizations/events/styles/:styleSlug",r,{styleSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/events/styles/:styleSlug",null,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var et=o(e=>({getAll:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:r}),"getAll"),get:o(async(t,r,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:r,ticketId:n}),"get"),create:o(async(t,r,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",n,{organizationSlug:t,eventSlug:r}),"create"),update:o(async(t,r,n,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",i,{organizationSlug:t,eventSlug:r,ticketId:n}),"update"),delete:o(async(t,r,n)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:r,ticketId:n}),"delete")}),"organizationsEventsTickets");var tt=o(e=>({getAll:o(async(t,r)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...r}):e.get("/organizations/events",r),"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,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:r}),"get"),create:o(async(t,r)=>e.post("/organizations/:organizationSlug/events",r,{organizationSlug:t}),"create"),update:o(async(t,r,n)=>e.put("/organizations/:organizationSlug/events/:eventSlug",n,{organizationSlug:t,eventSlug:r}),"update"),delete:o(async(t,r)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:r}),"delete"),orders:Qe(e),styles:Te(e),tickets:et(e)}),"organizationsEvents");var ot=o(e=>({getAll:o(async()=>e.get("/organizations/members"),"getAll"),delete:o(async t=>e.delete("/organizations/members/:memberId",null,{memberId:t}),"delete")}),"organizationsMembers");var rt=e=>({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,r)=>e.put("/organizations/:organizationSlug",r,{organizationSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/:organizationSlug",null,{organizationSlug:t}),"delete"),billing:Ke(e),events:tt(e),members:ot(e)});var st=e=>({follow:o(async t=>e.post("/profiles/:username/relationships/follow",null,{username:t}),"follow"),unfollow:o(async t=>e.post("/profiles/:username/relationships/unfollow",null,{username:t}),"unfollow")});var nt=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:st(e)});var it=e=>({getAll:o(async()=>e.get("/users"),"getAll"),get:o(async t=>e.get("/users",{id:t}),"get"),me:o(async()=>e.get("/users/me"),"me"),check:o(async(t,r)=>e.get("/users/check/:identifier",{identifier:t,suggestions:r}),"check"),update:o(async(t,r)=>e.put("/users/:userId",r,{userId:t}),"update")});var pt=e=>({registerToBeta:o(async()=>e.get("/notifications/subscribe/beta"),"registerToBeta")});var at=class{static{o(this,"TonightPass");}client;auth;careers;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new K(t),this.auth=He(this.client),this.careers=Ce(this.client),this.health=Je(this.client),this.orders=Ye(this.client),this.organizations=rt(this.client),this.profiles=nt(this.client),this.users=it(this.client),this.notifications=pt(this.client);}};
7
+ var ct=Object.defineProperty;var o=(e,t)=>ct(e,"name",{value:t,configurable:!0});var de="https://api.tonightpass.com";var m={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-Z0-9 ]+$/,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};function w(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(w,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(R,"_ts_metadata");var M=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};w([IsOptional(),IsString(),IsLowercase(),Length(1,48),R("design:type",String)],M.prototype,"organizationSlug",void 0);w([IsObject(),R("design:type",typeof S>"u"?Object:S)],M.prototype,"identity",void 0);w([IsArray(),R("design:type",Array)],M.prototype,"members",void 0);w([IsOptional(),IsObject(),R("design:type",typeof Location>"u"?Object:Location)],M.prototype,"location",void 0);var S=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};w([IsString(),IsNotEmpty(),Length(1,32),R("design:type",String)],S.prototype,"displayName",void 0);w([IsString(),Length(16,1024),IsOptional(),R("design:type",String)],S.prototype,"description",void 0);w([IsUrl({protocols:["http","https"]}),R("design:type",String)],S.prototype,"avatarUrl",void 0);w([IsOptional(),IsUrl({protocols:["http","https"]}),R("design:type",String)],S.prototype,"bannerUrl",void 0);w([IsOptional(),IsArray(),R("design:type",Array)],S.prototype,"socialLinks",void 0);function A(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(A,"_ts_decorate");function I(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(I,"_ts_metadata");var B=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};A([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(m.USERNAME),I("design:type",String)],B.prototype,"slug",void 0);A([IsObject(),IsOptional(),I("design:type",typeof j>"u"?Object:j)],B.prototype,"identity",void 0);A([IsOptional(),IsArray(),I("design:type",Array)],B.prototype,"members",void 0);A([IsOptional(),IsObject(),I("design:type",typeof Location>"u"?Object:Location)],B.prototype,"location",void 0);var j=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};A([IsString(),IsNotEmpty(),Length(1,32),IsOptional(),I("design:type",String)],j.prototype,"displayName",void 0);A([IsString(),Length(16,1024),IsOptional(),I("design:type",String)],j.prototype,"description",void 0);A([IsUrl({protocols:["http","https"]}),IsOptional(),I("design:type",String)],j.prototype,"avatarUrl",void 0);A([IsOptional(),IsUrl({protocols:["http","https"]}),I("design:type",String)],j.prototype,"bannerUrl",void 0);A([IsOptional(),IsArray(),I("design:type",Array)],j.prototype,"socialLinks",void 0);var ve=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};var C=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var xe=class extends C{static{o(this,"UpdateOrganizationEventStyleDto");}};var G;(function(e){e.ETicket="e-ticket",e.Other="other";})(G||(G={}));var F;(function(e){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";})(F||(F={}));var Se;(function(e){e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art";})(Se||(Se={}));var k;(function(e){e.Clubbing="clubbing",e.Concert="concert",e.Afterwork="afterwork",e.DancingLunch="dancing_lunch",e.Diner="diner",e.Garden="garden",e.AfterBeach="after_beach",e.Festival="festival",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";})(k||(k={}));var q;(function(e){e.Public="public",e.Unlisted="unlisted",e.Private="private";})(q||(q={}));var we;(function(e){e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected";})(we||(we={}));var b;(function(e){e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner";})(b||(b={}));var Re;(function(e){e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website";})(Re||(Re={}));var je;(function(e){e.Authentication="authentication",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation";})(je||(je={}));var Ae;(function(e){e.User="user",e.Developer="developer",e.Admin="admin";})(Ae||(Ae={}));var v;(function(e){e.Male="male",e.Female="female",e.NonBinary="non-binary";})(v||(v={}));var Ie;(function(e){e.User="user",e.Organization="organization";})(Ie||(Ie={}));var W;(function(e){e.EUR="EUR",e.USD="USD",e.GBP="GBP";})(W||(W={}));var _e;(function(e){e.FR="fr",e.EN="en";})(_e||(_e={}));function u(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}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 f=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};u([IsString(),Length(1,128),g("design:type",String)],f.prototype,"name",void 0);u([IsString(),Length(1,1024),g("design:type",String)],f.prototype,"description",void 0);u([IsNumber(),Min(0),g("design:type",Number)],f.prototype,"price",void 0);u([IsNumber(),Min(0),g("design:type",Number)],f.prototype,"quantity",void 0);u([IsEnum(G),g("design:type",typeof G>"u"?Object:G)],f.prototype,"type",void 0);u([IsEnum(F),g("design:type",typeof F>"u"?Object:F)],f.prototype,"category",void 0);u([IsEnum(W),g("design:type",typeof W>"u"?Object:W)],f.prototype,"currency",void 0);u([IsBoolean(),g("design:type",Boolean)],f.prototype,"isVisible",void 0);u([IsBoolean(),g("design:type",Boolean)],f.prototype,"isFeesIncluded",void 0);u([IsDateString(),IsOptional(),g("design:type",typeof Date>"u"?Object:Date)],f.prototype,"startAt",void 0);u([IsDateString(),IsOptional(),g("design:type",typeof Date>"u"?Object:Date)],f.prototype,"endAt",void 0);var Oe=class extends f{static{o(this,"UpdateOrganizationEventTicketDto");}};function U(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(U,"_ts_decorate");function z(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(z,"_ts_metadata");var y=class{static{o(this,"CreateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};U([IsString(),Length(1,64),z("design:type",String)],y.prototype,"title",void 0);U([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(m.SLUG),z("design:type",String)],y.prototype,"slug",void 0);U([IsString(),Length(16,2048),z("design:type",String)],y.prototype,"description",void 0);U([IsEnum(k),z("design:type",typeof k>"u"?Object:k)],y.prototype,"type",void 0);U([IsEnum(q),z("design:type",typeof q>"u"?Object:q)],y.prototype,"visibility",void 0);U([IsDateString(),z("design:type",typeof Date>"u"?Object:Date)],y.prototype,"startAt",void 0);U([IsDateString(),z("design:type",typeof Date>"u"?Object:Date)],y.prototype,"endAt",void 0);var Ge=class extends y{static{o(this,"UpdateOrganizationEventDto");}};function Fe(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(Fe,"_ts_decorate");function ke(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ke,"_ts_metadata");var J=class{static{o(this,"CreateOrganizationMemberDto");}user;role};Fe([IsString(),IsNotEmpty(),ke("design:type",String)],J.prototype,"user",void 0);Fe([IsEnum(b),IsNotEmpty(),ke("design:type",typeof b>"u"?Object:b)],J.prototype,"role",void 0);function St(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(St,"_ts_decorate");function wt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(wt,"_ts_metadata");var ie=class{static{o(this,"UpdateOrganizationMemberDto");}role};St([IsEnum(b),IsNotEmpty(),wt("design:type",typeof b>"u"?Object:b)],ie.prototype,"role",void 0);function N(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(N,"_ts_decorate");function E(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(E,"_ts_metadata");var ae=class{static{o(this,"CreateUserDto");}identifier;identity;password};N([IsString(),Matches(m.PASSWORD,{message:"Password must be secure."}),E("design:type",String)],ae.prototype,"password",void 0);var fe=class{static{o(this,"CreateUserIdentifierDto");}email;phoneNumber;username};N([IsOptional(),IsString(),IsEmail(),E("design:type",String)],fe.prototype,"email",void 0);N([IsOptional(),IsString(),IsPhoneNumber(),E("design:type",String)],fe.prototype,"phoneNumber",void 0);N([IsString(),IsString(),IsLowercase(),Length(3,48),Matches(m.USERNAME),E("design:type",String)],fe.prototype,"username",void 0);var O=class{static{o(this,"CreateUserIdentityDto");}firstName;lastName;gender;avatarUrl;birthDate};N([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"First name must be composed of letters only"}),E("design:type",String)],O.prototype,"firstName",void 0);N([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"Last name must be composed of letters only"}),E("design:type",String)],O.prototype,"lastName",void 0);N([IsEnum(v),E("design:type",typeof v>"u"?Object:v)],O.prototype,"gender",void 0);N([IsOptional(),IsUrl({protocols:["http","https"]}),E("design:type",String)],O.prototype,"avatarUrl",void 0);N([IsOptional(),IsDateString(),E("design:type",typeof Date>"u"?Object:Date)],O.prototype,"birthDate",void 0);var We=class{static{o(this,"SignInUserDto");}identifier;password};function c(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(c,"_ts_decorate");function l(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(l,"_ts_metadata");var Z=class{static{o(this,"UpdateUserDto");}identifier;identity;password};c([IsOptional(),IsObject(),ValidateNested(),Type(()=>V),l("design:type",typeof V>"u"?Object:V)],Z.prototype,"identifier",void 0);c([IsOptional(),IsObject(),ValidateNested(),Type(()=>h),l("design:type",typeof h>"u"?Object:h)],Z.prototype,"identity",void 0);c([IsOptional(),IsString(),MinLength(8),MaxLength(128),l("design:type",String)],Z.prototype,"password",void 0);var V=class{static{o(this,"UpdateUserIdentifierDto");}email;phoneNumber;username};c([IsOptional(),IsString(),IsEmail(),l("design:type",String)],V.prototype,"email",void 0);c([IsOptional(),IsString(),IsPhoneNumber(),l("design:type",String)],V.prototype,"phoneNumber",void 0);c([IsOptional(),IsString(),IsLowercase(),Length(3,48),Matches(m.USERNAME),l("design:type",String)],V.prototype,"username",void 0);var h=class{static{o(this,"UpdateUserIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};c([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"First name must be composed of letters only"}),l("design:type",String)],h.prototype,"firstName",void 0);c([IsOptional(),IsString(),Length(2,32),Matches(m.NAME,{message:"Last name must be composed of letters only"}),l("design:type",String)],h.prototype,"lastName",void 0);c([IsOptional(),IsString(),Length(1,32),l("design:type",String)],h.prototype,"displayName",void 0);c([IsOptional(),IsString(),Length(1,128),l("design:type",String)],h.prototype,"description",void 0);c([IsOptional(),IsUrl(),l("design:type",Object)],h.prototype,"avatarUrl",void 0);c([IsOptional(),IsUrl(),l("design:type",Object)],h.prototype,"bannerUrl",void 0);c([IsOptional(),IsEnum(v),l("design:type",typeof v>"u"?Object:v)],h.prototype,"gender",void 0);c([IsOptional(),IsDateString(),l("design:type",typeof Date>"u"?Object:Date)],h.prototype,"birthDate",void 0);var x=typeof window<"u";var Ft=Gt.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!x&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e){return JSON.stringify(e)}],withCredentials:x}),He=o(async(e,t)=>Ft(e,{...t}).then(s=>s).catch(s=>{throw s.data||console.error(s),s.data}),"request");var le=class extends Error{static{o(this,"TonightPassAPIError");}response;data;status;constructor(t,r){super(r.message),this.response=t,this.data=r,this.status=t.status;}},K=class{static{o(this,"Client");}options;url;constructor(t){this.options=t,this.url=(r,s)=>{let i=this.options.baseURL||de;return pathcat(i,r,s)};}setOptions(t){this.options=t;}async get(t,r,s){return this.requester("GET",t,void 0,r,s)}async post(t,r,s,i){return this.requester("POST",t,r,s,i)}async put(t,r,s,i){return this.requester("PUT",t,r,s,i)}async patch(t,r,s,i){return this.requester("PATCH",t,r,s,i)}async delete(t,r,s,i){return this.requester("DELETE",t,r,s,i)}async requester(t,r,s,i={},n={}){let a=this.url(r,i);if(s!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await He(a,{method:t,data:s,...n}),Q=p.data;if(!Q.success)throw new le(p,Q);return Q.data}};function L(e){return e}o(L,"sdk");var Ce=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",null),"signOut"),refreshToken:o(async()=>e.post("/auth/refresh-token",null),"refreshToken"),oauth2:{google:{connect:o(t=>{if(x)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")},"connect")},twitter:{connect:o(t=>{if(x)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")},"connect")},facebook:{connect:o(t=>{if(x)window.location.href=e.url("/oauth2/facebook",t||{});else throw new Error("Facebook OAuth2 is only available in the browser")},"connect")}}});var Je=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 Ye=e=>({getAll:o(async()=>e.get("/health"),"getAll"),database:o(async()=>e.get("/health/database"),"database"),http:o(async()=>e.get("/health/http"),"http")});var Ke=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:orderId",{orderId:t}),"get")});var Qe=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(x)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(x)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 Te=o(e=>({create:o(async(t,r,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:r}),"create")}),"organizationsEventsOrders");var et=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,r)=>e.put("/organizations/events/styles/:styleSlug",r,{styleSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/events/styles/:styleSlug",null,{styleSlug:t}),"delete")}),"organizationsEventsStyles");var tt=o(e=>({getAll:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:r}),"getAll"),get:o(async(t,r,s)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:r,ticketId:s}),"get"),create:o(async(t,r,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",s,{organizationSlug:t,eventSlug:r}),"create"),update:o(async(t,r,s,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",i,{organizationSlug:t,eventSlug:r,ticketId:s}),"update"),delete:o(async(t,r,s)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:r,ticketId:s}),"delete")}),"organizationsEventsTickets");var ot=o(e=>({getAll:o(async(t,r)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...r}):e.get("/organizations/events",r),"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,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:r}),"get"),create:o(async(t,r)=>e.post("/organizations/:organizationSlug/events",r,{organizationSlug:t}),"create"),update:o(async(t,r,s)=>e.put("/organizations/:organizationSlug/events/:eventSlug",s,{organizationSlug:t,eventSlug:r}),"update"),delete:o(async(t,r)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:r}),"delete"),orders:Te(e),styles:et(e),tickets:tt(e)}),"organizationsEvents");var rt=o(e=>({getAll:o(async()=>e.get("/organizations/members"),"getAll"),delete:o(async t=>e.delete("/organizations/members/:memberId",null,{memberId:t}),"delete")}),"organizationsMembers");var nt=e=>({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,r)=>e.put("/organizations/:organizationSlug",r,{organizationSlug:t}),"update"),delete:o(async t=>e.delete("/organizations/:organizationSlug",null,{organizationSlug:t}),"delete"),billing:Qe(e),events:ot(e),members:rt(e)});var st=e=>({follow:o(async t=>e.post("/profiles/:username/relationships/follow",null,{username:t}),"follow"),unfollow:o(async t=>e.post("/profiles/:username/relationships/unfollow",null,{username:t}),"unfollow")});var it=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get"),relationships:st(e)});var at=e=>({getAll:o(async()=>e.get("/users"),"getAll"),get:o(async t=>e.get("/users",{id:t}),"get"),me:o(async()=>e.get("/users/me"),"me"),check:o(async(t,r)=>e.get("/users/check/:identifier",{identifier:t,suggestions:r}),"check"),update:o(async(t,r)=>e.put("/users/:userId",r,{userId:t}),"update")});var pt=e=>({registerToBeta:o(async()=>e.get("/notifications/subscribe/beta"),"registerToBeta")});var ft=class{static{o(this,"TonightPass");}client;auth;careers;health;orders;organizations;profiles;users;notifications;constructor(t){this.client=new K(t),this.auth=Ce(this.client),this.careers=Je(this.client),this.health=Ye(this.client),this.orders=Ke(this.client),this.organizations=nt(this.client),this.profiles=it(this.client),this.users=at(this.client),this.notifications=pt(this.client);}};
8
8
 
9
- export { K as Client, M as CreateOrganizationDto, y as CreateOrganizationEventDto, ve as CreateOrganizationEventOrderDto, C as CreateOrganizationEventStyleDto, f as CreateOrganizationEventTicketDto, S as CreateOrganizationIdentityDto, J as CreateOrganizationMemberDto, pe as CreateUserDto, z as CreateUserIdentityDto, W as Currency, de as DEFAULT_API_URL, Ie as Language, Se as OrganizationEventStyleType, F as OrganizationEventTicketCategory, G as OrganizationEventTicketType, k as OrganizationEventType, q as OrganizationEventVisibilityType, b as OrganizationMemberRole, we as OrganizationMemberStatus, Re as OrganizationSocialType, m as REGEX, qe as SignInUserDto, at as TonightPass, le as TonightPassAPIError, B as UpdateOrganizationDto, Be as UpdateOrganizationEventDto, xe as UpdateOrganizationEventStyleDto, Oe as UpdateOrganizationEventTicketDto, j as UpdateOrganizationIdentityDto, ie as UpdateOrganizationMemberDto, Z as UpdateUserDto, v as UserIdentityGender, Ae as UserRole, je as UserTokenType, He as auth, Ce as careers, Je as health, x as isBrowser, pt as notifications, Ye as orders, rt as organizations, nt as profiles, Ze as request, L as sdk, it as users };
9
+ export { K as Client, M as CreateOrganizationDto, y as CreateOrganizationEventDto, ve as CreateOrganizationEventOrderDto, C as CreateOrganizationEventStyleDto, f as CreateOrganizationEventTicketDto, S as CreateOrganizationIdentityDto, J as CreateOrganizationMemberDto, ae as CreateUserDto, O as CreateUserIdentityDto, W as Currency, de as DEFAULT_API_URL, _e as Language, Se as OrganizationEventStyleType, F as OrganizationEventTicketCategory, G as OrganizationEventTicketType, k as OrganizationEventType, q as OrganizationEventVisibilityType, b as OrganizationMemberRole, we as OrganizationMemberStatus, Re as OrganizationSocialType, Ie as ProfileType, m as REGEX, We as SignInUserDto, ft as TonightPass, le as TonightPassAPIError, B as UpdateOrganizationDto, Ge as UpdateOrganizationEventDto, xe as UpdateOrganizationEventStyleDto, Oe as UpdateOrganizationEventTicketDto, j as UpdateOrganizationIdentityDto, ie as UpdateOrganizationMemberDto, Z as UpdateUserDto, v as UserIdentityGender, Ae as UserRole, je as UserTokenType, Ce as auth, Je as careers, Ye as health, x as isBrowser, pt as notifications, Ke as orders, nt as organizations, it as profiles, He as request, L as sdk, at as users };
10
10
  //# sourceMappingURL=index.mjs.map
11
11
  //# sourceMappingURL=index.mjs.map