tonightpass 0.0.186 → 0.0.188

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 CHANGED
@@ -2,8 +2,8 @@ import * as pathcat from 'pathcat';
2
2
  import { ParamValue, Query } from 'pathcat';
3
3
  export * from 'pathcat';
4
4
  import { Options, Response as Response$1 } from 'redaxios';
5
- import * as Stripe from 'stripe';
6
- import Stripe__default from 'stripe';
5
+ import * as stripe from 'stripe';
6
+ import stripe__default from 'stripe';
7
7
  import { ValidatorConstraintInterface, ValidationArguments, ValidationOptions } from 'class-validator';
8
8
  import { HealthCheckResult, HealthIndicatorResult } from '@nestjs/terminus';
9
9
 
@@ -51,8 +51,86 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
51
51
  unseen?: boolean;
52
52
  }>;
53
53
 
54
+ declare enum UserPostMediaType {
55
+ Image = "image",
56
+ Video = "video"
57
+ }
58
+ type UserPostMedia = {
59
+ url: string;
60
+ type: UserPostMediaType;
61
+ width: number;
62
+ height: number;
63
+ description?: string;
64
+ isNSFW: boolean;
65
+ thumbnailUrl?: string;
66
+ duration?: number;
67
+ };
68
+ type UserPostMediaEndpoints = Endpoint<"POST", "/users/@me/posts/media", UserPostMedia, FormData>;
69
+
70
+ declare class CreateUserPostDto$1 {
71
+ content?: string;
72
+ mediaIds: string[];
73
+ visibility?: UserPostVisibility;
74
+ }
75
+
76
+ declare class UpdateUserPostDto$1 {
77
+ content?: string;
78
+ visibility?: UserPostVisibility;
79
+ }
80
+
81
+ declare class CreateUserPostCommentDto$1 {
82
+ content: string;
83
+ replyToId?: string;
84
+ }
85
+
86
+ declare class UpdateUserPostCommentDto$1 {
87
+ content: string;
88
+ }
89
+
90
+ declare class CreateUserPostRepostDto$1 {
91
+ comment?: string;
92
+ }
93
+
94
+ type UserPostComment = Base & {
95
+ post: UserPost;
96
+ author: UserProfile;
97
+ content: string;
98
+ replyTo?: UserPostComment;
99
+ isEdited: boolean;
100
+ editedAt?: Date;
101
+ };
102
+ type UserPostCommentEndpoints = Endpoint<"GET", "/users/:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/@me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto$1> | Endpoint<"PUT", "/users/@me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto$1> | Endpoint<"DELETE", "/users/@me/posts/:postId/comments/:commentId", void>;
103
+
104
+ type UserPostRepost = Base & {
105
+ originalPost: UserPost;
106
+ author: UserProfile;
107
+ comment?: string;
108
+ };
109
+ type UserPostRepostEndpoints = Endpoint<"GET", "/users/:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"GET", "/users/:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/@me/posts/:postId/reposts", UserPostRepost, CreateUserPostRepostDto$1> | Endpoint<"DELETE", "/users/@me/posts/:postId/reposts", void>;
110
+
111
+ declare enum UserPostVisibility {
112
+ Public = "public",
113
+ Followers = "followers",
114
+ Private = "private"
115
+ }
116
+ type UserPost = Base & {
117
+ author: UserProfile;
118
+ content?: string;
119
+ media: UserPostMedia[];
120
+ visibility: UserPostVisibility;
121
+ metrics: {
122
+ reposts: number;
123
+ comments: number;
124
+ views: number;
125
+ };
126
+ isReposted?: boolean;
127
+ isEdited: boolean;
128
+ editedAt?: Date;
129
+ };
130
+ type UserPostEndpoints = Endpoint<"GET", "/users/:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/:username/posts/:postId", UserPost> | Endpoint<"POST", "/users/@me/posts", UserPost, CreateUserPostDto$1> | Endpoint<"PUT", "/users/@me/posts/:postId", UserPost, UpdateUserPostDto$1> | Endpoint<"DELETE", "/users/@me/posts/:postId", void> | Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null>;
131
+
54
132
  type Order = Base & {
55
- invoice: Stripe__default.Invoice;
133
+ invoice: stripe__default.Invoice;
56
134
  user: User;
57
135
  };
58
136
  type OrderEndpoints = Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>> | Endpoint<"GET", "/orders/:orderId", Order>;
