Skip to content

Commit 6ac4e7a

Browse files
committed
feat(chat-ui-swift): Add Channel Resource to Notification
1 parent f3cac54 commit 6ac4e7a

File tree

7 files changed

+436
-239
lines changed

7 files changed

+436
-239
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//
2+
// ChannelResource.swift
3+
//
4+
// Generated by swagger-codegen
5+
// https://github.com/swagger-api/swagger-codegen
6+
//
7+
8+
import Foundation
9+
10+
11+
12+
public struct ChannelResource: Codable {
13+
14+
public enum ModelType: String, Codable {
15+
case direct = "DIRECT"
16+
case _public = "PUBLIC"
17+
case _private = "PRIVATE"
18+
}
19+
/** The type of this channel */
20+
public var type: ModelType
21+
/** 64-bit integer identifier associated with this resource */
22+
public var _id: Int64
23+
/** The ISO date-time this channel was created */
24+
public var createdTime: Date
25+
public var creator: ChatUserProperties?
26+
public var lastReceivedMessage: MessageProperties?
27+
/** Custom data associated with this channel */
28+
public var properties: AnyCodable
29+
30+
public init(type: ModelType, _id: Int64, createdTime: Date, creator: ChatUserProperties? = nil, lastReceivedMessage: MessageProperties? = nil, properties: AnyCodable) {
31+
self.type = type
32+
self._id = _id
33+
self.createdTime = createdTime
34+
self.creator = creator
35+
self.lastReceivedMessage = lastReceivedMessage
36+
self.properties = properties
37+
}
38+
39+
public enum CodingKeys: String, CodingKey {
40+
case type
41+
case _id = "id"
42+
case createdTime
43+
case creator
44+
case lastReceivedMessage
45+
case properties
46+
}
47+
48+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//
2+
// ChatUserProperties.swift
3+
//
4+
// Generated by swagger-codegen
5+
// https://github.com/swagger-api/swagger-codegen
6+
//
7+
8+
import Foundation
9+
10+
11+
12+
public struct ChatUserProperties: Codable {
13+
14+
public enum ModelType: String, Codable {
15+
case person = "PERSON"
16+
case bot = "BOT"
17+
}
18+
public enum CallStatus: String, Codable {
19+
case available = "AVAILABLE"
20+
case inCall = "IN_CALL"
21+
}
22+
/** Type of user */
23+
public var type: ModelType
24+
/** 64-bit integer identifier associated with this resource */
25+
public var _id: Int64
26+
/** Call presence status of this user */
27+
public var callStatus: CallStatus?
28+
/** Human readable name of this user. Shown to other users */
29+
public var displayName: String
30+
/** URL for this user's display picture */
31+
public var displayPictureUrl: String
32+
/** True if this user was created by a guest user session */
33+
public var isGuest: Bool
34+
/** The unique name used to identify this user across ChatKitty. Also known as username */
35+
public var name: String
36+
/** Custom data associated with this user */
37+
public var properties: AnyCodable
38+
39+
public init(type: ModelType, _id: Int64, callStatus: CallStatus? = nil, displayName: String, displayPictureUrl: String, isGuest: Bool, name: String, properties: AnyCodable) {
40+
self.type = type
41+
self._id = _id
42+
self.callStatus = callStatus
43+
self.displayName = displayName
44+
self.displayPictureUrl = displayPictureUrl
45+
self.isGuest = isGuest
46+
self.name = name
47+
self.properties = properties
48+
}
49+
50+
public enum CodingKeys: String, CodingKey {
51+
case type
52+
case _id = "id"
53+
case callStatus
54+
case displayName
55+
case displayPictureUrl
56+
case isGuest
57+
case name
58+
case properties
59+
}
60+
61+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
//
2+
// MessageProperties.swift
3+
//
4+
// Generated by swagger-codegen
5+
// https://github.com/swagger-api/swagger-codegen
6+
//
7+
8+
import Foundation
9+
10+
11+
12+
public struct MessageProperties: Codable {
13+
14+
public enum ModelType: String, Codable {
15+
case text = "TEXT"
16+
case file = "FILE"
17+
case systemText = "SYSTEM_TEXT"
18+
case systemFile = "SYSTEM_FILE"
19+
}
20+
/** The type of this message */
21+
public var type: ModelType
22+
/** 64-bit integer identifier associated with this resource */
23+
public var _id: Int64
24+
/** The ID of the channel this message belongs to */
25+
public var channelId: Int64
26+
/** The time this message was created */
27+
public var createdTime: Date
28+
/** Optional string to associate this message with other messages. Can be used to group messages into a gallery */
29+
public var groupTag: String?
30+
/** The time this message was last edited */
31+
public var lastEditedTime: Date?
32+
/** The nested thread level of this message */
33+
public var nestedLevel: Int
34+
/** Custom data associated with this message */
35+
public var properties: AnyCodable
36+
/** The number of replies to this message */
37+
public var repliesCount: Int64?
38+
39+
public init(type: ModelType, _id: Int64, channelId: Int64, createdTime: Date, groupTag: String? = nil, lastEditedTime: Date? = nil, nestedLevel: Int, properties: AnyCodable, repliesCount: Int64? = nil) {
40+
self.type = type
41+
self._id = _id
42+
self.channelId = channelId
43+
self.createdTime = createdTime
44+
self.groupTag = groupTag
45+
self.lastEditedTime = lastEditedTime
46+
self.nestedLevel = nestedLevel
47+
self.properties = properties
48+
self.repliesCount = repliesCount
49+
}
50+
51+
public enum CodingKeys: String, CodingKey {
52+
case type
53+
case _id = "id"
54+
case channelId
55+
case createdTime
56+
case groupTag
57+
case lastEditedTime
58+
case nestedLevel
59+
case properties
60+
case repliesCount
61+
}
62+
63+
}

Example/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ EXTERNAL SOURCES:
1515
:path: "../"
1616

1717
SPEC CHECKSUMS:
18-
ChatKittyUI: f6a32e37039bfd61ff9b7bd0eea8d5e599d2df94
18+
ChatKittyUI: 5287566538d149596cc750be0d2690f8b63f448a
1919
FlexHybridApp: 4d892a14bb6a400d9e3e02c8400727c83f4539bf
2020

2121
PODFILE CHECKSUM: 8616378a5f8cb443ec1d2bac0253c8a396552291

Example/Pods/Local Podspecs/ChatKittyUI.podspec.json

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)