DeskShuttle is a hosted service and a Kotlin Multiplatform SDK. Your app sends an edit request, the user finishes it in a browser, and the result comes back to the app and to your server.DeskShuttle 은 호스팅 서비스와 Kotlin Multiplatform SDK 로 구성됩니다. 앱이 편집 요청(task)을 생성하면 사용자가 PC 브라우저에서 편집을 완료하고, 결과는 SDK 와 백엔드 웹훅으로 전달됩니다.
Early access: we set up each app by hand while the developer console is being built. Write to 현재 Early Access 단계입니다. 개발자 콘솔이 준비될 때까지 앱 등록은 저희가 직접 진행합니다. 앱 이름과 함께 support@deskshuttle.com with your app's name to get your keys. 로 문의해 주십시오.
The SDK is on Maven Central for Kotlin Multiplatform, Android and the JVM. The source is on GitHub under the Apache License 2.0.SDK 는 Maven Central 에 배포되며 Kotlin Multiplatform·Android·JVM 에서 사용할 수 있습니다. 소스는 Apache License 2.0 으로 GitHub 에 공개되어 있습니다.
// Kotlin Multiplatform
commonMain.dependencies { implementation("com.deskshuttle:sdk:0.1.0") }
// Android
dependencies { implementation("com.deskshuttle:sdk:0.1.0") }
Android minSdk 23. For a Swift-only iOS app, build the static XCFramework with ./gradlew :sdk:assembleDeskShuttleReleaseXCFramework. Source: Android minSdk 23. Swift 전용 iOS 앱은 ./gradlew :sdk:assembleDeskShuttleReleaseXCFramework 로 정적 XCFramework 를 빌드해 추가합니다. 소스: github.com/ecsoft-team/deskshuttle-sdk
| Key키 | Where it lives보관 위치 |
|---|---|
ds_sk_… secret keySecret key | Only on your server. It makes user tokens and manages the licence.백엔드에만 보관합니다. User token 발급과 라이선스 관리에 사용합니다. |
ds_pk_… publishable keyPublishable key | In the app, only for apps without accounts (device sign-up).앱에 포함합니다. 계정이 없는 앱의 디바이스 등록에만 사용합니다. |
| webhook secretWebhook secret | On your server, to check the DeskShuttle-Signature header.백엔드에 보관합니다. DeskShuttle-Signature 헤더 검증에 사용합니다. |
If your app has accounts, your server asks DeskShuttle for a user token and hands it to the app. Give an email address and DeskShuttle also mails the edit link.계정이 있는 앱은 백엔드가 Secret key 로 user token 을 발급받아 앱에 전달합니다. email 을 함께 넘기면 편집 링크가 메일로도 발송됩니다.
curl -X POST https://app.transkeyboard.com/deskshuttle/v1/user-tokens \
-H "Authorization: Bearer ds_sk_…" -H "Content-Type: application/json" \
-d '{"userId": "u_123", "email": "writer@example.com"}'
val ds = DeskShuttle(DeskShuttleConfig(
tokens = TokenProvider { refresh -> myApi.deskShuttleToken(forceNew = refresh) },
))
No accounts? Put the publishable key in the app and use DeviceAuth; the token is kept in SharedPreferences on Android and the Keychain on iOS.계정이 없는 앱은 Publishable key 와 DeviceAuth 를 사용합니다. 토큰은 Android 는 SharedPreferences, iOS 는 Keychain 에 저장됩니다.
The edit page is drawn from a form you write in code. Labels come in pairs, and the page picks the user's language.편집 화면은 코드로 정의한 form(JSON schema)으로 렌더링됩니다. 라벨은 t(en, ko) 로 지정하며, 요청 언어에 따라 표시됩니다.
val storyboard = form(note = t("Edit each panel's line.", "칸마다 대사를 고쳐 주세요.")) {
text("title", t("Title", "제목"), required = true, max = 40)
list("panels", fixed = true, itemLabel = t("Panel", "칸")) {
hidden("pid") // comes back unchanged
display("scene", t("Scene", "장면")) // shown, not edited
textarea("line", t("Line", "대사"), required = true, max = 80, lines = 2)
}
select("mood", t("Mood", "분위기"), listOf(option("warm"), option("sad")))
toggle("publish", t("Publish after drawing", "그린 뒤 바로 올리기"))
}
Parts: text, textarea, select, toggle, list, group, display, hidden.컴포넌트: text·textarea·select·toggle·list·group·display·hidden.
val task = ds.create(EditRequest(
title = "Episode 3 storyboard",
form = storyboard,
value = currentValue, // JSON in the shape of the form
target = "episode:42", // find it again when the app reopens
))
startActivity(task.shareIntent()) // iOS: task.shareText() in a share sheet
ds.watch(task.id, initial = task).collect { t ->
when (t.status) {
TaskStatus.OPENED -> showOpenedOnComputer()
TaskStatus.COMPLETED -> { apply(t.result!!); ds.ack(t.id) }
else -> {}
}
}
Your server is told too. Each webhook carries DeskShuttle-Event (for example task.completed) and DeskShuttle-Signature: t=…,v1=…, an HMAC-SHA256 of "<t>.<body>" with your webhook secret. Failed deliveries are tried again.백엔드에는 웹훅이 전송됩니다. DeskShuttle-Event(예: task.completed)와 DeskShuttle-Signature: t=…,v1=… 헤더가 포함되며, v1 은 webhook secret 으로 계산한 "<t>.<body>" 의 HMAC-SHA256 입니다. 전송에 실패하면 재시도합니다.
After buying DeskShuttle Pro, put the key on your app from your server:DeskShuttle Pro 구매 후, 백엔드에서 라이선스 키를 앱에 등록합니다.
curl -X PUT https://app.transkeyboard.com/deskshuttle/v1/license \
-H "Authorization: Bearer ds_sk_…" -H "Content-Type: application/json" \
-d '{"key": "DSK-XXXXXX-XXXXXXXXXXXXXXXXXXXXXXXX"}'
GET /v1/license shows the plan and this month's count. DELETE /v1/license takes the key off, so you can move it to another app.GET /v1/license 는 현재 플랜과 이번 달 사용량을 반환합니다. DELETE /v1/license 로 키를 해제하면 다른 앱에 등록할 수 있습니다.