tonightpass 0.0.117 → 0.0.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -2
- package/.turbo/turbo-build.log +0 -21
- package/CHANGELOG.md +0 -717
- package/src/constants/api.ts +0 -1
- package/src/constants/index.ts +0 -2
- package/src/constants/regex.ts +0 -28
- package/src/index.ts +0 -6
- package/src/rest/client.ts +0 -198
- package/src/rest/dtos/index.ts +0 -5
- package/src/rest/dtos/locations/create-location.dto.ts +0 -68
- package/src/rest/dtos/locations/index.ts +0 -2
- package/src/rest/dtos/locations/update-location.dto.ts +0 -37
- package/src/rest/dtos/organizations/create-organization.dto.ts +0 -60
- package/src/rest/dtos/organizations/events/create-organization-event.dto.ts +0 -99
- package/src/rest/dtos/organizations/events/index.ts +0 -6
- package/src/rest/dtos/organizations/events/orders/create-organization-event-order.dto.ts +0 -3
- package/src/rest/dtos/organizations/events/orders/index.ts +0 -1
- package/src/rest/dtos/organizations/events/styles/create-organization-event-style.dto.ts +0 -7
- package/src/rest/dtos/organizations/events/styles/index.ts +0 -2
- package/src/rest/dtos/organizations/events/styles/update-organization-event-style.dto.ts +0 -3
- package/src/rest/dtos/organizations/events/tickets/create-organization-event-ticket.dto.ts +0 -68
- package/src/rest/dtos/organizations/events/tickets/index.ts +0 -2
- package/src/rest/dtos/organizations/events/tickets/update-organization-event-ticket.dto.ts +0 -70
- package/src/rest/dtos/organizations/events/update-organization-event.dto.ts +0 -88
- package/src/rest/dtos/organizations/index.ts +0 -4
- package/src/rest/dtos/organizations/members/create-organization-member.dto.ts +0 -13
- package/src/rest/dtos/organizations/members/index.ts +0 -2
- package/src/rest/dtos/organizations/members/update-organization-member.dto.ts +0 -9
- package/src/rest/dtos/organizations/update-organization.dto.ts +0 -65
- package/src/rest/dtos/users/create-user.dto.ts +0 -86
- package/src/rest/dtos/users/index.ts +0 -3
- package/src/rest/dtos/users/sign-in-user.dto.ts +0 -11
- package/src/rest/dtos/users/update-user.dto.ts +0 -121
- package/src/rest/endpoints.ts +0 -36
- package/src/rest/index.ts +0 -5
- package/src/rest/request/index.ts +0 -1
- package/src/rest/request/request.ts +0 -52
- package/src/rest/types/auth/index.ts +0 -15
- package/src/rest/types/careers/index.ts +0 -87
- package/src/rest/types/health/index.ts +0 -15
- package/src/rest/types/index.ts +0 -108
- package/src/rest/types/locations/index.ts +0 -30
- package/src/rest/types/notifications/index.ts +0 -8
- package/src/rest/types/orders/index.ts +0 -14
- package/src/rest/types/organizations/events/index.ts +0 -136
- package/src/rest/types/organizations/events/orders/index.ts +0 -10
- package/src/rest/types/organizations/events/styles/index.ts +0 -47
- package/src/rest/types/organizations/events/tickets/index.ts +0 -73
- package/src/rest/types/organizations/events/views/index.ts +0 -8
- package/src/rest/types/organizations/index.ts +0 -78
- package/src/rest/types/organizations/members/index.ts +0 -72
- package/src/rest/types/profiles/index.ts +0 -82
- package/src/rest/types/users/bookings/index.ts +0 -56
- package/src/rest/types/users/index.ts +0 -116
- package/src/rest/types/users/notifications/index.ts +0 -50
- package/src/rest/types/users/tokens/index.ts +0 -19
- package/src/rest/types/webhooks/index.ts +0 -10
- package/src/sdk/auth.ts +0 -42
- package/src/sdk/builder.ts +0 -5
- package/src/sdk/careers.ts +0 -23
- package/src/sdk/health.ts +0 -8
- package/src/sdk/index.ts +0 -9
- package/src/sdk/notifications.ts +0 -6
- package/src/sdk/orders.ts +0 -13
- package/src/sdk/organizations/billing/index.ts +0 -33
- package/src/sdk/organizations/events/index.ts +0 -79
- package/src/sdk/organizations/events/orders/index.ts +0 -17
- package/src/sdk/organizations/events/styles/index.ts +0 -19
- package/src/sdk/organizations/events/tickets/index.ts +0 -64
- package/src/sdk/organizations/events/views/index.ts +0 -13
- package/src/sdk/organizations/index.ts +0 -22
- package/src/sdk/organizations/members/index.ts +0 -7
- package/src/sdk/profiles/index.ts +0 -8
- package/src/sdk/profiles/relationships/index.ts +0 -28
- package/src/sdk/users/bookings/index.ts +0 -8
- package/src/sdk/users/index.ts +0 -26
- package/src/sdk/users/notifications/index.ts +0 -7
- package/src/tonightpass.ts +0 -37
- package/src/utils/index.ts +0 -21
- package/tests/auth/index.ts +0 -26
- package/tests/careers/index.ts +0 -28
- package/tests/dtos/index.ts +0 -157
- package/tests/index.ts +0 -61
- package/tests/regex/index.ts +0 -81
- package/tests/users/index.ts +0 -38
- package/tsconfig.json +0 -18
- package/tsup.config.ts +0 -17
package/src/rest/types/index.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
export * from "./auth";
|
|
2
|
-
export * from "./careers";
|
|
3
|
-
export * from "./health";
|
|
4
|
-
export * from "./locations";
|
|
5
|
-
export * from "./organizations";
|
|
6
|
-
export * from "./users";
|
|
7
|
-
export * from "./orders";
|
|
8
|
-
export * from "./profiles";
|
|
9
|
-
export * from "./webhooks";
|
|
10
|
-
export * from "./notifications";
|
|
11
|
-
|
|
12
|
-
export type Base = {
|
|
13
|
-
id: string;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
updatedAt: Date;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export type ExcludeBase<T> = Omit<T, keyof Base>;
|
|
19
|
-
|
|
20
|
-
export type DeepPartial<T> = {
|
|
21
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// Currency
|
|
25
|
-
export enum Currency {
|
|
26
|
-
EUR = "EUR",
|
|
27
|
-
USD = "USD",
|
|
28
|
-
GBP = "GBP",
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// I18n
|
|
32
|
-
export enum Language {
|
|
33
|
-
FR = "fr",
|
|
34
|
-
EN = "en",
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type ArraySortOptions = {
|
|
38
|
-
/**
|
|
39
|
-
* Field to sort
|
|
40
|
-
*/
|
|
41
|
-
field: string;
|
|
42
|
-
/**
|
|
43
|
-
* Order to sort
|
|
44
|
-
*/
|
|
45
|
-
order: "asc" | "desc";
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type ArrayPaginationOptions = {
|
|
49
|
-
/**
|
|
50
|
-
* Page number
|
|
51
|
-
*/
|
|
52
|
-
page?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Number of items per page
|
|
55
|
-
*/
|
|
56
|
-
limit?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Offset to start from
|
|
59
|
-
*/
|
|
60
|
-
offset?: number;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export type ArrayFilterOptions = {
|
|
64
|
-
/**
|
|
65
|
-
* Field to filter
|
|
66
|
-
*/
|
|
67
|
-
field: string;
|
|
68
|
-
/**
|
|
69
|
-
* Value to filter
|
|
70
|
-
*/
|
|
71
|
-
value: string;
|
|
72
|
-
/**
|
|
73
|
-
* Operator to use
|
|
74
|
-
*/
|
|
75
|
-
operator:
|
|
76
|
-
| "eq" // Equal
|
|
77
|
-
| "ne" // Not equal
|
|
78
|
-
| "gt" // Greater than
|
|
79
|
-
| "lt" // Less than
|
|
80
|
-
| "gte" // Greater than or equal
|
|
81
|
-
| "lte" // Less than or equal
|
|
82
|
-
| "in" // In
|
|
83
|
-
| "nin"; // Not in
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
87
|
-
export type ArrayOptions<T> = {
|
|
88
|
-
/**
|
|
89
|
-
* Populate relations
|
|
90
|
-
*/
|
|
91
|
-
// populate?: string[];
|
|
92
|
-
/**
|
|
93
|
-
* Select only specific fields to display
|
|
94
|
-
*/
|
|
95
|
-
// fields?: readonly AutoPath<T, Fields, `${PopulatePath.ALL}`>[];
|
|
96
|
-
/**
|
|
97
|
-
* Exclude specific fields from the result
|
|
98
|
-
// */
|
|
99
|
-
// exclude?: readonly AutoPath<T, string>[];
|
|
100
|
-
} & ArrayPaginationOptions;
|
|
101
|
-
// & ArraySortOptions;
|
|
102
|
-
|
|
103
|
-
export type ArrayResult<T> = {
|
|
104
|
-
items: T[];
|
|
105
|
-
total: number;
|
|
106
|
-
page: number;
|
|
107
|
-
limit: number;
|
|
108
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a GeoJSON point with specific geographic coordinates.
|
|
3
|
-
*
|
|
4
|
-
* @see https://geojson.org/geojson-spec.html#point
|
|
5
|
-
*
|
|
6
|
-
* @property {"Point"} type - The type of the geometry, which is always "Point" for a GeoJSON point.
|
|
7
|
-
* @property {[number, number]} coordinates - The coordinates of the point, represented as [longitude, latitude].
|
|
8
|
-
*/
|
|
9
|
-
export type GeoPoint = {
|
|
10
|
-
type: "Point";
|
|
11
|
-
coordinates: [number, number];
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type Location = {
|
|
15
|
-
name?: string;
|
|
16
|
-
address: string;
|
|
17
|
-
zipCode: string;
|
|
18
|
-
city: string;
|
|
19
|
-
country: string;
|
|
20
|
-
geometry: GeoPoint;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export interface GeoSearchAggregation<T> {
|
|
24
|
-
metadata: { total: number }[];
|
|
25
|
-
data: T[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type Distance<T> = T & {
|
|
29
|
-
distance: number;
|
|
30
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import Stripe from "stripe";
|
|
2
|
-
|
|
3
|
-
import { ArrayOptions, ArrayResult, Base } from "..";
|
|
4
|
-
import { Endpoint } from "../../endpoints";
|
|
5
|
-
import { User } from "../users";
|
|
6
|
-
|
|
7
|
-
export type Order = Base & {
|
|
8
|
-
invoice: Stripe.Invoice;
|
|
9
|
-
user: User;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type OrderEndpoints =
|
|
13
|
-
| Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>>
|
|
14
|
-
| Endpoint<"GET", "/orders/:orderId", Order>;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
OrganizationEventTicket,
|
|
3
|
-
Organization,
|
|
4
|
-
OrganizationEventTicketEndpoints,
|
|
5
|
-
} from "..";
|
|
6
|
-
import { OrganizationEventOrderEndpoints } from "./orders";
|
|
7
|
-
import {
|
|
8
|
-
OrganizationEventStyle,
|
|
9
|
-
OrganizationEventStyleEndpoints,
|
|
10
|
-
} from "./styles";
|
|
11
|
-
import { ArrayOptions, ArrayResult, Base, Location } from "../..";
|
|
12
|
-
import { OrganizationEventViewEndpoints } from "./views";
|
|
13
|
-
import {
|
|
14
|
-
CreateOrganizationEventDto,
|
|
15
|
-
UpdateOrganizationEventDto,
|
|
16
|
-
} from "../../../dtos";
|
|
17
|
-
import { Endpoint } from "../../../endpoints";
|
|
18
|
-
|
|
19
|
-
export * from "./orders";
|
|
20
|
-
export * from "./tickets";
|
|
21
|
-
export * from "./styles";
|
|
22
|
-
|
|
23
|
-
export type OrganizationEvent = Base & {
|
|
24
|
-
title: string;
|
|
25
|
-
description: string;
|
|
26
|
-
slug: string;
|
|
27
|
-
organization: Organization;
|
|
28
|
-
type: OrganizationEventType;
|
|
29
|
-
visibility: OrganizationEventVisibilityType;
|
|
30
|
-
flyers: string[];
|
|
31
|
-
trailers: string[];
|
|
32
|
-
location: Location;
|
|
33
|
-
tickets: OrganizationEventTicket[];
|
|
34
|
-
styles: OrganizationEventStyle[];
|
|
35
|
-
viewsCount: number;
|
|
36
|
-
startAt: Date;
|
|
37
|
-
endAt: Date;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export enum OrganizationEventType {
|
|
41
|
-
Clubbing = "clubbing",
|
|
42
|
-
Concert = "concert",
|
|
43
|
-
Afterwork = "afterwork",
|
|
44
|
-
DancingLunch = "dancing_lunch",
|
|
45
|
-
Diner = "diner",
|
|
46
|
-
Garden = "garden",
|
|
47
|
-
AfterBeach = "after_beach",
|
|
48
|
-
Festival = "festival",
|
|
49
|
-
Spectacle = "spectacle",
|
|
50
|
-
Cruise = "cruise",
|
|
51
|
-
OutsideAnimation = "outside_animation",
|
|
52
|
-
Sport = "sport",
|
|
53
|
-
Match = "match",
|
|
54
|
-
Seminar = "seminar",
|
|
55
|
-
Conference = "conference",
|
|
56
|
-
WellnessDay = "wellness_day",
|
|
57
|
-
Workshop = "workshop",
|
|
58
|
-
TradeFair = "trade_fair",
|
|
59
|
-
ConsumerShow = "consumer_show",
|
|
60
|
-
Membership = "membership",
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export enum OrganizationEventVisibilityType {
|
|
64
|
-
Public = "public",
|
|
65
|
-
Unlisted = "unlisted",
|
|
66
|
-
Private = "private",
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type OrganizationEventEndpoints =
|
|
70
|
-
| Endpoint<
|
|
71
|
-
"GET",
|
|
72
|
-
"/organizations/events",
|
|
73
|
-
ArrayResult<OrganizationEvent>,
|
|
74
|
-
ArrayOptions<OrganizationEvent>
|
|
75
|
-
>
|
|
76
|
-
| Endpoint<
|
|
77
|
-
"GET",
|
|
78
|
-
"/organizations/events/suggestions",
|
|
79
|
-
ArrayResult<OrganizationEvent>,
|
|
80
|
-
ArrayOptions<OrganizationEvent>
|
|
81
|
-
>
|
|
82
|
-
| Endpoint<
|
|
83
|
-
"GET",
|
|
84
|
-
"/organizations/events/nearby",
|
|
85
|
-
ArrayResult<OrganizationEvent>,
|
|
86
|
-
ArrayOptions<OrganizationEvent> & {
|
|
87
|
-
latitude: number;
|
|
88
|
-
longitude: number;
|
|
89
|
-
radius?: number;
|
|
90
|
-
}
|
|
91
|
-
>
|
|
92
|
-
| Endpoint<
|
|
93
|
-
"GET",
|
|
94
|
-
"/organizations/:organizationSlug/events",
|
|
95
|
-
ArrayResult<OrganizationEvent>,
|
|
96
|
-
ArrayOptions<OrganizationEvent>
|
|
97
|
-
>
|
|
98
|
-
| Endpoint<
|
|
99
|
-
"GET",
|
|
100
|
-
"/organizations/:organizationSlug/events/past",
|
|
101
|
-
ArrayResult<OrganizationEvent>,
|
|
102
|
-
ArrayOptions<OrganizationEvent>
|
|
103
|
-
>
|
|
104
|
-
| Endpoint<
|
|
105
|
-
"GET",
|
|
106
|
-
"/organizations/:organizationSlug/events/upcoming",
|
|
107
|
-
ArrayResult<OrganizationEvent>,
|
|
108
|
-
ArrayOptions<OrganizationEvent>
|
|
109
|
-
>
|
|
110
|
-
| Endpoint<
|
|
111
|
-
"GET",
|
|
112
|
-
"/organizations/:organizationSlug/events/:eventSlug",
|
|
113
|
-
OrganizationEvent
|
|
114
|
-
>
|
|
115
|
-
| Endpoint<
|
|
116
|
-
"POST",
|
|
117
|
-
"/organizations/:organizationSlug/events",
|
|
118
|
-
OrganizationEvent,
|
|
119
|
-
CreateOrganizationEventDto
|
|
120
|
-
>
|
|
121
|
-
| Endpoint<
|
|
122
|
-
"PUT",
|
|
123
|
-
"/organizations/:organizationSlug/events/:eventSlug",
|
|
124
|
-
OrganizationEvent,
|
|
125
|
-
UpdateOrganizationEventDto
|
|
126
|
-
>
|
|
127
|
-
| Endpoint<
|
|
128
|
-
"DELETE",
|
|
129
|
-
"/organizations/:organizationSlug/events/:eventSlug",
|
|
130
|
-
OrganizationEvent,
|
|
131
|
-
null
|
|
132
|
-
>
|
|
133
|
-
| OrganizationEventOrderEndpoints
|
|
134
|
-
| OrganizationEventStyleEndpoints
|
|
135
|
-
| OrganizationEventTicketEndpoints
|
|
136
|
-
| OrganizationEventViewEndpoints;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CreateOrganizationEventOrderDto } from "../../../../dtos";
|
|
2
|
-
import { Endpoint } from "../../../../endpoints";
|
|
3
|
-
import { Order } from "../../../orders";
|
|
4
|
-
|
|
5
|
-
export type OrganizationEventOrderEndpoints = Endpoint<
|
|
6
|
-
"POST",
|
|
7
|
-
"/organizations/:organizationSlug/events/:eventSlug/orders",
|
|
8
|
-
Order,
|
|
9
|
-
CreateOrganizationEventOrderDto
|
|
10
|
-
>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Base } from "../../..";
|
|
2
|
-
import {
|
|
3
|
-
CreateOrganizationEventStyleDto,
|
|
4
|
-
UpdateOrganizationEventStyleDto,
|
|
5
|
-
} from "../../../../dtos/organizations/events/styles";
|
|
6
|
-
import { Endpoint } from "../../../../endpoints";
|
|
7
|
-
|
|
8
|
-
export type OrganizationEventStyle = Base & {
|
|
9
|
-
type: OrganizationEventStyleType;
|
|
10
|
-
emoji: string;
|
|
11
|
-
name: string;
|
|
12
|
-
slug: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export enum OrganizationEventStyleType {
|
|
16
|
-
Music = "music",
|
|
17
|
-
Dress = "dress",
|
|
18
|
-
Sport = "sport",
|
|
19
|
-
Food = "food",
|
|
20
|
-
Art = "art",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type OrganizationEventStyleEndpoints =
|
|
24
|
-
| Endpoint<"GET", "/organizations/events/styles", OrganizationEventStyle[]>
|
|
25
|
-
| Endpoint<
|
|
26
|
-
"GET",
|
|
27
|
-
"/organizations/events/styles/:styleSlug",
|
|
28
|
-
OrganizationEventStyle
|
|
29
|
-
>
|
|
30
|
-
| Endpoint<
|
|
31
|
-
"POST",
|
|
32
|
-
"/organizations/events/styles",
|
|
33
|
-
OrganizationEventStyle,
|
|
34
|
-
CreateOrganizationEventStyleDto
|
|
35
|
-
>
|
|
36
|
-
| Endpoint<
|
|
37
|
-
"PUT",
|
|
38
|
-
"/organizations/events/styles/:styleSlug",
|
|
39
|
-
OrganizationEventStyle,
|
|
40
|
-
UpdateOrganizationEventStyleDto
|
|
41
|
-
>
|
|
42
|
-
| Endpoint<
|
|
43
|
-
"DELETE",
|
|
44
|
-
"/organizations/events/styles/:styleSlug",
|
|
45
|
-
OrganizationEventStyle[],
|
|
46
|
-
null
|
|
47
|
-
>;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import Stripe from "stripe";
|
|
2
|
-
|
|
3
|
-
import { Base, OrganizationEvent } from "../../..";
|
|
4
|
-
import {
|
|
5
|
-
CreateOrganizationEventTicketDto,
|
|
6
|
-
UpdateOrganizationEventTicketDto,
|
|
7
|
-
} from "../../../../dtos";
|
|
8
|
-
import { Endpoint } from "../../../../endpoints";
|
|
9
|
-
|
|
10
|
-
export type OrganizationEventTicket = Base & {
|
|
11
|
-
name: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
price: Stripe.Price;
|
|
14
|
-
product: Stripe.Product;
|
|
15
|
-
fee: number;
|
|
16
|
-
quantity: number;
|
|
17
|
-
type: OrganizationEventTicketType;
|
|
18
|
-
category: OrganizationEventTicketCategory;
|
|
19
|
-
externalId?: string;
|
|
20
|
-
isVisible: boolean;
|
|
21
|
-
isFeesIncluded: boolean;
|
|
22
|
-
startAt?: Date;
|
|
23
|
-
endAt?: Date;
|
|
24
|
-
event: OrganizationEvent;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export enum OrganizationEventTicketType {
|
|
28
|
-
ETicket = "e-ticket",
|
|
29
|
-
Other = "other",
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export enum OrganizationEventTicketCategory {
|
|
33
|
-
Entry = "entry",
|
|
34
|
-
Package = "package",
|
|
35
|
-
Meal = "meal",
|
|
36
|
-
Drink = "drink",
|
|
37
|
-
Parking = "parking",
|
|
38
|
-
Accommodation = "accommodation",
|
|
39
|
-
Camping = "camping",
|
|
40
|
-
Locker = "locker",
|
|
41
|
-
Shuttle = "shuttle",
|
|
42
|
-
Other = "other",
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type OrganizationEventTicketEndpoints =
|
|
46
|
-
| Endpoint<
|
|
47
|
-
"GET",
|
|
48
|
-
"/organizations/:organizationSlug/events/:eventSlug/tickets",
|
|
49
|
-
OrganizationEventTicket[]
|
|
50
|
-
>
|
|
51
|
-
| Endpoint<
|
|
52
|
-
"GET",
|
|
53
|
-
"/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",
|
|
54
|
-
OrganizationEventTicket
|
|
55
|
-
>
|
|
56
|
-
| Endpoint<
|
|
57
|
-
"POST",
|
|
58
|
-
"/organizations/:organizationSlug/events/:eventSlug/tickets",
|
|
59
|
-
OrganizationEventTicket,
|
|
60
|
-
CreateOrganizationEventTicketDto
|
|
61
|
-
>
|
|
62
|
-
| Endpoint<
|
|
63
|
-
"PUT",
|
|
64
|
-
"/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",
|
|
65
|
-
OrganizationEventTicket,
|
|
66
|
-
UpdateOrganizationEventTicketDto
|
|
67
|
-
>
|
|
68
|
-
| Endpoint<
|
|
69
|
-
"DELETE",
|
|
70
|
-
"/organizations/:organizationSlug/events/:eventSlug/tickets/:ticketId",
|
|
71
|
-
OrganizationEventTicket[],
|
|
72
|
-
null
|
|
73
|
-
>;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type Stripe from "stripe";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ArrayOptions,
|
|
5
|
-
ArrayResult,
|
|
6
|
-
Base,
|
|
7
|
-
Location,
|
|
8
|
-
OrganizationProfile,
|
|
9
|
-
} from "..";
|
|
10
|
-
import { OrganizationEvent, OrganizationEventEndpoints } from "./events";
|
|
11
|
-
import { OrganizationEventTicket } from "./events/tickets";
|
|
12
|
-
import { OrganizationMember, OrganizationMembersEndpoints } from "./members";
|
|
13
|
-
import { CreateOrganizationDto, UpdateOrganizationDto } from "../../dtos";
|
|
14
|
-
import { Endpoint } from "../../endpoints";
|
|
15
|
-
|
|
16
|
-
export * from "./events";
|
|
17
|
-
export * from "./members";
|
|
18
|
-
|
|
19
|
-
export type Organization = Base & {
|
|
20
|
-
slug: string;
|
|
21
|
-
identity: OrganizationIdentity;
|
|
22
|
-
members: OrganizationMember[];
|
|
23
|
-
location?: Location;
|
|
24
|
-
events: OrganizationEvent[];
|
|
25
|
-
savedTickets: OrganizationEventTicket[];
|
|
26
|
-
verified: boolean;
|
|
27
|
-
billing: OrganizationBilling;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type OrganizationBilling = {
|
|
31
|
-
account: string;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type OrganizationBillingAccount = Stripe.Account;
|
|
35
|
-
|
|
36
|
-
export type OrganizationIdentity = OrganizationProfile & {
|
|
37
|
-
socialLinks: OrganizationSocialLink[];
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type OrganizationSocialLink = {
|
|
41
|
-
type: OrganizationSocialType;
|
|
42
|
-
url: string;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export enum OrganizationSocialType {
|
|
46
|
-
Facebook = "facebook",
|
|
47
|
-
Twitter = "twitter",
|
|
48
|
-
Instagram = "instagram",
|
|
49
|
-
Linkedin = "linkedin",
|
|
50
|
-
Youtube = "youtube",
|
|
51
|
-
Website = "website",
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export type OrganizationEndpoints =
|
|
55
|
-
| Endpoint<
|
|
56
|
-
"GET",
|
|
57
|
-
"/organizations",
|
|
58
|
-
ArrayResult<Organization>,
|
|
59
|
-
ArrayOptions<Organization>
|
|
60
|
-
>
|
|
61
|
-
| Endpoint<"GET", "/organizations/:organizationSlug", Organization>
|
|
62
|
-
| Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto>
|
|
63
|
-
| Endpoint<
|
|
64
|
-
"PUT",
|
|
65
|
-
"/organizations/:organizationSlug",
|
|
66
|
-
Organization,
|
|
67
|
-
UpdateOrganizationDto
|
|
68
|
-
>
|
|
69
|
-
| Endpoint<"DELETE", "/organizations/:organizationSlug", Organization, null>
|
|
70
|
-
| Endpoint<
|
|
71
|
-
"GET",
|
|
72
|
-
"/organizations/:organizationSlug/billing/account",
|
|
73
|
-
OrganizationBillingAccount
|
|
74
|
-
>
|
|
75
|
-
| Endpoint<"GET", "/organizations/:organizationSlug/billing/link", void>
|
|
76
|
-
| Endpoint<"GET", "/organizations/:organizationSlug/billing/dashboard", void>
|
|
77
|
-
| OrganizationEventEndpoints
|
|
78
|
-
| OrganizationMembersEndpoints;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Organization } from "..";
|
|
2
|
-
import { ArrayOptions, ArrayResult, Base } from "../..";
|
|
3
|
-
import { CreateOrganizationMemberDto } from "../../../dtos";
|
|
4
|
-
import { UpdateOrganizationMemberDto } from "../../../dtos/organizations/members/update-organization-member.dto";
|
|
5
|
-
import { Endpoint } from "../../../endpoints";
|
|
6
|
-
import { User } from "../../users";
|
|
7
|
-
import { UserToken } from "../../users/tokens";
|
|
8
|
-
|
|
9
|
-
export type OrganizationMember = Base & {
|
|
10
|
-
organization: Organization;
|
|
11
|
-
role: OrganizationMemberRole;
|
|
12
|
-
status: OrganizationMemberStatus;
|
|
13
|
-
user?: User;
|
|
14
|
-
token?: UserToken;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export enum OrganizationMemberStatus {
|
|
18
|
-
Pending = "pending",
|
|
19
|
-
Accepted = "accepted",
|
|
20
|
-
Rejected = "rejected",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export enum OrganizationMemberRole {
|
|
24
|
-
Member = "member",
|
|
25
|
-
Manager = "manager",
|
|
26
|
-
Admin = "admin",
|
|
27
|
-
Owner = "owner",
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type OrganizationMembersEndpoints =
|
|
31
|
-
| Endpoint<
|
|
32
|
-
"GET",
|
|
33
|
-
"/organizations/members",
|
|
34
|
-
ArrayResult<OrganizationMember>,
|
|
35
|
-
ArrayOptions<OrganizationMember>
|
|
36
|
-
>
|
|
37
|
-
| Endpoint<
|
|
38
|
-
"GET",
|
|
39
|
-
"/organizations/members/@me",
|
|
40
|
-
ArrayResult<OrganizationMember>,
|
|
41
|
-
ArrayOptions<OrganizationMember>
|
|
42
|
-
>
|
|
43
|
-
| Endpoint<
|
|
44
|
-
"DELETE",
|
|
45
|
-
"/organizations/members/:memberId",
|
|
46
|
-
OrganizationMember[],
|
|
47
|
-
null
|
|
48
|
-
>
|
|
49
|
-
| Endpoint<
|
|
50
|
-
"GET",
|
|
51
|
-
"/organizations/:organizationSlug/members",
|
|
52
|
-
ArrayResult<OrganizationMember>,
|
|
53
|
-
ArrayOptions<OrganizationMember>
|
|
54
|
-
>
|
|
55
|
-
| Endpoint<
|
|
56
|
-
"POST",
|
|
57
|
-
"/organizations/:organizationSlug/members",
|
|
58
|
-
OrganizationMember,
|
|
59
|
-
CreateOrganizationMemberDto
|
|
60
|
-
>
|
|
61
|
-
| Endpoint<
|
|
62
|
-
"PUT",
|
|
63
|
-
"/organizations/:organizationSlug/members/:userId",
|
|
64
|
-
OrganizationMember,
|
|
65
|
-
UpdateOrganizationMemberDto
|
|
66
|
-
>
|
|
67
|
-
| Endpoint<
|
|
68
|
-
"DELETE",
|
|
69
|
-
"/organizations/:organizationSlug/members/:userId",
|
|
70
|
-
OrganizationMember[],
|
|
71
|
-
null
|
|
72
|
-
>;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { ArrayOptions, ArrayResult } from "..";
|
|
2
|
-
import { Endpoint } from "../../endpoints";
|
|
3
|
-
import { Organization } from "../organizations";
|
|
4
|
-
import { User } from "../users";
|
|
5
|
-
|
|
6
|
-
export enum ProfileType {
|
|
7
|
-
User = "user",
|
|
8
|
-
Organization = "organization",
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type BaseProfile = {
|
|
12
|
-
type: ProfileType;
|
|
13
|
-
slug: string;
|
|
14
|
-
|
|
15
|
-
displayName: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
|
|
18
|
-
avatarUrl?: string;
|
|
19
|
-
bannerUrl?: string;
|
|
20
|
-
|
|
21
|
-
metadata: ProfileMetadata;
|
|
22
|
-
|
|
23
|
-
createdAt: Date;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export type UserProfile = BaseProfile & {
|
|
27
|
-
type: ProfileType.User;
|
|
28
|
-
metadata: UserProfileMetadata;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export type OrganizationProfile = BaseProfile & {
|
|
32
|
-
type: ProfileType.Organization;
|
|
33
|
-
metadata: OrganizationProfileMetadata;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export type Profile = UserProfile | OrganizationProfile;
|
|
37
|
-
|
|
38
|
-
export type BaseProfileMetadata = {
|
|
39
|
-
followersCount: number;
|
|
40
|
-
|
|
41
|
-
isFollower: boolean;
|
|
42
|
-
isFollowing: boolean;
|
|
43
|
-
|
|
44
|
-
isBlocked: boolean;
|
|
45
|
-
hasBlocked: boolean;
|
|
46
|
-
canDM: boolean;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type UserProfileMetadata = BaseProfileMetadata & {
|
|
50
|
-
hasPassPlus: boolean;
|
|
51
|
-
idValid: boolean;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export type OrganizationProfileMetadata = BaseProfileMetadata & {
|
|
55
|
-
eventsCount: number;
|
|
56
|
-
viewsCount: number;
|
|
57
|
-
membersCount: number;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
|
|
61
|
-
|
|
62
|
-
export type ProfileEndpoints =
|
|
63
|
-
| Endpoint<"GET", "/profiles/:username", Profile>
|
|
64
|
-
| Endpoint<
|
|
65
|
-
"GET",
|
|
66
|
-
"/profiles/@me/relationships/suggestions",
|
|
67
|
-
ArrayResult<Profile>,
|
|
68
|
-
ArrayOptions<Organization | User>
|
|
69
|
-
>
|
|
70
|
-
| Endpoint<
|
|
71
|
-
"GET",
|
|
72
|
-
"/profiles/:username/relationships/followers",
|
|
73
|
-
ArrayResult<UserProfile>,
|
|
74
|
-
ArrayOptions<User>
|
|
75
|
-
>
|
|
76
|
-
| Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null>
|
|
77
|
-
| Endpoint<
|
|
78
|
-
"POST",
|
|
79
|
-
"/profiles/:username/relationships/unfollow",
|
|
80
|
-
boolean,
|
|
81
|
-
null
|
|
82
|
-
>;
|