tonightpass 0.0.187 → 0.0.189

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
@@ -51,39 +51,29 @@ 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 = {
54
+ declare class CreateUserPostCommentDto$1 {
64
55
  content: string;
65
56
  replyToId?: string;
66
- };
67
- type UpdateUserPostCommentDto = {
57
+ }
58
+
59
+ declare class UpdateUserPostCommentDto$1 {
68
60
  content: string;
69
- };
70
- type CreateUserPostRepostDto = {
71
- comment?: string;
72
- };
73
- type UserPost = Base & {
61
+ }
62
+
63
+ type UserPostComment = Base & {
64
+ post: UserPost;
74
65
  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;
66
+ content: string;
67
+ replyTo?: UserPostComment;
84
68
  isEdited: boolean;
85
69
  editedAt?: Date;
86
70
  };
71
+ 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>;
72
+
73
+ declare enum UserPostMediaType {
74
+ Image = "image",
75
+ Video = "video"
76
+ }
87
77
  type UserPostMedia = {
88
78
  url: string;
89
79
  type: UserPostMediaType;
@@ -94,29 +84,52 @@ type UserPostMedia = {
94
84
  thumbnailUrl?: string;
95
85
  duration?: number;
96
86
  };
97
- declare enum UserPostMediaType {
98
- Image = "image",
99
- Video = "video"
87
+ type UserPostMediaEndpoints = Endpoint<"POST", "/users/@me/posts/media", UserPostMedia, FormData>;
88
+
89
+ declare class CreateUserPostRepostDto$1 {
90
+ comment?: string;
100
91
  }
92
+
93
+ type UserPostRepost = Base & {
94
+ originalPost: UserPost;
95
+ author: UserProfile;
96
+ comment?: string;
97
+ };
98
+ 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>;
99
+
100
+ type UserPostViewEndpoints = Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null>;
101
+
102
+ declare class CreateUserPostDto$1 {
103
+ content?: string;
104
+ mediaIds: string[];
105
+ visibility?: UserPostVisibility;
106
+ }
107
+
108
+ declare class UpdateUserPostDto$1 {
109
+ content?: string;
110
+ visibility?: UserPostVisibility;
111
+ }
112
+
101
113
  declare enum UserPostVisibility {
102
114
  Public = "public",
103
115
  Followers = "followers",
104
116
  Private = "private"
105
117
  }
106
- type UserPostComment = Base & {
107
- post: UserPost;
118
+ type UserPost = Base & {
108
119
  author: UserProfile;
109
- content: string;
110
- replyTo?: UserPostComment;
120
+ content?: string;
121
+ media: UserPostMedia[];
122
+ visibility: UserPostVisibility;
123
+ metrics: {
124
+ reposts: number;
125
+ comments: number;
126
+ views: number;
127
+ };
128
+ isReposted?: boolean;
111
129
  isEdited: boolean;
112
130
  editedAt?: Date;
113
131
  };
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>;
132
+ 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> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
120
133
 
121
134
  type Order = Base & {
122
135
  invoice: Stripe__default.Invoice;
@@ -1413,7 +1426,9 @@ declare const users: (client: Client) => {
1413
1426
  update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1414
1427
  delete: (postId: string) => Promise<void>;
1415
1428
  uploadMedia: (file: FormData) => Promise<UserPostMedia>;
1416
- addView: (username: string, postId: string) => Promise<boolean>;
1429
+ views: {
1430
+ record: (username: string, postId: string) => Promise<boolean>;
1431
+ };
1417
1432
  };
1418
1433
  postsComments: {
1419
1434
  getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
@@ -1424,8 +1439,8 @@ declare const users: (client: Client) => {
1424
1439
  postsReposts: {
1425
1440
  getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
1426
1441
  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>;
1442
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | UserPostComment | UserPostRepost | UserPostMedia | null>;
1443
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1429
1444
  };
1430
1445
  };
1431
1446
 
@@ -1630,7 +1645,9 @@ declare class TonightPass {
1630
1645
  update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1631
1646
  delete: (postId: string) => Promise<void>;
1632
1647
  uploadMedia: (file: FormData) => Promise<UserPostMedia>;
1633
- addView: (username: string, postId: string) => Promise<boolean>;
1648
+ views: {
1649
+ record: (username: string, postId: string) => Promise<boolean>;
1650
+ };
1634
1651
  };
1635
1652
  postsComments: {
1636
1653
  getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
@@ -1641,8 +1658,8 @@ declare class TonightPass {
1641
1658
  postsReposts: {
1642
1659
  getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
1643
1660
  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>;
1661
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | UserPostComment | UserPostRepost | UserPostMedia | null>;
1662
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1646
1663
  };
1647
1664
  };
1648
1665
  readonly notifications: {
@@ -1810,4 +1827,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1810
1827
  client: ChannelWebSocketClient;
1811
1828
  };
1812
1829
 
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 };
1830
+ 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, type UserPostViewEndpoints, 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,39 +51,29 @@ 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 = {
54
+ declare class CreateUserPostCommentDto$1 {
64
55
  content: string;
65
56
  replyToId?: string;
66
- };
67
- type UpdateUserPostCommentDto = {
57
+ }
58
+
59
+ declare class UpdateUserPostCommentDto$1 {
68
60
  content: string;
69
- };
70
- type CreateUserPostRepostDto = {
71
- comment?: string;
72
- };
73
- type UserPost = Base & {
61
+ }
62
+
63
+ type UserPostComment = Base & {
64
+ post: UserPost;
74
65
  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;
66
+ content: string;
67
+ replyTo?: UserPostComment;
84
68
  isEdited: boolean;
85
69
  editedAt?: Date;
86
70
  };
71
+ 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>;
72
+
73
+ declare enum UserPostMediaType {
74
+ Image = "image",
75
+ Video = "video"
76
+ }
87
77
  type UserPostMedia = {
88
78
  url: string;
89
79
  type: UserPostMediaType;
@@ -94,29 +84,52 @@ type UserPostMedia = {
94
84
  thumbnailUrl?: string;
95
85
  duration?: number;
96
86
  };
97
- declare enum UserPostMediaType {
98
- Image = "image",
99
- Video = "video"
87
+ type UserPostMediaEndpoints = Endpoint<"POST", "/users/@me/posts/media", UserPostMedia, FormData>;
88
+
89
+ declare class CreateUserPostRepostDto$1 {
90
+ comment?: string;
100
91
  }
92
+
93
+ type UserPostRepost = Base & {
94
+ originalPost: UserPost;
95
+ author: UserProfile;
96
+ comment?: string;
97
+ };
98
+ 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>;
99
+
100
+ type UserPostViewEndpoints = Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null>;
101
+
102
+ declare class CreateUserPostDto$1 {
103
+ content?: string;
104
+ mediaIds: string[];
105
+ visibility?: UserPostVisibility;
106
+ }
107
+
108
+ declare class UpdateUserPostDto$1 {
109
+ content?: string;
110
+ visibility?: UserPostVisibility;
111
+ }
112
+
101
113
  declare enum UserPostVisibility {
102
114
  Public = "public",
103
115
  Followers = "followers",
104
116
  Private = "private"
105
117
  }
106
- type UserPostComment = Base & {
107
- post: UserPost;
118
+ type UserPost = Base & {
108
119
  author: UserProfile;
109
- content: string;
110
- replyTo?: UserPostComment;
120
+ content?: string;
121
+ media: UserPostMedia[];
122
+ visibility: UserPostVisibility;
123
+ metrics: {
124
+ reposts: number;
125
+ comments: number;
126
+ views: number;
127
+ };
128
+ isReposted?: boolean;
111
129
  isEdited: boolean;
112
130
  editedAt?: Date;
113
131
  };
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>;
132
+ 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> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
120
133
 
121
134
  type Order = Base & {
122
135
  invoice: Stripe__default.Invoice;
@@ -1413,7 +1426,9 @@ declare const users: (client: Client) => {
1413
1426
  update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1414
1427
  delete: (postId: string) => Promise<void>;
1415
1428
  uploadMedia: (file: FormData) => Promise<UserPostMedia>;
1416
- addView: (username: string, postId: string) => Promise<boolean>;
1429
+ views: {
1430
+ record: (username: string, postId: string) => Promise<boolean>;
1431
+ };
1417
1432
  };
1418
1433
  postsComments: {
1419
1434
  getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
@@ -1424,8 +1439,8 @@ declare const users: (client: Client) => {
1424
1439
  postsReposts: {
1425
1440
  getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
1426
1441
  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>;
1442
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | UserPostComment | UserPostRepost | UserPostMedia | null>;
1443
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1429
1444
  };
1430
1445
  };
1431
1446
 
@@ -1630,7 +1645,9 @@ declare class TonightPass {
1630
1645
  update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
1631
1646
  delete: (postId: string) => Promise<void>;
1632
1647
  uploadMedia: (file: FormData) => Promise<UserPostMedia>;
1633
- addView: (username: string, postId: string) => Promise<boolean>;
1648
+ views: {
1649
+ record: (username: string, postId: string) => Promise<boolean>;
1650
+ };
1634
1651
  };
1635
1652
  postsComments: {
1636
1653
  getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostComment>) => Promise<ArrayResult<UserPostComment>>;
@@ -1641,8 +1658,8 @@ declare class TonightPass {
1641
1658
  postsReposts: {
1642
1659
  getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
1643
1660
  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>;
1661
+ create: (postId: string, data?: CreateUserPostRepostDto) => Promise<string | boolean | void | User | RecoveryResponse | Channel | ChannelMessage | CurrencyConversionResult | Order | Organization | OrganizationEvent | OrganizationEventStyle | OrganizationEventTicket | OrganizationMember | OrganizationToken | UserPost | UserPostComment | UserPostRepost | UserPostMedia | null>;
1662
+ delete: (postId: string) => Promise<void | Organization | OrganizationEvent | OrganizationEventStyle[] | OrganizationEventTicket[] | OrganizationMember[] | null>;
1646
1663
  };
1647
1664
  };
1648
1665
  readonly notifications: {
@@ -1810,4 +1827,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
1810
1827
  client: ChannelWebSocketClient;
1811
1828
  };
1812
1829
 
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 };
1830
+ 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, type UserPostViewEndpoints, 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 };