tonightpass 0.0.54 → 0.0.56
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 +20 -4
- package/dist/index.d.ts +20 -4
- package/dist/index.js +11 -10
- 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/endpoints.ts +2 -0
- package/src/rest/types/orders/index.ts +6 -1
- package/src/sdk/index.ts +1 -0
- package/src/sdk/orders.ts +13 -0
- package/src/sdk/organizations/events/index.ts +1 -1
- package/src/tonightpass.ts +11 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> tonightpass@0.0.
|
|
2
|
+
> tonightpass@0.0.56 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
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m20.
|
|
14
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
-
[32mCJS[39m [1mdist/index.js [22m[32m23.
|
|
17
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m40.
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m40.
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m20.47 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m72.38 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 575ms
|
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m23.71 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m72.51 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 576ms
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 3518ms
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m40.94 KB[39m
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m40.94 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# tonightpass
|
|
2
2
|
|
|
3
|
+
## 0.0.56
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3e62e99`](https://github.com/tonightpass/tonightpass/commit/3e62e99623675b3bf16abf0beb8d63b26efddf88) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Add orders sdk
|
|
8
|
+
|
|
9
|
+
## 0.0.55
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`dd3b572`](https://github.com/tonightpass/tonightpass/commit/dd3b572af8f7657cf03bec655d4aed6d6fb3d821) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Fix event orders typo in sdk
|
|
14
|
+
|
|
3
15
|
## 0.0.54
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -39,7 +39,7 @@ type Endpoint<M extends Options["method"], Path extends string, Res, Body = unde
|
|
|
39
39
|
res: Res;
|
|
40
40
|
body: Body;
|
|
41
41
|
};
|
|
42
|
-
type Endpoints = AuthEndpoints | CareersEndpoints | HealthEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints;
|
|
42
|
+
type Endpoints = AuthEndpoints | CareersEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints;
|
|
43
43
|
|
|
44
44
|
type User = Base & {
|
|
45
45
|
identifier: UserIdentifier;
|
|
@@ -197,6 +197,7 @@ type Order = Base & {
|
|
|
197
197
|
session: stripe__default.Checkout.Session;
|
|
198
198
|
user: User;
|
|
199
199
|
};
|
|
200
|
+
type OrderEndpoints = Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>> | Endpoint<"GET", "/orders/:sessionId", Order>;
|
|
200
201
|
|
|
201
202
|
type OrganizationEventOrderEndpoints = Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/orders", Order, CreateOrganizationEventOrderDto>;
|
|
202
203
|
|
|
@@ -675,6 +676,12 @@ declare class Client {
|
|
|
675
676
|
}> | Extract<Endpoint<"GET", "/health/http", Health<"app">>, {
|
|
676
677
|
path: Path;
|
|
677
678
|
method: "GET";
|
|
679
|
+
}> | Extract<Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<T>>, {
|
|
680
|
+
path: Path;
|
|
681
|
+
method: "GET";
|
|
682
|
+
}> | Extract<Endpoint<"GET", "/orders/:sessionId", Order>, {
|
|
683
|
+
path: Path;
|
|
684
|
+
method: "GET";
|
|
678
685
|
}> | Extract<Endpoint<"GET", "/organizations", Organization[]>, {
|
|
679
686
|
path: Path;
|
|
680
687
|
method: "GET";
|
|
@@ -889,6 +896,11 @@ declare const health: (client: Client) => {
|
|
|
889
896
|
http: () => Promise<Health<"app">>;
|
|
890
897
|
};
|
|
891
898
|
|
|
899
|
+
declare const orders: (client: Client) => {
|
|
900
|
+
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
901
|
+
get: (sessionId: string) => Promise<Order>;
|
|
902
|
+
};
|
|
903
|
+
|
|
892
904
|
declare const organizations: (client: Client) => {
|
|
893
905
|
getAll: () => Promise<Organization[]>;
|
|
894
906
|
get: (organizationSlug: string) => Promise<Organization>;
|
|
@@ -912,7 +924,7 @@ declare const organizations: (client: Client) => {
|
|
|
912
924
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
913
925
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
914
926
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
915
|
-
|
|
927
|
+
orders: {
|
|
916
928
|
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
|
|
917
929
|
};
|
|
918
930
|
styles: {
|
|
@@ -991,6 +1003,10 @@ declare class TonightPass {
|
|
|
991
1003
|
database: () => Promise<Health<"database">>;
|
|
992
1004
|
http: () => Promise<Health<"app">>;
|
|
993
1005
|
};
|
|
1006
|
+
readonly orders: {
|
|
1007
|
+
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
1008
|
+
get: (sessionId: string) => Promise<Order>;
|
|
1009
|
+
};
|
|
994
1010
|
readonly organizations: {
|
|
995
1011
|
getAll: () => Promise<Organization[]>;
|
|
996
1012
|
get: (organizationSlug: string) => Promise<Organization>;
|
|
@@ -1014,7 +1030,7 @@ declare class TonightPass {
|
|
|
1014
1030
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1015
1031
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1016
1032
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
1017
|
-
|
|
1033
|
+
orders: {
|
|
1018
1034
|
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
|
|
1019
1035
|
};
|
|
1020
1036
|
styles: {
|
|
@@ -1056,4 +1072,4 @@ declare class TonightPass {
|
|
|
1056
1072
|
|
|
1057
1073
|
declare const isBrowser: boolean;
|
|
1058
1074
|
|
|
1059
|
-
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, CreateOrganizationEventDto, CreateOrganizationEventOrderDto, 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 Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, 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, REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, 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 };
|
|
1075
|
+
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, CreateOrganizationEventDto, CreateOrganizationEventOrderDto, 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 OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, 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, REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, 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, orders, organizations, profiles, request, sdk, users };
|
package/dist/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ type Endpoint<M extends Options["method"], Path extends string, Res, Body = unde
|
|
|
39
39
|
res: Res;
|
|
40
40
|
body: Body;
|
|
41
41
|
};
|
|
42
|
-
type Endpoints = AuthEndpoints | CareersEndpoints | HealthEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints;
|
|
42
|
+
type Endpoints = AuthEndpoints | CareersEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints;
|
|
43
43
|
|
|
44
44
|
type User = Base & {
|
|
45
45
|
identifier: UserIdentifier;
|
|
@@ -197,6 +197,7 @@ type Order = Base & {
|
|
|
197
197
|
session: stripe__default.Checkout.Session;
|
|
198
198
|
user: User;
|
|
199
199
|
};
|
|
200
|
+
type OrderEndpoints = Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>> | Endpoint<"GET", "/orders/:sessionId", Order>;
|
|
200
201
|
|
|
201
202
|
type OrganizationEventOrderEndpoints = Endpoint<"POST", "/organizations/:organizationSlug/events/:eventSlug/orders", Order, CreateOrganizationEventOrderDto>;
|
|
202
203
|
|
|
@@ -675,6 +676,12 @@ declare class Client {
|
|
|
675
676
|
}> | Extract<Endpoint<"GET", "/health/http", Health<"app">>, {
|
|
676
677
|
path: Path;
|
|
677
678
|
method: "GET";
|
|
679
|
+
}> | Extract<Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<T>>, {
|
|
680
|
+
path: Path;
|
|
681
|
+
method: "GET";
|
|
682
|
+
}> | Extract<Endpoint<"GET", "/orders/:sessionId", Order>, {
|
|
683
|
+
path: Path;
|
|
684
|
+
method: "GET";
|
|
678
685
|
}> | Extract<Endpoint<"GET", "/organizations", Organization[]>, {
|
|
679
686
|
path: Path;
|
|
680
687
|
method: "GET";
|
|
@@ -889,6 +896,11 @@ declare const health: (client: Client) => {
|
|
|
889
896
|
http: () => Promise<Health<"app">>;
|
|
890
897
|
};
|
|
891
898
|
|
|
899
|
+
declare const orders: (client: Client) => {
|
|
900
|
+
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
901
|
+
get: (sessionId: string) => Promise<Order>;
|
|
902
|
+
};
|
|
903
|
+
|
|
892
904
|
declare const organizations: (client: Client) => {
|
|
893
905
|
getAll: () => Promise<Organization[]>;
|
|
894
906
|
get: (organizationSlug: string) => Promise<Organization>;
|
|
@@ -912,7 +924,7 @@ declare const organizations: (client: Client) => {
|
|
|
912
924
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
913
925
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
914
926
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
915
|
-
|
|
927
|
+
orders: {
|
|
916
928
|
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
|
|
917
929
|
};
|
|
918
930
|
styles: {
|
|
@@ -991,6 +1003,10 @@ declare class TonightPass {
|
|
|
991
1003
|
database: () => Promise<Health<"database">>;
|
|
992
1004
|
http: () => Promise<Health<"app">>;
|
|
993
1005
|
};
|
|
1006
|
+
readonly orders: {
|
|
1007
|
+
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
1008
|
+
get: (sessionId: string) => Promise<Order>;
|
|
1009
|
+
};
|
|
994
1010
|
readonly organizations: {
|
|
995
1011
|
getAll: () => Promise<Organization[]>;
|
|
996
1012
|
get: (organizationSlug: string) => Promise<Organization>;
|
|
@@ -1014,7 +1030,7 @@ declare class TonightPass {
|
|
|
1014
1030
|
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1015
1031
|
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
1016
1032
|
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
1017
|
-
|
|
1033
|
+
orders: {
|
|
1018
1034
|
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
|
|
1019
1035
|
};
|
|
1020
1036
|
styles: {
|
|
@@ -1056,4 +1072,4 @@ declare class TonightPass {
|
|
|
1056
1072
|
|
|
1057
1073
|
declare const isBrowser: boolean;
|
|
1058
1074
|
|
|
1059
|
-
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, CreateOrganizationEventDto, CreateOrganizationEventOrderDto, 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 Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, 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, REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, 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 };
|
|
1075
|
+
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, CreateOrganizationEventDto, CreateOrganizationEventOrderDto, 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 OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, 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, REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, 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, orders, organizations, profiles, request, sdk, users };
|
package/dist/index.js
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
require('reflect-metadata');
|
|
4
4
|
var classValidator = require('class-validator');
|
|
5
5
|
var classTransformer = require('class-transformer');
|
|
6
|
-
var
|
|
6
|
+
var yt = 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 yt__default = /*#__PURE__*/_interopDefault(yt);
|
|
12
12
|
|
|
13
|
-
var Qe=Object.defineProperty;var o=(e,t)=>Qe(e,"name",{value:t,configurable:!0});var te="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 j(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(j,"_ts_decorate");function R(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(R,"_ts_metadata");var z=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),R("design:type",String)],z.prototype,"slug",void 0);j([classValidator.IsObject(),classValidator.IsOptional(),R("design:type",typeof w>"u"?Object:w)],z.prototype,"identity",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),R("design:type",Array)],z.prototype,"members",void 0);j([classValidator.IsOptional(),classValidator.IsObject(),R("design:type",typeof Location>"u"?Object:Location)],z.prototype,"location",void 0);var w=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};j([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),R("design:type",String)],w.prototype,"displayName",void 0);j([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),R("design:type",String)],w.prototype,"description",void 0);j([classValidator.IsUrl({protocols:["http","https"]}),classValidator.IsOptional(),R("design:type",String)],w.prototype,"avatarUrl",void 0);j([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),R("design:type",String)],w.prototype,"bannerUrl",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),R("design:type",Array)],w.prototype,"socialLinks",void 0);var pe=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};var G=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var ce=class extends G{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.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 je=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 L(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(L,"_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),L("design:type",String)],g.prototype,"title",void 0);_([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),L("design:type",String)],g.prototype,"slug",void 0);_([classValidator.IsString(),classValidator.Length(16,2048),L("design:type",String)],g.prototype,"description",void 0);_([classValidator.IsEnum(exports.OrganizationEventType),L("design:type",typeof exports.OrganizationEventType>"u"?Object:exports.OrganizationEventType)],g.prototype,"type",void 0);_([classValidator.IsEnum(exports.OrganizationEventVisibilityType),L("design:type",typeof exports.OrganizationEventVisibilityType>"u"?Object:exports.OrganizationEventVisibilityType)],g.prototype,"visibility",void 0);_([classValidator.IsDateString(),L("design:type",typeof Date>"u"?Object:Date)],g.prototype,"startAt",void 0);_([classValidator.IsDateString(),L("design:type",typeof Date>"u"?Object:Date)],g.prototype,"endAt",void 0);var Ie=class extends g{static{o(this,"UpdateOrganizationEventDto");}};function _e(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(_e,"_ts_decorate");function Le(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Le,"_ts_metadata");var F=class{static{o(this,"CreateOrganizationMemberDto");}user;role};_e([classValidator.IsString(),classValidator.IsNotEmpty(),Le("design:type",String)],F.prototype,"user",void 0);_e([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),Le("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],F.prototype,"role",void 0);function at(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(at,"_ts_decorate");function pt(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(pt,"_ts_metadata");var T=class{static{o(this,"UpdateOrganizationMemberDto");}role};at([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),pt("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],T.prototype,"role",void 0);var ze=class{static{o(this,"CreateUserDto");}identifier;password;identity;addresses};var Ne=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 yt=gt__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}),ke=o(async(e,t)=>yt(e,{...t}).then(n=>n).catch(n=>{throw n.data||console.error(n),n.data}),"request");var ee=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||te;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 ke(a,{method:t,data:n,...s}),V=p.data;if(!V.success)throw new ee(p,V);return V.data}};function B(e){return e}o(B,"sdk");var qe=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 Ge=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 Fe=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 We=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 $e=o(e=>({create:o(async(t,r,n)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",n,{organizationSlug:t,eventSlug:r}),"create")}),"organizationsEventsOrders");var Ve=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 Ze=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 Ce=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:$e(e),styles:Ve(e),tickets:Ze(e)}),"organizationsEvents");var He=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 Xe=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:We(e),events:Ce(e),members:He(e)});var Je=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get")});var Ye=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 Ke=class{static{o(this,"TonightPass");}client;auth;careers;health;organizations;profiles;users;constructor(t){this.client=new $(t),this.auth=qe(this.client),this.careers=Ge(this.client),this.health=Fe(this.client),this.organizations=Xe(this.client),this.profiles=Je(this.client),this.users=Ye(this.client);}};
|
|
13
|
+
var Te=Object.defineProperty;var o=(e,t)=>Te(e,"name",{value:t,configurable:!0});var te="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,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(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 z=class{static{o(this,"CreateOrganizationDto");}organizationSlug;identity;members;location};v([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),S("design:type",String)],z.prototype,"organizationSlug",void 0);v([classValidator.IsObject(),S("design:type",typeof x>"u"?Object:x)],z.prototype,"identity",void 0);v([classValidator.IsArray(),S("design:type",Array)],z.prototype,"members",void 0);v([classValidator.IsOptional(),classValidator.IsObject(),S("design:type",typeof Location>"u"?Object:Location)],z.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 j(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(j,"_ts_decorate");function A(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(A,"_ts_metadata");var N=class{static{o(this,"UpdateOrganizationDto");}slug;identity;members;location};j([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),A("design:type",String)],N.prototype,"slug",void 0);j([classValidator.IsObject(),classValidator.IsOptional(),A("design:type",typeof w>"u"?Object:w)],N.prototype,"identity",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),A("design:type",Array)],N.prototype,"members",void 0);j([classValidator.IsOptional(),classValidator.IsObject(),A("design:type",typeof Location>"u"?Object:Location)],N.prototype,"location",void 0);var w=class{static{o(this,"UpdateOrganizationIdentityDto");}displayName;description;avatarUrl;bannerUrl;socialLinks};j([classValidator.IsString(),classValidator.IsNotEmpty(),classValidator.Length(1,32),classValidator.IsOptional(),A("design:type",String)],w.prototype,"displayName",void 0);j([classValidator.IsString(),classValidator.Length(16,1024),classValidator.IsOptional(),A("design:type",String)],w.prototype,"description",void 0);j([classValidator.IsUrl({protocols:["http","https"]}),classValidator.IsOptional(),A("design:type",String)],w.prototype,"avatarUrl",void 0);j([classValidator.IsOptional(),classValidator.IsUrl({protocols:["http","https"]}),A("design:type",String)],w.prototype,"bannerUrl",void 0);j([classValidator.IsOptional(),classValidator.IsArray(),A("design:type",Array)],w.prototype,"socialLinks",void 0);var pe=class{static{o(this,"CreateOrganizationEventOrderDto");}cart};var G=class{static{o(this,"CreateOrganizationEventStyleDto");}type;emoji;name};var ce=class extends G{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.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,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(u,"_ts_decorate");function 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 je=class extends c{static{o(this,"UpdateOrganizationEventTicketDto");}};function _(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(_,"_ts_decorate");function L(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(L,"_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),L("design:type",String)],g.prototype,"title",void 0);_([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsLowercase(),classValidator.Length(1,48),L("design:type",String)],g.prototype,"slug",void 0);_([classValidator.IsString(),classValidator.Length(16,2048),L("design:type",String)],g.prototype,"description",void 0);_([classValidator.IsEnum(exports.OrganizationEventType),L("design:type",typeof exports.OrganizationEventType>"u"?Object:exports.OrganizationEventType)],g.prototype,"type",void 0);_([classValidator.IsEnum(exports.OrganizationEventVisibilityType),L("design:type",typeof exports.OrganizationEventVisibilityType>"u"?Object:exports.OrganizationEventVisibilityType)],g.prototype,"visibility",void 0);_([classValidator.IsDateString(),L("design:type",typeof Date>"u"?Object:Date)],g.prototype,"startAt",void 0);_([classValidator.IsDateString(),L("design:type",typeof Date>"u"?Object:Date)],g.prototype,"endAt",void 0);var Ie=class extends g{static{o(this,"UpdateOrganizationEventDto");}};function _e(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(_e,"_ts_decorate");function Le(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(Le,"_ts_metadata");var F=class{static{o(this,"CreateOrganizationMemberDto");}user;role};_e([classValidator.IsString(),classValidator.IsNotEmpty(),Le("design:type",String)],F.prototype,"user",void 0);_e([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),Le("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],F.prototype,"role",void 0);function pt(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(pt,"_ts_decorate");function ct(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}o(ct,"_ts_metadata");var T=class{static{o(this,"UpdateOrganizationMemberDto");}role};pt([classValidator.IsEnum(exports.OrganizationMemberRole),classValidator.IsNotEmpty(),ct("design:type",typeof exports.OrganizationMemberRole>"u"?Object:exports.OrganizationMemberRole)],T.prototype,"role",void 0);var ze=class{static{o(this,"CreateUserDto");}identifier;password;identity;addresses};var Ne=class{static{o(this,"SignInUserDto");}identifier;password};function f(e,t,r,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,s);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(n=(i<3?a(n):i>3?a(t,r,n):a(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n}o(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(()=>B),l("design:type",typeof B>"u"?Object:B)],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 B=class{static{o(this,"UpdateIdentifierDto");}email;phoneNumber;username};f([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsEmail(),l("design:type",String)],B.prototype,"email",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.IsPhoneNumber(),l("design:type",String)],B.prototype,"phoneNumber",void 0);f([classValidator.IsOptional(),classValidator.IsString(),classValidator.MinLength(3),l("design:type",String)],B.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 ht=yt__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}),ke=o(async(e,t)=>ht(e,{...t}).then(s=>s).catch(s=>{throw s.data||console.error(s),s.data}),"request");var ee=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,s)=>{let i=this.options.baseURL||te;return pathcat.pathcat(i,r,s)};}setOptions(t){this.options=t;}async get(t,r,s){return this.requester("GET",t,void 0,r,s)}async post(t,r,s,i){return this.requester("POST",t,r,s,i)}async put(t,r,s,i){return this.requester("PUT",t,r,s,i)}async patch(t,r,s,i){return this.requester("PATCH",t,r,s,i)}async delete(t,r,s,i){return this.requester("DELETE",t,r,s,i)}async requester(t,r,s,i={},n={}){let a=this.url(r,i);if(s!==void 0&&t==="GET")throw new Error("Cannot send a GET request with a body");let p=await ke(a,{method:t,data:s,...n}),V=p.data;if(!V.success)throw new ee(p,V);return V.data}};function P(e){return e}o(P,"sdk");var qe=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 Ge=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 Fe=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 We=e=>({getAll:o(async t=>e.get("/orders",t),"getAll"),get:o(async t=>e.get("/orders/:sessionId",{sessionId:t}),"get")});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=>({create:o(async(t,r,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/orders",s,{organizationSlug:t,eventSlug:r}),"create")}),"organizationsEventsOrders");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 Ce=o(e=>({getAll:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets",{organizationSlug:t,eventSlug:r}),"getAll"),get:o(async(t,r,s)=>e.get("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",{organizationSlug:t,eventSlug:r,ticketId:s}),"get"),create:o(async(t,r,s)=>e.post("/organizations/:organizationSlug/events/:eventSlug/tickets",s,{organizationSlug:t,eventSlug:r}),"create"),update:o(async(t,r,s,i)=>e.put("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",i,{organizationSlug:t,eventSlug:r,ticketId:s}),"update"),delete:o(async(t,r,s)=>e.delete("/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",null,{organizationSlug:t,eventSlug:r,ticketId:s}),"delete")}),"organizationsEventsTickets");var He=o(e=>({getAll:o(async(t,r)=>t?e.get("/organizations/:organizationSlug/events",{organizationSlug:t,...r}):e.get("/organizations/events",r),"getAll"),getSuggestions:o(async t=>e.get("/organizations/events/suggestions",t),"getSuggestions"),getNearby:o(async t=>e.get("/organizations/events/nearby",t),"getNearby"),get:o(async(t,r)=>e.get("/organizations/:organizationSlug/events/:eventSlug",{organizationSlug:t,eventSlug:r}),"get"),create:o(async(t,r)=>e.post("/organizations/:organizationSlug/events",r,{organizationSlug:t}),"create"),update:o(async(t,r,s)=>e.put("/organizations/:organizationSlug/events/:eventSlug",s,{organizationSlug:t,eventSlug:r}),"update"),delete:o(async(t,r)=>e.delete("/organizations/:organizationSlug/events/:eventSlug",null,{organizationSlug:t,eventSlug:r}),"delete"),orders:Ve(e),styles:Ze(e),tickets:Ce(e)}),"organizationsEvents");var Xe=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 Je=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:He(e),members:Xe(e)});var Ye=e=>({get:o(async t=>e.get("/profiles/:username",{username:t}),"get")});var Ke=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 Qe=class{static{o(this,"TonightPass");}client;auth;careers;health;orders;organizations;profiles;users;constructor(t){this.client=new $(t),this.auth=qe(this.client),this.careers=Ge(this.client),this.health=Fe(this.client),this.orders=We(this.client),this.organizations=Je(this.client),this.profiles=Ye(this.client),this.users=Ke(this.client);}};
|
|
14
14
|
|
|
15
15
|
exports.Client = $;
|
|
16
|
-
exports.CreateOrganizationDto =
|
|
16
|
+
exports.CreateOrganizationDto = z;
|
|
17
17
|
exports.CreateOrganizationEventDto = g;
|
|
18
18
|
exports.CreateOrganizationEventOrderDto = pe;
|
|
19
19
|
exports.CreateOrganizationEventStyleDto = G;
|
|
@@ -24,9 +24,9 @@ exports.CreateUserDto = ze;
|
|
|
24
24
|
exports.DEFAULT_API_URL = te;
|
|
25
25
|
exports.REGEX = Z;
|
|
26
26
|
exports.SignInUserDto = Ne;
|
|
27
|
-
exports.TonightPass =
|
|
27
|
+
exports.TonightPass = Qe;
|
|
28
28
|
exports.TonightPassAPIError = ee;
|
|
29
|
-
exports.UpdateOrganizationDto =
|
|
29
|
+
exports.UpdateOrganizationDto = N;
|
|
30
30
|
exports.UpdateOrganizationEventDto = Ie;
|
|
31
31
|
exports.UpdateOrganizationEventStyleDto = ce;
|
|
32
32
|
exports.UpdateOrganizationEventTicketDto = je;
|
|
@@ -37,10 +37,11 @@ exports.auth = qe;
|
|
|
37
37
|
exports.careers = Ge;
|
|
38
38
|
exports.health = Fe;
|
|
39
39
|
exports.isBrowser = b;
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
40
|
+
exports.orders = We;
|
|
41
|
+
exports.organizations = Je;
|
|
42
|
+
exports.profiles = Ye;
|
|
42
43
|
exports.request = ke;
|
|
43
|
-
exports.sdk =
|
|
44
|
-
exports.users =
|
|
44
|
+
exports.sdk = P;
|
|
45
|
+
exports.users = Ke;
|
|
45
46
|
//# sourceMappingURL=index.js.map
|
|
46
47
|
//# sourceMappingURL=index.js.map
|