You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/middleware/actions.md
+33-44
Original file line number
Diff line number
Diff line change
@@ -3,40 +3,6 @@ title: Actions
3
3
nav_order: 2
4
4
layout: default
5
5
parent: Middleware
6
-
7
-
copy:
8
-
submit_request_props: |-
9
-
`collection` -- string
10
-
> The collection of the op
11
-
12
-
`id` -- string
13
-
> The document ID
14
-
15
-
`op` -- Object
16
-
> The submitted op
17
-
18
-
`snapshot` -- [`Snapshot`]({{ site.baseurl }}{% link api/snapshot.md %})
19
-
> The snapshot
20
-
21
-
`extra` -- Object
22
-
> `extra.source` -- Object
23
-
>> The submitted source when [`doc.submitSource`]({{ site.baseurl }}{% link api/doc.md %}http://localhost:4000/api/doc#submitsource--boolean) is set to `true`
24
-
25
-
`saveMilestoneSnapshot` -- boolean
26
-
> Flag to control [saving a milestone snapshot]({{ site.baseurl }}{% link adapters/milestone.md#requesting-snapshots %})
27
-
28
-
`suppressPublish` -- boolean
29
-
> Flag to prevent broadcasting over [pub/sub]({{ site.baseurl }}{% link pub-sub.md %})
30
-
31
-
`retries` -- number
32
-
> The number of times the op has attempted to submit
33
-
34
-
`maxRetries` -- number
35
-
> The maximum number of times to retry submitting the op
36
-
37
-
`channels` -- string[]
38
-
> The [pub/sub]({{ site.baseurl }}{% link pub-sub.md %}) channels the op will publish to
39
-
40
6
---
41
7
42
8
# Middleware actions
@@ -214,28 +180,51 @@ An operation has been submitted to the server.
214
180
215
181
This action has these additional `context` properties:
216
182
217
-
{{ page.copy.submit_request_props }}
183
+
`collection` -- string
184
+
> The collection of the op
185
+
186
+
`id` -- string
187
+
> The document ID
188
+
189
+
`op` -- Object
190
+
> The submitted op
191
+
192
+
`snapshot` -- [`Snapshot`]({{ site.baseurl }}{% link api/snapshot.md %})
193
+
> The snapshot
194
+
195
+
`extra` -- Object
196
+
> `extra.source` -- Object
197
+
>> The submitted source when [`doc.submitSource`]({{ site.baseurl }}{% link api/doc.md %}#submitsource--boolean) is set to `true`
198
+
199
+
`saveMilestoneSnapshot` -- boolean
200
+
> Flag to control [saving a milestone snapshot]({{ site.baseurl }}{% link adapters/milestone.md%}#requesting-snapshots)
201
+
202
+
`suppressPublish` -- boolean
203
+
> Flag to prevent broadcasting over [pub/sub]({{ site.baseurl }}{% link pub-sub.md %})
204
+
205
+
`retries` -- number
206
+
> The number of times the op has attempted to submit
207
+
208
+
`maxRetries` -- number
209
+
> The maximum number of times to retry submitting the op
210
+
211
+
`channels` -- string[]
212
+
> The [pub/sub]({{ site.baseurl }}{% link pub-sub.md %}) channels the op will publish to
218
213
219
214
## `'apply'`
220
215
221
216
An operation is about to be applied to a snapshot, before committing.
222
217
223
-
This action has these additional `context` properties:
224
-
225
-
{{ page.copy.submit_request_props }}
218
+
This action has the same additional `context` properties as [`'submit'`](#submit).
226
219
227
220
## `'commit'`
228
221
229
222
An operation was applied to a snapshot, and is about to be committed to the database.
230
223
231
-
This action has these additional `context` properties:
232
-
233
-
{{ page.copy.submit_request_props }}
224
+
This action has the same additional `context` properties as [`'submit'`](#submit).
234
225
235
226
## `'afterWrite'`
236
227
237
228
An operation and its updated snapshot were successfully written to the database.
238
229
239
-
This action has these additional `context` properties:
240
-
241
-
{{ page.copy.submit_request_props }}
230
+
This action has the same additional `context` properties as [`'submit'`](#submit).
0 commit comments