@@ -91,16 +169,6 @@ declare enum UserTokenType {
91
169
  PhoneValidation = "phone_validation"
92
170
  }
93
171
 
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
172
  type User = Base & {
105
173
  identifier: UserIdentifier;
106
174
  password?: string;
@@ -172,17 +240,14 @@ declare enum UserFileType {
172
240
  Avatar = "avatar",
173
241
  Banner = "banner"
174
242
  }
175
- type UserEndpoints = Endpoint<"GET", "/users/search", PublicUser[], {
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", {
243
+ type UserEndpoints = Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users/:userId", User> | Endpoint<"GET", "/users/@me", User> | Endpoint<"GET", "/users/check/:identifier", {
179
244
  exists: boolean;
180
245
  identifier: Partial<UserIdentifier>;
181
246
  suggestions?: string[];
182
247
  }, {
183
248
  identifier: boolean;
184
249
  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;
250
+ }> | 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
251
 
187
252
  type RecoveryResponse = {
188
253
  to: string;
@@ -536,8 +601,8 @@ type OrganizationEventViewEndpoints = Endpoint<"POST", "/organizations/:organiza
536
601
  type OrganizationEventTicket = Base & {
537
602
  name: string;
538
603
  description?: string;
539
- price: Stripe__default.Price;
540
- product: Stripe__default.Product;
604
+ price: stripe__default.Price;
605
+ product: stripe__default.Product;
541
606
  fee: number;
542
607
  quantity: number;
543
608
  type: OrganizationEventTicketType;
@@ -740,7 +805,7 @@ type OrganizationBilling = {
740
805
  account: string;
741
806
  vatRate: number;
742
807
  };
743
- type OrganizationBillingAccount = Stripe__default.Account;
808
+ type OrganizationBillingAccount = stripe__default.Account;
744
809
  type OrganizationIdentity = OrganizationProfile;
745
810
  declare enum OrganizationFileType {
746
811
  Avatar = "avatar",
@@ -795,7 +860,7 @@ type OrganizationProfileMetadata = BaseProfileMetadata & {
795
860
  type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
796
861
  type ProfileEndpoints = Endpoint<"GET", "/profiles/:username", Profile> | Endpoint<"GET", "/profiles/@me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null> | Endpoint<"POST", "/profiles/:username/relationships/unfollow", boolean, null>;
797
862
 
798
- type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, Stripe__default.Event>;
863
+ type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, stripe__default.Event>;
799
864
 
800
865
  type NotificationEndpoints = Endpoint<"POST", "/notifications/subscribe/beta", null, {
801
866
  email: string;
@@ -1262,7 +1327,7 @@ declare const organizations: (client: Client) => {
1262
1327
  delete: (organizationSlug: string) => Promise<Organization>;
1263
1328
  uploadFile: (organizationSlug: string, organizationFileType: OrganizationFileType, file: File) => Promise<string>;
1264
1329
  billing: {
1265
- account: (organizationSlug: string) => Promise<Stripe.Stripe.Account>;
1330
+ account: (organizationSlug: string) => Promise<stripe.Stripe.Account>;
1266
1331
  link: (organizationSlug: string) => void;
1267
1332
  dashboard: (organizationSlug: string) => void;
1268
1333
  };
@@ -1330,7 +1395,6 @@ declare const profiles: (client: Client) => {
1330
1395
  };
1331
1396
 
1332
1397
  declare const users: (client: Client) => {
1333
- search: (query: string, limit?: number) => Promise<PublicUser[]>;
1334
1398
  getAll: () => Promise<User[]>;
1335
1399
  get: (userId: string) => Promise<User>;
1336
1400
  me: () => Promise<User>;
@@ -1353,6 +1417,39 @@ declare const users: (client: Client) => {
1353
1417
  unseen?: boolean;
1354
1418
  }) => Promise<number>;
1355
1419
  };
1420
+ posts: {
1421
+ getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
1422
+ getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
1423
+ create: (data: CreateUserPostDto) => Promise<UserPost>;
1424
+ update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1425
+ delete: (postId: string) => Promise<void>;
1426
+ uploadMedia: (file: FormData) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1427
+ addView: (username: string, postId: string) => Promise<boolean>;
1428
+ };
1429
+ postsComments: {
1430
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1431
+ exists: boolean;
1432
+ identifier: Partial<UserIdentifier>;
1433
+ suggestions?: string[];
1434
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1435
+ create: (postId: string, data: CreateUserPostCommentDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1436
+ update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<User | Channel | ChannelMessage | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | UserPost>;
1437
+ delete: (postId: string, commentId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1438
+ };
1439
+ postsReposts: {
1440
+ getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1441
+ exists: boolean;
1442
+ identifier: Partial<UserIdentifier>;
1443
+ suggestions?: string[];
1444
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1445
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1446
+ exists: boolean;
1447
+ identifier: Partial<UserIdentifier>;
1448
+ suggestions?: string[];
1449
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1450
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1451
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1452
+ };
1356
1453
  };
1357
1454
 
1358
1455
  declare const notifications: (client: Client) => {
@@ -1461,7 +1558,7 @@ declare class TonightPass {
1461
1558
  delete: (organizationSlug: string) => Promise<Organization>;
1462
1559
  uploadFile: (organizationSlug: string, organizationFileType: OrganizationFileType, file: File) => Promise<string>;
1463
1560
  billing: {
1464
- account: (organizationSlug: string) => Promise<Stripe.Stripe.Account>;
1561
+ account: (organizationSlug: string) => Promise<stripe.Stripe.Account>;
1465
1562
  link: (organizationSlug: string) => void;
1466
1563
  dashboard: (organizationSlug: string) => void;
1467
1564
  };
@@ -1527,7 +1624,6 @@ declare class TonightPass {
1527
1624
  };
1528
1625
  };
1529
1626
  readonly users: {
1530
- search: (query: string, limit?: number) => Promise<PublicUser[]>;
1531
1627
  getAll: () => Promise<User[]>;
1532
1628
  get: (userId: string) => Promise<User>;
1533
1629
  me: () => Promise<User>;
@@ -1550,6 +1646,39 @@ declare class TonightPass {
1550
1646
  unseen?: boolean;
1551
1647
  }) => Promise<number>;
1552
1648
  };
1649
+ posts: {
1650
+ getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
1651
+ getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
1652
+ create: (data: CreateUserPostDto) => Promise<UserPost>;
1653
+ update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1654
+ delete: (postId: string) => Promise<void>;
1655
+ uploadMedia: (file: FormData) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1656
+ addView: (username: string, postId: string) => Promise<boolean>;
1657
+ };
1658
+ postsComments: {
1659
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1660
+ exists: boolean;
1661
+ identifier: Partial<UserIdentifier>;
1662
+ suggestions?: string[];
1663
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1664
+ create: (postId: string, data: CreateUserPostCommentDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1665
+ update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<User | Channel | ChannelMessage | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | UserPost>;
1666
+ delete: (postId: string, commentId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1667
+ };
1668
+ postsReposts: {
1669
+ getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1670
+ exists: boolean;
1671
+ identifier: Partial<UserIdentifier>;
1672
+ suggestions?: string[];
1673
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1674
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1675
+ exists: boolean;
1676
+ identifier: Partial<UserIdentifier>;
1677
+ suggestions?: string[];
1678
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1679
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1680
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1681
+ };
1553
1682
  };
1554
1683
  readonly notifications: {
1555
1684
  registerToBeta: (email: string) => Promise<null>;
@@ -1716,4 +1845,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1716
1845
  client: ChannelWebSocketClient;
1717
1846
  };
1718
1847
 
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 PublicUser, 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 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 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 };
1848
+ 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, CreateUserPostCommentDto$1 as CreateUserPostCommentDto, CreateUserPostDto$1 as CreateUserPostDto, CreateUserPostRepostDto$1 as 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, UpdateUserPostCommentDto$1 as UpdateUserPostCommentDto, UpdateUserPostDto$1 as 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 UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, 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
@@ -2,8 +2,8 @@ import * as pathcat from 'pathcat';
2
2
  import { ParamValue, Query } from 'pathcat';
3
3
  export * from 'pathcat';
4
4
  import { Options, Response as Response$1 } from 'redaxios';
5
- import * as Stripe from 'stripe';
6
- import Stripe__default from 'stripe';
5
+ import * as stripe from 'stripe';
6
+ import stripe__default from 'stripe';
7
7
  import { ValidatorConstraintInterface, ValidationArguments, ValidationOptions } from 'class-validator';
8
8
  import { HealthCheckResult, HealthIndicatorResult } from '@nestjs/terminus';
9
9
 
@@ -51,8 +51,86 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
51
51
  unseen?: boolean;
52
52
  }>;
53
53
 
54
+ declare enum UserPostMediaType {
55
+ Image = "image",
56
+ Video = "video"
57
+ }
58
+ type UserPostMedia = {
59
+ url: string;
60
+ type: UserPostMediaType;
61
+ width: number;
62
+ height: number;
63
+ description?: string;
64
+ isNSFW: boolean;
65
+ thumbnailUrl?: string;
66
+ duration?: number;
67
+ };
68
+ type UserPostMediaEndpoints = Endpoint<"POST", "/users/@me/posts/media", UserPostMedia, FormData>;
69
+
70
+ declare class CreateUserPostDto$1 {
71
+ content?: string;
72
+ mediaIds: string[];
73
+ visibility?: UserPostVisibility;
74
+ }
75
+
76
+ declare class UpdateUserPostDto$1 {
77
+ content?: string;
78
+ visibility?: UserPostVisibility;
79
+ }
80
+
81
+ declare class CreateUserPostCommentDto$1 {
82
+ content: string;
83
+ replyToId?: string;
84
+ }
85
+
86
+ declare class UpdateUserPostCommentDto$1 {
87
+ content: string;
88
+ }
89
+
90
+ declare class CreateUserPostRepostDto$1 {
91
+ comment?: string;
92
+ }
93
+
94
+ type UserPostComment = Base & {
95
+ post: UserPost;
96
+ author: UserProfile;
97
+ content: string;
98
+ replyTo?: UserPostComment;
99
+ isEdited: boolean;
100
+ editedAt?: Date;
101
+ };
102
+ type UserPostCommentEndpoints = Endpoint<"GET", "/users/:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/@me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto$1> | Endpoint<"PUT", "/users/@me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto$1> | Endpoint<"DELETE", "/users/@me/posts/:postId/comments/:commentId", void>;
103
+
104
+ type UserPostRepost = Base & {
105
+ originalPost: UserPost;
106
+ author: UserProfile;
107
+ comment?: string;
108
+ };
109
+ type UserPostRepostEndpoints = Endpoint<"GET", "/users/:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"GET", "/users/:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/@me/posts/:postId/reposts", UserPostRepost, CreateUserPostRepostDto$1> | Endpoint<"DELETE", "/users/@me/posts/:postId/reposts", void>;
110
+
111
+ declare enum UserPostVisibility {
112
+ Public = "public",
113
+ Followers = "followers",
114
+ Private = "private"
115
+ }
116
+ type UserPost = Base & {
117
+ author: UserProfile;
118
+ content?: string;
119
+ media: UserPostMedia[];
120
+ visibility: UserPostVisibility;
121
+ metrics: {
122
+ reposts: number;
123
+ comments: number;
124
+ views: number;
125
+ };
126
+ isReposted?: boolean;
127
+ isEdited: boolean;
128
+ editedAt?: Date;
129
+ };
130
+ type UserPostEndpoints = Endpoint<"GET", "/users/:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/:username/posts/:postId", UserPost> | Endpoint<"POST", "/users/@me/posts", UserPost, CreateUserPostDto$1> | Endpoint<"PUT", "/users/@me/posts/:postId", UserPost, UpdateUserPostDto$1> | Endpoint<"DELETE", "/users/@me/posts/:postId", void> | Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null>;
131
+
54
132
  type Order = Base & {
55
- invoice: Stripe__default.Invoice;
133
+ invoice: stripe__default.Invoice;
56
134
  user: User;
57
135
  };
58
136
  type OrderEndpoints = Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>> | Endpoint<"GET", "/orders/:orderId", Order>;
@@ -91,16 +169,6 @@ declare enum UserTokenType {
91
169
  PhoneValidation = "phone_validation"
92
170
  }
93
171
 
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
172
  type User = Base & {
105
173
  identifier: UserIdentifier;
106
174
  password?: string;
@@ -172,17 +240,14 @@ declare enum UserFileType {
172
240
  Avatar = "avatar",
173
241
  Banner = "banner"
174
242
  }
175
- type UserEndpoints = Endpoint<"GET", "/users/search", PublicUser[], {
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", {
243
+ type UserEndpoints = Endpoint<"GET", "/users", User[]> | Endpoint<"GET", "/users/:userId", User> | Endpoint<"GET", "/users/@me", User> | Endpoint<"GET", "/users/check/:identifier", {
179
244
  exists: boolean;
180
245
  identifier: Partial<UserIdentifier>;
181
246
  suggestions?: string[];
182
247
  }, {
183
248
  identifier: boolean;
184
249
  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;
250
+ }> | 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
251
 
187
252
  type RecoveryResponse = {
188
253
  to: string;
@@ -536,8 +601,8 @@ type OrganizationEventViewEndpoints = Endpoint<"POST", "/organizations/:organiza
536
601
  type OrganizationEventTicket = Base & {
537
602
  name: string;
538
603
  description?: string;
539
- price: Stripe__default.Price;
540
- product: Stripe__default.Product;
604
+ price: stripe__default.Price;
605
+ product: stripe__default.Product;
541
606
  fee: number;
542
607
  quantity: number;
543
608
  type: OrganizationEventTicketType;
@@ -740,7 +805,7 @@ type OrganizationBilling = {
740
805
  account: string;
741
806
  vatRate: number;
742
807
  };
743
- type OrganizationBillingAccount = Stripe__default.Account;
808
+ type OrganizationBillingAccount = stripe__default.Account;
744
809
  type OrganizationIdentity = OrganizationProfile;
745
810
  declare enum OrganizationFileType {
746
811
  Avatar = "avatar",
@@ -795,7 +860,7 @@ type OrganizationProfileMetadata = BaseProfileMetadata & {
795
860
  type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
796
861
  type ProfileEndpoints = Endpoint<"GET", "/profiles/:username", Profile> | Endpoint<"GET", "/profiles/@me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null> | Endpoint<"POST", "/profiles/:username/relationships/unfollow", boolean, null>;
797
862
 
798
- type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, Stripe__default.Event>;
863
+ type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, stripe__default.Event>;
799
864
 
800
865
  type NotificationEndpoints = Endpoint<"POST", "/notifications/subscribe/beta", null, {
801
866
  email: string;
@@ -1262,7 +1327,7 @@ declare const organizations: (client: Client) => {
1262
1327
  delete: (organizationSlug: string) => Promise<Organization>;
1263
1328
  uploadFile: (organizationSlug: string, organizationFileType: OrganizationFileType, file: File) => Promise<string>;
1264
1329
  billing: {
1265
- account: (organizationSlug: string) => Promise<Stripe.Stripe.Account>;
1330
+ account: (organizationSlug: string) => Promise<stripe.Stripe.Account>;
1266
1331
  link: (organizationSlug: string) => void;
1267
1332
  dashboard: (organizationSlug: string) => void;
1268
1333
  };
@@ -1330,7 +1395,6 @@ declare const profiles: (client: Client) => {
1330
1395
  };
1331
1396
 
1332
1397
  declare const users: (client: Client) => {
1333
- search: (query: string, limit?: number) => Promise<PublicUser[]>;
1334
1398
  getAll: () => Promise<User[]>;
1335
1399
  get: (userId: string) => Promise<User>;
1336
1400
  me: () => Promise<User>;
@@ -1353,6 +1417,39 @@ declare const users: (client: Client) => {
1353
1417
  unseen?: boolean;
1354
1418
  }) => Promise<number>;
1355
1419
  };
1420
+ posts: {
1421
+ getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
1422
+ getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
1423
+ create: (data: CreateUserPostDto) => Promise<UserPost>;
1424
+ update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1425
+ delete: (postId: string) => Promise<void>;
1426
+ uploadMedia: (file: FormData) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1427
+ addView: (username: string, postId: string) => Promise<boolean>;
1428
+ };
1429
+ postsComments: {
1430
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1431
+ exists: boolean;
1432
+ identifier: Partial<UserIdentifier>;
1433
+ suggestions?: string[];
1434
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1435
+ create: (postId: string, data: CreateUserPostCommentDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1436
+ update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<User | Channel | ChannelMessage | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | UserPost>;
1437
+ delete: (postId: string, commentId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1438
+ };
1439
+ postsReposts: {
1440
+ getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1441
+ exists: boolean;
1442
+ identifier: Partial<UserIdentifier>;
1443
+ suggestions?: string[];
1444
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1445
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1446
+ exists: boolean;
1447
+ identifier: Partial<UserIdentifier>;
1448
+ suggestions?: string[];
1449
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1450
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1451
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1452
+ };
1356
1453
  };
1357
1454
 
1358
1455
  declare const notifications: (client: Client) => {
@@ -1461,7 +1558,7 @@ declare class TonightPass {
1461
1558
  delete: (organizationSlug: string) => Promise<Organization>;
1462
1559
  uploadFile: (organizationSlug: string, organizationFileType: OrganizationFileType, file: File) => Promise<string>;
1463
1560
  billing: {
1464
- account: (organizationSlug: string) => Promise<Stripe.Stripe.Account>;
1561
+ account: (organizationSlug: string) => Promise<stripe.Stripe.Account>;
1465
1562
  link: (organizationSlug: string) => void;
1466
1563
  dashboard: (organizationSlug: string) => void;
1467
1564
  };
@@ -1527,7 +1624,6 @@ declare class TonightPass {
1527
1624
  };
1528
1625
  };
1529
1626
  readonly users: {
1530
- search: (query: string, limit?: number) => Promise<PublicUser[]>;
1531
1627
  getAll: () => Promise<User[]>;
1532
1628
  get: (userId: string) => Promise<User>;
1533
1629
  me: () => Promise<User>;
@@ -1550,6 +1646,39 @@ declare class TonightPass {
1550
1646
  unseen?: boolean;
1551
1647
  }) => Promise<number>;
1552
1648
  };
1649
+ posts: {
1650
+ getByUsername: (username: string, options?: ArrayOptions<UserPost>) => Promise<ArrayResult<UserPost>>;
1651
+ getByUsernameAndId: (username: string, postId: string) => Promise<UserPost>;
1652
+ create: (data: CreateUserPostDto) => Promise<UserPost>;
1653
+ update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1654
+ delete: (postId: string) => Promise<void>;
1655
+ uploadMedia: (file: FormData) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1656
+ addView: (username: string, postId: string) => Promise<boolean>;
1657
+ };
1658
+ postsComments: {
1659
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1660
+ exists: boolean;
1661
+ identifier: Partial<UserIdentifier>;
1662
+ suggestions?: string[];
1663
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1664
+ create: (postId: string, data: CreateUserPostCommentDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1665
+ update: (postId: string, commentId: string, data: UpdateUserPostCommentDto) => Promise<User | Channel | ChannelMessage | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | UserPost>;
1666
+ delete: (postId: string, commentId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1667
+ };
1668
+ postsReposts: {
1669
+ getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1670
+ exists: boolean;
1671
+ identifier: Partial<UserIdentifier>;
1672
+ suggestions?: string[];
1673
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1674
+ getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<number | void | User | CareersCategory[] | CareersEmploymentType[] | CareersJob[] | CareersJob | CareersOffice[] | Channel | ArrayResult<Channel> | ArrayResult<ChannelMember> | ChannelMessage | ArrayResult<ChannelMessage> | ExchangeRates | Health<"database" | "app" | "api"> | Health<"database"> | Health<"api"> | Health<"app"> | Order | ArrayResult<Order> | Organization[] | Organization | ArrayResult<Organization> | stripe.Stripe.Account | OrganizationEvent[] | OrganizationEvent | ArrayResult<OrganizationEvent> | OrganizationEventStyle[] | OrganizationEventStyle | OrganizationEventTicket[] | OrganizationEventTicket | ArrayResult<OrganizationMember> | ArrayResult<OrganizationToken> | OrganizationAnalyticsOverview | ArrayResult<OrganizationEventAnalytics> | Profile | ArrayResult<Profile> | ArrayResult<UserProfile> | User[] | {
1675
+ exists: boolean;
1676
+ identifier: Partial<UserIdentifier>;
1677
+ suggestions?: string[];
1678
+ } | UserBooking | ArrayResult<UserBooking> | UserBookingTicket | ArrayResult<UserNotificationFollow> | UserPost | ArrayResult<UserPost>>;
1679
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | null>;
1680
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1681
+ };
1553
1682
  };
1554
1683
  readonly notifications: {
1555
1684
  registerToBeta: (email: string) => Promise<null>;
@@ -1716,4 +1845,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1716
1845
  client: ChannelWebSocketClient;
1717
1846
  };
1718
1847
 
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 PublicUser, 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 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 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 };
1848
+ 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, CreateUserPostCommentDto$1 as CreateUserPostCommentDto, CreateUserPostDto$1 as CreateUserPostDto, CreateUserPostRepostDto$1 as 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, UpdateUserPostCommentDto$1 as UpdateUserPostCommentDto, UpdateUserPostDto$1 as 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 UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, 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 };