tonightpass 0.0.51 → 0.0.52
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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +24 -36
- package/dist/index.d.ts +24 -36
- package/dist/index.js +20 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/rest/dtos/organizations/events/checkouts/create-organization-event-checkout.dto.ts +5 -0
- package/src/rest/dtos/organizations/events/checkouts/index.ts +2 -0
- package/src/rest/dtos/organizations/events/checkouts/update-organization-event-checkout.dto.ts +3 -0
- package/src/rest/dtos/organizations/events/index.ts +1 -1
- package/src/rest/types/organizations/events/checkouts/index.ts +32 -0
- package/src/rest/types/organizations/events/index.ts +3 -3
- package/src/sdk/organizations/events/{carts → checkouts}/index.ts +17 -13
- package/src/sdk/organizations/events/index.ts +2 -2
- package/src/rest/dtos/organizations/events/carts/create-organization-event-cart.dto.ts +0 -8
- package/src/rest/dtos/organizations/events/carts/index.ts +0 -2
- package/src/rest/dtos/organizations/events/carts/update-organization-event-cart.dto.ts +0 -3
- package/src/rest/types/organizations/events/carts/index.ts +0 -42
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> tonightpass@0.0.
|
|
2
|
+
> tonightpass@0.0.52 build /home/runner/work/tonightpass/tonightpass/packages/node
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m43.
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m43.
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m24.42 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m76.25 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 837ms
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m21.14 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m76.12 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 837ms
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 4181ms
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m43.14 KB[39m
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m43.14 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# tonightpass
|
|
2
2
|
|
|
3
|
+
## 0.0.52
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`484ff42`](https://github.com/tonightpass/tonightpass/commit/484ff42a47a84b8c06e1523dcf7f8f3ae3919255) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Move cart into checkout
|
|
8
|
+
|
|
3
9
|
## 0.0.51
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -193,15 +193,7 @@ type Health<Key extends string> = {
|
|
|
193
193
|
};
|
|
194
194
|
type HealthEndpoints = Endpoint<"GET", "/health", [Health<"app">, Health<"database">]> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/http", Health<"app">>;
|
|
195
195
|
|
|
196
|
-
type
|
|
197
|
-
organizationEvent: OrganizationEvent;
|
|
198
|
-
tickets: OrganizationEventCartTicket[];
|
|
199
|
-
};
|
|
200
|
-
type OrganizationEventCartTicket = {
|
|
201
|
-
ticket: OrganizationEventTicket;
|
|
202
|
-
quantity: number;
|
|
203
|
-
};
|
|
204
|
-
type OrganizationEventCartEndpoints = Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/carts", ArrayResult<OrganizationEventCart>, ArrayOptions<OrganizationEventCart>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/carts/:cartId", OrganizationEventCart> | Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/carts", OrganizationEventCart, CreateOrganizationEventCartDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/carts/:cartId", OrganizationEventCart, UpdateOrganizationEventCartDto>;
|
|
196
|
+
type OrganizationEventCheckoutEndpoints = Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts", ArrayResult<OrganizationEventTicket[]>, ArrayOptions<OrganizationEventTicket[]>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[]> | Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/checkouts", OrganizationEventTicket[], CreateOrganizationEventCheckoutDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[], UpdateOrganizationEventCheckoutDto>;
|
|
205
197
|
|
|
206
198
|
declare class CreateOrganizationEventStyleDto {
|
|
207
199
|
type: OrganizationEventStyleType;
|
|
@@ -308,7 +300,7 @@ type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events", Array
|
|
|
308
300
|
latitude: number;
|
|
309
301
|
longitude: number;
|
|
310
302
|
radius?: number;
|
|
311
|
-
}> | Endpoint<"GET", "/organizations/:organizationSlug/events", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, null> |
|
|
303
|
+
}> | Endpoint<"GET", "/organizations/:organizationSlug/events", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, null> | OrganizationEventCheckoutEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints;
|
|
312
304
|
|
|
313
305
|
declare class UpdateOrganizationMemberDto {
|
|
314
306
|
role: OrganizationMemberRole;
|
|
@@ -539,17 +531,6 @@ declare class CreateOrganizationIdentityDto {
|
|
|
539
531
|
socialLinks?: OrganizationSocialLink[];
|
|
540
532
|
}
|
|
541
533
|
|
|
542
|
-
declare class CreateOrganizationEventCartDto {
|
|
543
|
-
tickets: CreateOrganizationEventCartTicketDto[];
|
|
544
|
-
}
|
|
545
|
-
declare class CreateOrganizationEventCartTicketDto {
|
|
546
|
-
ticketId: string;
|
|
547
|
-
quantity: number;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
declare class UpdateOrganizationEventCartDto extends CreateOrganizationEventCartDto {
|
|
551
|
-
}
|
|
552
|
-
|
|
553
534
|
declare class CreateOrganizationEventTicketDto {
|
|
554
535
|
name: string;
|
|
555
536
|
description?: string;
|
|
@@ -567,6 +548,13 @@ declare class CreateOrganizationEventTicketDto {
|
|
|
567
548
|
declare class UpdateOrganizationEventTicketDto extends CreateOrganizationEventTicketDto {
|
|
568
549
|
}
|
|
569
550
|
|
|
551
|
+
declare class CreateOrganizationEventCheckoutDto {
|
|
552
|
+
cart: CreateOrganizationEventTicketDto[];
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
declare class UpdateOrganizationEventCheckoutDto extends CreateOrganizationEventCheckoutDto {
|
|
556
|
+
}
|
|
557
|
+
|
|
570
558
|
declare class CreateOrganizationEventDto {
|
|
571
559
|
title: string;
|
|
572
560
|
slug?: string;
|
|
@@ -761,10 +749,10 @@ declare class Client {
|
|
|
761
749
|
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent>, {
|
|
762
750
|
path: Path;
|
|
763
751
|
method: "GET";
|
|
764
|
-
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/
|
|
752
|
+
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts", ArrayResult<OrganizationEventTicket[]>, ArrayOptions<T>>, {
|
|
765
753
|
path: Path;
|
|
766
754
|
method: "GET";
|
|
767
|
-
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/
|
|
755
|
+
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[]>, {
|
|
768
756
|
path: Path;
|
|
769
757
|
method: "GET";
|
|
770
758
|
}> | Extract<Endpoint<"GET", "/organizations/events/styles", OrganizationEventStyle[]>, {
|
|
@@ -833,7 +821,7 @@ declare class Client {
|
|
|
833
821
|
}> | Extract<Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto>, {
|
|
834
822
|
path: Path;
|
|
835
823
|
method: "POST";
|
|
836
|
-
}> | Extract<Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/
|
|
824
|
+
}> | Extract<Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/checkouts", OrganizationEventTicket[], CreateOrganizationEventCheckoutDto>, {
|
|
837
825
|
path: Path;
|
|
838
826
|
method: "POST";
|
|
839
827
|
}> | Extract<Endpoint<"POST", "/organizations/events/styles", OrganizationEventStyle, CreateOrganizationEventStyleDto>, {
|
|
@@ -857,7 +845,7 @@ declare class Client {
|
|
|
857
845
|
}> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto>, {
|
|
858
846
|
path: Path;
|
|
859
847
|
method: "PUT";
|
|
860
|
-
}> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/
|
|
848
|
+
}> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[], UpdateOrganizationEventCheckoutDto>, {
|
|
861
849
|
path: Path;
|
|
862
850
|
method: "PUT";
|
|
863
851
|
}> | Extract<Endpoint<"PUT", "/organizations/events/styles/:styleSlug", OrganizationEventStyle, UpdateOrganizationEventStyleDto>, {
|
|
@@ -971,11 +959,11 @@ declare const organizations: (client: Client) => {
|
|
|
971
959
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
972
960
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
973
961
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
974
|
-
|
|
975
|
-
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<
|
|
976
|
-
get: (organizationSlug: string, eventSlug: string,
|
|
977
|
-
create: (organizationSlug: string, eventSlug: string, data:
|
|
978
|
-
update: (organizationSlug: string, eventSlug: string,
|
|
962
|
+
checkouts: {
|
|
963
|
+
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationEventTicket[]>>;
|
|
964
|
+
get: (organizationSlug: string, eventSlug: string, checkoutId: string) => Promise<OrganizationEventTicket[]>;
|
|
965
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
966
|
+
update: (organizationSlug: string, eventSlug: string, checkoutId: string, data: UpdateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
979
967
|
};
|
|
980
968
|
styles: {
|
|
981
969
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
@@ -1076,11 +1064,11 @@ declare class TonightPass {
|
|
|
1076
1064
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1077
1065
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1078
1066
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
1079
|
-
|
|
1080
|
-
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<
|
|
1081
|
-
get: (organizationSlug: string, eventSlug: string,
|
|
1082
|
-
create: (organizationSlug: string, eventSlug: string, data:
|
|
1083
|
-
update: (organizationSlug: string, eventSlug: string,
|
|
1067
|
+
checkouts: {
|
|
1068
|
+
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationEventTicket[]>>;
|
|
1069
|
+
get: (organizationSlug: string, eventSlug: string, checkoutId: string) => Promise<OrganizationEventTicket[]>;
|
|
1070
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
1071
|
+
update: (organizationSlug: string, eventSlug: string, checkoutId: string, data: UpdateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
1084
1072
|
};
|
|
1085
1073
|
styles: {
|
|
1086
1074
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
@@ -1121,4 +1109,4 @@ declare class TonightPass {
|
|
|
1121
1109
|
|
|
1122
1110
|
declare const isBrowser: boolean;
|
|
1123
1111
|
|
|
1124
|
-
export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto,
|
|
1112
|
+
export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventCheckoutDto, CreateOrganizationEventDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, Currency, DEFAULT_API_URL, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, Language, type Location$1 as Location, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventCheckoutEndpoints, type OrganizationEventEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, type PromisedAPIResponse, type PromoCode, REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateOrganizationEventCheckoutDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, type UserIdentifier, type UserIdentity, type UserIdentityGender, type UserPreferences, UserRole, type UserToken, UserTokenType, auth, careers, health, isBrowser, organizations, profiles, request, sdk, users };
|
package/dist/index.d.ts
CHANGED
|
@@ -193,15 +193,7 @@ type Health<Key extends string> = {
|
|
|
193
193
|
};
|
|
194
194
|
type HealthEndpoints = Endpoint<"GET", "/health", [Health<"app">, Health<"database">]> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/http", Health<"app">>;
|
|
195
195
|
|
|
196
|
-
type
|
|
197
|
-
organizationEvent: OrganizationEvent;
|
|
198
|
-
tickets: OrganizationEventCartTicket[];
|
|
199
|
-
};
|
|
200
|
-
type OrganizationEventCartTicket = {
|
|
201
|
-
ticket: OrganizationEventTicket;
|
|
202
|
-
quantity: number;
|
|
203
|
-
};
|
|
204
|
-
type OrganizationEventCartEndpoints = Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/carts", ArrayResult<OrganizationEventCart>, ArrayOptions<OrganizationEventCart>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/carts/:cartId", OrganizationEventCart> | Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/carts", OrganizationEventCart, CreateOrganizationEventCartDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/carts/:cartId", OrganizationEventCart, UpdateOrganizationEventCartDto>;
|
|
196
|
+
type OrganizationEventCheckoutEndpoints = Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts", ArrayResult<OrganizationEventTicket[]>, ArrayOptions<OrganizationEventTicket[]>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[]> | Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/checkouts", OrganizationEventTicket[], CreateOrganizationEventCheckoutDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[], UpdateOrganizationEventCheckoutDto>;
|
|
205
197
|
|
|
206
198
|
declare class CreateOrganizationEventStyleDto {
|
|
207
199
|
type: OrganizationEventStyleType;
|
|
@@ -308,7 +300,7 @@ type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/events", Array
|
|
|
308
300
|
latitude: number;
|
|
309
301
|
longitude: number;
|
|
310
302
|
radius?: number;
|
|
311
|
-
}> | Endpoint<"GET", "/organizations/:organizationSlug/events", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, null> |
|
|
303
|
+
}> | Endpoint<"GET", "/organizations/:organizationSlug/events", ArrayResult<OrganizationEvent>, ArrayOptions<OrganizationEvent>> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent> | Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, null> | OrganizationEventCheckoutEndpoints | OrganizationEventStyleEndpoints | OrganizationEventTicketEndpoints;
|
|
312
304
|
|
|
313
305
|
declare class UpdateOrganizationMemberDto {
|
|
314
306
|
role: OrganizationMemberRole;
|
|
@@ -539,17 +531,6 @@ declare class CreateOrganizationIdentityDto {
|
|
|
539
531
|
socialLinks?: OrganizationSocialLink[];
|
|
540
532
|
}
|
|
541
533
|
|
|
542
|
-
declare class CreateOrganizationEventCartDto {
|
|
543
|
-
tickets: CreateOrganizationEventCartTicketDto[];
|
|
544
|
-
}
|
|
545
|
-
declare class CreateOrganizationEventCartTicketDto {
|
|
546
|
-
ticketId: string;
|
|
547
|
-
quantity: number;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
declare class UpdateOrganizationEventCartDto extends CreateOrganizationEventCartDto {
|
|
551
|
-
}
|
|
552
|
-
|
|
553
534
|
declare class CreateOrganizationEventTicketDto {
|
|
554
535
|
name: string;
|
|
555
536
|
description?: string;
|
|
@@ -567,6 +548,13 @@ declare class CreateOrganizationEventTicketDto {
|
|
|
567
548
|
declare class UpdateOrganizationEventTicketDto extends CreateOrganizationEventTicketDto {
|
|
568
549
|
}
|
|
569
550
|
|
|
551
|
+
declare class CreateOrganizationEventCheckoutDto {
|
|
552
|
+
cart: CreateOrganizationEventTicketDto[];
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
declare class UpdateOrganizationEventCheckoutDto extends CreateOrganizationEventCheckoutDto {
|
|
556
|
+
}
|
|
557
|
+
|
|
570
558
|
declare class CreateOrganizationEventDto {
|
|
571
559
|
title: string;
|
|
572
560
|
slug?: string;
|
|
@@ -761,10 +749,10 @@ declare class Client {
|
|
|
761
749
|
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent>, {
|
|
762
750
|
path: Path;
|
|
763
751
|
method: "GET";
|
|
764
|
-
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/
|
|
752
|
+
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts", ArrayResult<OrganizationEventTicket[]>, ArrayOptions<T>>, {
|
|
765
753
|
path: Path;
|
|
766
754
|
method: "GET";
|
|
767
|
-
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/
|
|
755
|
+
}> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[]>, {
|
|
768
756
|
path: Path;
|
|
769
757
|
method: "GET";
|
|
770
758
|
}> | Extract<Endpoint<"GET", "/organizations/events/styles", OrganizationEventStyle[]>, {
|
|
@@ -833,7 +821,7 @@ declare class Client {
|
|
|
833
821
|
}> | Extract<Endpoint<"POST", "/organizations/:organizationSlug/events", OrganizationEvent, CreateOrganizationEventDto>, {
|
|
834
822
|
path: Path;
|
|
835
823
|
method: "POST";
|
|
836
|
-
}> | Extract<Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/
|
|
824
|
+
}> | Extract<Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/checkouts", OrganizationEventTicket[], CreateOrganizationEventCheckoutDto>, {
|
|
837
825
|
path: Path;
|
|
838
826
|
method: "POST";
|
|
839
827
|
}> | Extract<Endpoint<"POST", "/organizations/events/styles", OrganizationEventStyle, CreateOrganizationEventStyleDto>, {
|
|
@@ -857,7 +845,7 @@ declare class Client {
|
|
|
857
845
|
}> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", OrganizationEvent, UpdateOrganizationEventDto>, {
|
|
858
846
|
path: Path;
|
|
859
847
|
method: "PUT";
|
|
860
|
-
}> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/
|
|
848
|
+
}> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId", OrganizationEventTicket[], UpdateOrganizationEventCheckoutDto>, {
|
|
861
849
|
path: Path;
|
|
862
850
|
method: "PUT";
|
|
863
851
|
}> | Extract<Endpoint<"PUT", "/organizations/events/styles/:styleSlug", OrganizationEventStyle, UpdateOrganizationEventStyleDto>, {
|
|
@@ -971,11 +959,11 @@ declare const organizations: (client: Client) => {
|
|
|
971
959
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
972
960
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
973
961
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
974
|
-
|
|
975
|
-
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<
|
|
976
|
-
get: (organizationSlug: string, eventSlug: string,
|
|
977
|
-
create: (organizationSlug: string, eventSlug: string, data:
|
|
978
|
-
update: (organizationSlug: string, eventSlug: string,
|
|
962
|
+
checkouts: {
|
|
963
|
+
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationEventTicket[]>>;
|
|
964
|
+
get: (organizationSlug: string, eventSlug: string, checkoutId: string) => Promise<OrganizationEventTicket[]>;
|
|
965
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
966
|
+
update: (organizationSlug: string, eventSlug: string, checkoutId: string, data: UpdateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
979
967
|
};
|
|
980
968
|
styles: {
|
|
981
969
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
@@ -1076,11 +1064,11 @@ declare class TonightPass {
|
|
|
1076
1064
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1077
1065
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1078
1066
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
1079
|
-
|
|
1080
|
-
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<
|
|
1081
|
-
get: (organizationSlug: string, eventSlug: string,
|
|
1082
|
-
create: (organizationSlug: string, eventSlug: string, data:
|
|
1083
|
-
update: (organizationSlug: string, eventSlug: string,
|
|
1067
|
+
checkouts: {
|
|
1068
|
+
getAll: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationEventTicket[]>>;
|
|
1069
|
+
get: (organizationSlug: string, eventSlug: string, checkoutId: string) => Promise<OrganizationEventTicket[]>;
|
|
1070
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
1071
|
+
update: (organizationSlug: string, eventSlug: string, checkoutId: string, data: UpdateOrganizationEventCheckoutDto) => Promise<OrganizationEventTicket[]>;
|
|
1084
1072
|
};
|
|
1085
1073
|
styles: {
|
|
1086
1074
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
@@ -1121,4 +1109,4 @@ declare class TonightPass {
|
|
|
1121
1109
|
|
|
1122
1110
|
declare const isBrowser: boolean;
|
|
1123
1111
|
|
|
1124
|
-
export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto,
|
|
1112
|
+
export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventCheckoutDto, CreateOrganizationEventDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, Currency, DEFAULT_API_URL, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, Language, type Location$1 as Location, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventCheckoutEndpoints, type OrganizationEventEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, type PromisedAPIResponse, type PromoCode, REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateOrganizationEventCheckoutDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, type UserIdentifier, type UserIdentity, type UserIdentityGender, type UserPreferences, UserRole, type UserToken, UserTokenType, auth, careers, health, isBrowser, organizations, profiles, request, sdk, users };
|
package/dist/index.js
CHANGED
|
@@ -3,46 +3,45 @@
|
|
|
3
3
|
require('reflect-metadata');
|
|
4
4
|
var classValidator = require('class-validator');
|
|
5
5
|
var classTransformer = require('class-transformer');
|
|
6
|
-
var
|
|
6
|
+
var ht = require('redaxios');
|
|
7
7
|
var pathcat = require('pathcat');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var ht__default = /*#__PURE__*/_interopDefault(ht);
|
|
12
12
|
|
|
13
|
-
var tt=Object.defineProperty;var o=(e,t)=>tt(e,"name",{value:t,configurable:!0});var oe="https://api.tonightpass.com";var Z={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-Z0-9 ]+$/,SLUG:/^[a-z0-9_.]+$/,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 v(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(v,"_ts_decorate");function S(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(S,"_ts_metadata");var P=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};v([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),S("design:type",String)],P.prototype,"organizationSlug",void 0);v([classValidator.IsObject(),S("design:type",typeof x>"u"?Object:x)],P.prototype,"identity",void 0);v([classValidator.IsArray(),S("design:type",Array)],P.prototype,"members",void 0);v([classValidator.IsOptional(),classValidator.IsObject(),S("design:type",typeof Location>"u"?Object:Location)],P.prototype,"location",void 0);var x=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};v([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),S("design:type",String)],x.prototype,"displayName",void 0);v([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),S("design:type",String)],x.prototype,"description",void 0);v([classValidator.IsUrl({protocols:["http","https"]}),S("design:type",String)],x.prototype,"avatarUrl",void 0);v([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),S("design:type",String)],x.prototype,"bannerUrl",void 0);v([classValidator.IsOptional(),classValidator.IsArray(),S("design:type",Array)],x.prototype,"socialLinks",void 0);function R(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(R,"_ts_decorate");function j(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(j,"_ts_metadata");var L=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};R([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),j("design:type",String)],L.prototype,"slug",void 0);R([classValidator.IsObject(),classValidator.IsOptional(),j("design:type",typeof w>"u"?Object:w)],L.prototype,"identity",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),j("design:type",Array)],L.prototype,"members",void 0);R([classValidator.IsOptional(),classValidator.IsObject(),j("design:type",typeof Location>"u"?Object:Location)],L.prototype,"location",void 0);var w=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};R([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),j("design:type",String)],w.prototype,"displayName",void 0);R([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),j("design:type",String)],w.prototype,"description",void 0);R([classValidator.IsUrl({protocols:["http","https"]}),classValidator.IsOptional(),j("design:type",String)],w.prototype,"avatarUrl",void 0);R([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),j("design:type",String)],w.prototype,"bannerUrl",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),j("design:type",Array)],w.prototype,"socialLinks",void 0);var G=class{static{o(this,"CreateOrganizationEventCartDto");}tickets},ce=class{static{o(this,"CreateOrganizationEventCartTicketDto");}ticketId;quantity};var fe=class extends G{static{o(this,"UpdateOrganizationEventCartDto");}};var F=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var le=class extends F{static{o(this,"UpdateOrganizationEventStyleDto");}};exports.OrganizationEventTicketType = void 0;(function(e){e.ETicket="e-ticket",e.Other="other";})(exports.OrganizationEventTicketType||(exports.OrganizationEventTicketType={}));exports.OrganizationEventTicketCategory = void 0;(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";})(exports.OrganizationEventTicketCategory||(exports.OrganizationEventTicketCategory={}));exports.OrganizationEventStyleType = void 0;(function(e){e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art";})(exports.OrganizationEventStyleType||(exports.OrganizationEventStyleType={}));exports.OrganizationEventType = void 0;(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";})(exports.OrganizationEventType||(exports.OrganizationEventType={}));exports.OrganizationEventVisibilityType = void 0;(function(e){e.Public="public",e.Unlisted="unlisted",e.Private="private";})(exports.OrganizationEventVisibilityType||(exports.OrganizationEventVisibilityType={}));exports.OrganizationMemberStatus = void 0;(function(e){e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected";})(exports.OrganizationMemberStatus||(exports.OrganizationMemberStatus={}));exports.OrganizationMemberRole = void 0;(function(e){e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner";})(exports.OrganizationMemberRole||(exports.OrganizationMemberRole={}));exports.OrganizationSocialType = void 0;(function(e){e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website";})(exports.OrganizationSocialType||(exports.OrganizationSocialType={}));exports.UserTokenType = void 0;(function(e){e.Authentication="authentication",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation";})(exports.UserTokenType||(exports.UserTokenType={}));exports.UserRole = void 0;(function(e){e.User="user",e.Developer="developer",e.Admin="admin";})(exports.UserRole||(exports.UserRole={}));exports.OrderStatus = void 0;(function(e){e.Created="created",e.Cancelled="cancelled",e.Completed="completed",e.Pending="pending",e.Confirmed="confirmed",e.Declined="declined",e.Refunded="refunded",e.PartiallyRefunded="partially_refunded",e.Expired="expired";})(exports.OrderStatus||(exports.OrderStatus={}));exports.Currency = void 0;(function(e){e.EUR="EUR",e.USD="USD",e.GBP="GBP";})(exports.Currency||(exports.Currency={}));exports.Language = void 0;(function(e){e.FR="fr",e.EN="en";})(exports.Language||(exports.Language={}));function u(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(u,"_ts_decorate");function m(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(m,"_ts_metadata");var c=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};u([classValidator.IsString(),classValidator.Length(1,128),m("design:type",String)],c.prototype,"name",void 0);u([classValidator.IsString(),classValidator.Length(1,1024),m("design:type",String)],c.prototype,"description",void 0);u([classValidator.IsNumber(),classValidator.Min(0),m("design:type",Number)],c.prototype,"price",void 0);u([classValidator.IsNumber(),classValidator.Min(0),m("design:type",Number)],c.prototype,"quantity",void 0);u([classValidator.IsEnum(exports.OrganizationEventTicketType),m("design:type",typeof exports.OrganizationEventTicketType>"u"?Object:exports.OrganizationEventTicketType)],c.prototype,"type",void 0);u([classValidator.IsEnum(exports.OrganizationEventTicketCategory),m("design:type",typeof exports.OrganizationEventTicketCategory>"u"?Object:exports.OrganizationEventTicketCategory)],c.prototype,"category",void 0);u([classValidator.IsEnum(exports.Currency),m("design:type",typeof exports.Currency>"u"?Object:exports.Currency)],c.prototype,"currency",void 0);u([classValidator.IsBoolean(),m("design:type",Boolean)],c.prototype,"isVisible",void 0);u([classValidator.IsBoolean(),m("design:type",Boolean)],c.prototype,"isFeesIncluded",void 0);u([classValidator.IsDateString(),classValidator.IsOptional(),m("design:type",typeof Date>"u"?Object:Date)],c.prototype,"startAt",void 0);u([classValidator.IsDateString(),classValidator.IsOptional(),m("design:type",typeof Date>"u"?Object:Date)],c.prototype,"endAt",void 0);var Ie=class extends c{static{o(this,"UpdateOrganizationEventTicketDto");}};function _(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(_,"_ts_decorate");function z(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(z,"_ts_metadata");var g=class{static{o(this,"CreateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};_([classValidator.IsString(),classValidator.Length(1,64),z("design:type",String)],g.prototype,"title",void 0);_([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),z("design:type",String)],g.prototype,"slug",void 0);_([classValidator.IsString(),classValidator.Length(16,2048),z("design:type",String)],g.prototype,"description",void 0);_([classValidator.IsEnum(exports.OrganizationEventType),z("design:type",typeof exports.OrganizationEventType>"u"?Object:exports.OrganizationEventType)],g.prototype,"type",void 0);_([classValidator.IsEnum(exports.OrganizationEventVisibilityType),z("design:type",typeof exports.OrganizationEventVisibilityType>"u"?Object:exports.OrganizationEventVisibilityType)],g.prototype,"visibility",void 0);_([classValidator.IsDateString(),z("design:type",typeof Date>"u"?Object:Date)],g.prototype,"startAt",void 0);_([classValidator.IsDateString(),z("design:type",typeof Date>"u"?Object:Date)],g.prototype,"endAt",void 0);var Pe=class extends g{static{o(this,"UpdateOrganizationEventDto");}};function Le(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(Le,"_ts_decorate");function Ne(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Ne,"_ts_metadata");var W=class{static{o(this,"CreateOrganizationMemberDto");}user;role};Le([classValidator.IsString(),classValidator.IsNotEmpty(),Ne("design:type",String)],W.prototype,"user",void 0);Le([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),Ne("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],W.prototype,"role",void 0);function ft(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(ft,"_ts_decorate");function lt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(lt,"_ts_metadata");var ee=class{static{o(this,"UpdateOrganizationMemberDto");}role};ft([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),lt("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],ee.prototype,"role",void 0);var Ue=class{static{o(this,"CreateUserDto");}identifier;password;identity;addresses};var Ee=class{static{o(this,"SignInUserDto");}identifier;password};function f(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(f,"_ts_decorate");function l(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(l,"_ts_metadata");var q=class{static{o(this,"UpdateUserDto");}identifier;identity;password};f([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>M),l("design:type",typeof M>"u"?Object:M)],q.prototype,"identifier",void 0);f([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>y),l("design:type",typeof y>"u"?Object:y)],q.prototype,"identity",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(8),classValidator.MaxLength(128),l("design:type",String)],q.prototype,"password",void 0);var M=class{static{o(this,"UpdateIdentifierDto");}email;phoneNumber;username};f([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),l("design:type",String)],M.prototype,"email",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),l("design:type",String)],M.prototype,"phoneNumber",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(3),l("design:type",String)],M.prototype,"username",void 0);var y=class{static{o(this,"UpdateIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(Z.NAME,{message:"First name must be composed of letters only"}),l("design:type",String)],y.prototype,"firstName",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(Z.NAME,{message:"Last name must be composed of letters only"}),l("design:type",String)],y.prototype,"lastName",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),l("design:type",String)],y.prototype,"displayName",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),l("design:type",String)],y.prototype,"description",void 0);f([classValidator.IsOptional(),classValidator.IsUrl(),l("design:type",Object)],y.prototype,"avatarUrl",void 0);f([classValidator.IsOptional(),classValidator.IsUrl(),l("design:type",Object)],y.prototype,"bannerUrl",void 0);f([classValidator.IsOptional(),l("design:type",String)],y.prototype,"gender",void 0);f([classValidator.IsOptional(),classValidator.IsDateString(),l("design:type",typeof Date>"u"?Object:Date)],y.prototype,"birthDate",void 0);var b=typeof window<"u";var xt=bt__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!b&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e){return JSON.stringify(e)}],withCredentials:b}),Fe=o(async(e,t)=>xt(e,{...t}).then(n=>n).catch(n=>{throw n.data||console.error(n),n.data}),"request");var te=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;}},$=class{static{o(this,"Client");}options;url;constructor(t){this.options=t,this.url=(r,n)=>{let i=this.options.baseURL||oe;return pathcat.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 a=this.url(r,i);if(n!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await Fe(a,{method:t,data:n,...s}),V=p.data;if(!V.success)throw new te(p,V);return V.data}};function B(e){return e}o(B,"sdk");var We=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(b)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(b)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(b)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 $e=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 Ve=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(b)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(b)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 Ze=o(e=>({getAll:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/carts",{organizationSlug:t,eventSlug:r}),"getAll"),get:o(async(t,r,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug/carts/:cartId",{organizationSlug:t,eventSlug:r,cartId:n}),"get"),create:o(async(t,r,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/carts",n,{organizationSlug:t,eventSlug:r}),"create"),update:o(async(t,r,n,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug/carts/:cartId",i,{organizationSlug:t,eventSlug:r,cartId:n}),"update")}),"organizationsEventCarts");var He=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 Xe=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 Je=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"),carts:Ze(e),styles:He(e),tickets:Xe(e)}),"organizationsEvents");var Ye=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 Ke=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:Ve(e),events:Je(e),members:Ye(e)});var Qe=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get")});var Te=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 et=class{static{o(this,"TonightPass");}client;auth;careers;health;organizations;profiles;users;constructor(t){this.client=new $(t),this.auth=We(this.client),this.careers=Ce(this.client),this.health=$e(this.client),this.organizations=Ke(this.client),this.profiles=Qe(this.client),this.users=Te(this.client);}};
|
|
13
|
+
var et=Object.defineProperty;var o=(e,t)=>et(e,"name",{value:t,configurable:!0});var oe="https://api.tonightpass.com";var Z={EMAIL:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i,NAME:/^[a-zA-Z0-9 ]+$/,SLUG:/^[a-z0-9_.]+$/,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 x(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(x,"_ts_decorate");function S(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(S,"_ts_metadata");var P=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};x([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),S("design:type",String)],P.prototype,"organizationSlug",void 0);x([classValidator.IsObject(),S("design:type",typeof v>"u"?Object:v)],P.prototype,"identity",void 0);x([classValidator.IsArray(),S("design:type",Array)],P.prototype,"members",void 0);x([classValidator.IsOptional(),classValidator.IsObject(),S("design:type",typeof Location>"u"?Object:Location)],P.prototype,"location",void 0);var v=class{static{o(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};x([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),S("design:type",String)],v.prototype,"displayName",void 0);x([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),S("design:type",String)],v.prototype,"description",void 0);x([classValidator.IsUrl({protocols:["http","https"]}),S("design:type",String)],v.prototype,"avatarUrl",void 0);x([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),S("design:type",String)],v.prototype,"bannerUrl",void 0);x([classValidator.IsOptional(),classValidator.IsArray(),S("design:type",Array)],v.prototype,"socialLinks",void 0);function R(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(R,"_ts_decorate");function j(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(j,"_ts_metadata");var L=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};R([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),j("design:type",String)],L.prototype,"slug",void 0);R([classValidator.IsObject(),classValidator.IsOptional(),j("design:type",typeof w>"u"?Object:w)],L.prototype,"identity",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),j("design:type",Array)],L.prototype,"members",void 0);R([classValidator.IsOptional(),classValidator.IsObject(),j("design:type",typeof Location>"u"?Object:Location)],L.prototype,"location",void 0);var w=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};R([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),j("design:type",String)],w.prototype,"displayName",void 0);R([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),j("design:type",String)],w.prototype,"description",void 0);R([classValidator.IsUrl({protocols:["http","https"]}),classValidator.IsOptional(),j("design:type",String)],w.prototype,"avatarUrl",void 0);R([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),j("design:type",String)],w.prototype,"bannerUrl",void 0);R([classValidator.IsOptional(),classValidator.IsArray(),j("design:type",Array)],w.prototype,"socialLinks",void 0);var G=class{static{o(this,"CreateOrganizationEventCheckoutDto");}cart};var ce=class extends G{static{o(this,"UpdateOrganizationEventCheckoutDto");}};var F=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var fe=class extends F{static{o(this,"UpdateOrganizationEventStyleDto");}};exports.OrganizationEventTicketType = void 0;(function(e){e.ETicket="e-ticket",e.Other="other";})(exports.OrganizationEventTicketType||(exports.OrganizationEventTicketType={}));exports.OrganizationEventTicketCategory = void 0;(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";})(exports.OrganizationEventTicketCategory||(exports.OrganizationEventTicketCategory={}));exports.OrganizationEventStyleType = void 0;(function(e){e.Music="music",e.Dress="dress",e.Sport="sport",e.Food="food",e.Art="art";})(exports.OrganizationEventStyleType||(exports.OrganizationEventStyleType={}));exports.OrganizationEventType = void 0;(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";})(exports.OrganizationEventType||(exports.OrganizationEventType={}));exports.OrganizationEventVisibilityType = void 0;(function(e){e.Public="public",e.Unlisted="unlisted",e.Private="private";})(exports.OrganizationEventVisibilityType||(exports.OrganizationEventVisibilityType={}));exports.OrganizationMemberStatus = void 0;(function(e){e.Pending="pending",e.Accepted="accepted",e.Rejected="rejected";})(exports.OrganizationMemberStatus||(exports.OrganizationMemberStatus={}));exports.OrganizationMemberRole = void 0;(function(e){e.Member="member",e.Manager="manager",e.Admin="admin",e.Owner="owner";})(exports.OrganizationMemberRole||(exports.OrganizationMemberRole={}));exports.OrganizationSocialType = void 0;(function(e){e.Facebook="facebook",e.Twitter="twitter",e.Instagram="instagram",e.Linkedin="linkedin",e.Youtube="youtube",e.Website="website";})(exports.OrganizationSocialType||(exports.OrganizationSocialType={}));exports.UserTokenType = void 0;(function(e){e.Authentication="authentication",e.OrganizationInvite="organization_invite",e.PasswordRecovery="password_recovery",e.EmailValidation="email_validation",e.PhoneValidation="phone_validation";})(exports.UserTokenType||(exports.UserTokenType={}));exports.UserRole = void 0;(function(e){e.User="user",e.Developer="developer",e.Admin="admin";})(exports.UserRole||(exports.UserRole={}));exports.OrderStatus = void 0;(function(e){e.Created="created",e.Cancelled="cancelled",e.Completed="completed",e.Pending="pending",e.Confirmed="confirmed",e.Declined="declined",e.Refunded="refunded",e.PartiallyRefunded="partially_refunded",e.Expired="expired";})(exports.OrderStatus||(exports.OrderStatus={}));exports.Currency = void 0;(function(e){e.EUR="EUR",e.USD="USD",e.GBP="GBP";})(exports.Currency||(exports.Currency={}));exports.Language = void 0;(function(e){e.FR="fr",e.EN="en";})(exports.Language||(exports.Language={}));function u(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(u,"_ts_decorate");function m(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(m,"_ts_metadata");var c=class{static{o(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};u([classValidator.IsString(),classValidator.Length(1,128),m("design:type",String)],c.prototype,"name",void 0);u([classValidator.IsString(),classValidator.Length(1,1024),m("design:type",String)],c.prototype,"description",void 0);u([classValidator.IsNumber(),classValidator.Min(0),m("design:type",Number)],c.prototype,"price",void 0);u([classValidator.IsNumber(),classValidator.Min(0),m("design:type",Number)],c.prototype,"quantity",void 0);u([classValidator.IsEnum(exports.OrganizationEventTicketType),m("design:type",typeof exports.OrganizationEventTicketType>"u"?Object:exports.OrganizationEventTicketType)],c.prototype,"type",void 0);u([classValidator.IsEnum(exports.OrganizationEventTicketCategory),m("design:type",typeof exports.OrganizationEventTicketCategory>"u"?Object:exports.OrganizationEventTicketCategory)],c.prototype,"category",void 0);u([classValidator.IsEnum(exports.Currency),m("design:type",typeof exports.Currency>"u"?Object:exports.Currency)],c.prototype,"currency",void 0);u([classValidator.IsBoolean(),m("design:type",Boolean)],c.prototype,"isVisible",void 0);u([classValidator.IsBoolean(),m("design:type",Boolean)],c.prototype,"isFeesIncluded",void 0);u([classValidator.IsDateString(),classValidator.IsOptional(),m("design:type",typeof Date>"u"?Object:Date)],c.prototype,"startAt",void 0);u([classValidator.IsDateString(),classValidator.IsOptional(),m("design:type",typeof Date>"u"?Object:Date)],c.prototype,"endAt",void 0);var Ae=class extends c{static{o(this,"UpdateOrganizationEventTicketDto");}};function _(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(_,"_ts_decorate");function z(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(z,"_ts_metadata");var g=class{static{o(this,"CreateOrganizationEventDto");}title;slug;description;type;visibility;flyers;trailers;location;tickets;styles;startAt;endAt};_([classValidator.IsString(),classValidator.Length(1,64),z("design:type",String)],g.prototype,"title",void 0);_([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),z("design:type",String)],g.prototype,"slug",void 0);_([classValidator.IsString(),classValidator.Length(16,2048),z("design:type",String)],g.prototype,"description",void 0);_([classValidator.IsEnum(exports.OrganizationEventType),z("design:type",typeof exports.OrganizationEventType>"u"?Object:exports.OrganizationEventType)],g.prototype,"type",void 0);_([classValidator.IsEnum(exports.OrganizationEventVisibilityType),z("design:type",typeof exports.OrganizationEventVisibilityType>"u"?Object:exports.OrganizationEventVisibilityType)],g.prototype,"visibility",void 0);_([classValidator.IsDateString(),z("design:type",typeof Date>"u"?Object:Date)],g.prototype,"startAt",void 0);_([classValidator.IsDateString(),z("design:type",typeof Date>"u"?Object:Date)],g.prototype,"endAt",void 0);var ze=class extends g{static{o(this,"UpdateOrganizationEventDto");}};function Pe(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(Pe,"_ts_decorate");function Le(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Le,"_ts_metadata");var W=class{static{o(this,"CreateOrganizationMemberDto");}user;role};Pe([classValidator.IsString(),classValidator.IsNotEmpty(),Le("design:type",String)],W.prototype,"user",void 0);Pe([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),Le("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],W.prototype,"role",void 0);function ct(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(ct,"_ts_decorate");function ft(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ft,"_ts_metadata");var ee=class{static{o(this,"UpdateOrganizationMemberDto");}role};ct([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),ft("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],ee.prototype,"role",void 0);var Ne=class{static{o(this,"CreateUserDto");}identifier;password;identity;addresses};var Ue=class{static{o(this,"SignInUserDto");}identifier;password};function f(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}o(f,"_ts_decorate");function l(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(l,"_ts_metadata");var q=class{static{o(this,"UpdateUserDto");}identifier;identity;password};f([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>O),l("design:type",typeof O>"u"?Object:O)],q.prototype,"identifier",void 0);f([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>y),l("design:type",typeof y>"u"?Object:y)],q.prototype,"identity",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(8),classValidator.MaxLength(128),l("design:type",String)],q.prototype,"password",void 0);var O=class{static{o(this,"UpdateIdentifierDto");}email;phoneNumber;username};f([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),l("design:type",String)],O.prototype,"email",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),l("design:type",String)],O.prototype,"phoneNumber",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(3),l("design:type",String)],O.prototype,"username",void 0);var y=class{static{o(this,"UpdateIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(Z.NAME,{message:"First name must be composed of letters only"}),l("design:type",String)],y.prototype,"firstName",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(Z.NAME,{message:"Last name must be composed of letters only"}),l("design:type",String)],y.prototype,"lastName",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),l("design:type",String)],y.prototype,"displayName",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),l("design:type",String)],y.prototype,"description",void 0);f([classValidator.IsOptional(),classValidator.IsUrl(),l("design:type",Object)],y.prototype,"avatarUrl",void 0);f([classValidator.IsOptional(),classValidator.IsUrl(),l("design:type",Object)],y.prototype,"bannerUrl",void 0);f([classValidator.IsOptional(),l("design:type",String)],y.prototype,"gender",void 0);f([classValidator.IsOptional(),classValidator.IsDateString(),l("design:type",typeof Date>"u"?Object:Date)],y.prototype,"birthDate",void 0);var b=typeof window<"u";var bt=ht__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!b&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e){return JSON.stringify(e)}],withCredentials:b}),Ge=o(async(e,t)=>bt(e,{...t}).then(n=>n).catch(n=>{throw n.data||console.error(n),n.data}),"request");var te=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;}},$=class{static{o(this,"Client");}options;url;constructor(t){this.options=t,this.url=(r,n)=>{let i=this.options.baseURL||oe;return pathcat.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 a=this.url(r,i);if(n!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await Ge(a,{method:t,data:n,...s}),V=p.data;if(!V.success)throw new te(p,V);return V.data}};function M(e){return e}o(M,"sdk");var Fe=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(b)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(b)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(b)window.location.href=e.url("/oauth2/facebook",t||{});else throw new Error("Facebook OAuth2 is only available in the browser")},"connect")}}});var We=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 Ce=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 $e=o(e=>({account:o(async t=>e.get("/organizations/:organizationSlug/billing/account",{organizationSlug:t}),"account"),link:o(t=>{if(b)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(b)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 Ve=o(e=>({getAll:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/checkouts",{organizationSlug:t,eventSlug:r}),"getAll"),get:o(async(t,r,n)=>e.get("/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId",{organizationSlug:t,eventSlug:r,checkoutId:n}),"get"),create:o(async(t,r,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/checkouts",n,{organizationSlug:t,eventSlug:r}),"create"),update:o(async(t,r,n,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug/checkouts/:checkoutId",i,{organizationSlug:t,eventSlug:r,checkoutId:n}),"update")}),"organizationsEventCheckouts");var Ze=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 He=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 Xe=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"),checkouts:Ve(e),styles:Ze(e),tickets:He(e)}),"organizationsEvents");var Je=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 Ye=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:$e(e),events:Xe(e),members:Je(e)});var Ke=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get")});var Qe=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 Te=class{static{o(this,"TonightPass");}client;auth;careers;health;organizations;profiles;users;constructor(t){this.client=new $(t),this.auth=Fe(this.client),this.careers=We(this.client),this.health=Ce(this.client),this.organizations=Ye(this.client),this.profiles=Ke(this.client),this.users=Qe(this.client);}};
|
|
14
14
|
|
|
15
15
|
exports.Client = $;
|
|
16
16
|
exports.CreateOrganizationDto = P;
|
|
17
|
-
exports.
|
|
18
|
-
exports.CreateOrganizationEventCartTicketDto = ce;
|
|
17
|
+
exports.CreateOrganizationEventCheckoutDto = G;
|
|
19
18
|
exports.CreateOrganizationEventDto = g;
|
|
20
19
|
exports.CreateOrganizationEventStyleDto = F;
|
|
21
20
|
exports.CreateOrganizationEventTicketDto = c;
|
|
22
|
-
exports.CreateOrganizationIdentityDto =
|
|
21
|
+
exports.CreateOrganizationIdentityDto = v;
|
|
23
22
|
exports.CreateOrganizationMemberDto = W;
|
|
24
|
-
exports.CreateUserDto =
|
|
23
|
+
exports.CreateUserDto = Ne;
|
|
25
24
|
exports.DEFAULT_API_URL = oe;
|
|
26
25
|
exports.REGEX = Z;
|
|
27
|
-
exports.SignInUserDto =
|
|
28
|
-
exports.TonightPass =
|
|
26
|
+
exports.SignInUserDto = Ue;
|
|
27
|
+
exports.TonightPass = Te;
|
|
29
28
|
exports.TonightPassAPIError = te;
|
|
30
29
|
exports.UpdateOrganizationDto = L;
|
|
31
|
-
exports.
|
|
32
|
-
exports.UpdateOrganizationEventDto =
|
|
33
|
-
exports.UpdateOrganizationEventStyleDto =
|
|
34
|
-
exports.UpdateOrganizationEventTicketDto =
|
|
30
|
+
exports.UpdateOrganizationEventCheckoutDto = ce;
|
|
31
|
+
exports.UpdateOrganizationEventDto = ze;
|
|
32
|
+
exports.UpdateOrganizationEventStyleDto = fe;
|
|
33
|
+
exports.UpdateOrganizationEventTicketDto = Ae;
|
|
35
34
|
exports.UpdateOrganizationIdentityDto = w;
|
|
36
35
|
exports.UpdateOrganizationMemberDto = ee;
|
|
37
36
|
exports.UpdateUserDto = q;
|
|
38
|
-
exports.auth =
|
|
39
|
-
exports.careers =
|
|
40
|
-
exports.health =
|
|
37
|
+
exports.auth = Fe;
|
|
38
|
+
exports.careers = We;
|
|
39
|
+
exports.health = Ce;
|
|
41
40
|
exports.isBrowser = b;
|
|
42
|
-
exports.organizations =
|
|
43
|
-
exports.profiles =
|
|
44
|
-
exports.request =
|
|
45
|
-
exports.sdk =
|
|
46
|
-
exports.users =
|
|
41
|
+
exports.organizations = Ye;
|
|
42
|
+
exports.profiles = Ke;
|
|
43
|
+
exports.request = Ge;
|
|
44
|
+
exports.sdk = M;
|
|
45
|
+
exports.users = Qe;
|
|
47
46
|
//# sourceMappingURL=index.js.map
|
|
48
47
|
//# sourceMappingURL=index.js.map
|