-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JS wrappers for all Chat APIs (#110)
Contains all JS APIs that match the Chat TypeScript types definition file, including MessageDraft V1 for Chat JS only.
- Loading branch information
1 parent
e48d4a2
commit a2fe6fa
Showing
67 changed files
with
5,522 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<baseline version="1.0"> | ||
</baseline> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ [email protected] | |
IOS_SIMULATOR_ID=iPhone 15 Pro | ||
SWIFT_PATH=pubnub-kotlin/swift | ||
|
||
ENABLE_TARGET_JS=false | ||
ENABLE_TARGET_JS=true | ||
ENABLE_TARGET_IOS_OTHER=false | ||
ENABLE_TARGET_IOS_SIMULATOR_ARM64=true | ||
# alternatively (e.g. for release): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<baseline version="1.0"> | ||
</baseline> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
pubnub-chat-api/src/commonMain/kotlin/com/pubnub/chat/types/MessageMentionedUser.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package com.pubnub.chat.types | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlin.js.JsExport | ||
|
||
@Serializable | ||
@JsExport | ||
class MessageMentionedUser(val id: String, val name: String) | ||
|
||
typealias MessageMentionedUsers = Map<Int, MessageMentionedUser> |
5 changes: 5 additions & 0 deletions
5
pubnub-chat-api/src/commonMain/kotlin/com/pubnub/chat/types/MessageReferencedChannel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
@file:OptIn(ExperimentalJsExport::class) | ||
|
||
package com.pubnub.chat.types | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlin.js.ExperimentalJsExport | ||
import kotlin.js.JsExport | ||
|
||
@Serializable | ||
@JsExport | ||
class MessageReferencedChannel(val id: String, val name: String) | ||
|
||
typealias MessageReferencedChannels = Map<Int, MessageReferencedChannel> |
7 changes: 6 additions & 1 deletion
7
pubnub-chat-api/src/commonMain/kotlin/com/pubnub/chat/types/TextLink.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
@file:OptIn(ExperimentalJsExport::class) | ||
|
||
package com.pubnub.chat.types | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlin.js.ExperimentalJsExport | ||
import kotlin.js.JsExport | ||
|
||
@Serializable | ||
class TextLink(val startIndex: Int, val endIndex: Int, val link: String) | ||
@JsExport | ||
data class TextLink(val startIndex: Int, val endIndex: Int, val link: String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<baseline version="1.0"> | ||
<file name="src/jsMain/kotlin/UserJs.kt"> | ||
<error line="46" column="53" source="standard:comment-wrapping" /> | ||
</file> | ||
<file name="src/jsMain/kotlin/converters.kt"> | ||
<error line="137" column="14" source="standard:function-naming" /> | ||
</file> | ||
</baseline> |
7 changes: 7 additions & 0 deletions
7
pubnub-chat-impl/src/appleMain/kotlin/com/pubnub/chat/internal/ChatImpl.ios.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.pubnub.chat.internal | ||
|
||
import kotlin.uuid.ExperimentalUuidApi | ||
import kotlin.uuid.Uuid | ||
|
||
@OptIn(ExperimentalUuidApi::class) | ||
actual fun generateRandomUuid(): String = Uuid.random().toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.