tonightpass 0.0.138 → 0.0.140
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 +58 -11
- package/dist/index.d.ts +58 -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,18 +281,26 @@ 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",
|
|
288
288
|
Group = "group"
|
|
289
289
|
}
|
|
290
290
|
type ChannelParticipant = Profile;
|
|
291
|
+
declare enum ChannelStatus {
|
|
292
|
+
Sent = "sent",
|
|
293
|
+
Delivered = "delivered",
|
|
294
|
+
Read = "read",
|
|
295
|
+
Received = "received",
|
|
296
|
+
Opened = "opened"
|
|
297
|
+
}
|
|
291
298
|
type Channel = Base & {
|
|
292
299
|
type: ChannelType;
|
|
293
300
|
participants: ChannelParticipant[];
|
|
294
301
|
name?: string;
|
|
295
302
|
lastMessageAt?: Date;
|
|
303
|
+
status?: ChannelStatus;
|
|
296
304
|
unreadCount?: number;
|
|
297
305
|
};
|
|
298
306
|
type ChannelMember = {
|
|
@@ -301,7 +309,10 @@ type ChannelMember = {
|
|
|
301
309
|
role?: "admin" | "member";
|
|
302
310
|
lastReadAt?: Date;
|
|
303
311
|
};
|
|
304
|
-
type
|
|
312
|
+
type UserChannelCountOptions = {
|
|
313
|
+
unseen?: boolean;
|
|
314
|
+
};
|
|
315
|
+
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
316
|
|
|
306
317
|
declare enum ErrorType {
|
|
307
318
|
AuthEmailAlreadyExists = "auth.email-already-exists",
|
|
@@ -1042,23 +1053,41 @@ declare const careers: (client: Client) => {
|
|
|
1042
1053
|
};
|
|
1043
1054
|
|
|
1044
1055
|
declare const channels: (client: Client) => {
|
|
1045
|
-
|
|
1056
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1057
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1058
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1059
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1046
1060
|
get: (channelId: string) => Promise<Channel>;
|
|
1061
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1047
1062
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1063
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1048
1064
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1065
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1049
1066
|
delete: (channelId: string) => Promise<void>;
|
|
1050
|
-
|
|
1067
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1068
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1069
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1051
1070
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1052
|
-
|
|
1071
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1072
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1073
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1053
1074
|
messages: {
|
|
1054
1075
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1076
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1055
1077
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1078
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1056
1079
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1080
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1057
1081
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1082
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1058
1083
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1059
|
-
|
|
1084
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1085
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1086
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1060
1087
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1088
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1061
1089
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1090
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1062
1091
|
};
|
|
1063
1092
|
};
|
|
1064
1093
|
|
|
@@ -1206,23 +1235,41 @@ declare class TonightPass {
|
|
|
1206
1235
|
};
|
|
1207
1236
|
};
|
|
1208
1237
|
readonly channels: {
|
|
1209
|
-
|
|
1238
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1239
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1240
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1241
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1210
1242
|
get: (channelId: string) => Promise<Channel>;
|
|
1243
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1211
1244
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1245
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1212
1246
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1247
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1213
1248
|
delete: (channelId: string) => Promise<void>;
|
|
1214
|
-
|
|
1249
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1250
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1251
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1215
1252
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1216
|
-
|
|
1253
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1254
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1255
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1217
1256
|
messages: {
|
|
1218
1257
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1258
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1219
1259
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1260
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1220
1261
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1262
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1221
1263
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1264
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1222
1265
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1223
|
-
|
|
1266
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1267
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1268
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1224
1269
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1270
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1225
1271
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1272
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1226
1273
|
};
|
|
1227
1274
|
};
|
|
1228
1275
|
readonly health: {
|
|
@@ -1330,4 +1377,4 @@ declare class TonightPass {
|
|
|
1330
1377
|
declare const isBrowser: boolean;
|
|
1331
1378
|
declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
|
|
1332
1379
|
|
|
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 };
|
|
1380
|
+
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, ChannelStatus, 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,18 +281,26 @@ 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",
|
|
288
288
|
Group = "group"
|
|
289
289
|
}
|
|
290
290
|
type ChannelParticipant = Profile;
|
|
291
|
+
declare enum ChannelStatus {
|
|
292
|
+
Sent = "sent",
|
|
293
|
+
Delivered = "delivered",
|
|
294
|
+
Read = "read",
|
|
295
|
+
Received = "received",
|
|
296
|
+
Opened = "opened"
|
|
297
|
+
}
|
|
291
298
|
type Channel = Base & {
|
|
292
299
|
type: ChannelType;
|
|
293
300
|
participants: ChannelParticipant[];
|
|
294
301
|
name?: string;
|
|
295
302
|
lastMessageAt?: Date;
|
|
303
|
+
status?: ChannelStatus;
|
|
296
304
|
unreadCount?: number;
|
|
297
305
|
};
|
|
298
306
|
type ChannelMember = {
|
|
@@ -301,7 +309,10 @@ type ChannelMember = {
|
|
|
301
309
|
role?: "admin" | "member";
|
|
302
310
|
lastReadAt?: Date;
|
|
303
311
|
};
|
|
304
|
-
type
|
|
312
|
+
type UserChannelCountOptions = {
|
|
313
|
+
unseen?: boolean;
|
|
314
|
+
};
|
|
315
|
+
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
316
|
|
|
306
317
|
declare enum ErrorType {
|
|
307
318
|
AuthEmailAlreadyExists = "auth.email-already-exists",
|
|
@@ -1042,23 +1053,41 @@ declare const careers: (client: Client) => {
|
|
|
1042
1053
|
};
|
|
1043
1054
|
|
|
1044
1055
|
declare const channels: (client: Client) => {
|
|
1045
|
-
|
|
1056
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1057
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1058
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1059
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1046
1060
|
get: (channelId: string) => Promise<Channel>;
|
|
1061
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1047
1062
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1063
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1048
1064
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1065
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1049
1066
|
delete: (channelId: string) => Promise<void>;
|
|
1050
|
-
|
|
1067
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1068
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1069
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1051
1070
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1052
|
-
|
|
1071
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1072
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1073
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1053
1074
|
messages: {
|
|
1054
1075
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1076
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1055
1077
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1078
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1056
1079
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1080
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1057
1081
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1082
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1058
1083
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1059
|
-
|
|
1084
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1085
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1086
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1060
1087
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1088
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1061
1089
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1090
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1062
1091
|
};
|
|
1063
1092
|
};
|
|
1064
1093
|
|
|
@@ -1206,23 +1235,41 @@ declare class TonightPass {
|
|
|
1206
1235
|
};
|
|
1207
1236
|
};
|
|
1208
1237
|
readonly channels: {
|
|
1209
|
-
|
|
1238
|
+
me: (options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1239
|
+
getByOrganization: (organizationSlug: string, options?: ArrayOptions<Channel>) => Promise<ArrayResult<Channel>>;
|
|
1240
|
+
countMe: (options?: UserChannelCountOptions) => Promise<number>;
|
|
1241
|
+
countByOrganization: (organizationSlug: string, options?: UserChannelCountOptions) => Promise<number>;
|
|
1210
1242
|
get: (channelId: string) => Promise<Channel>;
|
|
1243
|
+
getByOrganizationChannel: (organizationSlug: string, channelId: string) => Promise<Channel>;
|
|
1211
1244
|
create: (data: CreateChannelDto) => Promise<Channel>;
|
|
1245
|
+
createByOrganization: (organizationSlug: string, data: CreateChannelDto) => Promise<Channel>;
|
|
1212
1246
|
update: (channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1247
|
+
updateByOrganization: (organizationSlug: string, channelId: string, data: UpdateChannelDto) => Promise<Channel>;
|
|
1213
1248
|
delete: (channelId: string) => Promise<void>;
|
|
1214
|
-
|
|
1249
|
+
deleteByOrganization: (organizationSlug: string, channelId: string) => Promise<void>;
|
|
1250
|
+
addParticipant: (channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1251
|
+
addParticipantByOrganization: (organizationSlug: string, channelId: string, data: AddParticipantDto) => Promise<void>;
|
|
1215
1252
|
removeParticipant: (channelId: string, username: string) => Promise<void>;
|
|
1216
|
-
|
|
1253
|
+
removeParticipantByOrganization: (organizationSlug: string, channelId: string, username: string) => Promise<void>;
|
|
1254
|
+
getMembers: (channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1255
|
+
getMembersByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMember>) => Promise<ArrayResult<ChannelMember>>;
|
|
1217
1256
|
messages: {
|
|
1218
1257
|
getAll: (channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1258
|
+
getAllByOrganization: (organizationSlug: string, channelId: string, options?: ArrayOptions<ChannelMessage>) => Promise<ArrayResult<ChannelMessage>>;
|
|
1219
1259
|
get: (channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1260
|
+
getByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<ChannelMessage>;
|
|
1220
1261
|
create: (channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1262
|
+
createByOrganization: (organizationSlug: string, channelId: string, data: CreateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1221
1263
|
update: (channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1264
|
+
updateByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: UpdateChannelMessageDto) => Promise<ChannelMessage>;
|
|
1222
1265
|
delete: (channelId: string, messageId: string) => Promise<void>;
|
|
1223
|
-
|
|
1266
|
+
deleteByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1267
|
+
addReaction: (channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1268
|
+
addReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, data: AddReactionDto) => Promise<void>;
|
|
1224
1269
|
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1270
|
+
removeReactionByOrganization: (organizationSlug: string, channelId: string, messageId: string, emoji: string) => Promise<void>;
|
|
1225
1271
|
markAsRead: (channelId: string, messageId: string) => Promise<void>;
|
|
1272
|
+
markAsReadByOrganization: (organizationSlug: string, channelId: string, messageId: string) => Promise<void>;
|
|
1226
1273
|
};
|
|
1227
1274
|
};
|
|
1228
1275
|
readonly health: {
|
|
@@ -1330,4 +1377,4 @@ declare class TonightPass {
|
|
|
1330
1377
|
declare const isBrowser: boolean;
|
|
1331
1378
|
declare function buildFileFormData(key: string, files: File | File[] | FileList): FormData;
|
|
1332
1379
|
|
|
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 };
|
|
1380
|
+
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, ChannelStatus, 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 };
|