@oxyhq/contracts 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The follow graph wire contract (`/v2/follows`).
3
+ *
4
+ * These types are the boundary between the API that owns the graph and every
5
+ * application that reads it. They live here — not in the API and not in the
6
+ * SDK — because both ends have to agree, and a shape defined on one side is a
7
+ * shape the other side re-declares slightly differently within a release or two.
8
+ *
9
+ * ## Why the state is three fields and not a boolean
10
+ *
11
+ * A user can follow something globally and turn it off in ONE application. That
12
+ * is a state the user themselves created, so the client has to be able to see
13
+ * it and say so — "following, but not shown here" is a sentence a boolean
14
+ * cannot express. `globalState`, `applicationMode` and `effectiveState` are
15
+ * therefore reported separately, and only the last one answers "does this
16
+ * appear in my feed right now".
17
+ *
18
+ * ## Why kinds are strings
19
+ *
20
+ * `FollowTargetKind` is a plain `string`, not a union. Applications register
21
+ * their own kinds at runtime (`mercaria.store`, `syra.artist`), so a union here
22
+ * would mean every new application in the ecosystem needs a release of this
23
+ * package before it can follow anything. The namespace rule is enforced by the
24
+ * database, which is the one place that can enforce it for applications this
25
+ * package has never heard of.
26
+ */
27
+ export {};