Use atproto actions with ease in iOS shortcuts
1//
2// shortcut
3//
4// Created by Bailey Townsend on 6/29/25.
5//
6
7import ATProtoKit
8import AppIntents
9import Foundation
10
11struct ListRecordsAppEntity: TransientAppEntity {
12
13 @Property(title: "Cursor")
14 public var cursor: String?
15
16 @Property(title: "Records")
17 var records: [RecordAppEntity]
18
19 var id: UUID = UUID()
20
21 static var typeDisplayName: LocalizedStringResource = "List Records"
22
23 static var typeDescription: LocalizedStringResource? =
24 "The response from a list records request. Shows the requested records along with a cursor for pagination"
25
26 var displayRepresentation: AppIntents.DisplayRepresentation {
27
28 return DisplayRepresentation(
29 title: "\(records.count) records (Cursor:\(cursor ?? "No cursor"))")
30
31 }
32
33 static var typeDisplayRepresentation: TypeDisplayRepresentation = TypeDisplayRepresentation(
34 name: LocalizedStringResource("List Records Result"))
35
36}