tonightpass 0.0.192 → 0.0.194
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 +32 -16
- package/dist/index.d.ts +32 -16
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ type Endpoint<M extends Options["method"], Path extends string, Res, Body = unde
|
|
|
33
33
|
res: Res;
|
|
34
34
|
body: Body;
|
|
35
35
|
};
|
|
36
|
-
type Endpoints = AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
|
|
36
|
+
type Endpoints = AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
|
|
37
37
|
|
|
38
38
|
declare enum UserNotificationType {
|
|
39
39
|
Follow = "follow"
|
|
@@ -51,12 +51,12 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
|
|
|
51
51
|
unseen?: boolean;
|
|
52
52
|
}>;
|
|
53
53
|
|
|
54
|
-
declare class CreateUserPostCommentDto
|
|
54
|
+
declare class CreateUserPostCommentDto {
|
|
55
55
|
content: string;
|
|
56
56
|
replyToId?: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
declare class UpdateUserPostCommentDto
|
|
59
|
+
declare class UpdateUserPostCommentDto {
|
|
60
60
|
content: string;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ type UserPostComment = Base & {
|
|
|
68
68
|
isEdited: boolean;
|
|
69
69
|
editedAt?: Date;
|
|
70
70
|
};
|
|
71
|
-
type UserPostCommentEndpoints = Endpoint<"GET", "/users/:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/@me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto
|
|
71
|
+
type UserPostCommentEndpoints = 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>;
|
|
72
72
|
|
|
73
73
|
declare enum UserPostMediaType {
|
|
74
74
|
Image = "image",
|
|
@@ -86,7 +86,7 @@ type UserPostMedia = {
|
|
|
86
86
|
};
|
|
87
87
|
type UserPostMediaEndpoints = Endpoint<"POST", "/users/@me/posts/media", string, FormData>;
|
|
88
88
|
|
|
89
|
-
declare class CreateUserPostRepostDto
|
|
89
|
+
declare class CreateUserPostRepostDto {
|
|
90
90
|
comment?: string;
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -95,17 +95,17 @@ type UserPostRepost = Base & {
|
|
|
95
95
|
author: UserProfile;
|
|
96
96
|
comment?: string;
|
|
97
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
|
|
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> | Endpoint<"DELETE", "/users/@me/posts/:postId/reposts", void>;
|
|
99
99
|
|
|
100
100
|
type UserPostViewEndpoints = Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null>;
|
|
101
101
|
|
|
102
|
-
declare class CreateUserPostDto
|
|
102
|
+
declare class CreateUserPostDto {
|
|
103
103
|
content?: string;
|
|
104
104
|
mediaUrls: string[];
|
|
105
105
|
visibility?: UserPostVisibility;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
declare class UpdateUserPostDto
|
|
108
|
+
declare class UpdateUserPostDto {
|
|
109
109
|
content?: string;
|
|
110
110
|
visibility?: UserPostVisibility;
|
|
111
111
|
}
|
|
@@ -129,7 +129,7 @@ type UserPost = Base & {
|
|
|
129
129
|
isEdited: boolean;
|
|
130
130
|
editedAt?: Date;
|
|
131
131
|
};
|
|
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
|
|
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> | Endpoint<"PUT", "/users/@me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/@me/posts/:postId", void> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
|
|
133
133
|
|
|
134
134
|
type Order = Base & {
|
|
135
135
|
invoice: Stripe__default.Invoice;
|
|
@@ -535,6 +535,13 @@ declare enum ErrorType {
|
|
|
535
535
|
ExternalServiceUnavailable = "external-service.unavailable"
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
declare enum FeedType {
|
|
539
|
+
Following = "following",
|
|
540
|
+
Discover = "discover"
|
|
541
|
+
}
|
|
542
|
+
type FeedPost = UserPost | OrganizationEvent[];
|
|
543
|
+
type FeedEndpoints = Endpoint<"GET", "/feed/following", ArrayResult<FeedPost>, ArrayOptions<FeedPost>> | Endpoint<"GET", "/feed/discover", ArrayResult<FeedPost>, ArrayOptions<FeedPost>>;
|
|
544
|
+
|
|
538
545
|
interface Health<T extends string = string> extends HealthCheckResult {
|
|
539
546
|
info?: Record<T, HealthIndicatorResult[T]>;
|
|
540
547
|
error?: Record<T, HealthIndicatorResult[T]>;
|
|
@@ -1308,6 +1315,11 @@ declare const currencies: (client: Client) => {
|
|
|
1308
1315
|
|
|
1309
1316
|
declare function sdk<T>(builder: (client: Client) => T): (client: Client) => T;
|
|
1310
1317
|
|
|
1318
|
+
declare const feed: (client: Client) => {
|
|
1319
|
+
getFollowing: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1320
|
+
getDiscover: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1321
|
+
};
|
|
1322
|
+
|
|
1311
1323
|
declare const health: (client: Client) => {
|
|
1312
1324
|
getAll: () => Promise<Health<"database" | "app" | "api">>;
|
|
1313
1325
|
database: () => Promise<Health<"database">>;
|
|
@@ -1426,7 +1438,7 @@ declare const users: (client: Client) => {
|
|
|
1426
1438
|
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1427
1439
|
delete: (postId: string) => Promise<void>;
|
|
1428
1440
|
uploadMedia: (file: FormData) => Promise<string>;
|
|
1429
|
-
views: {
|
|
1441
|
+
views: (client: Client) => {
|
|
1430
1442
|
record: (username: string, postId: string) => Promise<boolean>;
|
|
1431
1443
|
};
|
|
1432
1444
|
};
|
|
@@ -1439,8 +1451,8 @@ declare const users: (client: Client) => {
|
|
|
1439
1451
|
postsReposts: {
|
|
1440
1452
|
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1441
1453
|
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1442
|
-
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<
|
|
1443
|
-
delete: (postId: string) => Promise<void
|
|
1454
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1455
|
+
delete: (postId: string) => Promise<void>;
|
|
1444
1456
|
};
|
|
1445
1457
|
};
|
|
1446
1458
|
|
|
@@ -1531,6 +1543,10 @@ declare class TonightPass {
|
|
|
1531
1543
|
convert: (conversion: CurrencyConversion) => Promise<CurrencyConversionResult>;
|
|
1532
1544
|
convertAmount: (from: Currency, to: Currency, amount: number) => Promise<CurrencyConversionResult>;
|
|
1533
1545
|
};
|
|
1546
|
+
readonly feed: {
|
|
1547
|
+
getFollowing: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1548
|
+
getDiscover: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1549
|
+
};
|
|
1534
1550
|
readonly health: {
|
|
1535
1551
|
getAll: () => Promise<Health<"database" | "app" | "api">>;
|
|
1536
1552
|
database: () => Promise<Health<"database">>;
|
|
@@ -1645,7 +1661,7 @@ declare class TonightPass {
|
|
|
1645
1661
|
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1646
1662
|
delete: (postId: string) => Promise<void>;
|
|
1647
1663
|
uploadMedia: (file: FormData) => Promise<string>;
|
|
1648
|
-
views: {
|
|
1664
|
+
views: (client: Client) => {
|
|
1649
1665
|
record: (username: string, postId: string) => Promise<boolean>;
|
|
1650
1666
|
};
|
|
1651
1667
|
};
|
|
@@ -1658,8 +1674,8 @@ declare class TonightPass {
|
|
|
1658
1674
|
postsReposts: {
|
|
1659
1675
|
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1660
1676
|
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1661
|
-
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<
|
|
1662
|
-
delete: (postId: string) => Promise<void
|
|
1677
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1678
|
+
delete: (postId: string) => Promise<void>;
|
|
1663
1679
|
};
|
|
1664
1680
|
};
|
|
1665
1681
|
readonly notifications: {
|
|
@@ -1827,4 +1843,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
|
|
|
1827
1843
|
client: ChannelWebSocketClient;
|
|
1828
1844
|
};
|
|
1829
1845
|
|
|
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
|
|
1846
|
+
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, CreateUserPostDto, 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 FeedEndpoints, type FeedPost, FeedType, 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, 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, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ type Endpoint<M extends Options["method"], Path extends string, Res, Body = unde
|
|
|
33
33
|
res: Res;
|
|
34
34
|
body: Body;
|
|
35
35
|
};
|
|
36
|
-
type Endpoints = AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
|
|
36
|
+
type Endpoints = AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
|
|
37
37
|
|
|
38
38
|
declare enum UserNotificationType {
|
|
39
39
|
Follow = "follow"
|
|
@@ -51,12 +51,12 @@ type UserNotificationEndpoints = Endpoint<"GET", "/users/@me/notifications", Arr
|
|
|
51
51
|
unseen?: boolean;
|
|
52
52
|
}>;
|
|
53
53
|
|
|
54
|
-
declare class CreateUserPostCommentDto
|
|
54
|
+
declare class CreateUserPostCommentDto {
|
|
55
55
|
content: string;
|
|
56
56
|
replyToId?: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
declare class UpdateUserPostCommentDto
|
|
59
|
+
declare class UpdateUserPostCommentDto {
|
|
60
60
|
content: string;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ type UserPostComment = Base & {
|
|
|
68
68
|
isEdited: boolean;
|
|
69
69
|
editedAt?: Date;
|
|
70
70
|
};
|
|
71
|
-
type UserPostCommentEndpoints = Endpoint<"GET", "/users/:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/@me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto
|
|
71
|
+
type UserPostCommentEndpoints = 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>;
|
|
72
72
|
|
|
73
73
|
declare enum UserPostMediaType {
|
|
74
74
|
Image = "image",
|
|
@@ -86,7 +86,7 @@ type UserPostMedia = {
|
|
|
86
86
|
};
|
|
87
87
|
type UserPostMediaEndpoints = Endpoint<"POST", "/users/@me/posts/media", string, FormData>;
|
|
88
88
|
|
|
89
|
-
declare class CreateUserPostRepostDto
|
|
89
|
+
declare class CreateUserPostRepostDto {
|
|
90
90
|
comment?: string;
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -95,17 +95,17 @@ type UserPostRepost = Base & {
|
|
|
95
95
|
author: UserProfile;
|
|
96
96
|
comment?: string;
|
|
97
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
|
|
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> | Endpoint<"DELETE", "/users/@me/posts/:postId/reposts", void>;
|
|
99
99
|
|
|
100
100
|
type UserPostViewEndpoints = Endpoint<"POST", "/users/:username/posts/:postId/views", boolean, null>;
|
|
101
101
|
|
|
102
|
-
declare class CreateUserPostDto
|
|
102
|
+
declare class CreateUserPostDto {
|
|
103
103
|
content?: string;
|
|
104
104
|
mediaUrls: string[];
|
|
105
105
|
visibility?: UserPostVisibility;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
declare class UpdateUserPostDto
|
|
108
|
+
declare class UpdateUserPostDto {
|
|
109
109
|
content?: string;
|
|
110
110
|
visibility?: UserPostVisibility;
|
|
111
111
|
}
|
|
@@ -129,7 +129,7 @@ type UserPost = Base & {
|
|
|
129
129
|
isEdited: boolean;
|
|
130
130
|
editedAt?: Date;
|
|
131
131
|
};
|
|
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
|
|
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> | Endpoint<"PUT", "/users/@me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/@me/posts/:postId", void> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
|
|
133
133
|
|
|
134
134
|
type Order = Base & {
|
|
135
135
|
invoice: Stripe__default.Invoice;
|
|
@@ -535,6 +535,13 @@ declare enum ErrorType {
|
|
|
535
535
|
ExternalServiceUnavailable = "external-service.unavailable"
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
declare enum FeedType {
|
|
539
|
+
Following = "following",
|
|
540
|
+
Discover = "discover"
|
|
541
|
+
}
|
|
542
|
+
type FeedPost = UserPost | OrganizationEvent[];
|
|
543
|
+
type FeedEndpoints = Endpoint<"GET", "/feed/following", ArrayResult<FeedPost>, ArrayOptions<FeedPost>> | Endpoint<"GET", "/feed/discover", ArrayResult<FeedPost>, ArrayOptions<FeedPost>>;
|
|
544
|
+
|
|
538
545
|
interface Health<T extends string = string> extends HealthCheckResult {
|
|
539
546
|
info?: Record<T, HealthIndicatorResult[T]>;
|
|
540
547
|
error?: Record<T, HealthIndicatorResult[T]>;
|
|
@@ -1308,6 +1315,11 @@ declare const currencies: (client: Client) => {
|
|
|
1308
1315
|
|
|
1309
1316
|
declare function sdk<T>(builder: (client: Client) => T): (client: Client) => T;
|
|
1310
1317
|
|
|
1318
|
+
declare const feed: (client: Client) => {
|
|
1319
|
+
getFollowing: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1320
|
+
getDiscover: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1321
|
+
};
|
|
1322
|
+
|
|
1311
1323
|
declare const health: (client: Client) => {
|
|
1312
1324
|
getAll: () => Promise<Health<"database" | "app" | "api">>;
|
|
1313
1325
|
database: () => Promise<Health<"database">>;
|
|
@@ -1426,7 +1438,7 @@ declare const users: (client: Client) => {
|
|
|
1426
1438
|
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1427
1439
|
delete: (postId: string) => Promise<void>;
|
|
1428
1440
|
uploadMedia: (file: FormData) => Promise<string>;
|
|
1429
|
-
views: {
|
|
1441
|
+
views: (client: Client) => {
|
|
1430
1442
|
record: (username: string, postId: string) => Promise<boolean>;
|
|
1431
1443
|
};
|
|
1432
1444
|
};
|
|
@@ -1439,8 +1451,8 @@ declare const users: (client: Client) => {
|
|
|
1439
1451
|
postsReposts: {
|
|
1440
1452
|
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1441
1453
|
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1442
|
-
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<
|
|
1443
|
-
delete: (postId: string) => Promise<void
|
|
1454
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1455
|
+
delete: (postId: string) => Promise<void>;
|
|
1444
1456
|
};
|
|
1445
1457
|
};
|
|
1446
1458
|
|
|
@@ -1531,6 +1543,10 @@ declare class TonightPass {
|
|
|
1531
1543
|
convert: (conversion: CurrencyConversion) => Promise<CurrencyConversionResult>;
|
|
1532
1544
|
convertAmount: (from: Currency, to: Currency, amount: number) => Promise<CurrencyConversionResult>;
|
|
1533
1545
|
};
|
|
1546
|
+
readonly feed: {
|
|
1547
|
+
getFollowing: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1548
|
+
getDiscover: (options?: ArrayOptions<FeedPost>) => Promise<ArrayResult<FeedPost>>;
|
|
1549
|
+
};
|
|
1534
1550
|
readonly health: {
|
|
1535
1551
|
getAll: () => Promise<Health<"database" | "app" | "api">>;
|
|
1536
1552
|
database: () => Promise<Health<"database">>;
|
|
@@ -1645,7 +1661,7 @@ declare class TonightPass {
|
|
|
1645
1661
|
update: (postId: string, data: UpdateUserPostDto) => Promise<UserPost>;
|
|
1646
1662
|
delete: (postId: string) => Promise<void>;
|
|
1647
1663
|
uploadMedia: (file: FormData) => Promise<string>;
|
|
1648
|
-
views: {
|
|
1664
|
+
views: (client: Client) => {
|
|
1649
1665
|
record: (username: string, postId: string) => Promise<boolean>;
|
|
1650
1666
|
};
|
|
1651
1667
|
};
|
|
@@ -1658,8 +1674,8 @@ declare class TonightPass {
|
|
|
1658
1674
|
postsReposts: {
|
|
1659
1675
|
getByUsername: (username: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1660
1676
|
getByPost: (username: string, postId: string, options?: ArrayOptions<UserPostRepost>) => Promise<ArrayResult<UserPostRepost>>;
|
|
1661
|
-
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<
|
|
1662
|
-
delete: (postId: string) => Promise<void
|
|
1677
|
+
create: (postId: string, data?: CreateUserPostRepostDto) => Promise<UserPostRepost>;
|
|
1678
|
+
delete: (postId: string) => Promise<void>;
|
|
1663
1679
|
};
|
|
1664
1680
|
};
|
|
1665
1681
|
readonly notifications: {
|
|
@@ -1827,4 +1843,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
|
|
|
1827
1843
|
client: ChannelWebSocketClient;
|
|
1828
1844
|
};
|
|
1829
1845
|
|
|
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
|
|
1846
|
+
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, CreateUserPostDto, 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 FeedEndpoints, type FeedPost, FeedType, 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, 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, feed, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|