Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Fix links in interpolated documentation #669

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 33 additions & 44 deletions docs/middleware/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,6 @@ title: Actions
nav_order: 2
layout: default
parent: Middleware

copy:
submit_request_props: |-
`collection` -- string
> The collection of the op

`id` -- string
> The document ID

`op` -- Object
> The submitted op

`snapshot` -- [`Snapshot`]({{ site.baseurl }}{% link api/snapshot.md %})
> The snapshot

`extra` -- Object
> `extra.source` -- Object
>> The submitted source when [`doc.submitSource`]({{ site.baseurl }}{% link api/doc.md %}http://localhost:4000/api/doc#submitsource--boolean) is set to `true`

`saveMilestoneSnapshot` -- boolean
> Flag to control [saving a milestone snapshot]({{ site.baseurl }}{% link adapters/milestone.md#requesting-snapshots %})

`suppressPublish` -- boolean
> Flag to prevent broadcasting over [pub/sub]({{ site.baseurl }}{% link pub-sub.md %})

`retries` -- number
> The number of times the op has attempted to submit

`maxRetries` -- number
> The maximum number of times to retry submitting the op

`channels` -- string[]
> The [pub/sub]({{ site.baseurl }}{% link pub-sub.md %}) channels the op will publish to

---

# Middleware actions
Expand Down Expand Up @@ -214,28 +180,51 @@ An operation has been submitted to the server.

This action has these additional `context` properties:

{{ page.copy.submit_request_props }}
`collection` -- string
> The collection of the op

`id` -- string
> The document ID

`op` -- Object
> The submitted op

`snapshot` -- [`Snapshot`]({{ site.baseurl }}{% link api/snapshot.md %})
> The snapshot

`extra` -- Object
> `extra.source` -- Object
>> The submitted source when [`doc.submitSource`]({{ site.baseurl }}{% link api/doc.md %}#submitsource--boolean) is set to `true`

`saveMilestoneSnapshot` -- boolean
> Flag to control [saving a milestone snapshot]({{ site.baseurl }}{% link adapters/milestone.md%}#requesting-snapshots)

`suppressPublish` -- boolean
> Flag to prevent broadcasting over [pub/sub]({{ site.baseurl }}{% link pub-sub.md %})

`retries` -- number
> The number of times the op has attempted to submit

`maxRetries` -- number
> The maximum number of times to retry submitting the op

`channels` -- string[]
> The [pub/sub]({{ site.baseurl }}{% link pub-sub.md %}) channels the op will publish to

## `'apply'`

An operation is about to be applied to a snapshot, before committing.

This action has these additional `context` properties:

{{ page.copy.submit_request_props }}
This action has the same additional `context` properties as [`'submit'`](#submit).

## `'commit'`

An operation was applied to a snapshot, and is about to be committed to the database.

This action has these additional `context` properties:

{{ page.copy.submit_request_props }}
This action has the same additional `context` properties as [`'submit'`](#submit).

## `'afterWrite'`

An operation and its updated snapshot were successfully written to the database.

This action has these additional `context` properties:

{{ page.copy.submit_request_props }}
This action has the same additional `context` properties as [`'submit'`](#submit).
Loading