tonightpass 0.0.137 → 0.0.139
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 +60 -19
- package/dist/index.d.ts +60 -19
- 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
|
@@ -259,6 +259,14 @@ type Attachment = {
|
|
|
259
259
|
size?: number;
|
|
260
260
|
mimeType?: string;
|
|
261
261
|
};
|
|
262
|
+
type ChannelMessageReadByEntry = {
|
|
263
|
+
participant: ChannelParticipant;
|
|
264
|
+
readAt: Date;
|
|
265
|
+
};
|
|
266
|
+
type ChannelMessageReaction = {
|
|
267
|
+
emoji: string;
|
|
268
|
+
participants: ChannelParticipant[];
|
|
269
|
+
};
|
|
262
270
|
type ChannelMessage = Base & {
|
|
263
271
|
channel: Channel;
|
|
264
272
|
sender: ChannelParticipant;
|
|
@@ -267,19 +275,13 @@ type ChannelMessage = Base & {
|
|
|
267
275
|
sent: boolean;
|
|
268
276
|
delivered: boolean;
|
|
269
277
|
read: boolean;
|
|
270
|
-
readBy?:
|
|
271
|
-
participant: ChannelParticipant;
|
|
272
|
-
readAt: Date;
|
|
273
|
-
}[];
|
|
278
|
+
readBy?: ChannelMessageReadByEntry[];
|
|
274
279
|
edited: boolean;
|
|
275
280
|
editedAt?: Date;
|
|
276
281
|
replyTo?: ChannelMessage;
|
|
277
|
-
reactions?:
|
|
278
|
-
emoji: string;
|
|
279
|
-
participants: ChannelParticipant[];
|
|
280
|
-
}[];
|
|
282
|
+
reactions?: ChannelMessageReaction[];
|
|
281
283
|
};
|
|
282
|
-
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/:channelId/messages/:messageId", void,
|
|
284
|
+
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/@me/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/@me/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/@me/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/@me/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/@me/:channelId/messages/:messageId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId", void> | Endpoint<"POST", "/channels/@me/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"DELETE", "/channels/@me/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"POST", "/channels/@me/:channelId/messages/:messageId/read", void, null> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/read", void, null>;
|
|
283
285
|
|
|
284
286
|
declare enum ChannelType {
|
|
285
287
|
Private = "private",
|
|
@@ -299,7 +301,10 @@ type ChannelMember = {
|
|
|
299
301
|
role?: "admin" | "member";
|
|
300
302
|
lastReadAt?: Date;
|
|
301
303
|
};
|
|
302
|
-
type
|
|
304
|
+
type UserChannelCountOptions = {
|
|
305
|
+
unseen?: boolean;
|
|
306
|
+
};
|
|
307
|
+
type ChannelEndpoints = Endpoint<"GET", "/channels/@me", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/channels/:organizationSlug", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/users/@me/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/users/:organizationSlug/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/channels/@me/:channelId", Channel> | Endpoint<"GET", "/channels/:organizationSlug/:channelId", Channel> | Endpoint<"POST", "/channels/@me", Channel, CreateChannelDto> | Endpoint<"POST", "/channels/:organizationSlug", Channel, CreateChannelDto> | Endpoint<"PUT", "/channels/@me/:channelId", Channel, UpdateChannelDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId", Channel, UpdateChannelDto> | Endpoint<"DELETE", "/channels/@me/:channelId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId", void> | Endpoint<"POST", "/channels/@me/:channelId/participants", void, AddParticipantDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/participants", void, AddParticipantDto> | Endpoint<"DELETE", "/channels/@me/:channelId/participants/:username", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/participants/:username", void> | Endpoint<"GET", "/channels/@me/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>>;
|
|
303
308
|
|
|
304
309
|
declare enum ErrorType {
|
|
305
310
|
AuthEmailAlreadyExists = "auth.email-already-exists",
|
|
@@ -1040,23 +1045,41 @@ declare const careers: (client: Client) => {
|
|
|
1040
1045
|
};
|
|
1041
1046
|
|
|
1042
1047
|
declare const channels: (client: Client) => {
|
|
1043
|
-
|
|
1048
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1049
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1050
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1051
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1044
1052
|
get: (channelId: string) => Promise<Channel>;
|
|
1053
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1045
1054
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1055
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1046
1056
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1057
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1047
1058
|
delete: (channelId: string) => Promise<void>;
|
|
1048
|
-
|
|
1059
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1060
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1061
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1049
1062
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1050
|
-
|
|
1063
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1064
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1065
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1051
1066
|
messages: {
|
|
1052
1067
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1068
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1053
1069
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1070
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1054
1071
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1072
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1055
1073
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1074
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1056
1075
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1057
|
-
|
|
1076
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1077
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1078
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1058
1079
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1080
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1059
1081
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1082
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1060
1083
|
};
|
|
1061
1084
|
};
|
|
1062
1085
|
|
|
@@ -1204,23 +1227,41 @@ declare class TonightPass {
|
|
|
1204
1227
|
};
|
|
1205
1228
|
};
|
|
1206
1229
|
readonly channels: {
|
|
1207
|
-
|
|
1230
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1231
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1232
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1233
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1208
1234
|
get: (channelId: string) => Promise<Channel>;
|
|
1235
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1209
1236
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1237
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1210
1238
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1239
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1211
1240
|
delete: (channelId: string) => Promise<void>;
|
|
1212
|
-
|
|
1241
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1242
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1243
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1213
1244
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1214
|
-
|
|
1245
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1246
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1247
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1215
1248
|
messages: {
|
|
1216
1249
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1250
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1217
1251
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1252
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1218
1253
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1254
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1219
1255
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1256
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1220
1257
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1221
|
-
|
|
1258
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1259
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1260
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1222
1261
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1262
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1223
1263
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1264
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1224
1265
|
};
|
|
1225
1266
|
};
|
|
1226
1267
|
readonly health: {
|
|
@@ -1328,4 +1369,4 @@ declare class TonightPass {
|
|
|
1328
1369
|
declare const isBrowser: boolean;
|
|
1329
1370
|
declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
|
|
1330
1371
|
|
|
1331
|
-
export { type APIRequestOptions, type APIResponse, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type Attachment, AttachmentType, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, type ChannelMessage, type ChannelMessageEndpoints, type ChannelParticipant, ChannelType, Client, type ClientOptions, CreateAttachmentDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, 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 OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, 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, type WebhookEndpoints, auth, buildFileFormData, careers, channels, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|
|
1372
|
+
export { type APIRequestOptions, type APIResponse, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type Attachment, AttachmentType, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, type ChannelMessage, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, type ChannelParticipant, ChannelType, Client, type ClientOptions, CreateAttachmentDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, 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 OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, 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, type WebhookEndpoints, auth, buildFileFormData, careers, channels, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|
package/dist/index.d.ts
CHANGED
|
@@ -259,6 +259,14 @@ type Attachment = {
|
|
|
259
259
|
size?: number;
|
|
260
260
|
mimeType?: string;
|
|
261
261
|
};
|
|
262
|
+
type ChannelMessageReadByEntry = {
|
|
263
|
+
participant: ChannelParticipant;
|
|
264
|
+
readAt: Date;
|
|
265
|
+
};
|
|
266
|
+
type ChannelMessageReaction = {
|
|
267
|
+
emoji: string;
|
|
268
|
+
participants: ChannelParticipant[];
|
|
269
|
+
};
|
|
262
270
|
type ChannelMessage = Base & {
|
|
263
271
|
channel: Channel;
|
|
264
272
|
sender: ChannelParticipant;
|
|
@@ -267,19 +275,13 @@ type ChannelMessage = Base & {
|
|
|
267
275
|
sent: boolean;
|
|
268
276
|
delivered: boolean;
|
|
269
277
|
read: boolean;
|
|
270
|
-
readBy?:
|
|
271
|
-
participant: ChannelParticipant;
|
|
272
|
-
readAt: Date;
|
|
273
|
-
}[];
|
|
278
|
+
readBy?: ChannelMessageReadByEntry[];
|
|
274
279
|
edited: boolean;
|
|
275
280
|
editedAt?: Date;
|
|
276
281
|
replyTo?: ChannelMessage;
|
|
277
|
-
reactions?:
|
|
278
|
-
emoji: string;
|
|
279
|
-
participants: ChannelParticipant[];
|
|
280
|
-
}[];
|
|
282
|
+
reactions?: ChannelMessageReaction[];
|
|
281
283
|
};
|
|
282
|
-
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/:channelId/messages/:messageId", void,
|
|
284
|
+
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/@me/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/@me/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/@me/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/@me/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/@me/:channelId/messages/:messageId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId", void> | Endpoint<"POST", "/channels/@me/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"DELETE", "/channels/@me/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"POST", "/channels/@me/:channelId/messages/:messageId/read", void, null> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/read", void, null>;
|
|
283
285
|
|
|
284
286
|
declare enum ChannelType {
|
|
285
287
|
Private = "private",
|
|
@@ -299,7 +301,10 @@ type ChannelMember = {
|
|
|
299
301
|
role?: "admin" | "member";
|
|
300
302
|
lastReadAt?: Date;
|
|
301
303
|
};
|
|
302
|
-
type
|
|
304
|
+
type UserChannelCountOptions = {
|
|
305
|
+
unseen?: boolean;
|
|
306
|
+
};
|
|
307
|
+
type ChannelEndpoints = Endpoint<"GET", "/channels/@me", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/channels/:organizationSlug", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/users/@me/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/users/:organizationSlug/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/channels/@me/:channelId", Channel> | Endpoint<"GET", "/channels/:organizationSlug/:channelId", Channel> | Endpoint<"POST", "/channels/@me", Channel, CreateChannelDto> | Endpoint<"POST", "/channels/:organizationSlug", Channel, CreateChannelDto> | Endpoint<"PUT", "/channels/@me/:channelId", Channel, UpdateChannelDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId", Channel, UpdateChannelDto> | Endpoint<"DELETE", "/channels/@me/:channelId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId", void> | Endpoint<"POST", "/channels/@me/:channelId/participants", void, AddParticipantDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/participants", void, AddParticipantDto> | Endpoint<"DELETE", "/channels/@me/:channelId/participants/:username", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/participants/:username", void> | Endpoint<"GET", "/channels/@me/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>>;
|
|
303
308
|
|
|
304
309
|
declare enum ErrorType {
|
|
305
310
|
AuthEmailAlreadyExists = "auth.email-already-exists",
|
|
@@ -1040,23 +1045,41 @@ declare const careers: (client: Client) => {
|
|
|
1040
1045
|
};
|
|
1041
1046
|
|
|
1042
1047
|
declare const channels: (client: Client) => {
|
|
1043
|
-
|
|
1048
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1049
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1050
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1051
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1044
1052
|
get: (channelId: string) => Promise<Channel>;
|
|
1053
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1045
1054
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1055
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1046
1056
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1057
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1047
1058
|
delete: (channelId: string) => Promise<void>;
|
|
1048
|
-
|
|
1059
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1060
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1061
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1049
1062
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1050
|
-
|
|
1063
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1064
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1065
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1051
1066
|
messages: {
|
|
1052
1067
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1068
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1053
1069
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1070
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1054
1071
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1072
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1055
1073
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1074
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1056
1075
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1057
|
-
|
|
1076
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1077
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1078
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1058
1079
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1080
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1059
1081
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1082
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1060
1083
|
};
|
|
1061
1084
|
};
|
|
1062
1085
|
|
|
@@ -1204,23 +1227,41 @@ declare class TonightPass {
|
|
|
1204
1227
|
};
|
|
1205
1228
|
};
|
|
1206
1229
|
readonly channels: {
|
|
1207
|
-
|
|
1230
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1231
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1232
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1233
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1208
1234
|
get: (channelId: string) => Promise<Channel>;
|
|
1235
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1209
1236
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1237
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1210
1238
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1239
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1211
1240
|
delete: (channelId: string) => Promise<void>;
|
|
1212
|
-
|
|
1241
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1242
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1243
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1213
1244
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1214
|
-
|
|
1245
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1246
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1247
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1215
1248
|
messages: {
|
|
1216
1249
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1250
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1217
1251
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1252
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1218
1253
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1254
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1219
1255
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1256
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1220
1257
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1221
|
-
|
|
1258
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1259
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1260
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1222
1261
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1262
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1223
1263
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1264
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1224
1265
|
};
|
|
1225
1266
|
};
|
|
1226
1267
|
readonly health: {
|
|
@@ -1328,4 +1369,4 @@ declare class TonightPass {
|
|
|
1328
1369
|
declare const isBrowser: boolean;
|
|
1329
1370
|
declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
|
|
1330
1371
|
|
|
1331
|
-
export { type APIRequestOptions, type APIResponse, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type Attachment, AttachmentType, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, type ChannelMessage, type ChannelMessageEndpoints, type ChannelParticipant, ChannelType, Client, type ClientOptions, CreateAttachmentDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, 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 OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, 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, type WebhookEndpoints, auth, buildFileFormData, careers, channels, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|
|
1372
|
+
export { type APIRequestOptions, type APIResponse, AddParticipantDto, AddReactionDto, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type Attachment, AttachmentType, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelEndpoints, type ChannelMember, type ChannelMessage, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, type ChannelParticipant, ChannelType, Client, type ClientOptions, CreateAttachmentDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, 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 OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type PublicUser, type QueryParams, REGEX, RecoveryDto, RecoveryResetDto, type RecoveryResponse, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, 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, type WebhookEndpoints, auth, buildFileFormData, careers, channels, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|