UNPKG

chatkitty

Version:
1,832 lines (1,741 loc) 405 kB
/* tslint:disable */ /* eslint-disable */ /** * ChatKitty Platform API * OpenAPI specification (OAS) for the ChatKitty Platform API. See the Interactive Docs to try ChatKitty API methods without writing code, and get the complete schema of resources exposed by the API. * * The version of the OpenAPI document: 2.106.8 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; export interface ApiError { 'error': string; 'explanation'?: string; 'message': string; 'properties'?: { [key: string]: object; }; 'timestamp': string; } /** * Application features that are enabled or disabled */ export interface ApplicationFeatureSettingsProperties { /** * Toggle state of this settings option */ 'guest_users': ApplicationFeatureSettingsPropertiesGuestUsersEnum; /** * Toggle state of this settings option */ 'user_created_channels': ApplicationFeatureSettingsPropertiesUserCreatedChannelsEnum; } export const ApplicationFeatureSettingsPropertiesGuestUsersEnum = { Disabled: 'DISABLED', Enabled: 'ENABLED' } as const; export type ApplicationFeatureSettingsPropertiesGuestUsersEnum = typeof ApplicationFeatureSettingsPropertiesGuestUsersEnum[keyof typeof ApplicationFeatureSettingsPropertiesGuestUsersEnum]; export const ApplicationFeatureSettingsPropertiesUserCreatedChannelsEnum = { Disabled: 'DISABLED', Enabled: 'ENABLED' } as const; export type ApplicationFeatureSettingsPropertiesUserCreatedChannelsEnum = typeof ApplicationFeatureSettingsPropertiesUserCreatedChannelsEnum[keyof typeof ApplicationFeatureSettingsPropertiesUserCreatedChannelsEnum]; export interface ApplicationJobResource { /** * The type of application job */ 'type': ApplicationJobResourceTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; 'created_time': string; 'ended_time'?: string; 'file'?: string; /** * The running state of an application job */ 'state': ApplicationJobResourceStateEnum; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const ApplicationJobResourceTypeEnum = { ChannelImport: 'CHANNEL_IMPORT', ChannelMembersImport: 'CHANNEL_MEMBERS_IMPORT', MessageImport: 'MESSAGE_IMPORT', UserImport: 'USER_IMPORT', MessageAnalyticsExport: 'MESSAGE_ANALYTICS_EXPORT' } as const; export type ApplicationJobResourceTypeEnum = typeof ApplicationJobResourceTypeEnum[keyof typeof ApplicationJobResourceTypeEnum]; export const ApplicationJobResourceStateEnum = { Pending: 'PENDING', Running: 'RUNNING', Finished: 'FINISHED', Failed: 'FAILED' } as const; export type ApplicationJobResourceStateEnum = typeof ApplicationJobResourceStateEnum[keyof typeof ApplicationJobResourceStateEnum]; export interface ApplicationResource { /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * ISO date-time this application was created */ 'created_time': string; /** * Primary API key assigned to this application */ 'key': string; /** * Custom properties attached to this application */ 'properties': { [key: string]: object; }; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } /** * Sent when a system message is sent */ export interface ApplicationSentSystemMessageNotificationData { 'type': string; /** * The ID channel the message was sent. Deprecated: Use the channel property of this notification * @deprecated */ 'channel_id': number; 'message': SystemMessageResource; } export interface ApplicationSettingsProperties { /** * Toggle state of this settings option */ 'guest_users': ApplicationSettingsPropertiesGuestUsersEnum; /** * Toggle state of this settings option */ 'user_created_channels': ApplicationSettingsPropertiesUserCreatedChannelsEnum; } export const ApplicationSettingsPropertiesGuestUsersEnum = { Disabled: 'DISABLED', Enabled: 'ENABLED' } as const; export type ApplicationSettingsPropertiesGuestUsersEnum = typeof ApplicationSettingsPropertiesGuestUsersEnum[keyof typeof ApplicationSettingsPropertiesGuestUsersEnum]; export const ApplicationSettingsPropertiesUserCreatedChannelsEnum = { Disabled: 'DISABLED', Enabled: 'ENABLED' } as const; export type ApplicationSettingsPropertiesUserCreatedChannelsEnum = typeof ApplicationSettingsPropertiesUserCreatedChannelsEnum[keyof typeof ApplicationSettingsPropertiesUserCreatedChannelsEnum]; export interface ApplicationSettingsResource { /** * Toggle state of this settings option */ 'guest_users': ApplicationSettingsResourceGuestUsersEnum; /** * Toggle state of this settings option */ 'user_created_channels': ApplicationSettingsResourceUserCreatedChannelsEnum; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const ApplicationSettingsResourceGuestUsersEnum = { Disabled: 'DISABLED', Enabled: 'ENABLED' } as const; export type ApplicationSettingsResourceGuestUsersEnum = typeof ApplicationSettingsResourceGuestUsersEnum[keyof typeof ApplicationSettingsResourceGuestUsersEnum]; export const ApplicationSettingsResourceUserCreatedChannelsEnum = { Disabled: 'DISABLED', Enabled: 'ENABLED' } as const; export type ApplicationSettingsResourceUserCreatedChannelsEnum = typeof ApplicationSettingsResourceUserCreatedChannelsEnum[keyof typeof ApplicationSettingsResourceUserCreatedChannelsEnum]; export interface AuthenticationError { 'error': string; 'error_description': string; } export interface ChannelGenericEventResource { /** * Custom type of this event */ 'type': string; /** * Custom data associated with this event */ 'properties': { [key: string]: object; }; 'user'?: ChatUserProperties; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface ChannelImport { 'type': string; /** * Username of the user who created this channel */ 'creator'?: string; /** * Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended */ 'idempotency_key'?: string; /** * List of usernames of members of this channel */ 'members': Array<string>; /** * Custom data associated with this channel */ 'properties'?: { [key: string]: object; }; } export interface ChannelInviteResource { /** * The time this invite was created */ 'created_time': string; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface ChannelMembershipImport { /** * Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended */ 'idempotency_key'?: string; /** * Username of the user to be added as a member */ 'username': string; } export interface ChannelMembershipResource { 'created_time': string; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } /** * A channel mention */ export interface ChannelMessageMentionProperties extends MessageMentionProperties { 'channel': MessageMentionChannelProperties; } export interface ChannelProperties { /** * The type of this channel */ 'type': ChannelPropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ISO date-time this channel was created */ 'created_time': string; 'creator'?: ChatUserProperties; 'last_received_message'?: MessageProperties; /** * Custom data associated with this channel */ 'properties': { [key: string]: object; }; } export const ChannelPropertiesTypeEnum = { Direct: 'DIRECT', Public: 'PUBLIC', Private: 'PRIVATE' } as const; export type ChannelPropertiesTypeEnum = typeof ChannelPropertiesTypeEnum[keyof typeof ChannelPropertiesTypeEnum]; /** * @type ChannelResource */ export type ChannelResource = { type: 'DIRECT' } & DirectChannelResource | { type: 'PRIVATE' } & PrivateChannelResource | { type: 'PUBLIC' } & PublicChannelResource; /** * The runtime this function executes on. Always a NodeJS runtime */ export interface ChatFunctionChatRuntimeProperties { /** * The type of this runtime. Always NODEJS */ 'type': ChatFunctionChatRuntimePropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The semantic version of this runtime */ 'version': string; } export const ChatFunctionChatRuntimePropertiesTypeEnum = { Nodejs: 'NODEJS' } as const; export type ChatFunctionChatRuntimePropertiesTypeEnum = typeof ChatFunctionChatRuntimePropertiesTypeEnum[keyof typeof ChatFunctionChatRuntimePropertiesTypeEnum]; export interface ChatFunctionInvocationResource { /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The function arguments passed into this function for this invocation */ 'args': { [key: string]: object; }; /** * The ISO date-time of this invocation when the function was called */ 'created_time': string; /** * The result of this invocation when it completed */ 'result': { [key: string]: object; }; /** * The running status of this invocation */ 'status': ChatFunctionInvocationResourceStatusEnum; /** * The version number of this function version when this invocation occured */ 'version_number': number; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const ChatFunctionInvocationResourceStatusEnum = { Running: 'RUNNING', Succeeded: 'SUCCEEDED', Failed: 'FAILED' } as const; export type ChatFunctionInvocationResourceStatusEnum = typeof ChatFunctionInvocationResourceStatusEnum[keyof typeof ChatFunctionInvocationResourceStatusEnum]; export interface ChatFunctionResource { /** * The type of this function */ 'type': string; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The current version number of this function. Incremented every time a new version is deployed */ 'current_version_number': number; /** * Optional description of this function */ 'description'?: string; /** * True if this function is enabled */ 'enabled': boolean; /** * The name of this function */ 'name': string; 'runtime': ChatFunctionChatRuntimeProperties; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface ChatFunctionVersionResource { /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * JavaScript/TypeScript code that runs when this function is executed */ 'handler_script': string; /** * The version number of this function version. Incremented from the previous version */ 'version_number': number; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } /** * The NPM dependencies version of this runtime */ export interface ChatRuntimeDependencyProperties { /** * True if this NPM package is automatically installed by ChatKitty and available by default in your chat functions */ 'default_dependency': boolean; /** * The name of the dependency NPM package */ 'name': string; /** * The version of the NPM package */ 'version': string; } export interface ChatRuntimeProperties { /** * The type of this runtime. Always NODEJS */ 'type': ChatRuntimePropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The NPM dependencies version of this runtime */ 'dependencies': Array<ChatRuntimeDependencyProperties>; /** * Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime */ 'environment_variables': { [key: string]: string; }; 'initialization_script'?: ChatRuntimeScriptProperties; /** * The semantic version of this runtime */ 'version': string; } export const ChatRuntimePropertiesTypeEnum = { Nodejs: 'NODEJS' } as const; export type ChatRuntimePropertiesTypeEnum = typeof ChatRuntimePropertiesTypeEnum[keyof typeof ChatRuntimePropertiesTypeEnum]; export interface ChatRuntimeResource { /** * The type of this runtime. Always NODEJS */ 'type': ChatRuntimeResourceTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The NPM dependencies version of this runtime */ 'dependencies': Array<ChatRuntimeDependencyProperties>; /** * Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime */ 'environment_variables': { [key: string]: string; }; 'initialization_script'?: ChatRuntimeScriptProperties; /** * The semantic version of this runtime */ 'version': string; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const ChatRuntimeResourceTypeEnum = { Nodejs: 'NODEJS' } as const; export type ChatRuntimeResourceTypeEnum = typeof ChatRuntimeResourceTypeEnum[keyof typeof ChatRuntimeResourceTypeEnum]; export interface ChatRuntimeScriptProperties { /** * The JavaScript/TypeScript source of this script */ 'script': string; } export interface ChatSessionResource { /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * Time this session was created */ 'created_time': string; /** * Time this session ended. Present if state is ENDED */ 'end_time'?: string; 'session': ChatUserSessionProperties; /** * State of this session. ACTIVE or ENDED */ 'state': ChatSessionResourceStateEnum; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const ChatSessionResourceStateEnum = { Active: 'ACTIVE', Ended: 'ENDED' } as const; export type ChatSessionResourceStateEnum = typeof ChatSessionResourceStateEnum[keyof typeof ChatSessionResourceStateEnum]; /** * Reference to a user by ID */ export interface ChatUserIdReference { /** * User ID associated with this user */ 'id': number; } export interface ChatUserImport { /** * Human readable name of this user. Shown to other users */ 'display_name': string; 'display_picture'?: FileImport; /** * True if this user was created by a guest user session */ 'guest': boolean; /** * Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended */ 'idempotency_key'?: string; /** * The unique name used to identify this user across ChatKitty. Also known as username */ 'name': string; /** * Custom data associated with this user */ 'properties': { [key: string]: object; }; } /** * Sent when a user mentions a channel in a message */ export interface ChatUserMentionedChannelNotificationData { 'type': string; /** * The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification * @deprecated */ 'channel_id': number; 'mentioned_channel': ChannelResource; 'message': TextMessageResource; } /** * Sent when a user mentions a user in a message */ export interface ChatUserMentionedChatUserNotificationData { 'type': string; /** * The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification * @deprecated */ 'channel_id': number; 'mentioned_user': ChatUserResource; 'message': TextMessageResource; } /** * A user mention */ export interface ChatUserMessageMentionProperties extends MessageMentionProperties { 'user': ChatUserProperties; } /** * @type ChatUserMessageResource * The message that was sent */ export type ChatUserMessageResource = { type: 'FILE' } & FileChatUserMessageResource | { type: 'TEXT' } & TextChatUserMessageResource; /** * Presence status of this user */ export interface ChatUserPresenceProperties { /** * True if this user has an active user session */ 'online': boolean; /** * The availability status of this user */ 'status': string; } export interface ChatUserProperties { /** * Type of user */ 'type': ChatUserPropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * Call presence status of this user */ 'call_status'?: ChatUserPropertiesCallStatusEnum; /** * Human readable name of this user. Shown to other users */ 'display_name': string; /** * URL for this user\'s display picture */ 'display_picture_url': string; /** * True if this user was created by a guest user session */ 'isGuest': boolean; /** * The unique name used to identify this user across ChatKitty. Also known as username */ 'name': string; 'presence': ChatUserPresenceProperties; /** * Custom data associated with this user */ 'properties': { [key: string]: object; }; } export const ChatUserPropertiesTypeEnum = { Person: 'PERSON', Bot: 'BOT' } as const; export type ChatUserPropertiesTypeEnum = typeof ChatUserPropertiesTypeEnum[keyof typeof ChatUserPropertiesTypeEnum]; export const ChatUserPropertiesCallStatusEnum = { Available: 'AVAILABLE', InCall: 'IN_CALL' } as const; export type ChatUserPropertiesCallStatusEnum = typeof ChatUserPropertiesCallStatusEnum[keyof typeof ChatUserPropertiesCallStatusEnum]; /** * Sent when a user replies to a message */ export interface ChatUserRepliedToChatUserMessageNotificationData { 'type': string; /** * The ID of channel the reply message was sent. Deprecated: Use the channel property of this notification * @deprecated */ 'channel_id': number; 'message': MessageResource; 'parent': MessageResource; } export interface ChatUserResource { /** * Type of user */ 'type': ChatUserResourceTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * Call presence status of this user */ 'call_status'?: ChatUserResourceCallStatusEnum; /** * Human readable name of this user. Shown to other users */ 'display_name': string; /** * URL for this user\'s display picture */ 'display_picture_url': string; /** * True if this user was created by a guest user session */ 'isGuest': boolean; /** * The unique name used to identify this user across ChatKitty. Also known as username */ 'name': string; 'presence': ChatUserPresenceProperties; /** * Custom data associated with this user */ 'properties': { [key: string]: object; }; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const ChatUserResourceTypeEnum = { Person: 'PERSON', Bot: 'BOT' } as const; export type ChatUserResourceTypeEnum = typeof ChatUserResourceTypeEnum[keyof typeof ChatUserResourceTypeEnum]; export const ChatUserResourceCallStatusEnum = { Available: 'AVAILABLE', InCall: 'IN_CALL' } as const; export type ChatUserResourceCallStatusEnum = typeof ChatUserResourceCallStatusEnum[keyof typeof ChatUserResourceCallStatusEnum]; /** * Sent when a user sends a message */ export interface ChatUserSentChatUserMessageNotificationData { 'type': string; /** * The ID channel the message was sent. Deprecated: Use the channel property of this notification * @deprecated */ 'channel_id': number; 'message': ChatUserMessageResource; } export interface ChatUserSessionProperties { /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * Time this session was created */ 'created_time': string; /** * Time this session ended. Present if state is ENDED */ 'end_time'?: string; /** * State of this session. ACTIVE or ENDED */ 'state': ChatUserSessionPropertiesStateEnum; 'user': ChatUserProperties; /** * User agent used to start this session */ 'user_agent'?: string; } export const ChatUserSessionPropertiesStateEnum = { Active: 'ACTIVE', Ended: 'ENDED' } as const; export type ChatUserSessionPropertiesStateEnum = typeof ChatUserSessionPropertiesStateEnum[keyof typeof ChatUserSessionPropertiesStateEnum]; export interface ChatUserSessionResource { /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * Time this session was created */ 'created_time': string; /** * Time this session ended. Present if state is ENDED */ 'end_time'?: string; /** * State of this session. ACTIVE or ENDED */ 'state': ChatUserSessionResourceStateEnum; 'user': ChatUserProperties; /** * User agent used to start this session */ 'user_agent'?: string; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const ChatUserSessionResourceStateEnum = { Active: 'ACTIVE', Ended: 'ENDED' } as const; export type ChatUserSessionResourceStateEnum = typeof ChatUserSessionResourceStateEnum[keyof typeof ChatUserSessionResourceStateEnum]; /** * Reference to a user by username */ export interface ChatUserUsernameReference { /** * Username associated with this user */ 'username': string; } export interface CountResource { /** * The number of items */ 'count': number; } export interface CreateChannelGenericEventResource { /** * Custom type of this event */ 'type': string; /** * Custom data associated with this event */ 'properties': { [key: string]: object; }; } export interface CreateChannelInviteResource { /** * Reference to a user */ 'user': object; } export interface CreateChannelResource { 'type': string; /** * Reference to a user */ 'creator'?: object; /** * List of user references of members of this channel */ 'members'?: Set<object>; /** * Custom data associated with this channel */ 'properties'?: { [key: string]: object; }; } export interface CreateChatFunctionResource { 'type': string; 'description'?: string; 'initialize_asynchronously': boolean; 'name': string; } export interface CreateChatFunctionVersionResource { /** * JavaScript/TypeScript code that runs when this function is executed */ 'handler_script': string; } export interface CreateDelegatedReplyThreadKeystrokesResource { 'keys': string; /** * Reference to a user */ 'user': object; } /** * Creates a direct channel */ export interface CreateDirectChannelResource extends CreateChannelResource { } export interface CreateExternalFileProperties { /** * File MIME content type */ 'content_type': string; /** * File name */ 'name': string; /** * File size in bytes */ 'size': number; /** * External file URL */ 'url': string; } export interface CreateFileMessageResource extends CreateMessageResource { 'file': CreateExternalFileProperties; } export interface CreateGroupChannelResource extends CreateChannelResource { /** * The unique name of this channel used to reference the channel. If absent defaults to a random UUID */ 'name'?: string; /** * Human readable name of this channel shown to users. If absent defaults to the channel name */ 'display_name'?: string; } export interface CreateMessageResource { 'type': string; /** * Optional string to associate this message with other messages. Can be used to group messages into a gallery */ 'group_tag'?: string; /** * Custom data associated with this message */ 'properties'?: { [key: string]: object; }; /** * Reference to a user */ 'user'?: object; } export interface CreatePersonChatUserResource { /** * Human readable name of this user. Shown to other users */ 'display_name': string; /** * True if this user was created by a guest user session */ 'is_guest': boolean; /** * The unique name used to identify this user across ChatKitty. Also known as username */ 'name': string; /** * Custom data associated with this user */ 'properties'?: { [key: string]: object; }; } /** * Creates a private channel */ export interface CreatePrivateChannelResource { 'type': string; /** * Reference to a user */ 'creator'?: object; /** * List of user references of members of this channel */ 'members'?: Set<object>; /** * Custom data associated with this channel */ 'properties'?: { [key: string]: object; }; /** * The unique name of this channel used to reference the channel. If absent defaults to a random UUID */ 'name'?: string; /** * Human readable name of this channel shown to users. If absent defaults to the channel name */ 'display_name'?: string; } /** * Creates a public channel */ export interface CreatePublicChannelResource { 'type': string; /** * Reference to a user */ 'creator'?: object; /** * List of user references of members of this channel */ 'members'?: Set<object>; /** * Custom data associated with this channel */ 'properties'?: { [key: string]: object; }; /** * The unique name of this channel used to reference the channel. If absent defaults to a random UUID */ 'name'?: string; /** * Human readable name of this channel shown to users. If absent defaults to the channel name */ 'display_name'?: string; } export interface CreateTextMessageResource extends CreateMessageResource { /** * The text body of this message */ 'body': string; } export interface CursorPageMetadata { 'next'?: string; 'size': number; 'start'?: string; 'total': number; } export interface CursorPagedModelMessageResource { '_embedded'?: CursorPagedModelMessageResourceEmbedded; 'page': CursorPageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface CursorPagedModelMessageResourceEmbedded { 'messages'?: Array<MessageResource>; } export interface CursorPagedModelNotificationResource { '_embedded'?: CursorPagedModelNotificationResourceEmbedded; 'page': CursorPageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface CursorPagedModelNotificationResourceEmbedded { 'notifications'?: Array<NotificationResource>; } /** * Imports a direct channel */ export interface DirectChannelImport extends ChannelImport { } /** * A direct channel */ export interface DirectChannelProperties extends ChannelProperties { /** * The members of this channel. Present if this is a direct channel. For other channel types, use [**list channel messages**](https://chatkitty.com/docs/api/reference#tag/channels/operation/list-channel-messages) */ 'members': Array<ChatUserProperties>; } export interface DirectChannelResource { /** * The type of this channel */ 'type': DirectChannelResourceTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ISO date-time this channel was created */ 'created_time': string; 'creator'?: ChatUserProperties; 'last_received_message'?: MessageProperties; /** * The members of this channel. Present if this is a direct channel. For other channel types, use [**list channel messages**](https://chatkitty.com/docs/api/reference#tag/channels/operation/list-channel-messages) */ 'members': Array<ChatUserProperties>; /** * Custom data associated with this channel */ 'properties': { [key: string]: object; }; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const DirectChannelResourceTypeEnum = { Direct: 'DIRECT', Public: 'PUBLIC', Private: 'PRIVATE' } as const; export type DirectChannelResourceTypeEnum = typeof DirectChannelResourceTypeEnum[keyof typeof DirectChannelResourceTypeEnum]; /** * The emoji these users reacted with */ export interface EmojiProperties { /** * List of possible aliases for this emoji */ 'aliases': Set<string>; /** * The unicode character of this emoji */ 'character': string; /** * Description of this emoji */ 'description': string; /** * Tags used to describe this emoji */ 'tags': Set<string>; } /** * A file message sent by or behalf of a user */ export interface FileChatUserMessageProperties { /** * The type of this message */ 'type': FileChatUserMessagePropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ID of the channel this message belongs to */ 'channel_id': number; /** * The time this message was created */ 'created_time': string; /** * Optional string to associate this message with other messages. Can be used to group messages into a gallery */ 'group_tag'?: string; /** * The time this message was last edited */ 'last_edited_time'?: string; /** * The nested thread level of this message */ 'nested_level': number; /** * Custom data associated with this message */ 'properties': { [key: string]: object; }; /** * Reactions to this message */ 'reactions'?: Array<MessageReactionsSummaryProperties>; /** * The number of replies to this message */ 'replies_count'?: number; /** * The number of times this message has been reported */ 'report_count'?: number; 'file': FileProperties; 'user': ChatUserProperties; } export const FileChatUserMessagePropertiesTypeEnum = { Text: 'TEXT', File: 'FILE', SystemText: 'SYSTEM_TEXT', SystemFile: 'SYSTEM_FILE' } as const; export type FileChatUserMessagePropertiesTypeEnum = typeof FileChatUserMessagePropertiesTypeEnum[keyof typeof FileChatUserMessagePropertiesTypeEnum]; export interface FileChatUserMessageResource { /** * The type of this message */ 'type': FileChatUserMessageResourceTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ID of the channel this message belongs to */ 'channel_id': number; /** * The time this message was created */ 'created_time': string; 'file': FileProperties; /** * Optional string to associate this message with other messages. Can be used to group messages into a gallery */ 'group_tag'?: string; /** * The time this message was last edited */ 'last_edited_time'?: string; /** * The nested thread level of this message */ 'nested_level': number; /** * Custom data associated with this message */ 'properties': { [key: string]: object; }; /** * Reactions to this message */ 'reactions'?: Array<MessageReactionsSummaryProperties>; /** * The number of replies to this message */ 'replies_count'?: number; /** * The number of times this message has been reported */ 'report_count'?: number; 'user': ChatUserProperties; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const FileChatUserMessageResourceTypeEnum = { Text: 'TEXT', File: 'FILE', SystemText: 'SYSTEM_TEXT', SystemFile: 'SYSTEM_FILE' } as const; export type FileChatUserMessageResourceTypeEnum = typeof FileChatUserMessageResourceTypeEnum[keyof typeof FileChatUserMessageResourceTypeEnum]; /** * External file properties */ export interface FileImport { /** * The mime type of this file */ 'content_type': string; /** * Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended */ 'idempotency_key'?: string; /** * The file name */ 'name': string; /** * The size of this file in bytes */ 'size': number; /** * The file URL */ 'url': string; } export interface FileMessageProperties extends MessageProperties { 'file': FileProperties; } /** * The file data of this message */ export interface FileProperties { /** * The type of this file. Either external or hosted by ChatKitty */ 'type': FilePropertiesTypeEnum; /** * The mime type of this file */ 'content_type': string; /** * The file name */ 'name': string; /** * The size of this file in bytes */ 'size': number; /** * The file URL */ 'url': string; } export const FilePropertiesTypeEnum = { Hosted: 'HOSTED', External: 'EXTERNAL' } as const; export type FilePropertiesTypeEnum = typeof FilePropertiesTypeEnum[keyof typeof FilePropertiesTypeEnum]; /** * A file message sent by this application itself. Used for systems announcements independent of any user */ export interface FileSystemMessageProperties { /** * The type of this message */ 'type': FileSystemMessagePropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ID of the channel this message belongs to */ 'channel_id': number; /** * The time this message was created */ 'created_time': string; /** * Optional string to associate this message with other messages. Can be used to group messages into a gallery */ 'group_tag'?: string; /** * The time this message was last edited */ 'last_edited_time'?: string; /** * The nested thread level of this message */ 'nested_level': number; /** * Custom data associated with this message */ 'properties': { [key: string]: object; }; /** * Reactions to this message */ 'reactions'?: Array<MessageReactionsSummaryProperties>; /** * The number of replies to this message */ 'replies_count'?: number; /** * The number of times this message has been reported */ 'report_count'?: number; 'file': FileProperties; } export const FileSystemMessagePropertiesTypeEnum = { Text: 'TEXT', File: 'FILE', SystemText: 'SYSTEM_TEXT', SystemFile: 'SYSTEM_FILE' } as const; export type FileSystemMessagePropertiesTypeEnum = typeof FileSystemMessagePropertiesTypeEnum[keyof typeof FileSystemMessagePropertiesTypeEnum]; export interface FileSystemMessageResource { /** * The type of this message */ 'type': FileSystemMessageResourceTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ID of the channel this message belongs to */ 'channel_id': number; /** * The time this message was created */ 'created_time': string; 'file': FileProperties; /** * Optional string to associate this message with other messages. Can be used to group messages into a gallery */ 'group_tag'?: string; /** * The time this message was last edited */ 'last_edited_time'?: string; /** * The nested thread level of this message */ 'nested_level': number; /** * Custom data associated with this message */ 'properties': { [key: string]: object; }; /** * Reactions to this message */ 'reactions'?: Array<MessageReactionsSummaryProperties>; /** * The number of replies to this message */ 'replies_count'?: number; /** * The number of times this message has been reported */ 'report_count'?: number; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export const FileSystemMessageResourceTypeEnum = { Text: 'TEXT', File: 'FILE', SystemText: 'SYSTEM_TEXT', SystemFile: 'SYSTEM_FILE' } as const; export type FileSystemMessageResourceTypeEnum = typeof FileSystemMessageResourceTypeEnum[keyof typeof FileSystemMessageResourceTypeEnum]; export interface GroupChannelImport { /** * Username of the user who created this channel */ 'creator'?: string; /** * Human readable name of this channel shown to users. If absent defaults to the channel name */ 'display_name'?: string; /** * Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended */ 'idempotency_key'?: string; /** * List of usernames of members of this channel */ 'members': Array<string>; /** * The unique name of this channel used to reference the channel. If absent defaults to a random UUID */ 'name'?: string; /** * Custom data associated with this channel */ 'properties'?: { [key: string]: object; }; } export interface GroupChannelProperties extends ChannelProperties { /** * Human readable name of this channel shown to users */ 'display_name': string; /** * The unique name of this channel used to reference the channel */ 'name': string; } export interface Link { 'href'?: string; 'hreflang'?: string; 'title'?: string; 'type'?: string; 'deprecation'?: string; 'profile'?: string; 'name'?: string; 'templated'?: boolean; } export interface MessageImport { 'type': string; /** * ID of the channel this message belongs to */ 'channel_id': number; /** * Tag identifying the message group this message belongs to */ 'group_tag'?: string; /** * Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended */ 'idempotency_key'?: string; /** * Map of custom data attached to this message */ 'properties'?: { [key: string]: object; }; } /** * Image data of this link preview */ export interface MessageLinkPreviewImageProperties { /** * The url source of this image */ 'source': string; } /** * Embedded link preview data */ export interface MessageLinkPreviewProperties { /** * Description of this link preview */ 'description'?: string; 'image': MessageLinkPreviewImageProperties; /** * The name of the site linked */ 'site_name'?: string; /** * The title of this link */ 'title': string; /** * The URL of the link being previewed */ 'url': string; } /** * Link previews in this message */ export interface MessageLinkProperties { /** * The ending index of this link within the message */ 'end_position': number; 'preview'?: MessageLinkPreviewProperties; /** * The href of the URL this message link represents */ 'source': string; /** * The starting index of this link within the message */ 'start_position': number; } /** * Channel properties embedded in channel mentions */ export interface MessageMentionChannelProperties { /** * The type of this channel */ 'type': MessageMentionChannelPropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ISO date-time this channel was created */ 'created_time': string; 'creator'?: ChatUserProperties; /** * Human readable name of this channel shown to users. Present if this is a group channel */ 'display_name'?: string; /** * The unique name of this channel used to reference the channel. Present if this is a group channel */ 'name'?: string; /** * Custom data associated with this channel */ 'properties': { [key: string]: object; }; } export const MessageMentionChannelPropertiesTypeEnum = { Direct: 'DIRECT', Public: 'PUBLIC', Private: 'PRIVATE' } as const; export type MessageMentionChannelPropertiesTypeEnum = typeof MessageMentionChannelPropertiesTypeEnum[keyof typeof MessageMentionChannelPropertiesTypeEnum]; /** * Mentions in this message */ export interface MessageMentionProperties { /** * The type of this message mention */ 'type': MessageMentionPropertiesTypeEnum; /** * The ending position of this mention reference inside its message */ 'end_position': number; /** * The starting position of this mention reference inside its message */ 'start_position': number; /** * The literal text referencing the mentioned entity inside the message */ 'tag': string; } export const MessageMentionPropertiesTypeEnum = { Channel: 'CHANNEL', User: 'USER' } as const; export type MessageMentionPropertiesTypeEnum = typeof MessageMentionPropertiesTypeEnum[keyof typeof MessageMentionPropertiesTypeEnum]; export interface MessageProperties { /** * The type of this message */ 'type': MessagePropertiesTypeEnum; /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The ID of the channel this message belongs to */ 'channel_id': number; /** * The time this message was created */ 'created_time': string; /** * Optional string to associate this message with other messages. Can be used to group messages into a gallery */ 'group_tag'?: string; /** * The time this message was last edited */ 'last_edited_time'?: string; /** * The nested thread level of this message */ 'nested_level': number; /** * Custom data associated with this message */ 'properties': { [key: string]: object; }; /** * Reactions to this message */ 'reactions'?: Array<MessageReactionsSummaryProperties>; /** * The number of replies to this message */ 'replies_count'?: number; /** * The number of times this message has been reported */ 'report_count'?: number; } export const MessagePropertiesTypeEnum = { Text: 'TEXT', File: 'FILE', SystemText: 'SYSTEM_TEXT', SystemFile: 'SYSTEM_FILE' } as const; export type MessagePropertiesTypeEnum = typeof MessagePropertiesTypeEnum[keyof typeof MessagePropertiesTypeEnum]; /** * Reactions to this message */ export interface MessageReactionsSummaryProperties { /** * The number of users that reacted with this emoji */ 'count': number; 'emoji': EmojiProperties; /** * The users that reacted with this emoji */ 'users': Array<ChatUserProperties>; } export interface MessageReadReceiptResource { /** * Time the user read this message */ 'created_time': string; 'user': ChatUserProperties; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface MessageReadReceiptSummaryResource { 'channel': ChannelProperties; /** * Number of unread messages */ 'count': number; 'user': ChatUserProperties; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } /** * @type MessageResource */ export type MessageResource = { type: 'FILE' } & FileChatUserMessageResource | { type: 'SYSTEM_FILE' } & FileSystemMessageResource | { type: 'SYSTEM_TEXT' } & TextSystemMessageResource | { type: 'TEXT' } & TextChatUserMessageResource; /** * Additional context data of this notification */ export interface NotificationData { /** * The type of notification that was received. This specifies the schema of the notification data */ 'type': string; } export interface NotificationResource { /** * 64-bit integer identifier associated with this resource */ 'id': number; /** * The text body of this notification */ 'body': string; 'channel'?: ChannelProperties; /** * Time this notification was created */ 'created_time': string; 'data': NotificationData; /** * True if this notification should be muted */ 'muted': boolean; /** * Time this notification was read */ 'read_time'?: string; /** * The title of this notification */ 'title': string; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PageMetadata { 'number'?: number; 'size'?: number; 'total_elements'?: number; 'total_pages'?: number; } export interface Pageable { 'page'?: number; 'size'?: number; 'sort'?: Array<string>; } export interface PagedModelApplicationJobResource { '_embedded'?: PagedModelApplicationJobResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelApplicationJobResourceEmbedded { 'jobs'?: Array<ApplicationJobResource>; } export interface PagedModelChannelInviteResource { '_embedded'?: PagedModelChannelInviteResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelChannelInviteResourceEmbedded { 'invites'?: Array<ChannelInviteResource>; } export interface PagedModelChannelMembershipResource { '_embedded'?: PagedModelChannelMembershipResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelChannelMembershipResourceEmbedded { 'memberships'?: Array<ChannelMembershipResource>; } export interface PagedModelChannelResource { '_embedded'?: PagedModelChannelResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelChannelResourceEmbedded { 'channels'?: Array<ChannelResource>; } export interface PagedModelChatFunctionInvocationResource { '_embedded'?: PagedModelChatFunctionInvocationResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelChatFunctionInvocationResourceEmbedded { 'invocations'?: Array<ChatFunctionInvocationResource>; } export interface PagedModelChatFunctionResource { '_embedded'?: PagedModelChatFunctionResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelChatFunctionResourceEmbedded { 'functions'?: Array<ChatFunctionResource>; } export interface PagedModelChatFunctionVersionResource { '_embedded'?: PagedModelChatFunctionVersionResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelChatFunctionVersionResourceEmbedded { 'versions'?: Array<ChatFunctionVersionResource>; } export interface PagedModelChatSessionResource { '_embedded'?: PagedModelChatSessionResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModelChatSessionResourceEmbedded { 'sessions'?: Array<ChatSessionResource>; } export interface PagedModelChatUserResource { '_embedded'?: PagedModelChatUserResourceEmbedded; 'page'?: PageMetadata; /** * Hypermedia control links for this resource */ '_links'?: Array<Link>; } export interface PagedModel