// Module included in the following assembly:
//
// service_mesh/v2x/ossm-threescale-webassembly-module.adoc

[id="ossm-threescale-webassembly-module-operations-object_{context}"]
= The 3scale WebAssembly module operations object

Each element in the `ops` array belonging to a specific `source type` is an `operation` object that either applies transformations to values or performs tests. The field name to use for such an object is the name of the `operation` itself, and any values are the parameters to the `operation`, which could be structure objects, for example, maps with fields and values, lists, or strings.

Most `operations` attend to one or more inputs, and produce one or more outputs. When they consume inputs or produce outputs, they work with a stack of values: each value consumed by the operations is popped from the stack of values and initially populated with any `source` matches. The values outputted by them are pushed to the stack. Other `operations` do not consume or produce outputs other than asserting certain properties, but they inspect a stack of values.

[NOTE]
====
When resolution finishes, the values picked up by the next step, such as assigning the values to be an `app_id`, `app_key`, or `user_key`, are taken from the bottom values of the stack.
====

There are a few different `operations` categories:

* `decode`: These transform an input value by decoding it to get a different format.
* `string`: These take a string value as input and perform transformations and checks on it.
* `stack`: These take a set of values in the input and perform multiple stack transformations and selection of specific positions in the stack.
* `check`: These assert properties about sets of operations in a side-effect free way.
* `control`: These perform operations that allow for modifying the evaluation flow.
* `format`: These parse the format-specific structure of input values and look up values in it.

All operations are specified by the name identifiers as strings.

[role="_additional-resources"]
.Additional resources
* Available link:https://github.com/3scale/threescale-wasm-auth/blob/main/docs/operations.md[operations]
