tonightpass 0.0.138 → 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 +50 -11
- package/dist/index.d.ts +50 -11
- 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
|
@@ -281,7 +281,7 @@ type ChannelMessage = Base & {
|
|
|
281
281
|
replyTo?: ChannelMessage;
|
|
282
282
|
reactions?: ChannelMessageReaction[];
|
|
283
283
|
};
|
|
284
|
-
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>;
|
|
285
285
|
|
|
286
286
|
declare enum ChannelType {
|
|
287
287
|
Private = "private",
|
|
@@ -301,7 +301,10 @@ type ChannelMember = {
|
|
|
301
301
|
role?: "admin" | "member";
|
|
302
302
|
lastReadAt?: Date;
|
|
303
303
|
};
|
|
304
|
-
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>>;
|
|
305
308
|
|
|
306
309
|
declare enum ErrorType {
|
|
307
310
|
AuthEmailAlreadyExists = "auth.email-already-exists",
|
|
@@ -1042,23 +1045,41 @@ declare const careers: (client: Client) => {
|
|
|
1042
1045
|
};
|
|
1043
1046
|
|
|
1044
1047
|
declare const channels: (client: Client) => {
|
|
1045
|
-
|
|
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>;
|
|
1046
1052
|
get: (channelId: string) => Promise<Channel>;
|
|
1053
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1047
1054
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1055
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1048
1056
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1057
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1049
1058
|
delete: (channelId: string) => Promise<void>;
|
|
1050
|
-
|
|
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>;
|
|
1051
1062
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1052
|
-
|
|
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>>;
|
|
1053
1066
|
messages: {
|
|
1054
1067
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1068
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1055
1069
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1070
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1056
1071
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1072
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1057
1073
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1074
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1058
1075
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1059
|
-
|
|
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>;
|
|
1060
1079
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1080
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1061
1081
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1082
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1062
1083
|
};
|
|
1063
1084
|
};
|
|
1064
1085
|
|
|
@@ -1206,23 +1227,41 @@ declare class TonightPass {
|
|
|
1206
1227
|
};
|
|
1207
1228
|
};
|
|
1208
1229
|
readonly channels: {
|
|
1209
|
-
|
|
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>;
|
|
1210
1234
|
get: (channelId: string) => Promise<Channel>;
|
|
1235
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1211
1236
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1237
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1212
1238
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1239
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1213
1240
|
delete: (channelId: string) => Promise<void>;
|
|
1214
|
-
|
|
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>;
|
|
1215
1244
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1216
|
-
|
|
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>>;
|
|
1217
1248
|
messages: {
|
|
1218
1249
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1250
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1219
1251
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1252
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1220
1253
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1254
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1221
1255
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1256
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1222
1257
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1223
|
-
|
|
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>;
|
|
1224
1261
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1262
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1225
1263
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1264
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1226
1265
|
};
|
|
1227
1266
|
};
|
|
1228
1267
|
readonly health: {
|
|
@@ -1330,4 +1369,4 @@ declare class TonightPass {
|
|
|
1330
1369
|
declare const isBrowser: boolean;
|
|
1331
1370
|
declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
|
|
1332
1371
|
|
|
1333
|
-
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 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
|
@@ -281,7 +281,7 @@ type ChannelMessage = Base & {
|
|
|
281
281
|
replyTo?: ChannelMessage;
|
|
282
282
|
reactions?: ChannelMessageReaction[];
|
|
283
283
|
};
|
|
284
|
-
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>;
|
|
285
285
|
|
|
286
286
|
declare enum ChannelType {
|
|
287
287
|
Private = "private",
|
|
@@ -301,7 +301,10 @@ type ChannelMember = {
|
|
|
301
301
|
role?: "admin" | "member";
|
|
302
302
|
lastReadAt?: Date;
|
|
303
303
|
};
|
|
304
|
-
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>>;
|
|
305
308
|
|
|
306
309
|
declare enum ErrorType {
|
|
307
310
|
AuthEmailAlreadyExists = "auth.email-already-exists",
|
|
@@ -1042,23 +1045,41 @@ declare const careers: (client: Client) => {
|
|
|
1042
1045
|
};
|
|
1043
1046
|
|
|
1044
1047
|
declare const channels: (client: Client) => {
|
|
1045
|
-
|
|
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>;
|
|
1046
1052
|
get: (channelId: string) => Promise<Channel>;
|
|
1053
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1047
1054
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1055
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1048
1056
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1057
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1049
1058
|
delete: (channelId: string) => Promise<void>;
|
|
1050
|
-
|
|
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>;
|
|
1051
1062
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1052
|
-
|
|
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>>;
|
|
1053
1066
|
messages: {
|
|
1054
1067
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1068
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1055
1069
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1070
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1056
1071
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1072
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1057
1073
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1074
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1058
1075
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1059
|
-
|
|
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>;
|
|
1060
1079
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1080
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1061
1081
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1082
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1062
1083
|
};
|
|
1063
1084
|
};
|
|
1064
1085
|
|
|
@@ -1206,23 +1227,41 @@ declare class TonightPass {
|
|
|
1206
1227
|
};
|
|
1207
1228
|
};
|
|
1208
1229
|
readonly channels: {
|
|
1209
|
-
|
|
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>;
|
|
1210
1234
|
get: (channelId: string) => Promise<Channel>;
|
|
1235
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1211
1236
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1237
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1212
1238
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1239
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1213
1240
|
delete: (channelId: string) => Promise<void>;
|
|
1214
|
-
|
|
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>;
|
|
1215
1244
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1216
|
-
|
|
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>>;
|
|
1217
1248
|
messages: {
|
|
1218
1249
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1250
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1219
1251
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1252
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1220
1253
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1254
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1221
1255
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1256
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1222
1257
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1223
|
-
|
|
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>;
|
|
1224
1261
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1262
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1225
1263
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1264
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1226
1265
|
};
|
|
1227
1266
|
};
|
|
1228
1267
|
readonly health: {
|
|
@@ -1330,4 +1369,4 @@ declare class TonightPass {
|
|
|
1330
1369
|
declare const isBrowser: boolean;
|
|
1331
1370
|
declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
|
|
1332
1371
|
|
|
1333
|
-
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 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 };
|