tonightpass 0.0.32 → 0.0.34
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 +12 -0
- package/dist/index.d.mts +40 -28
- package/dist/index.d.ts +40 -28
- package/dist/index.js +36 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/rest/dtos/organizations/create-organization.dto.ts +6 -18
- package/src/rest/dtos/organizations/index.ts +1 -0
- package/src/rest/dtos/organizations/members/create-organization-member.dto.ts +13 -0
- package/src/rest/dtos/organizations/members/index.ts +2 -0
- package/src/rest/dtos/organizations/update-organization.dto.ts +62 -2
- package/src/rest/dtos/users/update-user.dto.ts +5 -5
- package/src/rest/types/organizations/members/index.ts +2 -2
- package/src/sdk/organizations/billing/index.ts +3 -3
- package/src/sdk/organizations/events/index.ts +5 -5
- package/src/sdk/organizations/events/styles/index.ts +3 -3
- package/src/sdk/organizations/events/tickets/index.ts +3 -3
- package/src/sdk/organizations/index.ts +3 -3
- package/src/sdk/organizations/members/index.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> tonightpass@0.0.
|
|
2
|
+
> tonightpass@0.0.34 build /home/runner/work/tonightpass/tonightpass/packages/node
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
[34mCLI[39m Target: esnext
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
13
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
15
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
16
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
17
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m18.48 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m49.10 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 389ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m16.18 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m49.10 KB[39m
|
|
17
|
+
[32mESM[39m ⚡️ Build success in 390ms
|
|
18
18
|
[34mDTS[39m Build start
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m35.
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m35.
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 3783ms
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m35.91 KB[39m
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m35.91 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# tonightpass
|
|
2
2
|
|
|
3
|
+
## 0.0.34
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8bdbbc9`](https://github.com/tonightpass/tonightpass/commit/8bdbbc9236b978cc1cb5683e2e063431c018875d) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Update dtos with class-validator
|
|
8
|
+
|
|
9
|
+
## 0.0.33
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`b88f3c9`](https://github.com/tonightpass/tonightpass/commit/b88f3c9fe88f6c6a97ade72e8e645f0cc34fc8dc) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Fix sdk sub modules
|
|
14
|
+
|
|
3
15
|
## 0.0.32
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -41,7 +41,7 @@ type User = Base & {
|
|
|
41
41
|
password: string;
|
|
42
42
|
identity: UserIdentity;
|
|
43
43
|
role: UserRole;
|
|
44
|
-
addresses: Location[];
|
|
44
|
+
addresses: Location$1[];
|
|
45
45
|
preferences: UserPreferences;
|
|
46
46
|
connections: UserConnection[];
|
|
47
47
|
verified: boolean;
|
|
@@ -252,7 +252,7 @@ type OrganizationEvent = Base & {
|
|
|
252
252
|
public: boolean;
|
|
253
253
|
flyers: string[];
|
|
254
254
|
trailers: string[];
|
|
255
|
-
location: Location;
|
|
255
|
+
location: Location$1;
|
|
256
256
|
tickets: OrganizationEventTicket[];
|
|
257
257
|
styles: OrganizationEventStyle[];
|
|
258
258
|
startAt: Date;
|
|
@@ -320,13 +320,13 @@ declare enum OrganizationMemberRole {
|
|
|
320
320
|
Admin = "admin",
|
|
321
321
|
Owner = "owner"
|
|
322
322
|
}
|
|
323
|
-
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members", OrganizationMember[]> | Endpoint<"DELETE", "/organizations/members/:id", OrganizationMember[], null> | Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]> | Endpoint<"POST", "/organizations/:slug/members", OrganizationMember,
|
|
323
|
+
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members", OrganizationMember[]> | Endpoint<"DELETE", "/organizations/members/:id", OrganizationMember[], null> | Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]> | Endpoint<"POST", "/organizations/:slug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null>;
|
|
324
324
|
|
|
325
325
|
type Organization = Base & {
|
|
326
326
|
slug: string;
|
|
327
327
|
identity: OrganizationIdentity;
|
|
328
328
|
members: OrganizationMember[];
|
|
329
|
-
location?: Location;
|
|
329
|
+
location?: Location$1;
|
|
330
330
|
events: OrganizationEvent[];
|
|
331
331
|
savedTickets: OrganizationEventTicket[];
|
|
332
332
|
verified: boolean;
|
|
@@ -421,7 +421,7 @@ type Base = {
|
|
|
421
421
|
updatedAt: Date;
|
|
422
422
|
};
|
|
423
423
|
type ExcludeBase<T> = Omit<T, keyof Base>;
|
|
424
|
-
type Location = {
|
|
424
|
+
type Location$1 = {
|
|
425
425
|
name?: string;
|
|
426
426
|
address: string;
|
|
427
427
|
zipCode: string;
|
|
@@ -442,11 +442,16 @@ declare enum Language {
|
|
|
442
442
|
EN = "en"
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
declare class CreateOrganizationMemberDto {
|
|
446
|
+
user: string;
|
|
447
|
+
role: OrganizationMemberRole;
|
|
448
|
+
}
|
|
449
|
+
|
|
445
450
|
declare class CreateOrganizationDto {
|
|
446
451
|
slug?: string;
|
|
447
452
|
identity: CreateOrganizationIdentityDto;
|
|
448
|
-
members:
|
|
449
|
-
location?: Location;
|
|
453
|
+
members: CreateOrganizationMemberDto[];
|
|
454
|
+
location?: Location$1;
|
|
450
455
|
}
|
|
451
456
|
declare class CreateOrganizationIdentityDto {
|
|
452
457
|
displayName: string;
|
|
@@ -455,13 +460,6 @@ declare class CreateOrganizationIdentityDto {
|
|
|
455
460
|
bannerUrl?: string;
|
|
456
461
|
socialLinks?: OrganizationSocialLink[];
|
|
457
462
|
}
|
|
458
|
-
declare class OrganizationMemberDto {
|
|
459
|
-
user: string;
|
|
460
|
-
role: OrganizationMemberRole;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
declare class UpdateOrganizationDto extends CreateOrganizationDto {
|
|
464
|
-
}
|
|
465
463
|
|
|
466
464
|
declare class CreateOrganizationEventTicketDto {
|
|
467
465
|
name: string;
|
|
@@ -488,7 +486,7 @@ declare class CreateOrganizationEventDto {
|
|
|
488
486
|
public: boolean;
|
|
489
487
|
flyers: string[];
|
|
490
488
|
trailers: string[];
|
|
491
|
-
location: Location;
|
|
489
|
+
location: Location$1;
|
|
492
490
|
tickets: CreateOrganizationEventTicketDto[];
|
|
493
491
|
styles: string[];
|
|
494
492
|
startAt: Date;
|
|
@@ -498,11 +496,25 @@ declare class CreateOrganizationEventDto {
|
|
|
498
496
|
declare class UpdateOrganizationEventDto extends CreateOrganizationEventDto {
|
|
499
497
|
}
|
|
500
498
|
|
|
499
|
+
declare class UpdateOrganizationDto {
|
|
500
|
+
slug?: string;
|
|
501
|
+
identity: UpdateOrganizationIdentityDto;
|
|
502
|
+
members: UpdateOrganizationEventDto[];
|
|
503
|
+
location?: Location;
|
|
504
|
+
}
|
|
505
|
+
declare class UpdateOrganizationIdentityDto {
|
|
506
|
+
displayName: string;
|
|
507
|
+
description: string;
|
|
508
|
+
avatarUrl?: string;
|
|
509
|
+
bannerUrl?: string;
|
|
510
|
+
socialLinks?: OrganizationSocialLink[];
|
|
511
|
+
}
|
|
512
|
+
|
|
501
513
|
declare class CreateUserDto {
|
|
502
514
|
identifier: UserIdentifier;
|
|
503
515
|
password: string;
|
|
504
516
|
identity: CreateUserIdentituDto;
|
|
505
|
-
addresses: Location[];
|
|
517
|
+
addresses: Location$1[];
|
|
506
518
|
}
|
|
507
519
|
declare class CreateUserIdentituDto {
|
|
508
520
|
firstName: string;
|
|
@@ -711,7 +723,7 @@ declare class Client {
|
|
|
711
723
|
}> | Extract<Endpoint<"POST", "/organizations/:slug/events/:eventSlug/tickets", OrganizationEventTicket, CreateOrganizationEventTicketDto>, {
|
|
712
724
|
path: Path;
|
|
713
725
|
method: "POST";
|
|
714
|
-
}> | Extract<Endpoint<"POST", "/organizations/:slug/members", OrganizationMember,
|
|
726
|
+
}> | Extract<Endpoint<"POST", "/organizations/:slug/members", OrganizationMember, CreateOrganizationMemberDto>, {
|
|
715
727
|
path: Path;
|
|
716
728
|
method: "POST";
|
|
717
729
|
}>)["res"]>;
|
|
@@ -817,25 +829,25 @@ declare const organizations: (client: Client) => {
|
|
|
817
829
|
create: (data: CreateOrganizationDto) => Promise<Organization>;
|
|
818
830
|
update: (slug: string, data: UpdateOrganizationDto) => Promise<Organization>;
|
|
819
831
|
delete: (slug: string) => Promise<Organization>;
|
|
820
|
-
billing:
|
|
832
|
+
billing: {
|
|
821
833
|
account: (slug: string) => Promise<stripe.Stripe.Account>;
|
|
822
834
|
link: (slug: string) => void;
|
|
823
835
|
dashboard: (slug: string) => void;
|
|
824
836
|
};
|
|
825
|
-
events:
|
|
837
|
+
events: {
|
|
826
838
|
getAll: (organizationSlug: string) => Promise<Event[]>;
|
|
827
839
|
get: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
828
840
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
|
|
829
841
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<Event>;
|
|
830
842
|
delete: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
831
|
-
styles:
|
|
843
|
+
styles: {
|
|
832
844
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
833
845
|
get: (slug: string) => Promise<OrganizationEventStyle>;
|
|
834
846
|
create: (data: CreateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
835
847
|
update: (slug: string, data: UpdateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
836
848
|
delete: (slug: string) => Promise<OrganizationEventStyle[]>;
|
|
837
849
|
};
|
|
838
|
-
tickets:
|
|
850
|
+
tickets: {
|
|
839
851
|
getAll: (slug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
|
|
840
852
|
get: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
|
|
841
853
|
create: (slug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
@@ -843,7 +855,7 @@ declare const organizations: (client: Client) => {
|
|
|
843
855
|
delete: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
|
|
844
856
|
};
|
|
845
857
|
};
|
|
846
|
-
members:
|
|
858
|
+
members: {
|
|
847
859
|
getAll: () => Promise<OrganizationMember[]>;
|
|
848
860
|
delete: (id: string) => Promise<OrganizationMember[]>;
|
|
849
861
|
};
|
|
@@ -907,25 +919,25 @@ declare class TonightPass {
|
|
|
907
919
|
create: (data: CreateOrganizationDto) => Promise<Organization>;
|
|
908
920
|
update: (slug: string, data: UpdateOrganizationDto) => Promise<Organization>;
|
|
909
921
|
delete: (slug: string) => Promise<Organization>;
|
|
910
|
-
billing:
|
|
922
|
+
billing: {
|
|
911
923
|
account: (slug: string) => Promise<stripe.Stripe.Account>;
|
|
912
924
|
link: (slug: string) => void;
|
|
913
925
|
dashboard: (slug: string) => void;
|
|
914
926
|
};
|
|
915
|
-
events:
|
|
927
|
+
events: {
|
|
916
928
|
getAll: (organizationSlug: string) => Promise<Event[]>;
|
|
917
929
|
get: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
918
930
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
|
|
919
931
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<Event>;
|
|
920
932
|
delete: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
921
|
-
styles:
|
|
933
|
+
styles: {
|
|
922
934
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
923
935
|
get: (slug: string) => Promise<OrganizationEventStyle>;
|
|
924
936
|
create: (data: CreateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
925
937
|
update: (slug: string, data: UpdateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
926
938
|
delete: (slug: string) => Promise<OrganizationEventStyle[]>;
|
|
927
939
|
};
|
|
928
|
-
tickets:
|
|
940
|
+
tickets: {
|
|
929
941
|
getAll: (slug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
|
|
930
942
|
get: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
|
|
931
943
|
create: (slug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
@@ -933,7 +945,7 @@ declare class TonightPass {
|
|
|
933
945
|
delete: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
|
|
934
946
|
};
|
|
935
947
|
};
|
|
936
|
-
members:
|
|
948
|
+
members: {
|
|
937
949
|
getAll: () => Promise<OrganizationMember[]>;
|
|
938
950
|
delete: (id: string) => Promise<OrganizationMember[]>;
|
|
939
951
|
};
|
|
@@ -957,4 +969,4 @@ declare class TonightPass {
|
|
|
957
969
|
|
|
958
970
|
declare const isBrowser: boolean;
|
|
959
971
|
|
|
960
|
-
export { type APIRequestOptions, type APIResponse, type AuthEndpoints, BCRYPT_HASH, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateUserDto, Currency, DEFAULT_API_URL, EMAIL_REGEX, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, IMAGE_URL_REGEX, Language, type Location, NAME_REGEX, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, type OrganizationEventTicketType, OrganizationEventType, type OrganizationIdentity, type OrganizationMember,
|
|
972
|
+
export { type APIRequestOptions, type APIResponse, type AuthEndpoints, BCRYPT_HASH, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, Currency, DEFAULT_API_URL, EMAIL_REGEX, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, IMAGE_URL_REGEX, Language, type Location$1 as Location, NAME_REGEX, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, type OrganizationEventTicketType, OrganizationEventType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationSocialLink, OrganizationSocialType, PASSWORD_REGEX, PHONE_NUMBER_REGEX, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, type PromisedAPIResponse, type PromoCode, SLUG_REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateOrganizationEventDto, 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
|
@@ -41,7 +41,7 @@ type User = Base & {
|
|
|
41
41
|
password: string;
|
|
42
42
|
identity: UserIdentity;
|
|
43
43
|
role: UserRole;
|
|
44
|
-
addresses: Location[];
|
|
44
|
+
addresses: Location$1[];
|
|
45
45
|
preferences: UserPreferences;
|
|
46
46
|
connections: UserConnection[];
|
|
47
47
|
verified: boolean;
|
|
@@ -252,7 +252,7 @@ type OrganizationEvent = Base & {
|
|
|
252
252
|
public: boolean;
|
|
253
253
|
flyers: string[];
|
|
254
254
|
trailers: string[];
|
|
255
|
-
location: Location;
|
|
255
|
+
location: Location$1;
|
|
256
256
|
tickets: OrganizationEventTicket[];
|
|
257
257
|
styles: OrganizationEventStyle[];
|
|
258
258
|
startAt: Date;
|
|
@@ -320,13 +320,13 @@ declare enum OrganizationMemberRole {
|
|
|
320
320
|
Admin = "admin",
|
|
321
321
|
Owner = "owner"
|
|
322
322
|
}
|
|
323
|
-
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members", OrganizationMember[]> | Endpoint<"DELETE", "/organizations/members/:id", OrganizationMember[], null> | Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]> | Endpoint<"POST", "/organizations/:slug/members", OrganizationMember,
|
|
323
|
+
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members", OrganizationMember[]> | Endpoint<"DELETE", "/organizations/members/:id", OrganizationMember[], null> | Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]> | Endpoint<"POST", "/organizations/:slug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null>;
|
|
324
324
|
|
|
325
325
|
type Organization = Base & {
|
|
326
326
|
slug: string;
|
|
327
327
|
identity: OrganizationIdentity;
|
|
328
328
|
members: OrganizationMember[];
|
|
329
|
-
location?: Location;
|
|
329
|
+
location?: Location$1;
|
|
330
330
|
events: OrganizationEvent[];
|
|
331
331
|
savedTickets: OrganizationEventTicket[];
|
|
332
332
|
verified: boolean;
|
|
@@ -421,7 +421,7 @@ type Base = {
|
|
|
421
421
|
updatedAt: Date;
|
|
422
422
|
};
|
|
423
423
|
type ExcludeBase<T> = Omit<T, keyof Base>;
|
|
424
|
-
type Location = {
|
|
424
|
+
type Location$1 = {
|
|
425
425
|
name?: string;
|
|
426
426
|
address: string;
|
|
427
427
|
zipCode: string;
|
|
@@ -442,11 +442,16 @@ declare enum Language {
|
|
|
442
442
|
EN = "en"
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
declare class CreateOrganizationMemberDto {
|
|
446
|
+
user: string;
|
|
447
|
+
role: OrganizationMemberRole;
|
|
448
|
+
}
|
|
449
|
+
|
|
445
450
|
declare class CreateOrganizationDto {
|
|
446
451
|
slug?: string;
|
|
447
452
|
identity: CreateOrganizationIdentityDto;
|
|
448
|
-
members:
|
|
449
|
-
location?: Location;
|
|
453
|
+
members: CreateOrganizationMemberDto[];
|
|
454
|
+
location?: Location$1;
|
|
450
455
|
}
|
|
451
456
|
declare class CreateOrganizationIdentityDto {
|
|
452
457
|
displayName: string;
|
|
@@ -455,13 +460,6 @@ declare class CreateOrganizationIdentityDto {
|
|
|
455
460
|
bannerUrl?: string;
|
|
456
461
|
socialLinks?: OrganizationSocialLink[];
|
|
457
462
|
}
|
|
458
|
-
declare class OrganizationMemberDto {
|
|
459
|
-
user: string;
|
|
460
|
-
role: OrganizationMemberRole;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
declare class UpdateOrganizationDto extends CreateOrganizationDto {
|
|
464
|
-
}
|
|
465
463
|
|
|
466
464
|
declare class CreateOrganizationEventTicketDto {
|
|
467
465
|
name: string;
|
|
@@ -488,7 +486,7 @@ declare class CreateOrganizationEventDto {
|
|
|
488
486
|
public: boolean;
|
|
489
487
|
flyers: string[];
|
|
490
488
|
trailers: string[];
|
|
491
|
-
location: Location;
|
|
489
|
+
location: Location$1;
|
|
492
490
|
tickets: CreateOrganizationEventTicketDto[];
|
|
493
491
|
styles: string[];
|
|
494
492
|
startAt: Date;
|
|
@@ -498,11 +496,25 @@ declare class CreateOrganizationEventDto {
|
|
|
498
496
|
declare class UpdateOrganizationEventDto extends CreateOrganizationEventDto {
|
|
499
497
|
}
|
|
500
498
|
|
|
499
|
+
declare class UpdateOrganizationDto {
|
|
500
|
+
slug?: string;
|
|
501
|
+
identity: UpdateOrganizationIdentityDto;
|
|
502
|
+
members: UpdateOrganizationEventDto[];
|
|
503
|
+
location?: Location;
|
|
504
|
+
}
|
|
505
|
+
declare class UpdateOrganizationIdentityDto {
|
|
506
|
+
displayName: string;
|
|
507
|
+
description: string;
|
|
508
|
+
avatarUrl?: string;
|
|
509
|
+
bannerUrl?: string;
|
|
510
|
+
socialLinks?: OrganizationSocialLink[];
|
|
511
|
+
}
|
|
512
|
+
|
|
501
513
|
declare class CreateUserDto {
|
|
502
514
|
identifier: UserIdentifier;
|
|
503
515
|
password: string;
|
|
504
516
|
identity: CreateUserIdentituDto;
|
|
505
|
-
addresses: Location[];
|
|
517
|
+
addresses: Location$1[];
|
|
506
518
|
}
|
|
507
519
|
declare class CreateUserIdentituDto {
|
|
508
520
|
firstName: string;
|
|
@@ -711,7 +723,7 @@ declare class Client {
|
|
|
711
723
|
}> | Extract<Endpoint<"POST", "/organizations/:slug/events/:eventSlug/tickets", OrganizationEventTicket, CreateOrganizationEventTicketDto>, {
|
|
712
724
|
path: Path;
|
|
713
725
|
method: "POST";
|
|
714
|
-
}> | Extract<Endpoint<"POST", "/organizations/:slug/members", OrganizationMember,
|
|
726
|
+
}> | Extract<Endpoint<"POST", "/organizations/:slug/members", OrganizationMember, CreateOrganizationMemberDto>, {
|
|
715
727
|
path: Path;
|
|
716
728
|
method: "POST";
|
|
717
729
|
}>)["res"]>;
|
|
@@ -817,25 +829,25 @@ declare const organizations: (client: Client) => {
|
|
|
817
829
|
create: (data: CreateOrganizationDto) => Promise<Organization>;
|
|
818
830
|
update: (slug: string, data: UpdateOrganizationDto) => Promise<Organization>;
|
|
819
831
|
delete: (slug: string) => Promise<Organization>;
|
|
820
|
-
billing:
|
|
832
|
+
billing: {
|
|
821
833
|
account: (slug: string) => Promise<stripe.Stripe.Account>;
|
|
822
834
|
link: (slug: string) => void;
|
|
823
835
|
dashboard: (slug: string) => void;
|
|
824
836
|
};
|
|
825
|
-
events:
|
|
837
|
+
events: {
|
|
826
838
|
getAll: (organizationSlug: string) => Promise<Event[]>;
|
|
827
839
|
get: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
828
840
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
|
|
829
841
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<Event>;
|
|
830
842
|
delete: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
831
|
-
styles:
|
|
843
|
+
styles: {
|
|
832
844
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
833
845
|
get: (slug: string) => Promise<OrganizationEventStyle>;
|
|
834
846
|
create: (data: CreateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
835
847
|
update: (slug: string, data: UpdateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
836
848
|
delete: (slug: string) => Promise<OrganizationEventStyle[]>;
|
|
837
849
|
};
|
|
838
|
-
tickets:
|
|
850
|
+
tickets: {
|
|
839
851
|
getAll: (slug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
|
|
840
852
|
get: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
|
|
841
853
|
create: (slug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
@@ -843,7 +855,7 @@ declare const organizations: (client: Client) => {
|
|
|
843
855
|
delete: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
|
|
844
856
|
};
|
|
845
857
|
};
|
|
846
|
-
members:
|
|
858
|
+
members: {
|
|
847
859
|
getAll: () => Promise<OrganizationMember[]>;
|
|
848
860
|
delete: (id: string) => Promise<OrganizationMember[]>;
|
|
849
861
|
};
|
|
@@ -907,25 +919,25 @@ declare class TonightPass {
|
|
|
907
919
|
create: (data: CreateOrganizationDto) => Promise<Organization>;
|
|
908
920
|
update: (slug: string, data: UpdateOrganizationDto) => Promise<Organization>;
|
|
909
921
|
delete: (slug: string) => Promise<Organization>;
|
|
910
|
-
billing:
|
|
922
|
+
billing: {
|
|
911
923
|
account: (slug: string) => Promise<stripe.Stripe.Account>;
|
|
912
924
|
link: (slug: string) => void;
|
|
913
925
|
dashboard: (slug: string) => void;
|
|
914
926
|
};
|
|
915
|
-
events:
|
|
927
|
+
events: {
|
|
916
928
|
getAll: (organizationSlug: string) => Promise<Event[]>;
|
|
917
929
|
get: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
918
930
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
|
|
919
931
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<Event>;
|
|
920
932
|
delete: (organizationSlug: string, eventSlug: string) => Promise<Event>;
|
|
921
|
-
styles:
|
|
933
|
+
styles: {
|
|
922
934
|
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
923
935
|
get: (slug: string) => Promise<OrganizationEventStyle>;
|
|
924
936
|
create: (data: CreateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
925
937
|
update: (slug: string, data: UpdateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
926
938
|
delete: (slug: string) => Promise<OrganizationEventStyle[]>;
|
|
927
939
|
};
|
|
928
|
-
tickets:
|
|
940
|
+
tickets: {
|
|
929
941
|
getAll: (slug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
|
|
930
942
|
get: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
|
|
931
943
|
create: (slug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
@@ -933,7 +945,7 @@ declare class TonightPass {
|
|
|
933
945
|
delete: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
|
|
934
946
|
};
|
|
935
947
|
};
|
|
936
|
-
members:
|
|
948
|
+
members: {
|
|
937
949
|
getAll: () => Promise<OrganizationMember[]>;
|
|
938
950
|
delete: (id: string) => Promise<OrganizationMember[]>;
|
|
939
951
|
};
|
|
@@ -957,4 +969,4 @@ declare class TonightPass {
|
|
|
957
969
|
|
|
958
970
|
declare const isBrowser: boolean;
|
|
959
971
|
|
|
960
|
-
export { type APIRequestOptions, type APIResponse, type AuthEndpoints, BCRYPT_HASH, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateUserDto, Currency, DEFAULT_API_URL, EMAIL_REGEX, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, IMAGE_URL_REGEX, Language, type Location, NAME_REGEX, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, type OrganizationEventTicketType, OrganizationEventType, type OrganizationIdentity, type OrganizationMember,
|
|
972
|
+
export { type APIRequestOptions, type APIResponse, type AuthEndpoints, BCRYPT_HASH, type Base, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, Currency, DEFAULT_API_URL, EMAIL_REGEX, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, IMAGE_URL_REGEX, Language, type Location$1 as Location, NAME_REGEX, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, type OrganizationEventTicketType, OrganizationEventType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationSocialLink, OrganizationSocialType, PASSWORD_REGEX, PHONE_NUMBER_REGEX, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, type PromisedAPIResponse, type PromoCode, SLUG_REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateOrganizationEventDto, 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,45 +3,47 @@
|
|
|
3
3
|
require('reflect-metadata');
|
|
4
4
|
var classValidator = require('class-validator');
|
|
5
5
|
var classTransformer = require('class-transformer');
|
|
6
|
-
var
|
|
6
|
+
var Ve = 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 Ve__default = /*#__PURE__*/_interopDefault(Ve);
|
|
12
12
|
|
|
13
|
-
var be=Object.defineProperty;var s=(e,t)=>be(e,"name",{value:t,configurable:!0});var G="https://api.tonightpass.com";var Ue=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/,Ne=/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,D=/(^[\p{L}\d'\\.\s\\-]*$)/u,De=/^[a-z\d]+(?:(\.|-|_)[a-z\d]+)*$/,Pe=/\$2[abxy]?\$\d{1,2}\$[A-Za-z\d\\./]{53}/,Ee=/^\s*(?:\+?(\d{1,3}))?([-. (]*(\d{3})[-. )]*)?((\d{3})[-. ]*(\d{2,4})(?:[-.x ]*(\d+))?)\s*$/,Ge=/(((http:\/\/www)|(http:\/\/)|(www))[-a-zA-Z0-9@:%_\\+.~#?&//=]+)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)/i;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.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 d(e,t,o,r){var n=arguments.length,i=n<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var g=e.length-1;g>=0;g--)(l=e[g])&&(i=(n<3?l(i):n>3?l(t,o,i):l(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i}s(d,"_ts_decorate");function f(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}s(f,"_ts_metadata");var x=class{static{s(this,"CreateOrganizationDto");}slug;identity;members;location};d([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),f("design:type",String)],x.prototype,"slug",void 0);d([classValidator.IsObject(),f("design:type",typeof h>"u"?Object:h)],x.prototype,"identity",void 0);d([classValidator.IsArray(),f("design:type",Array)],x.prototype,"members",void 0);d([classValidator.IsOptional(),classValidator.IsObject(),f("design:type",typeof Location>"u"?Object:Location)],x.prototype,"location",void 0);var h=class{static{s(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};d([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),f("design:type",String)],h.prototype,"displayName",void 0);d([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,1024),f("design:type",String)],h.prototype,"description",void 0);d([classValidator.IsUrl({protocols:["http","https"]}),f("design:type",String)],h.prototype,"avatarUrl",void 0);d([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),f("design:type",String)],h.prototype,"bannerUrl",void 0);d([classValidator.IsOptional(),classValidator.IsArray(),f("design:type",Array)],h.prototype,"socialLinks",void 0);var _=class{static{s(this,"OrganizationMemberDto");}user;role};d([classValidator.IsString(),classValidator.IsNotEmpty(),f("design:type",String)],_.prototype,"user",void 0);d([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),f("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],_.prototype,"role",void 0);var J=class extends x{static{s(this,"UpdateOrganizationDto");}};var j=class{static{s(this,"CreateOrganizationEventDto");}title;description;organization;type;public;flyers;trailers;location;tickets;styles;startAt;endAt};var K=class extends j{static{s(this,"UpdateOrganizationEventDto");}};var I=class{static{s(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};var Q=class extends I{static{s(this,"UpdateOrganizationEventTicketDto");}};var O=class{static{s(this,"CreateUserDto");}identifier;password;identity;addresses};var T=class{static{s(this,"SignInUserDto");}identifier;password};function a(e,t,o,r){var n=arguments.length,i=n<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,r);else for(var g=e.length-1;g>=0;g--)(l=e[g])&&(i=(n<3?l(i):n>3?l(t,o,i):l(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i}s(a,"_ts_decorate");function p(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}s(p,"_ts_metadata");var A=class{static{s(this,"UpdateUserDto");}identifier;identity;password};a([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>v),p("design:type",typeof v>"u"?Object:v)],A.prototype,"identifier",void 0);a([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>m),p("design:type",typeof m>"u"?Object:m)],A.prototype,"identity",void 0);a([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(6),classValidator.MaxLength(130),p("design:type",String)],A.prototype,"password",void 0);var v=class{static{s(this,"UpdateIdentifierDto");}email;phoneNumber;username};a([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),p("design:type",String)],v.prototype,"email",void 0);a([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),p("design:type",String)],v.prototype,"phoneNumber",void 0);a([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(3),p("design:type",String)],v.prototype,"username",void 0);var m=class{static{s(this,"UpdateIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};a([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,50),classValidator.Matches(D,{message:"First name must be composed of letters only"}),p("design:type",String)],m.prototype,"firstName",void 0);a([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,50),classValidator.Matches(D,{message:"Last name must be composed of letters only"}),p("design:type",String)],m.prototype,"lastName",void 0);a([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),p("design:type",String)],m.prototype,"displayName",void 0);a([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(15,500),p("design:type",String)],m.prototype,"description",void 0);a([classValidator.IsOptional(),classValidator.IsUrl(),p("design:type",Object)],m.prototype,"avatarUrl",void 0);a([classValidator.IsOptional(),classValidator.IsUrl(),p("design:type",Object)],m.prototype,"bannerUrl",void 0);a([classValidator.IsOptional(),p("design:type",String)],m.prototype,"gender",void 0);a([classValidator.IsOptional(),classValidator.IsDateString(),p("design:type",typeof Date>"u"?Object:Date)],m.prototype,"birthDate",void 0);var y=typeof window<"u";var ke=Se__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!y&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e){return JSON.stringify(e)}],withCredentials:y}),ie=s(async(e,t)=>ke(e,{...t}).then(r=>r).catch(r=>{throw r.data}),"request");var E=class extends Error{static{s(this,"TonightPassAPIError");}response;data;status;constructor(t,o){super(o.message),this.response=t,this.data=o,this.status=t.status;}},U=class{static{s(this,"Client");}options;url;constructor(t){this.options=t,this.url=(o,r)=>{let n=this.options.baseURL||G;return pathcat.pathcat(n,o,r)};}setOptions(t){this.options=t;}async get(t,o,r){return this.requester("GET",t,void 0,o,r)}async post(t,o,r,n){return this.requester("POST",t,o,r,n)}async put(t,o,r,n){return this.requester("PUT",t,o,r,n)}async patch(t,o,r,n){return this.requester("PATCH",t,o,r,n)}async delete(t,o,r,n){return this.requester("DELETE",t,o,r,n)}async requester(t,o,r,n={},i={}){let l=this.url(o,n);if(r!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let g=await ie(l,{method:t,data:r,...i}),N=g.data;if(!N.success)throw new E(g,N);return N.data}};function u(e){return e}s(u,"sdk");var ae=e=>({signIn:async t=>e.post("/auth/sign-in",t),signUp:async t=>e.post("/auth/sign-up",t),signOut:async()=>e.post("/auth/sign-out",null),refreshToken:async()=>e.post("/auth/refresh-token",null),oauth2:{google:{connect:t=>{if(y)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")}},twitter:{connect:t=>{if(y)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")}}}});var pe=e=>({categories:{getAll:async t=>e.get("/careers/categories",t)},employmentTypes:{getAll:async t=>e.get("/careers/employmentTypes",t)},jobs:{getAll:async t=>e.get("/careers/jobs",t),get:async t=>e.get("/careers/jobs/:id",{id:t})},offices:{getAll:async t=>e.get("/careers/offices",t)}});var ce=e=>({getAll:async()=>e.get("/health"),database:async()=>e.get("/health/database"),http:async()=>e.get("/health/http")});var le=e=>({account:async t=>e.get("/organizations/:slug/billing/account",{slug:t}),link:t=>{if(y)window.location.href=e.url("/organizations/:slug/billing/link",{slug:t});else throw new Error("Billing link is only available in the browser")},dashboard:t=>{if(y)window.location.href=e.url("/organizations/:slug/billing/dashboard",{slug:t});else throw new Error("Billing dashboard is only available in the browser")}});var de=e=>({getAll:async()=>e.get("/organizations/events/styles"),get:async t=>e.get("/organizations/events/styles/:slug",{slug:t}),create:async t=>e.post("/organizations/events/styles",t),update:async(t,o)=>e.put("/organizations/events/styles/:slug",o,{slug:t}),delete:async t=>e.delete("/organizations/events/styles/:slug",null,{slug:t})});var fe=e=>({getAll:async(t,o)=>e.get("/organizations/:slug/events/:eventSlug/tickets",{slug:t,eventSlug:o}),get:async(t,o,r)=>e.get("/organizations/:slug/events/:eventSlug/tickets/:ticketId",{slug:t,eventSlug:o,ticketId:r}),create:async(t,o,r)=>e.post("/organizations/:slug/events/:eventSlug/tickets",r,{slug:t,eventSlug:o}),update:async(t,o,r,n)=>e.put("/organizations/:slug/events/:eventSlug/tickets/:ticketId",n,{slug:t,eventSlug:o,ticketId:r}),delete:async(t,o,r)=>e.delete("/organizations/:slug/events/:eventSlug/tickets/:ticketId",null,{slug:t,eventSlug:o,ticketId:r})});var me=e=>({getAll:async t=>e.get("/organizations/:organizationSlug/events",{organizationSlug:t}),get:async(t,o)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:o}),create:async(t,o)=>e.post("/organizations/:organizationSlug/events",o,{organizationSlug:t}),update:async(t,o,r)=>e.put("/organizations/:organizationSlug/events/:eventSlug",r,{organizationSlug:t,eventSlug:o}),delete:async(t,o)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:o}),styles:de,tickets:fe});var ue=e=>({getAll:async()=>e.get("/organizations/members"),delete:async t=>e.delete("/organizations/members/:id",null,{id:t})});var ge=e=>({getAll:async()=>e.get("/organizations"),get:async t=>e.get("/organizations/:slug",{slug:t}),create:async t=>e.post("/organizations",t),update:async(t,o)=>e.put("/organizations/:slug",o,{slug:t}),delete:async t=>e.delete("/organizations/:slug",null,{slug:t}),billing:le,events:me,members:ue});var he=e=>({get:async t=>e.get("/profiles/:username",{username:t})});var ye=e=>({getAll:async()=>e.get("/users"),get:async t=>e.get("/users",{id:t}),me:async()=>e.get("/users/me"),check:async(t,o)=>e.get("/users/check/:identifier",{identifier:t,suggestions:o}),update:async(t,o)=>e.put("/users/:id",o,{id:t})});var xe=class{static{s(this,"TonightPass");}client;auth;careers;health;organizations;profiles;users;constructor(t){this.client=new U(t),this.auth=ae(this.client),this.careers=pe(this.client),this.health=ce(this.client),this.organizations=ge(this.client),this.profiles=he(this.client),this.users=ye(this.client);}};
|
|
13
|
+
var De=Object.defineProperty;var r=(e,t)=>De(e,"name",{value:t,configurable:!0});var X="https://api.tonightpass.com";var Qe=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/,Oe=/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,k=/(^[\p{L}\d'\\.\s\\-]*$)/u,Te=/^[a-z\d]+(?:(\.|-|_)[a-z\d]+)*$/,et=/\$2[abxy]?\$\d{1,2}\$[A-Za-z\d\\./]{53}/,tt=/^\s*(?:\+?(\d{1,3}))?([-. (]*(\d{3})[-. )]*)?((\d{3})[-. ]*(\d{2,4})(?:[-.x ]*(\d+))?)\s*$/,ot=/(((http:\/\/www)|(http:\/\/)|(www))[-a-zA-Z0-9@:%_\\+.~#?&//=]+)\.(jpg|jpeg|gif|png|bmp|tiff|tga|svg)/i;function g(e,t,o,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,o):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,o,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,o,n):a(t,o))||n);return i>3&&n&&Object.defineProperty(t,o,n),n}r(g,"_ts_decorate");function y(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}r(y,"_ts_metadata");var _=class{static{r(this,"CreateOrganizationDto");}slug;identity;members;location};g([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),y("design:type",String)],_.prototype,"slug",void 0);g([classValidator.IsObject(),y("design:type",typeof u>"u"?Object:u)],_.prototype,"identity",void 0);g([classValidator.IsArray(),y("design:type",Array)],_.prototype,"members",void 0);g([classValidator.IsOptional(),classValidator.IsObject(),y("design:type",typeof Location>"u"?Object:Location)],_.prototype,"location",void 0);var u=class{static{r(this,"CreateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};g([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),y("design:type",String)],u.prototype,"displayName",void 0);g([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,1024),y("design:type",String)],u.prototype,"description",void 0);g([classValidator.IsUrl({protocols:["http","https"]}),y("design:type",String)],u.prototype,"avatarUrl",void 0);g([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),y("design:type",String)],u.prototype,"bannerUrl",void 0);g([classValidator.IsOptional(),classValidator.IsArray(),y("design:type",Array)],u.prototype,"socialLinks",void 0);function x(e,t,o,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,o):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,o,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,o,n):a(t,o))||n);return i>3&&n&&Object.defineProperty(t,o,n),n}r(x,"_ts_decorate");function b(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}r(b,"_ts_metadata");var A=class{static{r(this,"UpdateOrganizationDto");}slug;identity;members;location};x([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),b("design:type",String)],A.prototype,"slug",void 0);x([classValidator.IsObject(),classValidator.IsOptional(),b("design:type",typeof h>"u"?Object:h)],A.prototype,"identity",void 0);x([classValidator.IsOptional(),classValidator.IsArray(),b("design:type",Array)],A.prototype,"members",void 0);x([classValidator.IsOptional(),classValidator.IsObject(),b("design:type",typeof Location>"u"?Object:Location)],A.prototype,"location",void 0);var h=class{static{r(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};x([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),b("design:type",String)],h.prototype,"displayName",void 0);x([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(16,1024),classValidator.IsOptional(),b("design:type",String)],h.prototype,"description",void 0);x([classValidator.IsUrl({protocols:["http","https"]}),classValidator.IsOptional(),b("design:type",String)],h.prototype,"avatarUrl",void 0);x([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),b("design:type",String)],h.prototype,"bannerUrl",void 0);x([classValidator.IsOptional(),classValidator.IsArray(),b("design:type",Array)],h.prototype,"socialLinks",void 0);var N=class{static{r(this,"CreateOrganizationEventDto");}title;description;organization;type;public;flyers;trailers;location;tickets;styles;startAt;endAt};var Q=class extends N{static{r(this,"UpdateOrganizationEventDto");}};var U=class{static{r(this,"CreateOrganizationEventTicketDto");}name;description;price;quantity;type;category;currency;isVisible;isFeesIncluded;startAt;endAt};var O=class extends U{static{r(this,"UpdateOrganizationEventTicketDto");}};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.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 ce(e,t,o,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,o):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,o,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,o,n):a(t,o))||n);return i>3&&n&&Object.defineProperty(t,o,n),n}r(ce,"_ts_decorate");function le(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}r(le,"_ts_metadata");var P=class{static{r(this,"CreateOrganizationMemberDto");}user;role};ce([classValidator.IsString(),classValidator.IsNotEmpty(),le("design:type",String)],P.prototype,"user",void 0);ce([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),le("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],P.prototype,"role",void 0);function Me(e,t,o,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,o):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,o,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,o,n):a(t,o))||n);return i>3&&n&&Object.defineProperty(t,o,n),n}r(Me,"_ts_decorate");function qe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}r(qe,"_ts_metadata");var F=class{static{r(this,"UpdateOrganizationMemberDto");}role};Me([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),qe("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],F.prototype,"role",void 0);var fe=class{static{r(this,"CreateUserDto");}identifier;password;identity;addresses};var me=class{static{r(this,"SignInUserDto");}identifier;password};function c(e,t,o,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,o):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,o,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,o,n):a(t,o))||n);return i>3&&n&&Object.defineProperty(t,o,n),n}r(c,"_ts_decorate");function l(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}r(l,"_ts_metadata");var S=class{static{r(this,"UpdateUserDto");}identifier;identity;password};c([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>j),l("design:type",typeof j>"u"?Object:j)],S.prototype,"identifier",void 0);c([classValidator.IsOptional(),classValidator.IsObject(),classValidator.ValidateNested(),classTransformer.Type(()=>f),l("design:type",typeof f>"u"?Object:f)],S.prototype,"identity",void 0);c([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(8),classValidator.MaxLength(128),l("design:type",String)],S.prototype,"password",void 0);var j=class{static{r(this,"UpdateIdentifierDto");}email;phoneNumber;username};c([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),l("design:type",String)],j.prototype,"email",void 0);c([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),l("design:type",String)],j.prototype,"phoneNumber",void 0);c([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(3),l("design:type",String)],j.prototype,"username",void 0);var f=class{static{r(this,"UpdateIdentityDto");}firstName;lastName;displayName;description;avatarUrl;bannerUrl;gender;birthDate};c([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(k,{message:"First name must be composed of letters only"}),l("design:type",String)],f.prototype,"firstName",void 0);c([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(2,32),classValidator.Matches(k,{message:"Last name must be composed of letters only"}),l("design:type",String)],f.prototype,"lastName",void 0);c([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,32),l("design:type",String)],f.prototype,"displayName",void 0);c([classValidator.IsOptional(),classValidator.IsString(),classValidator.Length(1,128),l("design:type",String)],f.prototype,"description",void 0);c([classValidator.IsOptional(),classValidator.IsUrl(),l("design:type",Object)],f.prototype,"avatarUrl",void 0);c([classValidator.IsOptional(),classValidator.IsUrl(),l("design:type",Object)],f.prototype,"bannerUrl",void 0);c([classValidator.IsOptional(),l("design:type",String)],f.prototype,"gender",void 0);c([classValidator.IsOptional(),classValidator.IsDateString(),l("design:type",typeof Date>"u"?Object:Date)],f.prototype,"birthDate",void 0);var w=typeof window<"u";var Ze=Ve__default.default.create({headers:{"Content-Type":"application/json",Accept:"application/json",...!w&&{"User-Agent":"tonightpass-api-client"}},responseType:"json",transformRequest:[function(e){return JSON.stringify(e)}],withCredentials:w}),ve=r(async(e,t)=>Ze(e,{...t}).then(s=>s).catch(s=>{throw s.data}),"request");var $=class extends Error{static{r(this,"TonightPassAPIError");}response;data;status;constructor(t,o){super(o.message),this.response=t,this.data=o,this.status=t.status;}},D=class{static{r(this,"Client");}options;url;constructor(t){this.options=t,this.url=(o,s)=>{let i=this.options.baseURL||X;return pathcat.pathcat(i,o,s)};}setOptions(t){this.options=t;}async get(t,o,s){return this.requester("GET",t,void 0,o,s)}async post(t,o,s,i){return this.requester("POST",t,o,s,i)}async put(t,o,s,i){return this.requester("PUT",t,o,s,i)}async patch(t,o,s,i){return this.requester("PATCH",t,o,s,i)}async delete(t,o,s,i){return this.requester("DELETE",t,o,s,i)}async requester(t,o,s,i={},n={}){let a=this.url(o,i);if(s!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await ve(a,{method:t,data:s,...n}),G=p.data;if(!G.success)throw new $(p,G);return G.data}};function I(e){return e}r(I,"sdk");var we=e=>({signIn:async t=>e.post("/auth/sign-in",t),signUp:async t=>e.post("/auth/sign-up",t),signOut:async()=>e.post("/auth/sign-out",null),refreshToken:async()=>e.post("/auth/refresh-token",null),oauth2:{google:{connect:t=>{if(w)window.location.href=e.url("/oauth2/google",t||{});else throw new Error("Google OAuth2 is only available in the browser")}},twitter:{connect:t=>{if(w)window.location.href=e.url("/oauth2/twitter",t||{});else throw new Error("Twitter OAuth2 is only available in the browser")}}}});var Re=e=>({categories:{getAll:async t=>e.get("/careers/categories",t)},employmentTypes:{getAll:async t=>e.get("/careers/employmentTypes",t)},jobs:{getAll:async t=>e.get("/careers/jobs",t),get:async t=>e.get("/careers/jobs/:id",{id:t})},offices:{getAll:async t=>e.get("/careers/offices",t)}});var _e=e=>({getAll:async()=>e.get("/health"),database:async()=>e.get("/health/database"),http:async()=>e.get("/health/http")});var Ae=r(e=>({account:async t=>e.get("/organizations/:slug/billing/account",{slug:t}),link:t=>{if(w)window.location.href=e.url("/organizations/:slug/billing/link",{slug:t});else throw new Error("Billing link is only available in the browser")},dashboard:t=>{if(w)window.location.href=e.url("/organizations/:slug/billing/dashboard",{slug:t});else throw new Error("Billing dashboard is only available in the browser")}}),"organizationsBilling");var je=r(e=>({getAll:async()=>e.get("/organizations/events/styles"),get:async t=>e.get("/organizations/events/styles/:slug",{slug:t}),create:async t=>e.post("/organizations/events/styles",t),update:async(t,o)=>e.put("/organizations/events/styles/:slug",o,{slug:t}),delete:async t=>e.delete("/organizations/events/styles/:slug",null,{slug:t})}),"organizationsEventsStyles");var Ie=r(e=>({getAll:async(t,o)=>e.get("/organizations/:slug/events/:eventSlug/tickets",{slug:t,eventSlug:o}),get:async(t,o,s)=>e.get("/organizations/:slug/events/:eventSlug/tickets/:ticketId",{slug:t,eventSlug:o,ticketId:s}),create:async(t,o,s)=>e.post("/organizations/:slug/events/:eventSlug/tickets",s,{slug:t,eventSlug:o}),update:async(t,o,s,i)=>e.put("/organizations/:slug/events/:eventSlug/tickets/:ticketId",i,{slug:t,eventSlug:o,ticketId:s}),delete:async(t,o,s)=>e.delete("/organizations/:slug/events/:eventSlug/tickets/:ticketId",null,{slug:t,eventSlug:o,ticketId:s})}),"organizationsEventsTickets");var Se=r(e=>({getAll:async t=>e.get("/organizations/:organizationSlug/events",{organizationSlug:t}),get:async(t,o)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:o}),create:async(t,o)=>e.post("/organizations/:organizationSlug/events",o,{organizationSlug:t}),update:async(t,o,s)=>e.put("/organizations/:organizationSlug/events/:eventSlug",s,{organizationSlug:t,eventSlug:o}),delete:async(t,o)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:o}),styles:je(e),tickets:Ie(e)}),"organizationsEvents");var Le=r(e=>({getAll:async()=>e.get("/organizations/members"),delete:async t=>e.delete("/organizations/members/:id",null,{id:t})}),"organizationsMembers");var Ne=e=>({getAll:async()=>e.get("/organizations"),get:async t=>e.get("/organizations/:slug",{slug:t}),create:async t=>e.post("/organizations",t),update:async(t,o)=>e.put("/organizations/:slug",o,{slug:t}),delete:async t=>e.delete("/organizations/:slug",null,{slug:t}),billing:Ae(e),events:Se(e),members:Le(e)});var Ue=e=>({get:async t=>e.get("/profiles/:username",{username:t})});var Pe=e=>({getAll:async()=>e.get("/users"),get:async t=>e.get("/users",{id:t}),me:async()=>e.get("/users/me"),check:async(t,o)=>e.get("/users/check/:identifier",{identifier:t,suggestions:o}),update:async(t,o)=>e.put("/users/:id",o,{id:t})});var Ee=class{static{r(this,"TonightPass");}client;auth;careers;health;organizations;profiles;users;constructor(t){this.client=new D(t),this.auth=we(this.client),this.careers=Re(this.client),this.health=_e(this.client),this.organizations=Ne(this.client),this.profiles=Ue(this.client),this.users=Pe(this.client);}};
|
|
14
14
|
|
|
15
|
-
exports.BCRYPT_HASH =
|
|
16
|
-
exports.Client =
|
|
17
|
-
exports.CreateOrganizationDto =
|
|
18
|
-
exports.CreateOrganizationEventDto =
|
|
19
|
-
exports.CreateOrganizationEventTicketDto =
|
|
20
|
-
exports.CreateOrganizationIdentityDto =
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.PASSWORD_REGEX =
|
|
28
|
-
exports.PHONE_NUMBER_REGEX =
|
|
29
|
-
exports.SLUG_REGEX =
|
|
30
|
-
exports.SignInUserDto =
|
|
31
|
-
exports.TonightPass =
|
|
32
|
-
exports.TonightPassAPIError =
|
|
33
|
-
exports.UpdateOrganizationDto =
|
|
34
|
-
exports.UpdateOrganizationEventDto =
|
|
35
|
-
exports.UpdateOrganizationEventTicketDto =
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
15
|
+
exports.BCRYPT_HASH = et;
|
|
16
|
+
exports.Client = D;
|
|
17
|
+
exports.CreateOrganizationDto = _;
|
|
18
|
+
exports.CreateOrganizationEventDto = N;
|
|
19
|
+
exports.CreateOrganizationEventTicketDto = U;
|
|
20
|
+
exports.CreateOrganizationIdentityDto = u;
|
|
21
|
+
exports.CreateOrganizationMemberDto = P;
|
|
22
|
+
exports.CreateUserDto = fe;
|
|
23
|
+
exports.DEFAULT_API_URL = X;
|
|
24
|
+
exports.EMAIL_REGEX = Qe;
|
|
25
|
+
exports.IMAGE_URL_REGEX = ot;
|
|
26
|
+
exports.NAME_REGEX = k;
|
|
27
|
+
exports.PASSWORD_REGEX = Oe;
|
|
28
|
+
exports.PHONE_NUMBER_REGEX = tt;
|
|
29
|
+
exports.SLUG_REGEX = Te;
|
|
30
|
+
exports.SignInUserDto = me;
|
|
31
|
+
exports.TonightPass = Ee;
|
|
32
|
+
exports.TonightPassAPIError = $;
|
|
33
|
+
exports.UpdateOrganizationDto = A;
|
|
34
|
+
exports.UpdateOrganizationEventDto = Q;
|
|
35
|
+
exports.UpdateOrganizationEventTicketDto = O;
|
|
36
|
+
exports.UpdateOrganizationIdentityDto = h;
|
|
37
|
+
exports.UpdateOrganizationMemberDto = F;
|
|
38
|
+
exports.UpdateUserDto = S;
|
|
39
|
+
exports.auth = we;
|
|
40
|
+
exports.careers = Re;
|
|
41
|
+
exports.health = _e;
|
|
42
|
+
exports.isBrowser = w;
|
|
43
|
+
exports.organizations = Ne;
|
|
44
|
+
exports.profiles = Ue;
|
|
45
|
+
exports.request = ve;
|
|
46
|
+
exports.sdk = I;
|
|
47
|
+
exports.users = Pe;
|
|
46
48
|
//# sourceMappingURL=out.js.map
|
|
47
49
|
//# sourceMappingURL=index.js.map
|