@backmatter/core 0.0.60 → 0.0.61

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backmatter/core",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "description": "Experimental Backmatter SDK. APIs will break. Not ready for production.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -41,6 +41,11 @@ export type PreviewSessionClaims = {
41
41
  role: string;
42
42
  epoch: number;
43
43
  exp: number;
44
+ /**
45
+ * `view` follows its own branch whatever the person's checkout is, and
46
+ * cannot write. Absent is a full session that follows the checkout.
47
+ */
48
+ mode?: "view";
44
49
  };
45
50
 
46
51
  export type PreviewCookiePayload = {
@@ -140,6 +145,7 @@ function asSession(value: unknown): PreviewSessionClaims | null {
140
145
  role: v.role,
141
146
  epoch: v.epoch,
142
147
  exp: v.exp,
148
+ ...(v.mode === "view" ? { mode: "view" as const } : {}),
143
149
  };
144
150
  }
145
151