PlainApp
API 참조

클립보드

기능 지원은 app.capabilities, 인가는 app.access와 호스트 권한으로 확인하세요. 예제는 합성 값을 사용합니다. 호출 전에 경로, ID, 입력, 필터를 바꾸세요.

타입 정의

graphql
type Mutation {
  deleteClipboardItems(query: String!): ActionResult!
  setClipboard(text: String!, label: String! = "", sensitive: Boolean! = false): Boolean!
}

type Query {
  clipboardItemCount(query: String!): Int!
  clipboardItems(query: String!, offset: Int!, limit: Int!): [ClipboardItem!]!
}

type Subscription {
  clipboardChanged: ClipboardChange!
}

type ActionResult {
	affectedCount: Int!
}

type ClipboardChange {
	text: String!
	sensitive: Boolean!
	time: Instant!
}

type ClipboardItem {
	id: ID!
	text: String!
	
	source: String!
	label: String!
	sensitive: Boolean!
	createdAt: Instant!
}

scalar Instant

작업

mutation

deleteClipboardItems

일치하는 클립보드 기록을 삭제합니다. 모든 기록을 삭제하려면 all:true 쿼리를 명시적으로 사용하세요.

graphql
# Delete clipboard history entries matching the query DSL (`ids:` /
# `text:`; a bare word is a text LIKE). A blank query is rejected —
# send `all:true` to target everything.
mutation deleteClipboardItems($query: String!) {
  deleteClipboardItems(query: $query) { affectedCount }
}
mutation

setClipboard

기기 클립보드에 텍스트를 쓰고 해당 쓰기를 클립보드 기록에 남깁니다.

graphql
# Record caller-attributed history only after a successful system write; suppress watcher echoes.
mutation setClipboard($text: String!, $label: String!, $sensitive: Boolean!) {
  setClipboard(text: $text, label: $label, sensitive: $sensitive)
}
query

clipboardItemCount

쿼리에 일치하는 클립보드 기록 수를 셉니다.

graphql
query clipboardItemCount($query: String!) {
  clipboardItemCount(query: $query)
}
query

clipboardItems

일치하는 클립보드 기록을 최신순으로 페이지 단위로 읽습니다.

graphql
# Paged clipboard history, newest first.
query clipboardItems($query: String!, $offset: Int!, $limit: Int!) {
  clipboardItems(query: $query, offset: $offset, limit: $limit) { id text source label sensitive createdAt }
}
subscription

clipboardChanged

클립보드 변경 정보를 받습니다.

graphql
subscription clipboardChanged {
  clipboardChanged { text sensitive time }
}