API 參考
分享
透過 app.capabilities 判斷功能支援,透過 app.access 和主機權限判斷存取授權。範例使用合成值;呼叫前請替換路徑、ID、輸入和篩選條件。
型別定義
graphql
type Mutation {
createShare(input: ShareInput!): Share!
deleteShare(id: ID!): Boolean!
updateShare(id: ID!, input: ShareInput!): Share!
}
type Query {
share(id: ID!): Share
shares: [Share!]!
}
scalar Instant
type Share {
id: ID!
name: String!
password: String!
expiresAt: Instant
readOnly: Boolean!
data: [SharePath!]!
url: String!
}
input ShareInput {
name: String!
password: String!
expiresAt: Instant
readOnly: Boolean!
data: [SharePathInput!]!
}
type SharePath {
virtualPath: String!
realPath: String!
isDir: Boolean!
}
input SharePathInput {
virtualPath: String!
realPath: String!
isDir: Boolean!
}