tonightpass 0.0.186 → 0.0.187
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.d.mts +112 -18
- package/dist/index.d.ts +112 -18
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -51,6 +51,73 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
|
|
|
51
51
|
unseen?: boolean;
|
|
52
52
|
}>;
|
|
53
53
|
|
|
54
|
+
type CreateUserPostDto = {
|
|
55
|
+
content?: string;
|
|
56
|
+
mediaIds: string[];
|
|
57
|
+
visibility?: UserPostVisibility;
|
|
58
|
+
};
|
|
59
|
+
type UpdateUserPostDto = {
|
|
60
|
+
content?: string;
|
|
61
|
+
visibility?: UserPostVisibility;
|
|
62
|
+
};
|
|
63
|
+
type CreateUserPostCommentDto = {
|
|
64
|
+
content: string;
|
|
65
|
+
replyToId?: string;
|
|
66
|
+
};
|
|
67
|
+
type UpdateUserPostCommentDto = {
|
|
68
|
+
content: string;
|
|
69
|
+
};
|
|
70
|
+
type CreateUserPostRepostDto = {
|
|
71
|
+
comment?: string;
|
|
72
|
+
};
|
|
73
|
+
type UserPost = Base & {
|
|
74
|
+
author: UserProfile;
|
|
75
|
+
content?: string;
|
|
76
|
+
media: UserPostMedia[];
|
|
77
|
+
visibility: UserPostVisibility;
|
|
78
|
+
metrics: {
|
|
79
|
+
reposts: number;
|
|
80
|
+
comments: number;
|
|
81
|
+
views: number;
|
|
82
|
+
};
|
|
83
|
+
isReposted?: boolean;
|
|
84
|
+
isEdited: boolean;
|
|
85
|
+
editedAt?: Date;
|
|
86
|
+
};
|
|
87
|
+
type UserPostMedia = {
|
|
88
|
+
url: string;
|
|
89
|
+
type: UserPostMediaType;
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
description?: string;
|
|
93
|
+
isNSFW: boolean;
|
|
94
|
+
thumbnailUrl?: string;
|
|
95
|
+
duration?: number;
|
|
96
|
+
};
|
|
97
|
+
declare enum UserPostMediaType {
|
|
98
|
+
Image = "image",
|
|
99
|
+
Video = "video"
|
|
100
|
+
}
|
|
101
|
+
declare enum UserPostVisibility {
|
|
102
|
+
Public = "public",
|
|
103
|
+
Followers = "followers",
|
|
104
|
+
Private = "private"
|
|
105
|
+
}
|
|
106
|
+
type UserPostComment = Base & {
|
|
107
|
+
post: UserPost;
|
|
108
|
+
author: UserProfile;
|
|
109
|
+
content: string;
|
|
110
|
+
replyTo?: UserPostComment;
|
|
111
|
+
isEdited: boolean;
|
|
112
|
+
editedAt?: Date;
|
|
113
|
+
};
|
|
114
|
+
type UserPostRepost = Base & {
|
|
115
|
+
originalPost: UserPost;
|
|
116
|
+
author: UserProfile;
|
|
117
|
+
comment?: string;
|
|
118
|
+
};
|
|
119
|
+
type UserPostEndpoints = Endpoint<"GET", "/users/:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/:username/posts/:postId", UserPost> | Endpoint<"GET", "/users/:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/@me/posts", UserPost, CreateUserPostDto> | Endpoint<"PUT", "/users/@me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/@me/posts/:postId", void> | Endpoint<"POST", "/users/@me/posts/media", UserPostMedia, FormData> | Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null> | Endpoint<"GET", "/users/:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/@me/posts/:postId/repost", UserPostRepost, CreateUserPostRepostDto> | Endpoint<"DELETE", "/users/@me/posts/:postId/repost", void> | Endpoint<"GET", "/users/:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/@me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto> | Endpoint<"PUT", "/users/@me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto> | Endpoint<"DELETE", "/users/@me/posts/:postId/comments/:commentId", void>;
|
|
120
|
+
|
|
54
121
|
type Order = Base & {
|
|
55
122
|
invoice: Stripe__default.Invoice;
|
|
56
123
|
user: User;
|
|
@@ -91,16 +158,6 @@ declare enum UserTokenType {
|
|
|
91
158
|
PhoneValidation = "phone_validation"
|
|
92
159
|
}
|
|
93
160
|
|
|
94
|
-
type PublicUser = {
|
|
95
|
-
identifier: Pick<UserIdentifier, "username">;
|
|
96
|
-
identity: {
|
|
97
|
-
displayName: string;
|
|
98
|
-
avatarUrl: string;
|
|
99
|
-
slug: string;
|
|
100
|
-
type: ProfileType;
|
|
101
|
-
metadata: UserProfileMetadata;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
161
|
type User = Base & {
|
|
105
162
|
identifier: UserIdentifier;
|
|
106
163
|
password?: string;
|
|
@@ -172,17 +229,14 @@ declare enum UserFileType {
|
|
|
172
229
|
Avatar = "avatar",
|
|
173
230
|
Banner = "banner"
|
|
174
231
|
}
|
|
175
|
-
type UserEndpoints = Endpoint<"GET", "/users
|
|
176
|
-
q: string;
|
|
177
|
-
limit?: number;
|
|
178
|
-
}> | Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users/:userId", User> | Endpoint<"GET", "/users/@me", User> | Endpoint<"GET", "/users/check/:identifier", {
|
|
232
|
+
type UserEndpoints = Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users/:userId", User> | Endpoint<"GET", "/users/@me", User> | Endpoint<"GET", "/users/check/:identifier", {
|
|
179
233
|
exists: boolean;
|
|
180
234
|
identifier: Partial<UserIdentifier>;
|
|
181
235
|
suggestions?: string[];
|
|
182
236
|
}, {
|
|
183
237
|
identifier: boolean;
|
|
184
238
|
suggestions?: boolean;
|
|
185
|
-
}> | Endpoint<"PUT", "/users/:userId", User, UpdateUserDto> | Endpoint<"POST", "/users/:userId/files/:userFileType", string, FormData> | Endpoint<"POST", "/users/files/:userFileType", string, FormData> | UserBookingEndpoints | UserNotificationEndpoints;
|
|
239
|
+
}> | Endpoint<"PUT", "/users/:userId", User, UpdateUserDto> | Endpoint<"POST", "/users/:userId/files/:userFileType", string, FormData> | Endpoint<"POST", "/users/files/:userFileType", string, FormData> | UserBookingEndpoints | UserNotificationEndpoints | UserPostEndpoints;
|
|
186
240
|
|
|
187
241
|
type RecoveryResponse = {
|
|
188
242
|
to: string;
|
|
@@ -1330,7 +1384,6 @@ declare const profiles: (client: Client) => {
|
|
|
1330
1384
|
};
|
|
1331
1385
|
|
|
1332
1386
|
declare const users: (client: Client) => {
|
|
1333
|
-
search: (query: string, limit?: number) => Promise<PublicUser[]>;
|
|
1334
1387
|
getAll: () => Promise<User[]>;
|
|
1335
1388
|
get: (userId: string) => Promise<User>;
|
|
1336
1389
|
me: () => Promise<User>;
|
|
@@ -1353,6 +1406,27 @@ declare const users: (client: Client) => {
|
|
|
1353
1406
|
unseen?: boolean;
|
|
1354
1407
|
}) => Promise<number>;
|
|
1355
1408
|
};
|
|
1409
|
+
posts: {
|
|
1410
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
|
|
1411
|
+
getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
|
|
1412
|
+
create: (data: CreateUserPostDto) => Promise<UserPost>;
|
|
1413
|
+
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1414
|
+
delete: (postId: string) => Promise<void>;
|
|
1415
|
+
uploadMedia: (file: FormData) => Promise<UserPostMedia>;
|
|
1416
|
+
addView: (username: string, postId: string) => Promise<boolean>;
|
|
1417
|
+
};
|
|
1418
|
+
postsComments: {
|
|
1419
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
|
|
1420
|
+
create: (postId: string, data: CreateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1421
|
+
update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1422
|
+
delete: (postId: string, commentId: string) => Promise<void>;
|
|
1423
|
+
};
|
|
1424
|
+
postsReposts: {
|
|
1425
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1426
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1427
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1428
|
+
delete: (postId: string) => Promise<void>;
|
|
1429
|
+
};
|
|
1356
1430
|
};
|
|
1357
1431
|
|
|
1358
1432
|
declare const notifications: (client: Client) => {
|
|
@@ -1527,7 +1601,6 @@ declare class TonightPass {
|
|
|
1527
1601
|
};
|
|
1528
1602
|
};
|
|
1529
1603
|
readonly users: {
|
|
1530
|
-
search: (query: string, limit?: number) => Promise<PublicUser[]>;
|
|
1531
1604
|
getAll: () => Promise<User[]>;
|
|
1532
1605
|
get: (userId: string) => Promise<User>;
|
|
1533
1606
|
me: () => Promise<User>;
|
|
@@ -1550,6 +1623,27 @@ declare class TonightPass {
|
|
|
1550
1623
|
unseen?: boolean;
|
|
1551
1624
|
}) => Promise<number>;
|
|
1552
1625
|
};
|
|
1626
|
+
posts: {
|
|
1627
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
|
|
1628
|
+
getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
|
|
1629
|
+
create: (data: CreateUserPostDto) => Promise<UserPost>;
|
|
1630
|
+
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1631
|
+
delete: (postId: string) => Promise<void>;
|
|
1632
|
+
uploadMedia: (file: FormData) => Promise<UserPostMedia>;
|
|
1633
|
+
addView: (username: string, postId: string) => Promise<boolean>;
|
|
1634
|
+
};
|
|
1635
|
+
postsComments: {
|
|
1636
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
|
|
1637
|
+
create: (postId: string, data: CreateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1638
|
+
update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1639
|
+
delete: (postId: string, commentId: string) => Promise<void>;
|
|
1640
|
+
};
|
|
1641
|
+
postsReposts: {
|
|
1642
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1643
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1644
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1645
|
+
delete: (postId: string) => Promise<void>;
|
|
1646
|
+
};
|
|
1553
1647
|
};
|
|
1554
1648
|
readonly notifications: {
|
|
1555
1649
|
registerToBeta: (email: string) => Promise<null>;
|
|
@@ -1716,4 +1810,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
|
|
|
1716
1810
|
client: ChannelWebSocketClient;
|
|
1717
1811
|
};
|
|
1718
1812
|
|
|
1719
|
-
export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type
|
|
1813
|
+
export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, type CreateUserPostCommentDto, type CreateUserPostDto, type CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type UpdateUserPostCommentDto, type UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPost, type UserPostComment, type UserPostEndpoints, type UserPostMedia, UserPostMediaType, type UserPostRepost, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, auth, buildFileFormData, careers, channels, channelsWS, currencies, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,73 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
|
|
|
51
51
|
unseen?: boolean;
|
|
52
52
|
}>;
|
|
53
53
|
|
|
54
|
+
type CreateUserPostDto = {
|
|
55
|
+
content?: string;
|
|
56
|
+
mediaIds: string[];
|
|
57
|
+
visibility?: UserPostVisibility;
|
|
58
|
+
};
|
|
59
|
+
type UpdateUserPostDto = {
|
|
60
|
+
content?: string;
|
|
61
|
+
visibility?: UserPostVisibility;
|
|
62
|
+
};
|
|
63
|
+
type CreateUserPostCommentDto = {
|
|
64
|
+
content: string;
|
|
65
|
+
replyToId?: string;
|
|
66
|
+
};
|
|
67
|
+
type UpdateUserPostCommentDto = {
|
|
68
|
+
content: string;
|
|
69
|
+
};
|
|
70
|
+
type CreateUserPostRepostDto = {
|
|
71
|
+
comment?: string;
|
|
72
|
+
};
|
|
73
|
+
type UserPost = Base & {
|
|
74
|
+
author: UserProfile;
|
|
75
|
+
content?: string;
|
|
76
|
+
media: UserPostMedia[];
|
|
77
|
+
visibility: UserPostVisibility;
|
|
78
|
+
metrics: {
|
|
79
|
+
reposts: number;
|
|
80
|
+
comments: number;
|
|
81
|
+
views: number;
|
|
82
|
+
};
|
|
83
|
+
isReposted?: boolean;
|
|
84
|
+
isEdited: boolean;
|
|
85
|
+
editedAt?: Date;
|
|
86
|
+
};
|
|
87
|
+
type UserPostMedia = {
|
|
88
|
+
url: string;
|
|
89
|
+
type: UserPostMediaType;
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
description?: string;
|
|
93
|
+
isNSFW: boolean;
|
|
94
|
+
thumbnailUrl?: string;
|
|
95
|
+
duration?: number;
|
|
96
|
+
};
|
|
97
|
+
declare enum UserPostMediaType {
|
|
98
|
+
Image = "image",
|
|
99
|
+
Video = "video"
|
|
100
|
+
}
|
|
101
|
+
declare enum UserPostVisibility {
|
|
102
|
+
Public = "public",
|
|
103
|
+
Followers = "followers",
|
|
104
|
+
Private = "private"
|
|
105
|
+
}
|
|
106
|
+
type UserPostComment = Base & {
|
|
107
|
+
post: UserPost;
|
|
108
|
+
author: UserProfile;
|
|
109
|
+
content: string;
|
|
110
|
+
replyTo?: UserPostComment;
|
|
111
|
+
isEdited: boolean;
|
|
112
|
+
editedAt?: Date;
|
|
113
|
+
};
|
|
114
|
+
type UserPostRepost = Base & {
|
|
115
|
+
originalPost: UserPost;
|
|
116
|
+
author: UserProfile;
|
|
117
|
+
comment?: string;
|
|
118
|
+
};
|
|
119
|
+
type UserPostEndpoints = Endpoint<"GET", "/users/:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/:username/posts/:postId", UserPost> | Endpoint<"GET", "/users/:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/@me/posts", UserPost, CreateUserPostDto> | Endpoint<"PUT", "/users/@me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/@me/posts/:postId", void> | Endpoint<"POST", "/users/@me/posts/media", UserPostMedia, FormData> | Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null> | Endpoint<"GET", "/users/:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/@me/posts/:postId/repost", UserPostRepost, CreateUserPostRepostDto> | Endpoint<"DELETE", "/users/@me/posts/:postId/repost", void> | Endpoint<"GET", "/users/:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/@me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto> | Endpoint<"PUT", "/users/@me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto> | Endpoint<"DELETE", "/users/@me/posts/:postId/comments/:commentId", void>;
|
|
120
|
+
|
|
54
121
|
type Order = Base & {
|
|
55
122
|
invoice: Stripe__default.Invoice;
|
|
56
123
|
user: User;
|
|
@@ -91,16 +158,6 @@ declare enum UserTokenType {
|
|
|
91
158
|
PhoneValidation = "phone_validation"
|
|
92
159
|
}
|
|
93
160
|
|
|
94
|
-
type PublicUser = {
|
|
95
|
-
identifier: Pick<UserIdentifier, "username">;
|
|
96
|
-
identity: {
|
|
97
|
-
displayName: string;
|
|
98
|
-
avatarUrl: string;
|
|
99
|
-
slug: string;
|
|
100
|
-
type: ProfileType;
|
|
101
|
-
metadata: UserProfileMetadata;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
161
|
type User = Base & {
|
|
105
162
|
identifier: UserIdentifier;
|
|
106
163
|
password?: string;
|
|
@@ -172,17 +229,14 @@ declare enum UserFileType {
|
|
|
172
229
|
Avatar = "avatar",
|
|
173
230
|
Banner = "banner"
|
|
174
231
|
}
|
|
175
|
-
type UserEndpoints = Endpoint<"GET", "/users
|
|
176
|
-
q: string;
|
|
177
|
-
limit?: number;
|
|
178
|
-
}> | Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users/:userId", User> | Endpoint<"GET", "/users/@me", User> | Endpoint<"GET", "/users/check/:identifier", {
|
|
232
|
+
type UserEndpoints = Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users/:userId", User> | Endpoint<"GET", "/users/@me", User> | Endpoint<"GET", "/users/check/:identifier", {
|
|
179
233
|
exists: boolean;
|
|
180
234
|
identifier: Partial<UserIdentifier>;
|
|
181
235
|
suggestions?: string[];
|
|
182
236
|
}, {
|
|
183
237
|
identifier: boolean;
|
|
184
238
|
suggestions?: boolean;
|
|
185
|
-
}> | Endpoint<"PUT", "/users/:userId", User, UpdateUserDto> | Endpoint<"POST", "/users/:userId/files/:userFileType", string, FormData> | Endpoint<"POST", "/users/files/:userFileType", string, FormData> | UserBookingEndpoints | UserNotificationEndpoints;
|
|
239
|
+
}> | Endpoint<"PUT", "/users/:userId", User, UpdateUserDto> | Endpoint<"POST", "/users/:userId/files/:userFileType", string, FormData> | Endpoint<"POST", "/users/files/:userFileType", string, FormData> | UserBookingEndpoints | UserNotificationEndpoints | UserPostEndpoints;
|
|
186
240
|
|
|
187
241
|
type RecoveryResponse = {
|
|
188
242
|
to: string;
|
|
@@ -1330,7 +1384,6 @@ declare const profiles: (client: Client) => {
|
|
|
1330
1384
|
};
|
|
1331
1385
|
|
|
1332
1386
|
declare const users: (client: Client) => {
|
|
1333
|
-
search: (query: string, limit?: number) => Promise<PublicUser[]>;
|
|
1334
1387
|
getAll: () => Promise<User[]>;
|
|
1335
1388
|
get: (userId: string) => Promise<User>;
|
|
1336
1389
|
me: () => Promise<User>;
|
|
@@ -1353,6 +1406,27 @@ declare const users: (client: Client) => {
|
|
|
1353
1406
|
unseen?: boolean;
|
|
1354
1407
|
}) => Promise<number>;
|
|
1355
1408
|
};
|
|
1409
|
+
posts: {
|
|
1410
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
|
|
1411
|
+
getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
|
|
1412
|
+
create: (data: CreateUserPostDto) => Promise<UserPost>;
|
|
1413
|
+
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1414
|
+
delete: (postId: string) => Promise<void>;
|
|
1415
|
+
uploadMedia: (file: FormData) => Promise<UserPostMedia>;
|
|
1416
|
+
addView: (username: string, postId: string) => Promise<boolean>;
|
|
1417
|
+
};
|
|
1418
|
+
postsComments: {
|
|
1419
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
|
|
1420
|
+
create: (postId: string, data: CreateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1421
|
+
update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1422
|
+
delete: (postId: string, commentId: string) => Promise<void>;
|
|
1423
|
+
};
|
|
1424
|
+
postsReposts: {
|
|
1425
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1426
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1427
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1428
|
+
delete: (postId: string) => Promise<void>;
|
|
1429
|
+
};
|
|
1356
1430
|
};
|
|
1357
1431
|
|
|
1358
1432
|
declare const notifications: (client: Client) => {
|
|
@@ -1527,7 +1601,6 @@ declare class TonightPass {
|
|
|
1527
1601
|
};
|
|
1528
1602
|
};
|
|
1529
1603
|
readonly users: {
|
|
1530
|
-
search: (query: string, limit?: number) => Promise<PublicUser[]>;
|
|
1531
1604
|
getAll: () => Promise<User[]>;
|
|
1532
1605
|
get: (userId: string) => Promise<User>;
|
|
1533
1606
|
me: () => Promise<User>;
|
|
@@ -1550,6 +1623,27 @@ declare class TonightPass {
|
|
|
1550
1623
|
unseen?: boolean;
|
|
1551
1624
|
}) => Promise<number>;
|
|
1552
1625
|
};
|
|
1626
|
+
posts: {
|
|
1627
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
|
|
1628
|
+
getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
|
|
1629
|
+
create: (data: CreateUserPostDto) => Promise<UserPost>;
|
|
1630
|
+
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1631
|
+
delete: (postId: string) => Promise<void>;
|
|
1632
|
+
uploadMedia: (file: FormData) => Promise<UserPostMedia>;
|
|
1633
|
+
addView: (username: string, postId: string) => Promise<boolean>;
|
|
1634
|
+
};
|
|
1635
|
+
postsComments: {
|
|
1636
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
|
|
1637
|
+
create: (postId: string, data: CreateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1638
|
+
update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<UserPostComment>;
|
|
1639
|
+
delete: (postId: string, commentId: string) => Promise<void>;
|
|
1640
|
+
};
|
|
1641
|
+
postsReposts: {
|
|
1642
|
+
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1643
|
+
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1644
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1645
|
+
delete: (postId: string) => Promise<void>;
|
|
1646
|
+
};
|
|
1553
1647
|
};
|
|
1554
1648
|
readonly notifications: {
|
|
1555
1649
|
registerToBeta: (email: string) => Promise<null>;
|
|
@@ -1716,4 +1810,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
|
|
|
1716
1810
|
client: ChannelWebSocketClient;
|
|
1717
1811
|
};
|
|
1718
1812
|
|
|
1719
|
-
export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type
|
|
1813
|
+
export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AnalyticsOptions, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, type CreateUserPostCommentDto, type CreateUserPostDto, type CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type GeoPoint, GeoPointDto, type GeoSearchAggregation, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type UpdateUserPostCommentDto, type UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserPost, type UserPostComment, type UserPostEndpoints, type UserPostMedia, UserPostMediaType, type UserPostRepost, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, auth, buildFileFormData, careers, channels, channelsWS, currencies, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|