@spotto/contract 1.0.70-alpha.37 → 1.0.70-alpha.38

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.
@@ -96,7 +96,13 @@ export interface ITypeEventPropagation {
96
96
  origin: IEmbeddedEntity;
97
97
  }
98
98
  export interface ITypeEventPayload {
99
- /** Top-level keys the request set on the type; empty on a propagated write. */
99
+ /**
100
+ * The authored keys whose stored value differs between the states the
101
+ * event records (`previousTypeState` → `newTypeState`; nothing → the new
102
+ * state on a create), in authored order. Not the keys the request sent: an
103
+ * editor re-sends a whole section, and a key re-sent unchanged is no
104
+ * change. Empty on a propagated write.
105
+ */
100
106
  changed: string[];
101
107
  /** Present only on a write made by propagation from another type's edit. */
102
108
  propagation?: ITypeEventPropagation;
@@ -108,8 +114,14 @@ export interface ITypeCrudEvent extends IBaseEvent {
108
114
  assetType: IEventAssetType;
109
115
  user: IEmbeddedEntity;
110
116
  payload: ITypeEventPayload;
111
- /** `TypeUpdated` — the type's authored keys before the write (no resolved `*All` caches). */
117
+ /** `TypeUpdated` / `TypeDeleted` — the type's authored keys before the write (no resolved `*All` caches). */
112
118
  previousTypeState?: GetTypeResponse;
119
+ /**
120
+ * `TypeUpdated` / `TypeCreated` — the type's authored keys after the write,
121
+ * in the same shape. Diff the two for what changed, as `asset` and
122
+ * `previousAssetState` on an asset event.
123
+ */
124
+ newTypeState?: GetTypeResponse;
113
125
  }
114
126
  export interface IUserSearchEvent extends IBaseEvent {
115
127
  type: 'UserSearch';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotto/contract",
3
3
  "license": "ISC",
4
- "version": "1.0.70-alpha.37",
4
+ "version": "1.0.70-alpha.38",
5
5
  "description": "Spotto's API Contract type definitions",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
@@ -18,5 +18,5 @@
18
18
  "@types/geojson": "^7946.0.11",
19
19
  "shx": "^0.3.4"
20
20
  },
21
- "gitHead": "55a29affe0ebc09495a381fd90a9eb92ba0155b0"
21
+ "gitHead": "d2d597e4ba973b37359b1895ae8569ffd13de1a1"
22
22
  }