Skip to content

Commit

Permalink
feat(chat-ui-swift): Add Channel Resource to Notification
Browse files Browse the repository at this point in the history
  • Loading branch information
itsAlexNguyen committed Nov 23, 2023
1 parent f3cac54 commit 6ac4e7a
Show file tree
Hide file tree
Showing 7 changed files with 436 additions and 239 deletions.
48 changes: 48 additions & 0 deletions ChatKittyUI/Classes/models/generated/ChannelResource.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// ChannelResource.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation



public struct ChannelResource: Codable {

public enum ModelType: String, Codable {
case direct = "DIRECT"
case _public = "PUBLIC"
case _private = "PRIVATE"
}
/** The type of this channel */
public var type: ModelType
/** 64-bit integer identifier associated with this resource */
public var _id: Int64
/** The ISO date-time this channel was created */
public var createdTime: Date
public var creator: ChatUserProperties?
public var lastReceivedMessage: MessageProperties?
/** Custom data associated with this channel */
public var properties: AnyCodable

public init(type: ModelType, _id: Int64, createdTime: Date, creator: ChatUserProperties? = nil, lastReceivedMessage: MessageProperties? = nil, properties: AnyCodable) {
self.type = type
self._id = _id
self.createdTime = createdTime
self.creator = creator
self.lastReceivedMessage = lastReceivedMessage
self.properties = properties
}

public enum CodingKeys: String, CodingKey {
case type
case _id = "id"
case createdTime
case creator
case lastReceivedMessage
case properties
}

}
61 changes: 61 additions & 0 deletions ChatKittyUI/Classes/models/generated/ChatUserProperties.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// ChatUserProperties.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation



public struct ChatUserProperties: Codable {

public enum ModelType: String, Codable {
case person = "PERSON"
case bot = "BOT"
}
public enum CallStatus: String, Codable {
case available = "AVAILABLE"
case inCall = "IN_CALL"
}
/** Type of user */
public var type: ModelType
/** 64-bit integer identifier associated with this resource */
public var _id: Int64
/** Call presence status of this user */
public var callStatus: CallStatus?
/** Human readable name of this user. Shown to other users */
public var displayName: String
/** URL for this user's display picture */
public var displayPictureUrl: String
/** True if this user was created by a guest user session */
public var isGuest: Bool
/** The unique name used to identify this user across ChatKitty. Also known as username */
public var name: String
/** Custom data associated with this user */
public var properties: AnyCodable

public init(type: ModelType, _id: Int64, callStatus: CallStatus? = nil, displayName: String, displayPictureUrl: String, isGuest: Bool, name: String, properties: AnyCodable) {
self.type = type
self._id = _id
self.callStatus = callStatus
self.displayName = displayName
self.displayPictureUrl = displayPictureUrl
self.isGuest = isGuest
self.name = name
self.properties = properties
}

public enum CodingKeys: String, CodingKey {
case type
case _id = "id"
case callStatus
case displayName
case displayPictureUrl
case isGuest
case name
case properties
}

}
63 changes: 63 additions & 0 deletions ChatKittyUI/Classes/models/generated/MessageProperties.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//
// MessageProperties.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation



public struct MessageProperties: Codable {

public enum ModelType: String, Codable {
case text = "TEXT"
case file = "FILE"
case systemText = "SYSTEM_TEXT"
case systemFile = "SYSTEM_FILE"
}
/** The type of this message */
public var type: ModelType
/** 64-bit integer identifier associated with this resource */
public var _id: Int64
/** The ID of the channel this message belongs to */
public var channelId: Int64
/** The time this message was created */
public var createdTime: Date
/** Optional string to associate this message with other messages. Can be used to group messages into a gallery */
public var groupTag: String?
/** The time this message was last edited */
public var lastEditedTime: Date?
/** The nested thread level of this message */
public var nestedLevel: Int
/** Custom data associated with this message */
public var properties: AnyCodable
/** The number of replies to this message */
public var repliesCount: Int64?

public init(type: ModelType, _id: Int64, channelId: Int64, createdTime: Date, groupTag: String? = nil, lastEditedTime: Date? = nil, nestedLevel: Int, properties: AnyCodable, repliesCount: Int64? = nil) {
self.type = type
self._id = _id
self.channelId = channelId
self.createdTime = createdTime
self.groupTag = groupTag
self.lastEditedTime = lastEditedTime
self.nestedLevel = nestedLevel
self.properties = properties
self.repliesCount = repliesCount
}

public enum CodingKeys: String, CodingKey {
case type
case _id = "id"
case channelId
case createdTime
case groupTag
case lastEditedTime
case nestedLevel
case properties
case repliesCount
}

}
2 changes: 1 addition & 1 deletion Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
ChatKittyUI: f6a32e37039bfd61ff9b7bd0eea8d5e599d2df94
ChatKittyUI: 5287566538d149596cc750be0d2690f8b63f448a
FlexHybridApp: 4d892a14bb6a400d9e3e02c8400727c83f4539bf

PODFILE CHECKSUM: 8616378a5f8cb443ec1d2bac0253c8a396552291
Expand Down
12 changes: 8 additions & 4 deletions Example/Pods/Local Podspecs/ChatKittyUI.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6ac4e7a

Please sign in to comment.