Use atproto actions with ease in iOS shortcuts
at main 1.8 kB view raw
1// 2// shortcut 3// 4// Created by Bailey Townsend on 6/29/25. 5// 6 7import ATProtoKit 8import AppIntents 9import Foundation 10import UniformTypeIdentifiers 11 12//@AssistantEntity(schema: .files.file) 13//struct BlobsEntity: FileEntity { 14// 15// struct Query: EntityStringQuery { 16// func entities(for identifiers: [FilesEntity.ID]) async throws -> [FilesEntity] { [] } 17// func entities(matching string: String) async throws -> [FilesEntity] { [] } 18// } 19// 20// static var defaultQuery = Query() 21// 22// static var supportedContentTypes: [UTType] = [UTType.folder] 23// 24// var id: FileEntityIdentifier 25// 26// @Property(title: "Car File") 27// public var car: IntentFile? 28// 29// static var typeDisplayName: LocalizedStringResource = "Repo" 30// 31// static var typeDescription: LocalizedStringResource? = 32// "The CAR file of a user's repository" 33// 34// var displayRepresentation: AppIntents.DisplayRepresentation { 35// return DisplayRepresentation( 36// title: "A .CAR file") 37// } 38// 39// static var typeDisplayRepresentation: TypeDisplayRepresentation { 40// TypeDisplayRepresentation( 41// name: LocalizedStringResource("Repo", table: "AppIntents") 42// 43// ) 44// } 45// 46//} 47 48@AssistantEntity(schema: .files.file) 49struct FolderEntity: FileEntity { 50 51 struct Query: EntityStringQuery { 52 func entities(for identifiers: [FolderEntity.ID]) async throws -> [FolderEntity] { [] } 53 func entities(matching string: String) async throws -> [FolderEntity] { [] } 54 } 55 static var defaultQuery = Query() 56 57 static var supportedContentTypes = [UTType.folder] 58 var displayRepresentation: AppIntents.DisplayRepresentation { 59 "Folder Location" 60 } 61 62 var id: FileEntityIdentifier 63 64 var creationDate: Date? 65 var fileModificationDate: Date? 66}