{"owner":"reactioncommerce","repo":"reaction","hasSkills":true,"totalSkillsCount":66,"totalTokensCount":41105,"categories":["plugin-manifest","anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":["packages/api-core/README.md","packages/api-plugin-accounts/README.md","packages/api-plugin-address-validation-test/README.md","packages/api-plugin-address-validation/README.md","packages/api-plugin-authentication/README.md","packages/api-plugin-authorization-simple/README.md","packages/api-plugin-bull-queue/README.md","packages/api-plugin-carts/README.md","packages/api-plugin-catalogs/README.md","packages/api-plugin-discounts-codes/README.md","packages/api-plugin-discounts/README.md","packages/api-plugin-email-smtp/README.md","packages/api-plugin-email-templates/README.md","packages/api-plugin-email/README.md","packages/api-plugin-files/README.md","packages/api-plugin-fulfillment-method-pickup-store/README.md","packages/api-plugin-fulfillment-method-shipping-dynamic-rate/README.md","packages/api-plugin-fulfillment-method-shipping-flat-rate/README.md","packages/api-plugin-fulfillment-type-pickup/README.md","packages/api-plugin-fulfillment-type-shipping/README.md","packages/api-plugin-fulfillment/README.md","packages/api-plugin-i18n/README.md","packages/api-plugin-inventory-simple/README.md","packages/api-plugin-inventory/README.md","packages/api-plugin-job-queue/README.md","packages/api-plugin-job-queue/src/job-queue/README.md","packages/api-plugin-navigation/README.md","packages/api-plugin-notifications/README.md","packages/api-plugin-orders/README.md","packages/api-plugin-payments-example/README.md","packages/api-plugin-payments-stripe-sca/README.md","packages/api-plugin-payments/README.md","packages/api-plugin-pricing-simple/README.md","packages/api-plugin-pricing-simple/src/README.md","packages/api-plugin-products/README.md","packages/api-plugin-promotions-coupons/README.md","packages/api-plugin-promotions-discounts/README.md","packages/api-plugin-promotions-offers/README.md","packages/api-plugin-promotions/README.md","packages/api-plugin-sample-data/README.md","packages/api-plugin-sequences/README.md","packages/api-plugin-settings/README.md","packages/api-plugin-shipments-flat-rate/README.md","packages/api-plugin-shipments/README.md","packages/api-plugin-shops/README.md","packages/api-plugin-simple-schema/README.md","packages/api-plugin-sitemap-generator/README.md","packages/api-plugin-surcharges/README.md","packages/api-plugin-system-information/README.md","packages/api-plugin-tags/README.md","packages/api-plugin-taxes-flat-rate/README.md","packages/api-plugin-taxes/README.md","packages/api-plugin-translations/README.md","packages/api-utils/README.md","packages/api-utils/docs/README.md","packages/api-utils/docs/generateFilterQuery.md","packages/api-utils/docs/getAbsoluteUrl.md","packages/api-utils/docs/getPaginatedResponseFromAggregate.md","packages/api-utils/docs/tagsForCatalogProducts.md","packages/db-version-check/README.md","packages/file-collections-sa-base/README.md","packages/file-collections-sa-gridfs/README.md","packages/file-collections/README.md","packages/logger/README.md","packages/random/README.md","packages/reaction-error/README.md"],"skills":{"packages/api-core/README.md":"# Reaction API Core\n\nThis NPM package provides the `ReactionAPICore` class. Use this to build a NodeJS microservice that is compatible with the Reaction Commerce platform, or to build your main Reaction Commerce API if you don't want to start by forking the `https://github.com/reactioncommerce/reaction` project.\n\nIf you're just looking to run the default Reaction release with all built-in plugins for development, demos, or evaluation, use the released Docker images and the [Reaction Development Platform](https://github.com/reactioncommerce/reaction-development-platform) instead.\n\nThis NPM package also provides the `ReactionTestAPICore` class, which you can use to write automated tests that run GraphQL queries against your API with a real database connection. This class is almost identical to the `ReactionAPICore` class, except that no actual GraphQL server is created and various additional methods are available to help with common testing needs.\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Included Features](#included-features)\n- [Supported Environment Variables](#supported-environment-variables)\n- [ReactionAPICore Configuration](#reactionapicore-configuration)\n- [Plugins](#plugins)\n  - [Plugin Configuration](#plugin-configuration)\n    - [auth](#auth)\n    - [collections](#collections)\n    - [contextAdditions](#contextadditions)\n    - [expressMiddleware](#expressmiddleware)\n    - [functionsByType](#functionsbytype)\n    - [graphQL](#graphql)\n    - [mutations and queries](#mutations-and-queries)\n- [App Context](#app-context)\n- [Writing Tests Using ReactionTestAPICore](#writing-tests-using-reactiontestapicore)\n- [Developer Certificate of Origin](#developer-certificate-of-origin)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\n```sh\nnpm install @reactioncommerce/api-core graphql\n```\n\nThe `graphql` package is a required peer dependency.\n\n## Usage\n\nHere is example usage assuming Node 12.14.1 with experimental modules enabled.\n\n```js\nimport { ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport registerFooPlugin from \"reaction-plugin-foo\";\nimport Logger from \"@reactioncommerce/logger\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // Call this once per plugin.\n  await api.registerPlugin({\n    // Plugin config. See \"Plugin Configuration\" section\n  });\n\n  // Plugin packages export a function that calls `api.registerPlugin` for you, so\n  // for those you just pass `api` to the function.\n  await registerFooPlugin(api);\n\n  // Or you can register multiple at once, passing in either a function or a\n  // registration object for each.\n  await api.registerPlugins({\n    foo: registerFooPlugin,\n    another: {\n      // some plugin config\n    }\n  });\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nAlternatively, you can keep your plugin list in a JSON file:\n\n```js\nimport { importPluginsJSONFile, ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport Logger from \"@reactioncommerce/logger\";\nimport authorizationPlugin from \"@reactioncommerce/reaction-plugin-authorization\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // An optional function allows you to transform the list from the\n  // JSON (add, swap, or remove plugins) before it attempts to load the\n  // plugin modules.\n  const plugins = await importPluginsJSONFile(\"./plugins.json\", (pluginList) => {\n    pluginList.authorization = authorizationPlugin;\n\n    return pluginList;\n  });\n\n  await api.registerPlugins(plugins);\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nSample `plugins.json` file:\n\n```json\n{\n  \"accounts\": \"./core-services/account/index.js\",\n  \"address\": \"./core-services/address/index.js\",\n  \"authentication\": \"@reactioncommerce/plugin-authentication\",\n  \"authorization\": \"@reactioncommerce/plugin-simple-authorization\"\n}\n```\n\nAll relative paths are assumed to be relative to the JSON file and are assumed to be an ES module. All packages are assumed to export the plugin registration function as their default ES module export.\n\n### Included Features\n\nMost Reaction API features are released as [plugins](#plugins), but even if you never register any plugins and run your API, you'll get the following core features automatically:\n\n- A minimal GraphQL API running at `/graphql` on `ROOT_URL`, with a `ping` query, an `echo` mutation, and a `tick` subscription for testing.\n- Commonly used core GraphQL types such as `Date`, `DateTime`, `Money`, and `Rate`, as well as types related to Relay-style pagination\n- A static file server if you passed in the `serveStaticPaths` option\n- A connection to MongoDB, with improved connection retry, if the `MONGO_URL` environment variable or the `mongoDb` option was provided\n- Access to an Express app at `api.expressApp`\n\n## Supported Environment Variables\n\nThe following environment variables are picked up automatically by the `ReactionAPICore` instance.\n\n```js\n{\n  BODY_PARSER_SIZE_LIMIT: bodyParserValidator({\n    default: 5 * 1000000 // value in bytes = 5mb\n  }),\n  GRAPHQL_INTROSPECTION_ENABLED: bool({ default: false, devDefault: true }),\n  GRAPHQL_PLAYGROUND_ENABLED: bool({ default: false, devDefault: true }),\n  MONGO_URL: str({\n    devDefault: \"mongodb://localhost:27017/reaction\",\n    desc: \"A valid MongoDB connection string URI, ending with the database name\",\n    example: \"mongodb://localhost:27017/reaction\"\n  }),\n  PORT: num({\n    default: 3000,\n    desc: \"The port on which the API server should listen\",\n    example: \"8000\"\n  }),\n  REACTION_LOG_LEVEL: str({\n    choices: [\"FATAL\", \"ERROR\", \"WARN\", \"INFO\", \"DEBUG\", \"TRACE\"],\n    default: \"WARN\",\n    devDefault: \"DEBUG\",\n    desc: \"Determines how much logging you see. The options, from least to most logging, are FATAL, ERROR, WARN, INFO, DEBUG, TRACE. See: https://github.com/trentm/node-bunyan#levels\",\n    example: \"ERROR\"\n  }),\n  REACTION_APOLLO_FEDERATION_ENABLED: bool({\n    default: false,\n    desc: \"Set this to true if you need Apollo Federation support.\"\n  }),\n  REACTION_GRAPHQL_SUBSCRIPTIONS_ENABLED: bool({\n    default: true,\n    desc: \"Set this to false if you do not need GraphQL subscription support\"\n  }),\n  REACTION_SHOULD_INIT_REPLICA_SET: bool({\n    default: false,\n    devDefault: true,\n    desc: \"Automatically initialize a replica set for the MongoDB instance. Set this to 'true' when running the app for development or tests.\"\n  }),\n  ROOT_URL: str({\n    devDefault: \"http://localhost:3000\",\n    desc: \"The protocol, domain, and port portion of the URL, to which relative paths will be appended. \" +\n      \"This is used when full URLs are generated for things such as emails and notifications, so it must be publicly accessible.\",\n    example: \"https://shop.mydomain.com\"\n  })\n}\n```\n\n## ReactionAPICore Configuration\n\nThe following options can be passed in the first argument of `ReactionAPICore` when initializing an instance.\n\n- **appEvents**: See the \"Providing a Custom appEvents Implementation\" section.\n- **httpServer**: An HTTP server for GraphQL subscription websocket handlers. In most cases you should omit this and let `ReactionAPICore` create one for you.\n- **mongodb**: Optionally pass in the `mongodb` reference from `import mongodb from \"mongodb\";`. In most cases you should omit this and let `ReactionAPICore` use its own reference, but if you need to ensure a specific version is used, this allows you to do that.\n- **serveStaticPaths**: An optional array of paths (relative to your project root) that should be served as static files. Each of these is passed to [express.static()](https://expressjs.com/en/starter/static-files.html). If you need more control, you can access `api.expressApp` directly.\n- **rootUrl**: Items such as `api.rootUrl`, `context.rootUrl`, and `context.getAbsoluteUrl` are set based on this. If not provided, falls back to `ROOT_URL` environment variable.\n- **version**: Pass any valid version string. This is available to plugins as `api.version` or `context.appVersion`. This allows you to version your API as a whole (with all plugins installed and configured), which is different from the version of this `api-core` package. Use this for whatever purpose you want, but it is not required and will be `null` if you don't set a version.\n\n## Plugins\n\nThe Reaction API server has a plugin system that allows code to be broken into small packages. Plugins can register functions, configuration, and GraphQL schemas and resolvers. The sum of everything registered by every plugin is your Reaction API.\n\nIn some cases a plugin has plugins of its own or has other external components that you also need to install.\n\nA plugin need not be in a separate package. You can simply call `api.registerPlugin`, passing in any valid configuration. This may be fine for prototyping and quick tests, but we highly recommend that all plugins be published as separate NPM packages, which allows you to track and manage dependencies more easily. This does not necessarily mean they need to be published to NPM, but they must be something you can add to `package.json` and NPM will know how to install it. For example, a private GitHub repo will work.\n\nIf you publish a plugin as an NPM package, the default package export should be an async function that accepts `api` as the first argument and calls `api.registerPlugin` with all necessary configuration options.\n\n### Plugin Configuration\n\nWhether you are calling `api.registerPlugin` directly in an API project or within a plugin package, you must pass in an object that includes everything the plugin wants to make available to the core API or other API plugins. This `registerPlugin` object has a specific structure.\n\nThe two keys that every plugin will include are `name` and `label`. `name` must be unique, cannot contain spaces, and identifies your plugin; `label` is the human-readable version of your plugin name, for showing in UIs.\n\nBeyond `name` and `label`, the following standard keys can be included in your `registerPlugin` object and are described in more detail below:\n\n- `auth`\n- `collections`\n- `contextAdditions`\n- `expressMiddleware`\n- `functionsByType`\n- `graphQL`\n- `mutations`\n- `queries`\n\n#### auth\n\nPlugins can pass functions in an `auth` object, which are then used to add permission and account information to `context` for each API request.\n\n```js\nauth: {\n  accountByUserId,\n  permissionsByUserId\n}\n```\n\n- `accountByUserId`: An async function with signature `(context, userId)` that must return an account document for the given `userId`, or `null` if one cannot be found. This will be used to set `context.account` and `context.accountId`.\n- `permissionsByUserId`: An async function with signature `(context, userId)` that must return an array of permissions for the given `userId`, or `null` if no permission list can be generated. This is available for each API request as `context.userPermissions`.\n\nSee also the \"getHasPermissionFunctionForUser\" functionsByType.\n\n#### collections\n\nTo create any non-core MongoDB collection that a plugin needs, use the `collections` option:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\"\n  }\n}\n```\n\nThe `collections` object key is where you will access this collection on `context.collections`, and `name` is the collection name in MongoDB. We recommend you make these the same if you can.\n\nThe example above will make `context.collections.MyCustomCollection` available in all query and mutation functions, and all functions that receive `context`, such as startup functions. Note MongoDB may not actually create the collection until the first time you insert into it.\n\nYou can optionally add indexes for your MongoDB collection:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    indexes: [\n      [{ referenceId: 1 }, { unique: true }]\n    ]\n  }\n}\n```\n\nEach item in the `indexes` array is an array of arguments that will be passed to the Mongo `createIndex` function. The `background` option is always set to `true` so you need not include that.\n\nThere is also experimental support for defining validation options. Add `validator`, `validationLevel`, or `validationAction` options and they will be passed along to the MongoDB library. Refer to [their createCollection documentation](http://mongodb.github.io/node-mongodb-native/3.6/api/Db.html#createCollection).\n\nThere is also a convenience syntax that allows you to pass a JSONSchema directly. This:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    jsonSchema: someJsonSchema\n  }\n}\n```\n\nIs shorthand for this:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    validator: {\n      $jsonSchema: someJsonSchema\n    }\n  }\n}\n```\n\nNOTE: Registering your collections is not required, and in fact it is probably best to NOT register them unless you need to allow other plugins to access your data directly. As long as you do not register them, they remain a private implementation detail that you are free to change without breaking other plugins.\n\n#### contextAdditions\n\nA plugin can add properties to context using the `contextAdditions` option. They are added before any `preStartup` or `startup` functions are run.\n\n```js\ncontextAdditions: {\n  something: \"wicked\"\n}\n```\n\n```js\n// in startup fn or anywhere you have context\nconsole.log(context.something); // \"wicked\"\n```\n\n#### expressMiddleware\n\nPlugins can register Express middleware using the `expressMiddleware` option:\n\n```js\nexpressMiddleware: [\n  {\n    route: \"graphql\",\n    stage: \"authenticate\",\n    fn: tokenMiddleware\n  }\n]\n```\n\nFor now, only the \"graphql\" route is supported, and the following stages are supported in this order:\n\n- `first`\n- `before-authenticate`\n- `authenticate`\n- `before-response`\n\nAn `authenticate` middleware function should do something like look up the user by the Authorization header, and either set `request.user` or send a 401 response if the token is invalid. It should not require a token.\n\nThe `first` middleware stage can be used for loggers or anything else that needs to be first in the middleware list. `before-response` middleware will have the user available if there is one, and is called before the Apollo GraphQL middleware.\n\nA middleware function is passed `context` and must return the Express middleware handler function, which must call `next()` or send a response.\n\n#### functionsByType\n\nThe `functionsByType` object is a map of function types to arrays of functions of that type. This pattern can be used by any plugin to allow any other plugin to register certain types of functions for plugin points.\n\nDocumentation for individual plugins will tell you how to use this for that plugin, but there are also a few core types that any plugin might want to use:\n\n- createDataLoaders\n- getHasPermissionFunctionForUser\n- preStartup\n- registerPluginHandler\n- startup\n- shutdown\n\nLook at built-in plugins for examples of these, and read [How To: Share Code Between API Plugins](https://docs.reactioncommerce.com/docs/how-to-share-code-between-plugins) for more information.\n\n#### graphQL\n\nUse the `graphQL` object to register schemas and resolvers that extend the core GraphQL API.\n\nMore information:\n\n- [How To: Create a new GraphQL mutation](https://docs.reactioncommerce.com/docs/graphql-create-mutation)\n- [How To: Create a new GraphQL query](https://docs.reactioncommerce.com/docs/graphql-create-query)\n- [How To: Extend GraphQL to add a field](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-to-add-field)\n- [How To: Extend GraphQL with Remote Schema Delegation](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-with-remote-schema)\n\n#### mutations and queries\n\nThe `mutations` and `queries` objects are maps of functions that are extended onto `context.mutations` and `context.queries`. These may be functions that are called from GraphQL resolvers of a similar name, or functions that are intended to be called only by other plugin code. Functions that modify data should be registered as `mutations` and all other functions should be registered as `queries`.\n\n## App Context\n\nApollo Server passes a `context` object to every GraphQL resolver. By convention, plugins pass this down as the first argument to all internal query, mutation, and util functions, too. We refer to this as the app context, and many different things live on it. It is the primary way that functions and other information are shared among plugins.\n\nThere are two types of properties on the app context: instance properties and request properties. Most properties are instance properties; they are set when you initialize a `ReactionAPICore` instance or when you register a plugin, and they do not change while the API is running. A few other properties are added to the context at the start of every request that comes in, and these are the request properties.\n\nInstance properties:\n\n- `app`: The `ReactionAPICore` instance that owns this context. (Note that `api.context.app` is a circular reference.)\n- `appEvents`: A simple event mechanism with `on` and `emit` properties. This allows event-based communication among plugins. Unlike Node's built-in `EventEmitter`, `appEvents.on` functions may return Promises and `appEvents.emit` may be awaited in situations where you want to be sure all event listeners have handled the event before continuing.\n- `appVersion`: A string set to whatever the `version` option is when creating the `ReactionAPICore` instance\n- `collections`: An object with references to [MongoDB collections](http://mongodb.github.io/node-mongodb-native/3.5/api/Collection.html), built by any plugins that register collections. Allows direct access to collections from various plugins even if only one plugin \"owns\" that collection.\n- `getInternalContext`: A function that takes no arguments and returns a context with all authentication and authorization mocked to allow anything. Useful when you need to pass down context to another query or mutation but circumvent its normal authorization checks.\n- `getFunctionsOfType`: A function that takes one argument, a type string, and returns an array of all functions that were registered with that type. This is a simple way that plugins can share functions with other plugins for specific purposes\n- `mutations` and `queries`: These objects have references to all functions that plugins have registered in their own `mutations` and `queries` objects, when calling `registerPlugin`. If multiple plugins have mutations or queries with the same name, the last plugin to be registered will win (unlike `getFunctionsOfType` where multiple functions may be registered).\n- `rootUrl`: The root URL string, from `rootUrl` instance option or `ROOT_URL` environment variable\n- `getAbsoluteUrl`: A function that is bound to `rootUrl`, for easy conversion of a relative URL to one that is absolute and begins with `rootUrl`.\n\nThere may be additional instance properties if any plugins have added them using the `contextAdditions` option for `registerPlugin`. Refer to documentation for individual plugins.\n\nRequest properties:\n\n- `user`: The User document for the user who made the request. This is set to the Express `request.user` property, which any plugin can set by registering request middleware.\n- `userId`: If `user` is set, this will be the `user._id`, for convenience.\n- `account`: If `context.auth.accountByUserId` is a function and `context.user` is set, `accountByUserId` will be called for the request, and the return value will be available as `context.account`. The `user` is a generic authentication document for OAuth, whereas `account` is a Reaction-specific concept where additional information about each user is tracked.\n- `accountId`: If `account` is set, this will be the `account._id`, for convenience.\n- `userPermissions`: If `context.auth.permissionsByUserId` is a function, it will be called with `(context, userId)` arguments, and the return value is available as `context.userPermissions`.\n- `userHasPermission`: A function that you can call to determine whether a user has needed permissions. It calls any functions registered as type `getHasPermissionFunctionForUser`, passing in `context`, and then calls the function returned by each. Returns `true` only if every registered function returns `true`.\n- `validatePermissions`: Calls `userHasPermission` and throws an Access Denied error if it returns `false`.\n- `requestHeaders`: An object with all HTTP headers for the current request on it, except with `Authorization` and `Cookie` headers removed for security.\n\nYou can always access the app context on `api.context` if you have a reference to the `api` instance, but this will never have any request properties set because there is no request happening.\n\n## Providing a Custom appEvents Implementation\n\n`context.appEvents` is available to all plugins and is used for communication among plugins. The built-in implementation of this is not highly optimized, but you may provide your own implementation to meet your needs.\n\nTo override the built-in `appEvents` with your own, pass `appEvents` option when constructing your API instance. The provided object must have 4 function properties named `emit`, `on`, `stop`, and `resume`. Here's an example:\n\n```js\nconst appEvents = {\n  async emit(name, ...args) {},\n  on(name, func) {},\n  stop() {},\n  resume() {}\n};\n\nconst api = new ReactionAPICore({ appEvents });\n```\n\n- `stop` should stop emission and `resume` should resume emission. Neither takes any arguments.\n- `emit`:\n  - `emit` may or may not return a Promise, but either way the final returned value must be `undefined`\n  - When emission is stopped, `emit` should do nothing\n  - When emission is not stopped, `emit` should call each handler registered by `on` one by one. If a handler returns a Promise, wait until it resolves or rejects before calling the next handler. `emit` itself should not resolve or reject until all handlers have been called and have resolved or rejected.\n  - Any additional `args` passed to `emit` should be passed along to each handler function.\n- `on` registers a handler function to be called by `emit`.\n- Handlers are called only after they are registered. Any events emitted prior to registering a handler are never handled by that handler.\n\n## Writing Tests Using ReactionTestAPICore\n\nRefer to [Writing Jest Integration Tests](https://docs.reactioncommerce.com/docs/writing-jest-integration-tests).\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing-off all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign-off your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real full name (please no anonymous contributions or pseudonyms) and a real email address. By signing-off your commit you are certifying that you have the right to submit it under the [GNU GPLv3 License](./LICENSE.md).\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO sign-offs of every commit.\n\nIf you forget to sign-off your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction package is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-accounts/README.md":"# api-plugin-accounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-accounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-accounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-accounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-accounts)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nAccounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n","packages/api-plugin-address-validation-test/README.md":"# api-plugin-address-validation-test\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation-test.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation-test)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test)\n\n## Summary\n\nAddress Validation Test plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-address-validation/README.md":"# api-plugin-address-validation\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation)\n\n## Summary\n\nAddress Validation plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-authentication/README.md":"# api-plugin-authentication\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authentication.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authentication)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authentication.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authentication)\n\n## Summary\n\nThis plugin provides Authentication middleware for the Reaction API. It relies on token based authentication.\nUtils included in this plugin help connect the [Account-js](https://www.accountsjs.com/) library and the Reaction API via an Auth Token.\n\n## How it works\n\nThis plugin registers the schema and resolvers that are required by account-js.\n\nA express middleware is added whose job is to extract the `Authorization` header from the request and uses account-js to get the user for that token. The format should be `Authorization: Bearer <YOUR_ACCESS_TOKEN>`. Then the user is attached to the `req` object.\n\nA function is added to `functionByType.graphQLContext` which links the graphQL context used in the api-core with the \"internal context\" used by account-js. This is needed because account-js also keeps tracks of the tokens and uses a separate GraphQL server.\n\n## Supported actions\n\n1. Signup\n2. Login\n3. Change Password\n4. Forgot Password - A email is sent with a reset token url of the form `https://<STORE_URL>/?resetToken=<token>`\n\n## Environment Variables:\n\n| Variable Name | Description                                                                                                                     | Default Value           |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |\n| STORE_URL     | This is the public link to the storefront (used to redirect)                                                                    | `http://localhost:4000` |\n| MONGO_URL     | MongoDB used to store session & tokens                                                                                          | None                    |\n| TOKEN_SECRET  | [secret](https://www.accountsjs.com/docs/api/server/interfaces/accountsserveroptions#tokensecret) used while creating the token | `UPDATE_THIS_SECRET`    |\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nCopyright 2020 Reaction Commerce\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","packages/api-plugin-authorization-simple/README.md":"# api-plugin-authorization-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authorization-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authorization-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple)\n\n## Summary\n\nThis plugin checks authorization in the Reaction API.\n\nAuthorization is determined by one primary function, `validatePermissions`, which is added onto the `context`. If permissions are valid, nothing will happen when this function is called. If permissions are invalid, this call will throw an `\"Access Denied\"` error.\n\nA secondary function, `userHasPermission`, is also available on the `context`. This will provide a boolean value of the permission status.\n\n`validatePermissions` is our preferred method.\n\n## Usage\n\n`permissions` are attached to account `Groups`, initially by being copied from [defaultRoles.js](https://github.com/reactioncommerce/reaction/blob/trunk/src/core-services/account/util/defaultRoles.js) on startup. Each account can belong to as may groups as needed (including not belonging to any group), and is granted *all* `permissions` from *all* the groups they belong to. This package provides the function `permissionsByUserId` which does the work to build a list of all the `permissions` the user is granted.\n\n### Checking permissions\n\nThe `validatePermissions` function (and `userHasPermission`) takes three parameters: `resource`, `action`, and `context`. For example, this call is checking to see if the current user has permission to `cancel an item` on this particular order:\n\n```js\nawait context.validatePermissions(`reaction:legacy:orders:${order._id}`, \"cancel:item\", {\n  shopId: order.shopId,\n  owner: order.accountId\n});\n```\n\n#### Resource\n\nResource is the name of the resource a user is trying to access. This consists of three required pieces: `organization`, `system`, `entity`; and one optional field: `id`.\n\nFor our purposes in Reaction code:\n\n- `organization` will always be `reaction`.\n- `system` is the service or group of services that provide the resource we want to access control. It will always be `legacy` if the code lives within the Reaction API project, and will be the package name (i.e. `simple-authorization`) if the code live outside of the Reaction API project.\n- `entity` is the actual data entity to access control, such as an `orders`. Entity names are always plural.\n- `id`  is the actual ID of a data entity to access control. This is for super granular Policies and will most of the time be omitted or described with just a * meaning \"all IDs\".\n\n#### Action\n\nThe action the user would like to preform. This can be anything, but we recommend sticking short, intentional words, which can be package-spaced if desired. For example, `create`, `read`, `update`, `delete`, and `publish` are all great actions. If you need more context, `remove:addressBook` would be a good name for the permission to remove `addressBooks` from an `account`, but not have `remove` privileges on the entire `account`.\n\n#### Context\n\nContext is used to pass any extra information to the permissions check. We use it primarily for two things at this time:\n\n1. We pass `shopId` in the context (somtimes referred to as `ketoContext`) everywhere it's avaialble\n1. We pass `owner` into the context anywhere where a regular, non-admin user is allowed permissions to something they themselves own. For example, on an order they placed, they will have `owner` permissions on that particular order.\n\n## Under the hood\n\n- `userHasPermission` is built from `getHasPermissionFunctionForUser`, which is registered to `context` as a `functionsByType` in its respective package, and called `userHasPermission` on `context` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L28-L42)). This plugin will work alongside any other authorization plugin registered in the same way.\n\n- `validatePermissions` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L46-L49)), is created from the value of `context.userHasPermission`, If `userHasPermissions === true`, `validatePermissions` does nothing, and lets the rest of the function continue to run. If `userHasPermission === false`, `validatePermissions` throws an `Access Denied` error.\n\n## Using this package\nImport this package into the [registerPlugins.js](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/registerPlugins.js) file in the Reaction API, and then await its `registerPlugin` function:\n\n```js\nimport registerSimpleAuthorizationPlugin from \"@reactioncommerce/api-plugin-authorization-simple/index.js\";\nawait registerSimpleAuthorizationPlugin(app);\n```\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-bull-queue/README.md":"# api-plugin-bull-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-bull-queue.svg)](https://www.npmjs.\ncom/package/@reactioncommerce/api-plugin-bull-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-bull-queue.svg?style=svg)](https://circleci.\ncom/gh/reactioncommerce/api-plugin-bull-queue)\n\n## Summary\n\nJob Queue plugin Based on [Bull](https://www.npmjs.com/package/bull) for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\nThe current API includes just 4 commands:\n\n`createQueue` - Which creates a job queue, assigns a processor to it and adds the queue to the context to it's \naccessible everywhere\n\n`addJob` - Allows you to add a job to the queue. You can see an example of this in the include email plugin\n\n`scheduleJob` - Allows you to schedule repeating job using cron syntax. You can see an example of \nthis in the Promotions plugin.\n\n`addDelayedJob` - Similar to `addJob` but just allows you to delay the job by a number of ms.\n\n[Many more commands](https://github.com/OptimalBits/bull/blob/HEAD/REFERENCE.md) are available if you have an instance of the queue\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2022 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-carts/README.md":"# api-plugin-carts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-carts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-carts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-carts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-carts)\n\n## Summary\n\nCarts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-catalogs/README.md":"# api-plugin-catalogs\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-catalogs.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-catalogs)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs)\n\n## Summary\n\nCatalogs plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-discounts-codes/README.md":"# api-plugin-discounts-codes\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts-codes.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts-codes)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n\n## Summary\n\nDiscount Codes plugin for the Reaction API\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-discounts/README.md":"# api-plugin-discounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n## Summary\n\nDiscounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-email-smtp/README.md":"# api-plugin-email-smtp\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-smtp.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-smtp)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp)\n\n## Summary\n\nSMTP Email plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-email-templates/README.md":"# api-plugin-email-templates\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-templates.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-templates)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates)\n\n## Summary\n\nEmail Templates plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-email/README.md":"# api-plugin-email\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email)\n\n## Summary\n\nEmail plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-files/README.md":"# api-plugin-files\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-files.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-files)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-files.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-files)\n\n## Summary\n\nFiles plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","packages/api-plugin-fulfillment-method-pickup-store/README.md":"# api-plugin-fulfillment-method-pickup-store\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-pickup`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesPickupStore - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Store\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/collectStoreDetails - dummy function to simulate api providing store specific info while returning quotes.\n* util/validateOrderMethodsPickupStore - dummy function to simulate store specific validations. Called by prepareOrder.js\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-method-shipping-dynamic-rate/README.md":"# api-plugin-fulfillment-method-shipping-dynamic-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingDynamicRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Dynamic Rate\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/calculateDynamicRateRate - dummy function to simulate api providing dynamic rate specific info while returning quotes.\n* util/validateOrderMethodsDynamicRate - dummy function to simulate dynamic rate specific validations done. Called by prepareOrder.js\n\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-method-shipping-flat-rate/README.md":"# api-plugin-fulfillment-method-shipping-flat-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingFlatRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to FlatRate (dummy and can be changed)\n* create/update/delete FlatRateFulfillmentMethods\n* create/update/delete FlatRateFulfillmentRestrictions\n* getFlatRateFulfillmentMethod(s) - deprecated\n* getFlatRateFulfillmentRestriction(s) - deprecated\n* flatRateFulfillmentMethod(s)\n* flatRateFulfillmentRestriction(s)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-type-pickup/README.md":"# api-plugin-fulfillment-type-pickup\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like pickup-store). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (pickup) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'pickup' as a ff-type via registeredFulfillmentTypes: [\"pickup\"]\n* Inserts the default entry for pickup ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-type-shipping/README.md":"# api-plugin-fulfillment-type-shipping\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like flat-rate-shipping, dynamic-rate-shipping etc). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (shipping) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'shipping' as a ff-type via registeredFulfillmentTypes: [\"shipping\"]\n* Inserts the default entry for shipping ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment/README.md":"# api-plugin-fulfillment\n\nThis is the base fulfillment plugin which would enable other fulfillment types (like shipping, pickup, digital) and fulfillment-methods (like shipping, store, download etc) to be introduced via their own separate plugins. This plugin provides the common functionalities required for implementing fulfillment.\n\nEach of the newly introduced fulfillment type plugin would need to have the specific fulfillment methods also to be added as separate plugins. Example, fulfillment type 'pickup' could have fulfillment methods like 'store pickup' and 'curb-side pickup' and each of them would be separate plugins.","packages/api-plugin-i18n/README.md":"# api-plugin-i18n\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-i18n.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-i18n)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-i18n.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-i18n)\n\n## Summary\n\ni18n plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","packages/api-plugin-inventory-simple/README.md":"# api-plugin-inventory-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple)\n\n## Summary\n\nSimple Inventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-inventory/README.md":"# api-plugin-inventory\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory)\n\n## Summary\n\nInventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-job-queue/README.md":"# api-plugin-job-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-job-queue.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-job-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue)\n\n## Summary\n\nJob Queue plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-job-queue/src/job-queue/README.md":"The files in this folder are a rewrite of the @reactioncommerce/job-queue package with an almost identical API but no Meteor dependencies. This is not expected to be the final solution for background jobs in Reaction, but it is a temporary solution that works fairly well for now.\n","packages/api-plugin-navigation/README.md":"# api-plugin-navigation\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-navigation.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-navigation)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-navigation.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-navigation)\n\n## Summary\n\nThis plugin provides Navigation Item and Navigation Tree `mutations` and `queries` for the Reaction API.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-notifications/README.md":"# api-plugin-notifications\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-notifications.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-notifications)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-notifications.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-notifications)\n\n## Summary\n\nNotifications plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-orders/README.md":"# api-plugin-orders\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-orders.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-orders)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-orders.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-orders)\n\n## Summary\n\nOrders plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-payments-example/README.md":"# api-plugin-payments-example\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments-example.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments-example)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments-example.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments-example)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nExample Payments plugin for the Reaction API\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-payments-stripe-sca/README.md":"# api-plugin-payments-stripe-sca\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments-stripe-sca.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments-stripe-sca)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments-stripe-sca.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments-stripe-sca)\n\n## Summary\n\nStripe Payments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction) with support for SCA-compliant Stripe Payment Intents API\n\n### Usage\n\n1. Set the `STRIPE_API_KEY` environment variable in reaction API .env file with the private API key from Stripe.\n2. Set the `STRIPE_PUBLIC_API_KEY` environment variable in the example-storefront .env file with the public API key from Stripe.\n3. Restart containers.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2021 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.","packages/api-plugin-payments/README.md":"# api-plugin-payments\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nPayments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-pricing-simple/README.md":"# api-plugin-pricing-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-pricing-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-pricing-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-pricing-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-pricing-simple)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSimple Pricing plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-pricing-simple/src/README.md":"# Simple Pricing\n\nPricing data falls under it's own domain within the Reaction Commerce system, however it currently needs to be intertwined and available from other system domains (i.e., Catalog, Cart, Checkout, Orders). To give us more flexibility in pricing data management we've begun to move pricing get/set functions into this `simple-pricing` plugin and calling these functions from the `context.queries` object from within their respective functions. Now we can fully replace the pricing management system without modification to core by creating a custom plugin that replaces the `simple-pricing` queries.\n\n## Queries\n\nAny pricing plugin is expected to define and register the following query functions.\n\n### getVariantPrice\n\nThis query function is used to get a product variant's real current price.\n","packages/api-plugin-products/README.md":"# api-plugin-products\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-products.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-products)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-products.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-products)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nProducts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n### Example on how to use Filter Conditions\n\nWe have a query endpoint defined in this plugin which allows us to query products collection based on the input GraphQL conditions object. This query endpoint is defined as `filterProducts.js` and it calls the `generateFilterQuery` function from the `api-utils` plugin to generate the MongoDB filter query.\n\nThe `generateFilterQuery` function expects the input GraphQL conditions object to be in the format of the `FilterConditionsInput` input type defined in the GraphQL Schemas (in api-core plugin) along with other parameters like `context`, `collectionName` and `shopId`.\n\nPlease go through a general introduction of how to use this function which can be found in the [api-utils README](https://github.com/reactioncommerce/reaction/tree/trunk/packages/api-utils/docs) before going through the examples below on how to use this function in the context of the `products` plugin.\n\nIn the query endpoint, we pass the `FilterConditionsInput` input type object as the `conditions` argument. This object is passed to the `generateFilterQuery` function along with other parameters like `context`, `collectionName` and `shopId` to generate the MongoDB filter query. The `generateFilterQuery` function is generic and can be used to generate filter queries for any collection. Since the parametes like `context`, `collectionName` and `shopId` are pretty self-explanatory, we shall focus on explaining the various ways in which the `conditions` object can be used.\n\n1. Single condition.\nHere we are querying products collection for entries with the handle as 'mens-waterproof-outdoor-rain-jacket'. Since it is single condition, using either `all` or `any` will not make difference. \n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n<br>\n\n2. Two conditions.\n\nHere we are querying products collection for entries which have either the handle as 'mens-waterproof-outdoor-rain-jacket' or 'title' begins with the text 'men'. Since we are using the `any` to connect the conditions, it translates to a mongo DB `$or` condition. Please note that the top level `all` condition is only to maintain the structure of the input GraphQL conditions object. It does not impact the results of the inner query.\n\n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }, \n            {\n              key: \"title\",\n              stringValue: \"men\",\n              relationalOperator: beginsWith,\n              logicalNot: false\n              caseSensitive: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n<br>\n\n3. Multiple conditions.\n\nHere we are querying products collection for entries which confirms to multiple conditions.\nWe have 3 distinct group of conditions in the inner level and the results of all these 3 are joined at the top level with `all` meaning `$and` in MongoDB.\n\nThe first group looks for entries matching either of the conditions `handle` as 'mens-waterproof-outdoor-rain-jacket' or `title` begins with the text 'men'. Since we are using the `any` to connect the conditions, it translates to a mongo DB `$or` condition.\n\nThe second group looks for entries matching the `_id` in the array `[\"DZwLHk4EAzitRni8F\", \"Hn4BRaBvLkYffMq36\"]` and `isDeleted` as `false` and `workflow.status` as `new`. Since we are using the `all` to connect the conditions, it translates to a mongo DB `$and` condition.\n\nThe third group looks for entries matching the `price.min` greater than 19.99 and `type` as `simple`. Since we are using the `all` to connect the conditions, it translates to a mongo DB `$and` condition.\n\nAs explained above, the final results are joined at the top level with `all` meaning `$and` in MongoDB.\n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }, \n            {\n              key: \"title\",\n              stringValue: \"men\",\n              relationalOperator: beginsWith,\n              logicalNot: false\n              caseSensitive: false\n            }\n          ]\n        },\n        {\n          all:[\n            {\n              key: \"_id\",\n              stringArrayValue: [\"DZwLHk4EAzitRni8F\", \"Hn4BRaBvLkYffMq36\"],\n              relationalOperator: in,\n              logicalNot: false\n            },\n            {\n              key: \"isDeleted\",\n              booleanValue: false,\n              relationalOperator: eq,\n              logicalNot: false\n            },\n            {\n              key: \"workflow.status\",\n              stringValue: \"new\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        },\n        {\n          all:[\n            {\n              key: \"price.min\",\n              floatValue: 19.99,\n              relationalOperator: gte,\n              logicalNot: false\n            },\n            {\n              key: \"type\",\n              stringValue: \"simple\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-promotions-coupons/README.md":"## Promotions-Coupons\n\nA plugin that allows you to create promotions \"coupons\" which can trigger any \"action\"\n\n","packages/api-plugin-promotions-discounts/README.md":"# api-plugin-promotions-discounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-promotions-discounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-promotions-discounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-promotions-discounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-promotions-discounts)\n\n## Summary\n\nDiscounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-promotions-offers/README.md":"## Promotions-Offers\n\nA plugin that allows you to create promotions \"offers\" which can trigger any \"action\"\n\n","packages/api-plugin-promotions/README.md":"## Promotions\n\nThe base plugin for promotions\n\n","packages/api-plugin-sample-data/README.md":"# api-plugin-sample-data\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-example.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-example)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-example.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-example)\n\n## Summary\n\nThis plugin loads the database with sample data that gives the user an idea of how the Storefront would appear with the basic details. The data would also appear in the AdminUI. The sample data includes Account (default admin account), Shop data (includes basic shop data, sample shipping, sample payment), Product data (including variants and images), Tags & Navigation. Instructions to add additional data are also provided below.\n\n#### Where is the sample data stored?\nAll of the initial set of data required by this plugin is present in the `/src/json-data` folder within this plugin. All files are in JSON format.\n\nAdditionally, we have the image files for the products stored in `/src/images` folder.\n#### How to load the default sample data?\nThis plugin has to be explicitly added to your API and configured to load in the initial start-up. Apart from including this plugin, the other pre-requisites are:\n* The LOAD_SAMPLE_DATA flag should be set to true in the .env file in the root API folder. Add a line `LOAD_SAMPLE_DATA=true`\n* There should not be any existing Shop in the database\n\nIf any of the above two conditions turns out to be false, this plugin exits without making any changes to the database.\n\nAt this stage, the database is populated with the initial sample data and you may tweak around with it from the Admin UI. You may add new products, tags, navigation etc from the Admin UI as usual. But in case you want some additional data to be prepopulated along with the provided sample data, then you may follow the below steps to update the JSON files to include the additional data.\n\n#### How to add additional data? \nFor the purpose of the sample data, we are confining our requirement to a single account and shop. The details of the account and the shop are present in the following json files and are customizable (`/src/json-data/Accounts.json`, `/src/json-data/users.json` and `/src/json-data/Shops.json`). Also, the default shipping method is added via `/src/json-data/ShippingMethod.json`.\n\nAs for the remaining items (Products, Images, Tags, Navigation), let us walk through the steps to add them.\n\nLet us add the Tag details first as this will be required before we publish the products.\n\n##### 1. Adding a new Tag\nSample json for a new Tag is provided below. Please make a note of the object's key (menJacket) and the slug (men-jacket), as they will be used later in this plugin. Also the _name_ and _displayTitle_ is what the user would see in the UI as the bread-crumbs and title.\n\n```\n  \"menJacket\": {\n    \"name\": \"Men's Jacket\",\n    \"slug\": \"men-jacket\",\n    \"displayTitle\": \"Men's Jackets\",\n    \"shopId\": \"\",\n    \"isVisible\": true\n  }\n```\nOnce the new tag is present in the Tags.json, we would need to modify the `/src/loaders/loadTags.js` to create an entry (similar to the one below) corresponding to the newly added tag. Here we have hard-coded the variable 'menJacket' to match the property key that we used above to create the tag.\n\n`\n  tagOutput.menJacket = await context.mutations.addTag(context.getInternalContext(), TagsData.menJacket);\n`\n\nThe tag objects output from the `loadTags.js` is used later in the `loadProducts.js` to associate the products with the tags. For the association to happen, we need to create an entry in the `/src/json-data/TagProductMapping.json` also and this will be mentioned in the below section where we add products.\n\n##### 2. Adding new Products\n* For this sample-data plugin, we are considering products that have variants under them and in some examples we have one or more options under these variants. \n* The top level product will have `type: 'simple'` and also the ancestors property will be an empty array. \n* The variants and the options under the variants (if any) will have `type: 'variant'` and the ancestors property will be an array of productIds that defines the hierarchy of the Product.\n\nThe sample entry that we are adding now will be a top-level product (say Jacket), with variants categorized by 'Color' and 'Size'. Example, we will have:\n```\nJacket\n|\n+-- Black (Color)\n|   |\n|   +-- Small (Size)\n|   +-- Large (Size)\n|\n+-- Blue (Color)\n    |\n    +-- Small (Size)\n    +-- Medium (Size)\n```\n\n_Special-case: 'price' property._\n\nThe 'price' property of leaf-level products would be of type 'Number' which contains the actual price of the product. The 'price' property will be an object for all the higher levels of the specific product (basically the top-level and all other variants). This object would contain properties such as range, max, min. This is to capture the max, min, and range of price values of all the products under that level.\n\nIn case of this sample data, for product entries of `type: 'simple'` we add price as an object. For product entries of `type: 'variant'` we shall insert price as a Number. Later, the 'afterVariantUpdate' event which is triggered inside this plugin will transform all the 'price' properties from Number to Object for those entries which are not leaf-level.\n\n\n###### 2.a. Adding top-level product\nHere is a sample json to add a new top-level product (Comments are only for additional info and must be removed before using this template).\n\n```\n{\n    \"_id\": \"DZwLHk4EAzitRni8F\",    // provide NEW productId\n    \"ancestors\": [],              // empty for top-level\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:01:34.445+0000\"\n    },\n    \"handle\": \"mens-jacket\",\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"\",       // this will be updated by the plugin dynamically\n    \"shouldAppearInSitemap\": true,\n    \"supportedFulfillmentTypes\": [\n      \"shipping\"\n    ],\n    \"title\": \"Men's Jacket\",\n    \"type\": \"simple\",         // 'simple' for top-level product\n    \"updatedAt\": {\n      \"$date\": \"2022-01-21T16:53:32.010+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": {               // price as object for top-level\n      \"range\": \"49.99\",\n      \"min\": 49.99,\n      \"max\": 49.99\n    },\n    \"description\": \"Our new rain jacket is crafted with outdoor-inspired details in a city-ready package. Constructed in a durable three-layer waterproof stretch nylon fabric, our rain jacket will be your first line of defense against the elements.\",\n    \"originCountry\": \"US\",\n    \"currentProductHash\": \"3f262d57850e31fbccd2a6eb6a1bb92b1328a327\",\n    \"facebookMsg\": \"Share our listing wth your friends on facebook using the link below www.facebook.com/mens-waterproof-outdoor-rain-jacket\",\n    \"pinterestMsg\": \"Share our listing wth your friends on pinterest using the link below www.pinterest.com/mens-waterproof-outdoor-rain-jacket\",\n    \"twitterMsg\": \"Share our listing wth your friends on twitter using the link below www.twitter.com/mens-waterproof-outdoor-rain-jacket\",\n    \"pageTitle\": null,\n    \"vendor\": \"Reaction Outdoor Apparel\",\n    \"publishedAt\": {\n      \"$date\": \"2022-01-21T16:53:32.010+0000\"\n    },\n    \"publishedProductHash\": \"3f262d57850e31fbccd2a6eb6a1bb92b1328a327\",\n    \"hashtags\": []\n  }\n```\n\n###### 2.b. Adding Variants entries\nSample json for adding the variants 'Color' (entries Black & Blue). Please notice the _attributeLabel_ and _optionTitle_ properties. Also the ancestors property has the productId of the top-level product.\n(Comments are only for additional info and must be removed before using this template)\n```\n  {\n    \"_id\": \"Hn4BRaBvLkYffMq36\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level\n      \"DZwLHk4EAzitRni8F\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:01:34.457+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-05T15:17:49.155+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"isTaxable\": true,\n    \"attributeLabel\": \"Color\",\n    \"height\": 18,\n    \"length\": 10,\n    \"optionTitle\": \"Black\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black\",\n    \"weight\": 2.5,\n    \"width\": 6,\n    \"compareAtPrice\": 24.99,\n    \"taxCode\": \"USCA\",\n    \"taxDescription\": \"California Tax\"\n  },\n  {\n    \"_id\": \"ynNA5rXKZCHF2uKjq\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level\n      \"DZwLHk4EAzitRni8F\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:38:57.021+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-05T15:39:37.646+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"isTaxable\": true,\n    \"attributeLabel\": \"Color\",\n    \"height\": 15,\n    \"length\": 17,\n    \"optionTitle\": \"Blue\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue\",\n    \"weight\": 2.5,\n    \"width\": 13,\n    \"compareAtPrice\": 24.99\n  }\n```\n###### 2.c. Adding Leaf-level entries\nSample json for adding leaf-level entries under Color-Black with variant type as Size (values Small, Large etc). The 1st entry in the ancestors property is the top-level product and the 2nd entry is the variant with Color = Black (\"Hn4BRaBvLkYffMq36\"). Please notice the _attributeLabel_ and _optionTitle_ properties. \n(Comments are only for additional info and must be removed before using this template)\n\n```\n  {\n    \"_id\": \"4JS386GgmvrxgyooS\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"Hn4BRaBvLkYffMq36\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:50:33.008+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:54:56.478+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Small\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black Small\",\n    \"weight\": null,\n    \"width\": null\n  },\n  {\n    \"_id\": \"MShhiNKGYqyR68ZF7\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"Hn4BRaBvLkYffMq36\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:51:11.147+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:54:58.299+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Large\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black Large\",\n    \"weight\": null,\n    \"width\": null\n  }\n```\nSample json for adding leaf-level entries under Color-Blue with variant type as Size (values Small, Medium etc). The 1st entry in the ancestors property is the top-level product and the 2nd entry is the variant with Color = Blue (\"ynNA5rXKZCHF2uKjq\"). Please notice the _attributeLabel_ and _optionTitle_ properties.\n\n```\n  {\n    \"_id\": \"je2NxNaHzghJSFNin\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"ynNA5rXKZCHF2uKjq\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:54:03.957+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-19T23:43:39.335+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Small\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue Small\",\n    \"weight\": null,\n    \"width\": null\n  },\n  {\n    \"_id\": \"YGQdZoXEcYBMCrfcJ\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"ynNA5rXKZCHF2uKjq\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:54:20.828+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:55:32.251+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Medium\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue Medium\",\n    \"weight\": null,\n    \"width\": null\n  }\n```\n\nNow that we have the product details available, we could complete the entry in the `/src/json-data/TagProductMapping.json` that we mentioned earlier in the '1. Add Tags' section. Since our new product maps to the tag 'menJacket' we should be adding an entry (top-level productId \"DZwLHk4EAzitRni8F\") to the array of products of the specific tag.\n\n##### 3. Adding NavigationItem\n\nWe should be creating a NavigationItem entry in the `/src/json-data/NavigationItems.json` similar to the sample provided below. The value property is what gets displayed on the Storefront UI navigation. The url has to follow the specific format `/tag/<slug_of_the_tag>`. Here we want the NavigationItem to point to the Men's Jacket. That particular product is tagged with a tag entry 'menJacket' which has the slug as 'men-jacket'. So our url value would be _/tag/men-jacket_\n\n```\n  \"MenuOneLeafLevel\": {\n    \"draftData\": {\n      \"classNames\": null,\n      \"content\": [\n        {\n          \"language\": \"en\",\n          \"value\": \"Men's Jacket\"\n        }\n      ],\n      \"isUrlRelative\": true,\n      \"shouldOpenInNewWindow\": false,\n      \"url\": \"/tag/men-jacket\"\n    }\n  }\n```\n\n##### 4. Updating NavigationTree\nNavigation structure can be as complex or simple as we need it to be. In our sample-data, we are defining few top-level entries (like Men/Women/Unisex) and sub-levels under them (like Men's Outdoors, Women's Outdoors) and leaf-level entries (like Men's Jacket). Updating Navigation tree via code involves extensive hardcoding as detailed in `/src/loaders/loadNavigation.js`. The steps are:\n* Create a NavigationItem object by calling the mutaion (createNavigationItem) and providing the NavigationItem data from the above created entry inside `/src/json-data/NavigationItems.json` .\n* This NavigationItem object is updated with the function '_getNavigationItem_'.\n* The NavigationItem under each level of Navigation is defined by the '_items_' property of the that level. Hence we have to add our new NavigationItem entry to the items of the level above it.\n\nThe above steps translate to the below code (for reference)\n```\n  const navItemMenuOneLeafLevel = await context.mutations.createNavigationItem(context.getInternalContext(), {\n    navigationItem: NavigationItemsData.MenuOneLeafLevel\n  });\n\n\n  let m1leaf = getNavigationItem(navItemMenuOneLeafLevel._id);\n\n  m1sub.items = [m1leaf];\n\n```\nInside  `/src/loaders/loadNavigation.js` we can see how this sub-level (`m1sub`) is subsequently added to the _items_ array which in turn is added to the top-level of Navigation. \n\nThe navigation changes are publshed via the _publishNavigationChanges_ mutation and the Shops collection is updated with the _navigationTreeId_.\n\n##### 5. Adding Images to the product\n\nWe could add one (or more) images for each of the leaf-level entries mentioned in the Products.json. But for the simplicity of this sample-data, we are only adding images at the variant-level. This would mean that all of the leaf-level items under a variant would have the same set of images.\n\nTo explain with an example, we have 'Jackets' as top-level product, variants as 'Black'/'Blue' and leaf-level entries as Small/Medium/Large. So in effect, we will have the same set of images for all the sizes (small/medium/large) under each Color.\n\nOnce we have identified the productID (_id) of the variant entries, we just need to update the file-name to include the productId at the begining of the file-name followed by a period '.'. So the specific format of the image would be `productID.<rest_of_file_name>.<extn>`. Allowed image file extensions are jpg/jpeg/png. Once the image with the updated file-name is ready, we just need to place the file in the `/src/images` folder.\n\nNote: We have hard-coded the path to the images folder inside `/src/loaders/loadImages.js` as follows `  let folderPath = \"./custom-packages/api-plugin-sample-data/src/images/\"`\nBy default, when a new plugin is added, the above mentioned path would be correct, but in case we have the plugin folder under a different name, we need to make sure that the above folderPath is updated to match the actual location.\nThe `/src/loaders/loadImages.js` script will update the product images to the database and publish the product. The details of the parent productId which is required by the `loadImages.js` is pulled from the Products.json that we updated initially with product data.\n\n#### Conclusion\nAt this stage, we have all the data that we need to update the database. We could start the API with api-sample-data-plugin enabled and the LOAD_SAMPLE_DATA flag set to true in .env file.\n\n\n#### Login info (for the adminUI) \n\nusername: admin@example.org\npassword: password\n\n## Included in this example plugin\n\n### `.circleci/`\n\nAdds CI scripts that enable Circle CI to run tests and lint your project.\n\n### `src/`\n\nThe `src` folder is where you'll put all the plugin files. An `index.js` with a bear-bones `registerPlugin` is included.\n\n### `.gitignore`\n\nA basic `gitignore` file\n\n### `.nvmrc`\n\n`.nvmrc` sets your plugin to use Node v12.14.1\n\n### `babel.config.cjs`\n\nIf your plugin includes linting and tests, this file is required to allow esmodules to run correctly.\n\n### `jest.config.cjs`\n\nIf your plugin includes tests, this file is required to allow esmodules to run correctly. You'll need to update the `transformIgnorePatterns` and `moduleNameMapper` sections to include any esmodule `npm` packages used in your plugin.\n\n### `License.md`\n\nIf your plugin uses `Apache 2` licensing, you can leave this file as-is. If another type of licensing is used, you need to update this file, and the README, accordingly.\n\n### `package.json`\n\nThe provided `package.json` is set up to install all needed packages and config for linting and testing. You'll need to update the `name`, `description`, and add any new dependencies your plugin files use.\n\n### `index.js`\n\nThe entrypoint file for your npm package, will most likely just export your plugin registration from the `src` folder.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-sequences/README.md":"# api-plugin-sequences\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-sequences.svg)](https://www.npmjs.\ncom/package/@reactioncommerce/api-plugin-sequences)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-sequences.svg?style=svg)](https://circleci.\ncom/gh/reactioncommerce/api-plugin-sequences)\n\n## Summary\n\nProvides functionality for auto-incrementing integer IDs which is not natively supported by Mongo\n\n## Usage\n\nYou can define a new sequence by declaring it in the `Sequences` of your plugin registraion\n\n```javascript\n    sequenceConfig: [\n      {\n        entity: \"Promotions\"\n      }\n    ]\n```\n\nThis will create a sequence starting with 1000000 which can be incremented (returning the next to use) by calling\n`context.mutations.incrementSequence(context, shopId, \"YOUR_ENTITY_NAME\")`;\n\nIf you wish to define the starting sequence you can do that by declaring an env var like:\n\n```bash\nSEQUENCE_INITIAL_VALUES={\"Promotions\":999}\n```\n\nWhere you declare a one-line JSON object which contains any entities you want use a sequence for.\n\nSequences will be created on start-up and should be available to use immediately.\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-settings/README.md":"# api-plugin-settings\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-settings.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-settings)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-settings.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-settings)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSettings plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-shipments-flat-rate/README.md":"# api-plugin-shipments-flat-rate\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shipments-flat-rate.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shipments-flat-rate)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shipments-flat-rate.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shipments-flat-rate)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nFlat Rate Shipments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-shipments/README.md":"# api-plugin-shipments\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shipments.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shipments)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shipments.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shipments)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nShipments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-shops/README.md":"# api-plugin-shops\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shops.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shops)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shops.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shops)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nShops plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","packages/api-plugin-simple-schema/README.md":"# api-plugin-simple-schema\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-simple-schema.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-simple-schema)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-simple-schema.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-simple-schema)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSimpleSchema plugin for the [Reaction API](https://github.com/reactioncommerce/reaction).\n\nThe [SimpleSchema](https://github.com/aldeed/simple-schema-js) package is used by many plugins to validate data, often before inserting or updating MongoDB documents. To allow other plugins to extend these schemas, some plugins register them such that they are accessible in a `preStartup` function.\n\n## Installation\n\n```sh\nnpm install @reactioncommerce/api-plugin-simple-schema\n```\n\nThen add a reference in `plugins.json`, using any key you want. The order in which plugins appear in this file is the order in which they load.\n\n```json\n{\n  simpleSchema: \"@reactioncommerce/api-plugin-simple-schema\"\n}\n```\n\n## Usage\n\nHere's an example of registering a schema:\n\n```js\nimport SimpleSchema from \"simpl-schema\";\n\nconst ProductSchema = new SimpleSchema({\n  // ...\n});\n\nexport default async function register(app) {\n  await app.registerPlugin({\n    // ...\n    simpleSchemas: {\n      Product: ProductSchema\n    }\n  });\n}\n```\n\nNote that a plugin creating a SimpleSchema instance as in the above example will also need to list the `simpl-schema` NPM package as a dependency.\n\nAnd on the other side, if you have a plugin that wants to extend some of the schemas provided by other plugins, do it in a `preStartup` function:\n\n```js\nexport default function preStartup(context) {\n  context.simpleSchemas.Product.extend({\n    price: PriceRange\n  });\n}\n```\n\nThis could be done in a `startup` function, but because startup code sometimes validates against these schemas, it's safer to do it in a `preStartup` function.\n\nA plugin that extends schemas but never calls `new SimpleSchema()` anywhere need not list the `simpl-schema` NPM package as a dependency.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-sitemap-generator/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-sitemap-generator%2FREADME.md -->","packages/api-plugin-surcharges/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-surcharges%2FREADME.md -->","packages/api-plugin-system-information/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-system-information%2FREADME.md -->","packages/api-plugin-tags/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-tags%2FREADME.md -->","packages/api-plugin-taxes-flat-rate/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-taxes-flat-rate%2FREADME.md -->","packages/api-plugin-taxes/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-taxes%2FREADME.md -->","packages/api-plugin-translations/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-translations%2FREADME.md -->","packages/api-utils/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-utils%2FREADME.md -->","packages/api-utils/docs/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-utils%2Fdocs%2FREADME.md -->","packages/api-utils/docs/generateFilterQuery.md":"\n# generateFilterQuery\n\nA function that generates a MongoDB filter query from an input GraphQL conditions object. It expects the input GraphQL conditions object to be in the format of the `FilterConditionsInput` input type (detailed below) defined in the GraphQL  Schemas along with other parameters like `context`, `collectionName` and `shopId`.\n\nAs seen in the format below, \n* The input object is a nested object where you could use  either `all` or `any` keys.\n* Both the top level `all` & `any` keys are an array of objects with one more level of `all` or `any` keys.\n* The inner `all` or `any` keys is an array of objects with the structure defined by `SingleConditionInput`.\n* The `SingleConditionInput` object has the fields which define a single condition to filter on.\n<br>\n* The `all` key is equivalent of the `$and` operator in MongoDB and the `any` key is equivalent of the `$or` operator in MongoDB.\n* In the `SingleConditionInput` object, mandatory fields are the `key`, `relationalOperator` and exactly any ONE of the value fields. The `key` is the field name to filter on. The `relationalOperator` is the relational operator to use to filter on the field (predefined as enum values). The `stringValue`, `integerValue`, `floatValue`, `booleanValue`, `dateValue`, `stringArrayValue`, `integerArrayValue`, `floatArrayValue` are the values to filter on (use exactly one of this) depending on the key.\n* Finally there are two more optional fields `caseSensitive` and `logicalNot`. The `caseSensitive` is a boolean flag to set if the regex is case sensitive. The `logicalNot` is a boolean flag to set if the condition is to be negated.\n\nFilterConditionsInput format below (from GraphQL Schemas). __Example__ follows the format below:\n\n\n```graphql\n\ninput FilterConditionsInput {\n  all: [ConditionsArray]\n\n  any: [ConditionsArray]\n}\n\n\ninput ConditionsArray {\n  all: [SingleConditionInput]\n\n  any: [SingleConditionInput]\n}\n\n\ninput SingleConditionInput {\n  booleanValue: Boolean\n  caseSensitive: Boolean\n  dateValue: DateTime\n  floatArrayValue: [Float]\n  floatValue: Float\n  integerArrayValue: [Int]\n  integerValue: Int\n  key: String!\n  logicalNot: Boolean\n  relationalOperator: RelationalOperatorTypes!\n  stringArrayValue: [String]\n  stringValue: String\n}\n\n\nenum RelationalOperatorTypes{\n  beginsWith\n  endsWith\n  eq\n  gt\n  gte\n  in\n  lt\n  lte\n  ne\n  nin\n  regex\n}\n\n```\n\n\n## Example\n\nExample of invoking the function with a simple conditions object. Here we are querying for products collection for entries with the handle as 'mens-waterproof-outdoor-rain-jacket'. Since it is single condition, using either `all` or `any` will not make difference. \n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n\nPlease refer to readme in the respective plugins for more detailed examples (example: api-plugin-products).\n\n","packages/api-utils/docs/getAbsoluteUrl.md":"# getAbsoluteUrl\n\nA function that takes a root URL and a relative URL and combines them. Handles URLs that do and don't begin and end with slashes.\n\n- It's fine to pass a path that may be undefined. Just the root URL will be returned.\n- It's fine to pass a path that may already be absolute. It will be left alone.\n\nExample:\n\n```js\nconst rootUrl = \"http://localhost:3000/\";\nconst path = \"/media/test.jpg\";\nconst url = getAbsoluteUrl(rootUrl, path); // http://localhost:3000/media/test.jpg\n```\n","packages/api-utils/docs/getPaginatedResponseFromAggregate.md":"# getPaginatedResponseFromAggregate\n\nReturns a paginated response from a MongoDB aggregation pipeline.\n\nUsage example:\n\n```js\nimport getPaginatedResponseFromAggregate from \"@reactioncommerce/api-utils/getPaginatedResponseFromAggregate.js\";\n\n// the MongoDB collection you want to run your aggregation on\nconst collection = getYourMongoDBCollectionSomehow();\n\nconst pipeline = [\n  {\n    // for example, here's a $lookup operator\n    $lookup: {\n      // some options\n    }\n  },\n  // but you can add,\n  // any,\n  // other,\n  // operators\n];\n\nconst args = {\n  // connection arguments from your GraphQL query or mutation\n  // more info here: https://facebook.github.io/relay/graphql/connections.htm#sec-Arguments\n  // supported:\n  // offset: Int,\n  // first: Int,\n  // last: Int,\n  // sortBy: String (the name of the MongoDB field you want to sort results by)\n  // sortOrder: String (\"desc\" for descending, or \"asc\" for ascending)\n};\n\nconst options = {\n  // some options to control which optional fields get returned with the results\n  // supported:\n  // includeHasNextPage: Boolean,\n  // includeHasPreviousPage: Boolean,\n  // includeTotalCount: Boolean\n};\n\nconst results = await getPaginatedResponseFromAggregate(collection, pipeline, args, options);\n\nreturn results;\n// {\n//   pipeline: Array (the pipeline that was passed, with the necessary modifications that were added to it by `getPaginatedResponseFromAggregate`)\n//   nodes: Array (the returned items)\n//   pageInfo: Object {\n//     `hasNextPage: Boolean` (if requested in `options`),\n//     `hasPreviousPage: Boolean` (if requested in `options`),\n//     `startCursor`: String (`_id` of the first item in `nodes`),\n//     `endCursor`: String (`_id of the last item in `nodes`)\n//   },\n//   totalCount: Int (if requested in `options`)\n// }\n```\n","packages/api-utils/docs/tagsForCatalogProducts.md":"# tagsForCatalogProducts\n\nGive an array of CatalogProduct objects, returns an array of tags for each product ID.\n\nExample data set:\n\n```js\n// Tags\n[\n  {\n    _id: \"1\",\n    name: \"ONE\"\n  },\n  {\n    _id: \"2\",\n    name: \"TWO\"\n  },\n  {\n    _id: \"3\",\n    name: \"THREE\"\n  }\n]\n\n// CatalogProducts\n[\n  {\n    product: {\n      productId: \"1\",\n      tagIds: [\"1\", \"2\"]\n    }\n  },\n  {\n    product: {\n      productId: \"2\",\n      tagIds: [\"3\"]\n    }\n  }\n]\n```\n\nUsage:\n\n```js\n// Tags is the \"Tags\" Mongo.Collection\n// `catalogProducts` is an array of CatalogItemProduct from Catalog collection\nconst result = await tagsForCatalogProducts(Tags, catalogProducts);\n```\n\nResult will be:\n\n```js\n[\n  {\n    productId: \"1\",\n    tags: [\"ONE\", \"TWO\"]\n  },\n  {\n    productId: \"2\",\n    tags: [\"THREE\"]\n  }\n]\n```\n","packages/db-version-check/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fdb-version-check%2FREADME.md -->","packages/file-collections-sa-base/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections-sa-base%2FREADME.md -->","packages/file-collections-sa-gridfs/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections-sa-gridfs%2FREADME.md -->","packages/file-collections/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections%2FREADME.md -->","packages/logger/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Flogger%2FREADME.md -->","packages/random/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Frandom%2FREADME.md -->","packages/reaction-error/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Freaction-error%2FREADME.md -->"},"files":{"packages/api-core/README.md":"# Reaction API Core\n\nThis NPM package provides the `ReactionAPICore` class. Use this to build a NodeJS microservice that is compatible with the Reaction Commerce platform, or to build your main Reaction Commerce API if you don't want to start by forking the `https://github.com/reactioncommerce/reaction` project.\n\nIf you're just looking to run the default Reaction release with all built-in plugins for development, demos, or evaluation, use the released Docker images and the [Reaction Development Platform](https://github.com/reactioncommerce/reaction-development-platform) instead.\n\nThis NPM package also provides the `ReactionTestAPICore` class, which you can use to write automated tests that run GraphQL queries against your API with a real database connection. This class is almost identical to the `ReactionAPICore` class, except that no actual GraphQL server is created and various additional methods are available to help with common testing needs.\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Included Features](#included-features)\n- [Supported Environment Variables](#supported-environment-variables)\n- [ReactionAPICore Configuration](#reactionapicore-configuration)\n- [Plugins](#plugins)\n  - [Plugin Configuration](#plugin-configuration)\n    - [auth](#auth)\n    - [collections](#collections)\n    - [contextAdditions](#contextadditions)\n    - [expressMiddleware](#expressmiddleware)\n    - [functionsByType](#functionsbytype)\n    - [graphQL](#graphql)\n    - [mutations and queries](#mutations-and-queries)\n- [App Context](#app-context)\n- [Writing Tests Using ReactionTestAPICore](#writing-tests-using-reactiontestapicore)\n- [Developer Certificate of Origin](#developer-certificate-of-origin)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\n```sh\nnpm install @reactioncommerce/api-core graphql\n```\n\nThe `graphql` package is a required peer dependency.\n\n## Usage\n\nHere is example usage assuming Node 12.14.1 with experimental modules enabled.\n\n```js\nimport { ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport registerFooPlugin from \"reaction-plugin-foo\";\nimport Logger from \"@reactioncommerce/logger\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // Call this once per plugin.\n  await api.registerPlugin({\n    // Plugin config. See \"Plugin Configuration\" section\n  });\n\n  // Plugin packages export a function that calls `api.registerPlugin` for you, so\n  // for those you just pass `api` to the function.\n  await registerFooPlugin(api);\n\n  // Or you can register multiple at once, passing in either a function or a\n  // registration object for each.\n  await api.registerPlugins({\n    foo: registerFooPlugin,\n    another: {\n      // some plugin config\n    }\n  });\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nAlternatively, you can keep your plugin list in a JSON file:\n\n```js\nimport { importPluginsJSONFile, ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport Logger from \"@reactioncommerce/logger\";\nimport authorizationPlugin from \"@reactioncommerce/reaction-plugin-authorization\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // An optional function allows you to transform the list from the\n  // JSON (add, swap, or remove plugins) before it attempts to load the\n  // plugin modules.\n  const plugins = await importPluginsJSONFile(\"./plugins.json\", (pluginList) => {\n    pluginList.authorization = authorizationPlugin;\n\n    return pluginList;\n  });\n\n  await api.registerPlugins(plugins);\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nSample `plugins.json` file:\n\n```json\n{\n  \"accounts\": \"./core-services/account/index.js\",\n  \"address\": \"./core-services/address/index.js\",\n  \"authentication\": \"@reactioncommerce/plugin-authentication\",\n  \"authorization\": \"@reactioncommerce/plugin-simple-authorization\"\n}\n```\n\nAll relative paths are assumed to be relative to the JSON file and are assumed to be an ES module. All packages are assumed to export the plugin registration function as their default ES module export.\n\n### Included Features\n\nMost Reaction API features are released as [plugins](#plugins), but even if you never register any plugins and run your API, you'll get the following core features automatically:\n\n- A minimal GraphQL API running at `/graphql` on `ROOT_URL`, with a `ping` query, an `echo` mutation, and a `tick` subscription for testing.\n- Commonly used core GraphQL types such as `Date`, `DateTime`, `Money`, and `Rate`, as well as types related to Relay-style pagination\n- A static file server if you passed in the `serveStaticPaths` option\n- A connection to MongoDB, with improved connection retry, if the `MONGO_URL` environment variable or the `mongoDb` option was provided\n- Access to an Express app at `api.expressApp`\n\n## Supported Environment Variables\n\nThe following environment variables are picked up automatically by the `ReactionAPICore` instance.\n\n```js\n{\n  BODY_PARSER_SIZE_LIMIT: bodyParserValidator({\n    default: 5 * 1000000 // value in bytes = 5mb\n  }),\n  GRAPHQL_INTROSPECTION_ENABLED: bool({ default: false, devDefault: true }),\n  GRAPHQL_PLAYGROUND_ENABLED: bool({ default: false, devDefault: true }),\n  MONGO_URL: str({\n    devDefault: \"mongodb://localhost:27017/reaction\",\n    desc: \"A valid MongoDB connection string URI, ending with the database name\",\n    example: \"mongodb://localhost:27017/reaction\"\n  }),\n  PORT: num({\n    default: 3000,\n    desc: \"The port on which the API server should listen\",\n    example: \"8000\"\n  }),\n  REACTION_LOG_LEVEL: str({\n    choices: [\"FATAL\", \"ERROR\", \"WARN\", \"INFO\", \"DEBUG\", \"TRACE\"],\n    default: \"WARN\",\n    devDefault: \"DEBUG\",\n    desc: \"Determines how much logging you see. The options, from least to most logging, are FATAL, ERROR, WARN, INFO, DEBUG, TRACE. See: https://github.com/trentm/node-bunyan#levels\",\n    example: \"ERROR\"\n  }),\n  REACTION_APOLLO_FEDERATION_ENABLED: bool({\n    default: false,\n    desc: \"Set this to true if you need Apollo Federation support.\"\n  }),\n  REACTION_GRAPHQL_SUBSCRIPTIONS_ENABLED: bool({\n    default: true,\n    desc: \"Set this to false if you do not need GraphQL subscription support\"\n  }),\n  REACTION_SHOULD_INIT_REPLICA_SET: bool({\n    default: false,\n    devDefault: true,\n    desc: \"Automatically initialize a replica set for the MongoDB instance. Set this to 'true' when running the app for development or tests.\"\n  }),\n  ROOT_URL: str({\n    devDefault: \"http://localhost:3000\",\n    desc: \"The protocol, domain, and port portion of the URL, to which relative paths will be appended. \" +\n      \"This is used when full URLs are generated for things such as emails and notifications, so it must be publicly accessible.\",\n    example: \"https://shop.mydomain.com\"\n  })\n}\n```\n\n## ReactionAPICore Configuration\n\nThe following options can be passed in the first argument of `ReactionAPICore` when initializing an instance.\n\n- **appEvents**: See the \"Providing a Custom appEvents Implementation\" section.\n- **httpServer**: An HTTP server for GraphQL subscription websocket handlers. In most cases you should omit this and let `ReactionAPICore` create one for you.\n- **mongodb**: Optionally pass in the `mongodb` reference from `import mongodb from \"mongodb\";`. In most cases you should omit this and let `ReactionAPICore` use its own reference, but if you need to ensure a specific version is used, this allows you to do that.\n- **serveStaticPaths**: An optional array of paths (relative to your project root) that should be served as static files. Each of these is passed to [express.static()](https://expressjs.com/en/starter/static-files.html). If you need more control, you can access `api.expressApp` directly.\n- **rootUrl**: Items such as `api.rootUrl`, `context.rootUrl`, and `context.getAbsoluteUrl` are set based on this. If not provided, falls back to `ROOT_URL` environment variable.\n- **version**: Pass any valid version string. This is available to plugins as `api.version` or `context.appVersion`. This allows you to version your API as a whole (with all plugins installed and configured), which is different from the version of this `api-core` package. Use this for whatever purpose you want, but it is not required and will be `null` if you don't set a version.\n\n## Plugins\n\nThe Reaction API server has a plugin system that allows code to be broken into small packages. Plugins can register functions, configuration, and GraphQL schemas and resolvers. The sum of everything registered by every plugin is your Reaction API.\n\nIn some cases a plugin has plugins of its own or has other external components that you also need to install.\n\nA plugin need not be in a separate package. You can simply call `api.registerPlugin`, passing in any valid configuration. This may be fine for prototyping and quick tests, but we highly recommend that all plugins be published as separate NPM packages, which allows you to track and manage dependencies more easily. This does not necessarily mean they need to be published to NPM, but they must be something you can add to `package.json` and NPM will know how to install it. For example, a private GitHub repo will work.\n\nIf you publish a plugin as an NPM package, the default package export should be an async function that accepts `api` as the first argument and calls `api.registerPlugin` with all necessary configuration options.\n\n### Plugin Configuration\n\nWhether you are calling `api.registerPlugin` directly in an API project or within a plugin package, you must pass in an object that includes everything the plugin wants to make available to the core API or other API plugins. This `registerPlugin` object has a specific structure.\n\nThe two keys that every plugin will include are `name` and `label`. `name` must be unique, cannot contain spaces, and identifies your plugin; `label` is the human-readable version of your plugin name, for showing in UIs.\n\nBeyond `name` and `label`, the following standard keys can be included in your `registerPlugin` object and are described in more detail below:\n\n- `auth`\n- `collections`\n- `contextAdditions`\n- `expressMiddleware`\n- `functionsByType`\n- `graphQL`\n- `mutations`\n- `queries`\n\n#### auth\n\nPlugins can pass functions in an `auth` object, which are then used to add permission and account information to `context` for each API request.\n\n```js\nauth: {\n  accountByUserId,\n  permissionsByUserId\n}\n```\n\n- `accountByUserId`: An async function with signature `(context, userId)` that must return an account document for the given `userId`, or `null` if one cannot be found. This will be used to set `context.account` and `context.accountId`.\n- `permissionsByUserId`: An async function with signature `(context, userId)` that must return an array of permissions for the given `userId`, or `null` if no permission list can be generated. This is available for each API request as `context.userPermissions`.\n\nSee also the \"getHasPermissionFunctionForUser\" functionsByType.\n\n#### collections\n\nTo create any non-core MongoDB collection that a plugin needs, use the `collections` option:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\"\n  }\n}\n```\n\nThe `collections` object key is where you will access this collection on `context.collections`, and `name` is the collection name in MongoDB. We recommend you make these the same if you can.\n\nThe example above will make `context.collections.MyCustomCollection` available in all query and mutation functions, and all functions that receive `context`, such as startup functions. Note MongoDB may not actually create the collection until the first time you insert into it.\n\nYou can optionally add indexes for your MongoDB collection:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    indexes: [\n      [{ referenceId: 1 }, { unique: true }]\n    ]\n  }\n}\n```\n\nEach item in the `indexes` array is an array of arguments that will be passed to the Mongo `createIndex` function. The `background` option is always set to `true` so you need not include that.\n\nThere is also experimental support for defining validation options. Add `validator`, `validationLevel`, or `validationAction` options and they will be passed along to the MongoDB library. Refer to [their createCollection documentation](http://mongodb.github.io/node-mongodb-native/3.6/api/Db.html#createCollection).\n\nThere is also a convenience syntax that allows you to pass a JSONSchema directly. This:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    jsonSchema: someJsonSchema\n  }\n}\n```\n\nIs shorthand for this:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    validator: {\n      $jsonSchema: someJsonSchema\n    }\n  }\n}\n```\n\nNOTE: Registering your collections is not required, and in fact it is probably best to NOT register them unless you need to allow other plugins to access your data directly. As long as you do not register them, they remain a private implementation detail that you are free to change without breaking other plugins.\n\n#### contextAdditions\n\nA plugin can add properties to context using the `contextAdditions` option. They are added before any `preStartup` or `startup` functions are run.\n\n```js\ncontextAdditions: {\n  something: \"wicked\"\n}\n```\n\n```js\n// in startup fn or anywhere you have context\nconsole.log(context.something); // \"wicked\"\n```\n\n#### expressMiddleware\n\nPlugins can register Express middleware using the `expressMiddleware` option:\n\n```js\nexpressMiddleware: [\n  {\n    route: \"graphql\",\n    stage: \"authenticate\",\n    fn: tokenMiddleware\n  }\n]\n```\n\nFor now, only the \"graphql\" route is supported, and the following stages are supported in this order:\n\n- `first`\n- `before-authenticate`\n- `authenticate`\n- `before-response`\n\nAn `authenticate` middleware function should do something like look up the user by the Authorization header, and either set `request.user` or send a 401 response if the token is invalid. It should not require a token.\n\nThe `first` middleware stage can be used for loggers or anything else that needs to be first in the middleware list. `before-response` middleware will have the user available if there is one, and is called before the Apollo GraphQL middleware.\n\nA middleware function is passed `context` and must return the Express middleware handler function, which must call `next()` or send a response.\n\n#### functionsByType\n\nThe `functionsByType` object is a map of function types to arrays of functions of that type. This pattern can be used by any plugin to allow any other plugin to register certain types of functions for plugin points.\n\nDocumentation for individual plugins will tell you how to use this for that plugin, but there are also a few core types that any plugin might want to use:\n\n- createDataLoaders\n- getHasPermissionFunctionForUser\n- preStartup\n- registerPluginHandler\n- startup\n- shutdown\n\nLook at built-in plugins for examples of these, and read [How To: Share Code Between API Plugins](https://docs.reactioncommerce.com/docs/how-to-share-code-between-plugins) for more information.\n\n#### graphQL\n\nUse the `graphQL` object to register schemas and resolvers that extend the core GraphQL API.\n\nMore information:\n\n- [How To: Create a new GraphQL mutation](https://docs.reactioncommerce.com/docs/graphql-create-mutation)\n- [How To: Create a new GraphQL query](https://docs.reactioncommerce.com/docs/graphql-create-query)\n- [How To: Extend GraphQL to add a field](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-to-add-field)\n- [How To: Extend GraphQL with Remote Schema Delegation](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-with-remote-schema)\n\n#### mutations and queries\n\nThe `mutations` and `queries` objects are maps of functions that are extended onto `context.mutations` and `context.queries`. These may be functions that are called from GraphQL resolvers of a similar name, or functions that are intended to be called only by other plugin code. Functions that modify data should be registered as `mutations` and all other functions should be registered as `queries`.\n\n## App Context\n\nApollo Server passes a `context` object to every GraphQL resolver. By convention, plugins pass this down as the first argument to all internal query, mutation, and util functions, too. We refer to this as the app context, and many different things live on it. It is the primary way that functions and other information are shared among plugins.\n\nThere are two types of properties on the app context: instance properties and request properties. Most properties are instance properties; they are set when you initialize a `ReactionAPICore` instance or when you register a plugin, and they do not change while the API is running. A few other properties are added to the context at the start of every request that comes in, and these are the request properties.\n\nInstance properties:\n\n- `app`: The `ReactionAPICore` instance that owns this context. (Note that `api.context.app` is a circular reference.)\n- `appEvents`: A simple event mechanism with `on` and `emit` properties. This allows event-based communication among plugins. Unlike Node's built-in `EventEmitter`, `appEvents.on` functions may return Promises and `appEvents.emit` may be awaited in situations where you want to be sure all event listeners have handled the event before continuing.\n- `appVersion`: A string set to whatever the `version` option is when creating the `ReactionAPICore` instance\n- `collections`: An object with references to [MongoDB collections](http://mongodb.github.io/node-mongodb-native/3.5/api/Collection.html), built by any plugins that register collections. Allows direct access to collections from various plugins even if only one plugin \"owns\" that collection.\n- `getInternalContext`: A function that takes no arguments and returns a context with all authentication and authorization mocked to allow anything. Useful when you need to pass down context to another query or mutation but circumvent its normal authorization checks.\n- `getFunctionsOfType`: A function that takes one argument, a type string, and returns an array of all functions that were registered with that type. This is a simple way that plugins can share functions with other plugins for specific purposes\n- `mutations` and `queries`: These objects have references to all functions that plugins have registered in their own `mutations` and `queries` objects, when calling `registerPlugin`. If multiple plugins have mutations or queries with the same name, the last plugin to be registered will win (unlike `getFunctionsOfType` where multiple functions may be registered).\n- `rootUrl`: The root URL string, from `rootUrl` instance option or `ROOT_URL` environment variable\n- `getAbsoluteUrl`: A function that is bound to `rootUrl`, for easy conversion of a relative URL to one that is absolute and begins with `rootUrl`.\n\nThere may be additional instance properties if any plugins have added them using the `contextAdditions` option for `registerPlugin`. Refer to documentation for individual plugins.\n\nRequest properties:\n\n- `user`: The User document for the user who made the request. This is set to the Express `request.user` property, which any plugin can set by registering request middleware.\n- `userId`: If `user` is set, this will be the `user._id`, for convenience.\n- `account`: If `context.auth.accountByUserId` is a function and `context.user` is set, `accountByUserId` will be called for the request, and the return value will be available as `context.account`. The `user` is a generic authentication document for OAuth, whereas `account` is a Reaction-specific concept where additional information about each user is tracked.\n- `accountId`: If `account` is set, this will be the `account._id`, for convenience.\n- `userPermissions`: If `context.auth.permissionsByUserId` is a function, it will be called with `(context, userId)` arguments, and the return value is available as `context.userPermissions`.\n- `userHasPermission`: A function that you can call to determine whether a user has needed permissions. It calls any functions registered as type `getHasPermissionFunctionForUser`, passing in `context`, and then calls the function returned by each. Returns `true` only if every registered function returns `true`.\n- `validatePermissions`: Calls `userHasPermission` and throws an Access Denied error if it returns `false`.\n- `requestHeaders`: An object with all HTTP headers for the current request on it, except with `Authorization` and `Cookie` headers removed for security.\n\nYou can always access the app context on `api.context` if you have a reference to the `api` instance, but this will never have any request properties set because there is no request happening.\n\n## Providing a Custom appEvents Implementation\n\n`context.appEvents` is available to all plugins and is used for communication among plugins. The built-in implementation of this is not highly optimized, but you may provide your own implementation to meet your needs.\n\nTo override the built-in `appEvents` with your own, pass `appEvents` option when constructing your API instance. The provided object must have 4 function properties named `emit`, `on`, `stop`, and `resume`. Here's an example:\n\n```js\nconst appEvents = {\n  async emit(name, ...args) {},\n  on(name, func) {},\n  stop() {},\n  resume() {}\n};\n\nconst api = new ReactionAPICore({ appEvents });\n```\n\n- `stop` should stop emission and `resume` should resume emission. Neither takes any arguments.\n- `emit`:\n  - `emit` may or may not return a Promise, but either way the final returned value must be `undefined`\n  - When emission is stopped, `emit` should do nothing\n  - When emission is not stopped, `emit` should call each handler registered by `on` one by one. If a handler returns a Promise, wait until it resolves or rejects before calling the next handler. `emit` itself should not resolve or reject until all handlers have been called and have resolved or rejected.\n  - Any additional `args` passed to `emit` should be passed along to each handler function.\n- `on` registers a handler function to be called by `emit`.\n- Handlers are called only after they are registered. Any events emitted prior to registering a handler are never handled by that handler.\n\n## Writing Tests Using ReactionTestAPICore\n\nRefer to [Writing Jest Integration Tests](https://docs.reactioncommerce.com/docs/writing-jest-integration-tests).\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing-off all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign-off your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real full name (please no anonymous contributions or pseudonyms) and a real email address. By signing-off your commit you are certifying that you have the right to submit it under the [GNU GPLv3 License](./LICENSE.md).\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO sign-offs of every commit.\n\nIf you forget to sign-off your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction package is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-accounts/README.md":"# api-plugin-accounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-accounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-accounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-accounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-accounts)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nAccounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n","packages/api-plugin-address-validation-test/README.md":"# api-plugin-address-validation-test\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation-test.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation-test)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test)\n\n## Summary\n\nAddress Validation Test plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-address-validation/README.md":"# api-plugin-address-validation\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation)\n\n## Summary\n\nAddress Validation plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-authentication/README.md":"# api-plugin-authentication\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authentication.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authentication)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authentication.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authentication)\n\n## Summary\n\nThis plugin provides Authentication middleware for the Reaction API. It relies on token based authentication.\nUtils included in this plugin help connect the [Account-js](https://www.accountsjs.com/) library and the Reaction API via an Auth Token.\n\n## How it works\n\nThis plugin registers the schema and resolvers that are required by account-js.\n\nA express middleware is added whose job is to extract the `Authorization` header from the request and uses account-js to get the user for that token. The format should be `Authorization: Bearer <YOUR_ACCESS_TOKEN>`. Then the user is attached to the `req` object.\n\nA function is added to `functionByType.graphQLContext` which links the graphQL context used in the api-core with the \"internal context\" used by account-js. This is needed because account-js also keeps tracks of the tokens and uses a separate GraphQL server.\n\n## Supported actions\n\n1. Signup\n2. Login\n3. Change Password\n4. Forgot Password - A email is sent with a reset token url of the form `https://<STORE_URL>/?resetToken=<token>`\n\n## Environment Variables:\n\n| Variable Name | Description                                                                                                                     | Default Value           |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |\n| STORE_URL     | This is the public link to the storefront (used to redirect)                                                                    | `http://localhost:4000` |\n| MONGO_URL     | MongoDB used to store session & tokens                                                                                          | None                    |\n| TOKEN_SECRET  | [secret](https://www.accountsjs.com/docs/api/server/interfaces/accountsserveroptions#tokensecret) used while creating the token | `UPDATE_THIS_SECRET`    |\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nCopyright 2020 Reaction Commerce\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","packages/api-plugin-authorization-simple/README.md":"# api-plugin-authorization-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authorization-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authorization-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple)\n\n## Summary\n\nThis plugin checks authorization in the Reaction API.\n\nAuthorization is determined by one primary function, `validatePermissions`, which is added onto the `context`. If permissions are valid, nothing will happen when this function is called. If permissions are invalid, this call will throw an `\"Access Denied\"` error.\n\nA secondary function, `userHasPermission`, is also available on the `context`. This will provide a boolean value of the permission status.\n\n`validatePermissions` is our preferred method.\n\n## Usage\n\n`permissions` are attached to account `Groups`, initially by being copied from [defaultRoles.js](https://github.com/reactioncommerce/reaction/blob/trunk/src/core-services/account/util/defaultRoles.js) on startup. Each account can belong to as may groups as needed (including not belonging to any group), and is granted *all* `permissions` from *all* the groups they belong to. This package provides the function `permissionsByUserId` which does the work to build a list of all the `permissions` the user is granted.\n\n### Checking permissions\n\nThe `validatePermissions` function (and `userHasPermission`) takes three parameters: `resource`, `action`, and `context`. For example, this call is checking to see if the current user has permission to `cancel an item` on this particular order:\n\n```js\nawait context.validatePermissions(`reaction:legacy:orders:${order._id}`, \"cancel:item\", {\n  shopId: order.shopId,\n  owner: order.accountId\n});\n```\n\n#### Resource\n\nResource is the name of the resource a user is trying to access. This consists of three required pieces: `organization`, `system`, `entity`; and one optional field: `id`.\n\nFor our purposes in Reaction code:\n\n- `organization` will always be `reaction`.\n- `system` is the service or group of services that provide the resource we want to access control. It will always be `legacy` if the code lives within the Reaction API project, and will be the package name (i.e. `simple-authorization`) if the code live outside of the Reaction API project.\n- `entity` is the actual data entity to access control, such as an `orders`. Entity names are always plural.\n- `id`  is the actual ID of a data entity to access control. This is for super granular Policies and will most of the time be omitted or described with just a * meaning \"all IDs\".\n\n#### Action\n\nThe action the user would like to preform. This can be anything, but we recommend sticking short, intentional words, which can be package-spaced if desired. For example, `create`, `read`, `update`, `delete`, and `publish` are all great actions. If you need more context, `remove:addressBook` would be a good name for the permission to remove `addressBooks` from an `account`, but not have `remove` privileges on the entire `account`.\n\n#### Context\n\nContext is used to pass any extra information to the permissions check. We use it primarily for two things at this time:\n\n1. We pass `shopId` in the context (somtimes referred to as `ketoContext`) everywhere it's avaialble\n1. We pass `owner` into the context anywhere where a regular, non-admin user is allowed permissions to something they themselves own. For example, on an order they placed, they will have `owner` permissions on that particular order.\n\n## Under the hood\n\n- `userHasPermission` is built from `getHasPermissionFunctionForUser`, which is registered to `context` as a `functionsByType` in its respective package, and called `userHasPermission` on `context` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L28-L42)). This plugin will work alongside any other authorization plugin registered in the same way.\n\n- `validatePermissions` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L46-L49)), is created from the value of `context.userHasPermission`, If `userHasPermissions === true`, `validatePermissions` does nothing, and lets the rest of the function continue to run. If `userHasPermission === false`, `validatePermissions` throws an `Access Denied` error.\n\n## Using this package\nImport this package into the [registerPlugins.js](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/registerPlugins.js) file in the Reaction API, and then await its `registerPlugin` function:\n\n```js\nimport registerSimpleAuthorizationPlugin from \"@reactioncommerce/api-plugin-authorization-simple/index.js\";\nawait registerSimpleAuthorizationPlugin(app);\n```\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-bull-queue/README.md":"# api-plugin-bull-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-bull-queue.svg)](https://www.npmjs.\ncom/package/@reactioncommerce/api-plugin-bull-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-bull-queue.svg?style=svg)](https://circleci.\ncom/gh/reactioncommerce/api-plugin-bull-queue)\n\n## Summary\n\nJob Queue plugin Based on [Bull](https://www.npmjs.com/package/bull) for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\nThe current API includes just 4 commands:\n\n`createQueue` - Which creates a job queue, assigns a processor to it and adds the queue to the context to it's \naccessible everywhere\n\n`addJob` - Allows you to add a job to the queue. You can see an example of this in the include email plugin\n\n`scheduleJob` - Allows you to schedule repeating job using cron syntax. You can see an example of \nthis in the Promotions plugin.\n\n`addDelayedJob` - Similar to `addJob` but just allows you to delay the job by a number of ms.\n\n[Many more commands](https://github.com/OptimalBits/bull/blob/HEAD/REFERENCE.md) are available if you have an instance of the queue\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2022 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-carts/README.md":"# api-plugin-carts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-carts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-carts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-carts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-carts)\n\n## Summary\n\nCarts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-catalogs/README.md":"# api-plugin-catalogs\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-catalogs.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-catalogs)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs)\n\n## Summary\n\nCatalogs plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-discounts-codes/README.md":"# api-plugin-discounts-codes\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts-codes.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts-codes)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n\n## Summary\n\nDiscount Codes plugin for the Reaction API\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-discounts/README.md":"# api-plugin-discounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n## Summary\n\nDiscounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-email-smtp/README.md":"# api-plugin-email-smtp\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-smtp.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-smtp)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp)\n\n## Summary\n\nSMTP Email plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-email-templates/README.md":"# api-plugin-email-templates\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-templates.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-templates)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates)\n\n## Summary\n\nEmail Templates plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-email/README.md":"# api-plugin-email\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email)\n\n## Summary\n\nEmail plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-files/README.md":"# api-plugin-files\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-files.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-files)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-files.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-files)\n\n## Summary\n\nFiles plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","packages/api-plugin-fulfillment-method-pickup-store/README.md":"# api-plugin-fulfillment-method-pickup-store\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-pickup`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesPickupStore - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Store\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/collectStoreDetails - dummy function to simulate api providing store specific info while returning quotes.\n* util/validateOrderMethodsPickupStore - dummy function to simulate store specific validations. Called by prepareOrder.js\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-method-shipping-dynamic-rate/README.md":"# api-plugin-fulfillment-method-shipping-dynamic-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingDynamicRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Dynamic Rate\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/calculateDynamicRateRate - dummy function to simulate api providing dynamic rate specific info while returning quotes.\n* util/validateOrderMethodsDynamicRate - dummy function to simulate dynamic rate specific validations done. Called by prepareOrder.js\n\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-method-shipping-flat-rate/README.md":"# api-plugin-fulfillment-method-shipping-flat-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingFlatRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to FlatRate (dummy and can be changed)\n* create/update/delete FlatRateFulfillmentMethods\n* create/update/delete FlatRateFulfillmentRestrictions\n* getFlatRateFulfillmentMethod(s) - deprecated\n* getFlatRateFulfillmentRestriction(s) - deprecated\n* flatRateFulfillmentMethod(s)\n* flatRateFulfillmentRestriction(s)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-type-pickup/README.md":"# api-plugin-fulfillment-type-pickup\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like pickup-store). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (pickup) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'pickup' as a ff-type via registeredFulfillmentTypes: [\"pickup\"]\n* Inserts the default entry for pickup ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment-type-shipping/README.md":"# api-plugin-fulfillment-type-shipping\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like flat-rate-shipping, dynamic-rate-shipping etc). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (shipping) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'shipping' as a ff-type via registeredFulfillmentTypes: [\"shipping\"]\n* Inserts the default entry for shipping ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-fulfillment/README.md":"# api-plugin-fulfillment\n\nThis is the base fulfillment plugin which would enable other fulfillment types (like shipping, pickup, digital) and fulfillment-methods (like shipping, store, download etc) to be introduced via their own separate plugins. This plugin provides the common functionalities required for implementing fulfillment.\n\nEach of the newly introduced fulfillment type plugin would need to have the specific fulfillment methods also to be added as separate plugins. Example, fulfillment type 'pickup' could have fulfillment methods like 'store pickup' and 'curb-side pickup' and each of them would be separate plugins.","packages/api-plugin-i18n/README.md":"# api-plugin-i18n\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-i18n.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-i18n)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-i18n.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-i18n)\n\n## Summary\n\ni18n plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","packages/api-plugin-inventory-simple/README.md":"# api-plugin-inventory-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple)\n\n## Summary\n\nSimple Inventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-inventory/README.md":"# api-plugin-inventory\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory)\n\n## Summary\n\nInventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-job-queue/README.md":"# api-plugin-job-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-job-queue.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-job-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue)\n\n## Summary\n\nJob Queue plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-job-queue/src/job-queue/README.md":"The files in this folder are a rewrite of the @reactioncommerce/job-queue package with an almost identical API but no Meteor dependencies. This is not expected to be the final solution for background jobs in Reaction, but it is a temporary solution that works fairly well for now.\n","packages/api-plugin-navigation/README.md":"# api-plugin-navigation\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-navigation.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-navigation)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-navigation.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-navigation)\n\n## Summary\n\nThis plugin provides Navigation Item and Navigation Tree `mutations` and `queries` for the Reaction API.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-notifications/README.md":"# api-plugin-notifications\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-notifications.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-notifications)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-notifications.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-notifications)\n\n## Summary\n\nNotifications plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-orders/README.md":"# api-plugin-orders\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-orders.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-orders)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-orders.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-orders)\n\n## Summary\n\nOrders plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-payments-example/README.md":"# api-plugin-payments-example\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments-example.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments-example)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments-example.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments-example)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nExample Payments plugin for the Reaction API\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-payments-stripe-sca/README.md":"# api-plugin-payments-stripe-sca\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments-stripe-sca.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments-stripe-sca)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments-stripe-sca.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments-stripe-sca)\n\n## Summary\n\nStripe Payments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction) with support for SCA-compliant Stripe Payment Intents API\n\n### Usage\n\n1. Set the `STRIPE_API_KEY` environment variable in reaction API .env file with the private API key from Stripe.\n2. Set the `STRIPE_PUBLIC_API_KEY` environment variable in the example-storefront .env file with the public API key from Stripe.\n3. Restart containers.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2021 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.","packages/api-plugin-payments/README.md":"# api-plugin-payments\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nPayments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-pricing-simple/README.md":"# api-plugin-pricing-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-pricing-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-pricing-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-pricing-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-pricing-simple)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSimple Pricing plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-pricing-simple/src/README.md":"# Simple Pricing\n\nPricing data falls under it's own domain within the Reaction Commerce system, however it currently needs to be intertwined and available from other system domains (i.e., Catalog, Cart, Checkout, Orders). To give us more flexibility in pricing data management we've begun to move pricing get/set functions into this `simple-pricing` plugin and calling these functions from the `context.queries` object from within their respective functions. Now we can fully replace the pricing management system without modification to core by creating a custom plugin that replaces the `simple-pricing` queries.\n\n## Queries\n\nAny pricing plugin is expected to define and register the following query functions.\n\n### getVariantPrice\n\nThis query function is used to get a product variant's real current price.\n","packages/api-plugin-products/README.md":"# api-plugin-products\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-products.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-products)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-products.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-products)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nProducts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n### Example on how to use Filter Conditions\n\nWe have a query endpoint defined in this plugin which allows us to query products collection based on the input GraphQL conditions object. This query endpoint is defined as `filterProducts.js` and it calls the `generateFilterQuery` function from the `api-utils` plugin to generate the MongoDB filter query.\n\nThe `generateFilterQuery` function expects the input GraphQL conditions object to be in the format of the `FilterConditionsInput` input type defined in the GraphQL Schemas (in api-core plugin) along with other parameters like `context`, `collectionName` and `shopId`.\n\nPlease go through a general introduction of how to use this function which can be found in the [api-utils README](https://github.com/reactioncommerce/reaction/tree/trunk/packages/api-utils/docs) before going through the examples below on how to use this function in the context of the `products` plugin.\n\nIn the query endpoint, we pass the `FilterConditionsInput` input type object as the `conditions` argument. This object is passed to the `generateFilterQuery` function along with other parameters like `context`, `collectionName` and `shopId` to generate the MongoDB filter query. The `generateFilterQuery` function is generic and can be used to generate filter queries for any collection. Since the parametes like `context`, `collectionName` and `shopId` are pretty self-explanatory, we shall focus on explaining the various ways in which the `conditions` object can be used.\n\n1. Single condition.\nHere we are querying products collection for entries with the handle as 'mens-waterproof-outdoor-rain-jacket'. Since it is single condition, using either `all` or `any` will not make difference. \n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n<br>\n\n2. Two conditions.\n\nHere we are querying products collection for entries which have either the handle as 'mens-waterproof-outdoor-rain-jacket' or 'title' begins with the text 'men'. Since we are using the `any` to connect the conditions, it translates to a mongo DB `$or` condition. Please note that the top level `all` condition is only to maintain the structure of the input GraphQL conditions object. It does not impact the results of the inner query.\n\n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }, \n            {\n              key: \"title\",\n              stringValue: \"men\",\n              relationalOperator: beginsWith,\n              logicalNot: false\n              caseSensitive: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n<br>\n\n3. Multiple conditions.\n\nHere we are querying products collection for entries which confirms to multiple conditions.\nWe have 3 distinct group of conditions in the inner level and the results of all these 3 are joined at the top level with `all` meaning `$and` in MongoDB.\n\nThe first group looks for entries matching either of the conditions `handle` as 'mens-waterproof-outdoor-rain-jacket' or `title` begins with the text 'men'. Since we are using the `any` to connect the conditions, it translates to a mongo DB `$or` condition.\n\nThe second group looks for entries matching the `_id` in the array `[\"DZwLHk4EAzitRni8F\", \"Hn4BRaBvLkYffMq36\"]` and `isDeleted` as `false` and `workflow.status` as `new`. Since we are using the `all` to connect the conditions, it translates to a mongo DB `$and` condition.\n\nThe third group looks for entries matching the `price.min` greater than 19.99 and `type` as `simple`. Since we are using the `all` to connect the conditions, it translates to a mongo DB `$and` condition.\n\nAs explained above, the final results are joined at the top level with `all` meaning `$and` in MongoDB.\n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }, \n            {\n              key: \"title\",\n              stringValue: \"men\",\n              relationalOperator: beginsWith,\n              logicalNot: false\n              caseSensitive: false\n            }\n          ]\n        },\n        {\n          all:[\n            {\n              key: \"_id\",\n              stringArrayValue: [\"DZwLHk4EAzitRni8F\", \"Hn4BRaBvLkYffMq36\"],\n              relationalOperator: in,\n              logicalNot: false\n            },\n            {\n              key: \"isDeleted\",\n              booleanValue: false,\n              relationalOperator: eq,\n              logicalNot: false\n            },\n            {\n              key: \"workflow.status\",\n              stringValue: \"new\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        },\n        {\n          all:[\n            {\n              key: \"price.min\",\n              floatValue: 19.99,\n              relationalOperator: gte,\n              logicalNot: false\n            },\n            {\n              key: \"type\",\n              stringValue: \"simple\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-promotions-coupons/README.md":"## Promotions-Coupons\n\nA plugin that allows you to create promotions \"coupons\" which can trigger any \"action\"\n\n","packages/api-plugin-promotions-discounts/README.md":"# api-plugin-promotions-discounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-promotions-discounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-promotions-discounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-promotions-discounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-promotions-discounts)\n\n## Summary\n\nDiscounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-promotions-offers/README.md":"## Promotions-Offers\n\nA plugin that allows you to create promotions \"offers\" which can trigger any \"action\"\n\n","packages/api-plugin-promotions/README.md":"## Promotions\n\nThe base plugin for promotions\n\n","packages/api-plugin-sample-data/README.md":"# api-plugin-sample-data\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-example.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-example)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-example.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-example)\n\n## Summary\n\nThis plugin loads the database with sample data that gives the user an idea of how the Storefront would appear with the basic details. The data would also appear in the AdminUI. The sample data includes Account (default admin account), Shop data (includes basic shop data, sample shipping, sample payment), Product data (including variants and images), Tags & Navigation. Instructions to add additional data are also provided below.\n\n#### Where is the sample data stored?\nAll of the initial set of data required by this plugin is present in the `/src/json-data` folder within this plugin. All files are in JSON format.\n\nAdditionally, we have the image files for the products stored in `/src/images` folder.\n#### How to load the default sample data?\nThis plugin has to be explicitly added to your API and configured to load in the initial start-up. Apart from including this plugin, the other pre-requisites are:\n* The LOAD_SAMPLE_DATA flag should be set to true in the .env file in the root API folder. Add a line `LOAD_SAMPLE_DATA=true`\n* There should not be any existing Shop in the database\n\nIf any of the above two conditions turns out to be false, this plugin exits without making any changes to the database.\n\nAt this stage, the database is populated with the initial sample data and you may tweak around with it from the Admin UI. You may add new products, tags, navigation etc from the Admin UI as usual. But in case you want some additional data to be prepopulated along with the provided sample data, then you may follow the below steps to update the JSON files to include the additional data.\n\n#### How to add additional data? \nFor the purpose of the sample data, we are confining our requirement to a single account and shop. The details of the account and the shop are present in the following json files and are customizable (`/src/json-data/Accounts.json`, `/src/json-data/users.json` and `/src/json-data/Shops.json`). Also, the default shipping method is added via `/src/json-data/ShippingMethod.json`.\n\nAs for the remaining items (Products, Images, Tags, Navigation), let us walk through the steps to add them.\n\nLet us add the Tag details first as this will be required before we publish the products.\n\n##### 1. Adding a new Tag\nSample json for a new Tag is provided below. Please make a note of the object's key (menJacket) and the slug (men-jacket), as they will be used later in this plugin. Also the _name_ and _displayTitle_ is what the user would see in the UI as the bread-crumbs and title.\n\n```\n  \"menJacket\": {\n    \"name\": \"Men's Jacket\",\n    \"slug\": \"men-jacket\",\n    \"displayTitle\": \"Men's Jackets\",\n    \"shopId\": \"\",\n    \"isVisible\": true\n  }\n```\nOnce the new tag is present in the Tags.json, we would need to modify the `/src/loaders/loadTags.js` to create an entry (similar to the one below) corresponding to the newly added tag. Here we have hard-coded the variable 'menJacket' to match the property key that we used above to create the tag.\n\n`\n  tagOutput.menJacket = await context.mutations.addTag(context.getInternalContext(), TagsData.menJacket);\n`\n\nThe tag objects output from the `loadTags.js` is used later in the `loadProducts.js` to associate the products with the tags. For the association to happen, we need to create an entry in the `/src/json-data/TagProductMapping.json` also and this will be mentioned in the below section where we add products.\n\n##### 2. Adding new Products\n* For this sample-data plugin, we are considering products that have variants under them and in some examples we have one or more options under these variants. \n* The top level product will have `type: 'simple'` and also the ancestors property will be an empty array. \n* The variants and the options under the variants (if any) will have `type: 'variant'` and the ancestors property will be an array of productIds that defines the hierarchy of the Product.\n\nThe sample entry that we are adding now will be a top-level product (say Jacket), with variants categorized by 'Color' and 'Size'. Example, we will have:\n```\nJacket\n|\n+-- Black (Color)\n|   |\n|   +-- Small (Size)\n|   +-- Large (Size)\n|\n+-- Blue (Color)\n    |\n    +-- Small (Size)\n    +-- Medium (Size)\n```\n\n_Special-case: 'price' property._\n\nThe 'price' property of leaf-level products would be of type 'Number' which contains the actual price of the product. The 'price' property will be an object for all the higher levels of the specific product (basically the top-level and all other variants). This object would contain properties such as range, max, min. This is to capture the max, min, and range of price values of all the products under that level.\n\nIn case of this sample data, for product entries of `type: 'simple'` we add price as an object. For product entries of `type: 'variant'` we shall insert price as a Number. Later, the 'afterVariantUpdate' event which is triggered inside this plugin will transform all the 'price' properties from Number to Object for those entries which are not leaf-level.\n\n\n###### 2.a. Adding top-level product\nHere is a sample json to add a new top-level product (Comments are only for additional info and must be removed before using this template).\n\n```\n{\n    \"_id\": \"DZwLHk4EAzitRni8F\",    // provide NEW productId\n    \"ancestors\": [],              // empty for top-level\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:01:34.445+0000\"\n    },\n    \"handle\": \"mens-jacket\",\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"\",       // this will be updated by the plugin dynamically\n    \"shouldAppearInSitemap\": true,\n    \"supportedFulfillmentTypes\": [\n      \"shipping\"\n    ],\n    \"title\": \"Men's Jacket\",\n    \"type\": \"simple\",         // 'simple' for top-level product\n    \"updatedAt\": {\n      \"$date\": \"2022-01-21T16:53:32.010+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": {               // price as object for top-level\n      \"range\": \"49.99\",\n      \"min\": 49.99,\n      \"max\": 49.99\n    },\n    \"description\": \"Our new rain jacket is crafted with outdoor-inspired details in a city-ready package. Constructed in a durable three-layer waterproof stretch nylon fabric, our rain jacket will be your first line of defense against the elements.\",\n    \"originCountry\": \"US\",\n    \"currentProductHash\": \"3f262d57850e31fbccd2a6eb6a1bb92b1328a327\",\n    \"facebookMsg\": \"Share our listing wth your friends on facebook using the link below www.facebook.com/mens-waterproof-outdoor-rain-jacket\",\n    \"pinterestMsg\": \"Share our listing wth your friends on pinterest using the link below www.pinterest.com/mens-waterproof-outdoor-rain-jacket\",\n    \"twitterMsg\": \"Share our listing wth your friends on twitter using the link below www.twitter.com/mens-waterproof-outdoor-rain-jacket\",\n    \"pageTitle\": null,\n    \"vendor\": \"Reaction Outdoor Apparel\",\n    \"publishedAt\": {\n      \"$date\": \"2022-01-21T16:53:32.010+0000\"\n    },\n    \"publishedProductHash\": \"3f262d57850e31fbccd2a6eb6a1bb92b1328a327\",\n    \"hashtags\": []\n  }\n```\n\n###### 2.b. Adding Variants entries\nSample json for adding the variants 'Color' (entries Black & Blue). Please notice the _attributeLabel_ and _optionTitle_ properties. Also the ancestors property has the productId of the top-level product.\n(Comments are only for additional info and must be removed before using this template)\n```\n  {\n    \"_id\": \"Hn4BRaBvLkYffMq36\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level\n      \"DZwLHk4EAzitRni8F\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:01:34.457+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-05T15:17:49.155+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"isTaxable\": true,\n    \"attributeLabel\": \"Color\",\n    \"height\": 18,\n    \"length\": 10,\n    \"optionTitle\": \"Black\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black\",\n    \"weight\": 2.5,\n    \"width\": 6,\n    \"compareAtPrice\": 24.99,\n    \"taxCode\": \"USCA\",\n    \"taxDescription\": \"California Tax\"\n  },\n  {\n    \"_id\": \"ynNA5rXKZCHF2uKjq\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level\n      \"DZwLHk4EAzitRni8F\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:38:57.021+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-05T15:39:37.646+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"isTaxable\": true,\n    \"attributeLabel\": \"Color\",\n    \"height\": 15,\n    \"length\": 17,\n    \"optionTitle\": \"Blue\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue\",\n    \"weight\": 2.5,\n    \"width\": 13,\n    \"compareAtPrice\": 24.99\n  }\n```\n###### 2.c. Adding Leaf-level entries\nSample json for adding leaf-level entries under Color-Black with variant type as Size (values Small, Large etc). The 1st entry in the ancestors property is the top-level product and the 2nd entry is the variant with Color = Black (\"Hn4BRaBvLkYffMq36\"). Please notice the _attributeLabel_ and _optionTitle_ properties. \n(Comments are only for additional info and must be removed before using this template)\n\n```\n  {\n    \"_id\": \"4JS386GgmvrxgyooS\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"Hn4BRaBvLkYffMq36\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:50:33.008+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:54:56.478+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Small\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black Small\",\n    \"weight\": null,\n    \"width\": null\n  },\n  {\n    \"_id\": \"MShhiNKGYqyR68ZF7\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"Hn4BRaBvLkYffMq36\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:51:11.147+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:54:58.299+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Large\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black Large\",\n    \"weight\": null,\n    \"width\": null\n  }\n```\nSample json for adding leaf-level entries under Color-Blue with variant type as Size (values Small, Medium etc). The 1st entry in the ancestors property is the top-level product and the 2nd entry is the variant with Color = Blue (\"ynNA5rXKZCHF2uKjq\"). Please notice the _attributeLabel_ and _optionTitle_ properties.\n\n```\n  {\n    \"_id\": \"je2NxNaHzghJSFNin\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"ynNA5rXKZCHF2uKjq\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:54:03.957+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-19T23:43:39.335+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Small\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue Small\",\n    \"weight\": null,\n    \"width\": null\n  },\n  {\n    \"_id\": \"YGQdZoXEcYBMCrfcJ\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"ynNA5rXKZCHF2uKjq\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:54:20.828+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:55:32.251+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Medium\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue Medium\",\n    \"weight\": null,\n    \"width\": null\n  }\n```\n\nNow that we have the product details available, we could complete the entry in the `/src/json-data/TagProductMapping.json` that we mentioned earlier in the '1. Add Tags' section. Since our new product maps to the tag 'menJacket' we should be adding an entry (top-level productId \"DZwLHk4EAzitRni8F\") to the array of products of the specific tag.\n\n##### 3. Adding NavigationItem\n\nWe should be creating a NavigationItem entry in the `/src/json-data/NavigationItems.json` similar to the sample provided below. The value property is what gets displayed on the Storefront UI navigation. The url has to follow the specific format `/tag/<slug_of_the_tag>`. Here we want the NavigationItem to point to the Men's Jacket. That particular product is tagged with a tag entry 'menJacket' which has the slug as 'men-jacket'. So our url value would be _/tag/men-jacket_\n\n```\n  \"MenuOneLeafLevel\": {\n    \"draftData\": {\n      \"classNames\": null,\n      \"content\": [\n        {\n          \"language\": \"en\",\n          \"value\": \"Men's Jacket\"\n        }\n      ],\n      \"isUrlRelative\": true,\n      \"shouldOpenInNewWindow\": false,\n      \"url\": \"/tag/men-jacket\"\n    }\n  }\n```\n\n##### 4. Updating NavigationTree\nNavigation structure can be as complex or simple as we need it to be. In our sample-data, we are defining few top-level entries (like Men/Women/Unisex) and sub-levels under them (like Men's Outdoors, Women's Outdoors) and leaf-level entries (like Men's Jacket). Updating Navigation tree via code involves extensive hardcoding as detailed in `/src/loaders/loadNavigation.js`. The steps are:\n* Create a NavigationItem object by calling the mutaion (createNavigationItem) and providing the NavigationItem data from the above created entry inside `/src/json-data/NavigationItems.json` .\n* This NavigationItem object is updated with the function '_getNavigationItem_'.\n* The NavigationItem under each level of Navigation is defined by the '_items_' property of the that level. Hence we have to add our new NavigationItem entry to the items of the level above it.\n\nThe above steps translate to the below code (for reference)\n```\n  const navItemMenuOneLeafLevel = await context.mutations.createNavigationItem(context.getInternalContext(), {\n    navigationItem: NavigationItemsData.MenuOneLeafLevel\n  });\n\n\n  let m1leaf = getNavigationItem(navItemMenuOneLeafLevel._id);\n\n  m1sub.items = [m1leaf];\n\n```\nInside  `/src/loaders/loadNavigation.js` we can see how this sub-level (`m1sub`) is subsequently added to the _items_ array which in turn is added to the top-level of Navigation. \n\nThe navigation changes are publshed via the _publishNavigationChanges_ mutation and the Shops collection is updated with the _navigationTreeId_.\n\n##### 5. Adding Images to the product\n\nWe could add one (or more) images for each of the leaf-level entries mentioned in the Products.json. But for the simplicity of this sample-data, we are only adding images at the variant-level. This would mean that all of the leaf-level items under a variant would have the same set of images.\n\nTo explain with an example, we have 'Jackets' as top-level product, variants as 'Black'/'Blue' and leaf-level entries as Small/Medium/Large. So in effect, we will have the same set of images for all the sizes (small/medium/large) under each Color.\n\nOnce we have identified the productID (_id) of the variant entries, we just need to update the file-name to include the productId at the begining of the file-name followed by a period '.'. So the specific format of the image would be `productID.<rest_of_file_name>.<extn>`. Allowed image file extensions are jpg/jpeg/png. Once the image with the updated file-name is ready, we just need to place the file in the `/src/images` folder.\n\nNote: We have hard-coded the path to the images folder inside `/src/loaders/loadImages.js` as follows `  let folderPath = \"./custom-packages/api-plugin-sample-data/src/images/\"`\nBy default, when a new plugin is added, the above mentioned path would be correct, but in case we have the plugin folder under a different name, we need to make sure that the above folderPath is updated to match the actual location.\nThe `/src/loaders/loadImages.js` script will update the product images to the database and publish the product. The details of the parent productId which is required by the `loadImages.js` is pulled from the Products.json that we updated initially with product data.\n\n#### Conclusion\nAt this stage, we have all the data that we need to update the database. We could start the API with api-sample-data-plugin enabled and the LOAD_SAMPLE_DATA flag set to true in .env file.\n\n\n#### Login info (for the adminUI) \n\nusername: admin@example.org\npassword: password\n\n## Included in this example plugin\n\n### `.circleci/`\n\nAdds CI scripts that enable Circle CI to run tests and lint your project.\n\n### `src/`\n\nThe `src` folder is where you'll put all the plugin files. An `index.js` with a bear-bones `registerPlugin` is included.\n\n### `.gitignore`\n\nA basic `gitignore` file\n\n### `.nvmrc`\n\n`.nvmrc` sets your plugin to use Node v12.14.1\n\n### `babel.config.cjs`\n\nIf your plugin includes linting and tests, this file is required to allow esmodules to run correctly.\n\n### `jest.config.cjs`\n\nIf your plugin includes tests, this file is required to allow esmodules to run correctly. You'll need to update the `transformIgnorePatterns` and `moduleNameMapper` sections to include any esmodule `npm` packages used in your plugin.\n\n### `License.md`\n\nIf your plugin uses `Apache 2` licensing, you can leave this file as-is. If another type of licensing is used, you need to update this file, and the README, accordingly.\n\n### `package.json`\n\nThe provided `package.json` is set up to install all needed packages and config for linting and testing. You'll need to update the `name`, `description`, and add any new dependencies your plugin files use.\n\n### `index.js`\n\nThe entrypoint file for your npm package, will most likely just export your plugin registration from the `src` folder.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-sequences/README.md":"# api-plugin-sequences\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-sequences.svg)](https://www.npmjs.\ncom/package/@reactioncommerce/api-plugin-sequences)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-sequences.svg?style=svg)](https://circleci.\ncom/gh/reactioncommerce/api-plugin-sequences)\n\n## Summary\n\nProvides functionality for auto-incrementing integer IDs which is not natively supported by Mongo\n\n## Usage\n\nYou can define a new sequence by declaring it in the `Sequences` of your plugin registraion\n\n```javascript\n    sequenceConfig: [\n      {\n        entity: \"Promotions\"\n      }\n    ]\n```\n\nThis will create a sequence starting with 1000000 which can be incremented (returning the next to use) by calling\n`context.mutations.incrementSequence(context, shopId, \"YOUR_ENTITY_NAME\")`;\n\nIf you wish to define the starting sequence you can do that by declaring an env var like:\n\n```bash\nSEQUENCE_INITIAL_VALUES={\"Promotions\":999}\n```\n\nWhere you declare a one-line JSON object which contains any entities you want use a sequence for.\n\nSequences will be created on start-up and should be available to use immediately.\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-settings/README.md":"# api-plugin-settings\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-settings.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-settings)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-settings.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-settings)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSettings plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-shipments-flat-rate/README.md":"# api-plugin-shipments-flat-rate\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shipments-flat-rate.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shipments-flat-rate)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shipments-flat-rate.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shipments-flat-rate)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nFlat Rate Shipments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","packages/api-plugin-shipments/README.md":"# api-plugin-shipments\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shipments.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shipments)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shipments.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shipments)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nShipments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","packages/api-plugin-shops/README.md":"# api-plugin-shops\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shops.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shops)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shops.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shops)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nShops plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","packages/api-plugin-simple-schema/README.md":"# api-plugin-simple-schema\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-simple-schema.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-simple-schema)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-simple-schema.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-simple-schema)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSimpleSchema plugin for the [Reaction API](https://github.com/reactioncommerce/reaction).\n\nThe [SimpleSchema](https://github.com/aldeed/simple-schema-js) package is used by many plugins to validate data, often before inserting or updating MongoDB documents. To allow other plugins to extend these schemas, some plugins register them such that they are accessible in a `preStartup` function.\n\n## Installation\n\n```sh\nnpm install @reactioncommerce/api-plugin-simple-schema\n```\n\nThen add a reference in `plugins.json`, using any key you want. The order in which plugins appear in this file is the order in which they load.\n\n```json\n{\n  simpleSchema: \"@reactioncommerce/api-plugin-simple-schema\"\n}\n```\n\n## Usage\n\nHere's an example of registering a schema:\n\n```js\nimport SimpleSchema from \"simpl-schema\";\n\nconst ProductSchema = new SimpleSchema({\n  // ...\n});\n\nexport default async function register(app) {\n  await app.registerPlugin({\n    // ...\n    simpleSchemas: {\n      Product: ProductSchema\n    }\n  });\n}\n```\n\nNote that a plugin creating a SimpleSchema instance as in the above example will also need to list the `simpl-schema` NPM package as a dependency.\n\nAnd on the other side, if you have a plugin that wants to extend some of the schemas provided by other plugins, do it in a `preStartup` function:\n\n```js\nexport default function preStartup(context) {\n  context.simpleSchemas.Product.extend({\n    price: PriceRange\n  });\n}\n```\n\nThis could be done in a `startup` function, but because startup code sometimes validates against these schemas, it's safer to do it in a `preStartup` function.\n\nA plugin that extends schemas but never calls `new SimpleSchema()` anywhere need not list the `simpl-schema` NPM package as a dependency.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","packages/api-plugin-sitemap-generator/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-sitemap-generator%2FREADME.md -->","packages/api-plugin-surcharges/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-surcharges%2FREADME.md -->","packages/api-plugin-system-information/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-system-information%2FREADME.md -->","packages/api-plugin-tags/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-tags%2FREADME.md -->","packages/api-plugin-taxes-flat-rate/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-taxes-flat-rate%2FREADME.md -->","packages/api-plugin-taxes/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-taxes%2FREADME.md -->","packages/api-plugin-translations/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-translations%2FREADME.md -->","packages/api-utils/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-utils%2FREADME.md -->","packages/api-utils/docs/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-utils%2Fdocs%2FREADME.md -->","packages/api-utils/docs/generateFilterQuery.md":"\n# generateFilterQuery\n\nA function that generates a MongoDB filter query from an input GraphQL conditions object. It expects the input GraphQL conditions object to be in the format of the `FilterConditionsInput` input type (detailed below) defined in the GraphQL  Schemas along with other parameters like `context`, `collectionName` and `shopId`.\n\nAs seen in the format below, \n* The input object is a nested object where you could use  either `all` or `any` keys.\n* Both the top level `all` & `any` keys are an array of objects with one more level of `all` or `any` keys.\n* The inner `all` or `any` keys is an array of objects with the structure defined by `SingleConditionInput`.\n* The `SingleConditionInput` object has the fields which define a single condition to filter on.\n<br>\n* The `all` key is equivalent of the `$and` operator in MongoDB and the `any` key is equivalent of the `$or` operator in MongoDB.\n* In the `SingleConditionInput` object, mandatory fields are the `key`, `relationalOperator` and exactly any ONE of the value fields. The `key` is the field name to filter on. The `relationalOperator` is the relational operator to use to filter on the field (predefined as enum values). The `stringValue`, `integerValue`, `floatValue`, `booleanValue`, `dateValue`, `stringArrayValue`, `integerArrayValue`, `floatArrayValue` are the values to filter on (use exactly one of this) depending on the key.\n* Finally there are two more optional fields `caseSensitive` and `logicalNot`. The `caseSensitive` is a boolean flag to set if the regex is case sensitive. The `logicalNot` is a boolean flag to set if the condition is to be negated.\n\nFilterConditionsInput format below (from GraphQL Schemas). __Example__ follows the format below:\n\n\n```graphql\n\ninput FilterConditionsInput {\n  all: [ConditionsArray]\n\n  any: [ConditionsArray]\n}\n\n\ninput ConditionsArray {\n  all: [SingleConditionInput]\n\n  any: [SingleConditionInput]\n}\n\n\ninput SingleConditionInput {\n  booleanValue: Boolean\n  caseSensitive: Boolean\n  dateValue: DateTime\n  floatArrayValue: [Float]\n  floatValue: Float\n  integerArrayValue: [Int]\n  integerValue: Int\n  key: String!\n  logicalNot: Boolean\n  relationalOperator: RelationalOperatorTypes!\n  stringArrayValue: [String]\n  stringValue: String\n}\n\n\nenum RelationalOperatorTypes{\n  beginsWith\n  endsWith\n  eq\n  gt\n  gte\n  in\n  lt\n  lte\n  ne\n  nin\n  regex\n}\n\n```\n\n\n## Example\n\nExample of invoking the function with a simple conditions object. Here we are querying for products collection for entries with the handle as 'mens-waterproof-outdoor-rain-jacket'. Since it is single condition, using either `all` or `any` will not make difference. \n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n\nPlease refer to readme in the respective plugins for more detailed examples (example: api-plugin-products).\n\n","packages/api-utils/docs/getAbsoluteUrl.md":"# getAbsoluteUrl\n\nA function that takes a root URL and a relative URL and combines them. Handles URLs that do and don't begin and end with slashes.\n\n- It's fine to pass a path that may be undefined. Just the root URL will be returned.\n- It's fine to pass a path that may already be absolute. It will be left alone.\n\nExample:\n\n```js\nconst rootUrl = \"http://localhost:3000/\";\nconst path = \"/media/test.jpg\";\nconst url = getAbsoluteUrl(rootUrl, path); // http://localhost:3000/media/test.jpg\n```\n","packages/api-utils/docs/getPaginatedResponseFromAggregate.md":"# getPaginatedResponseFromAggregate\n\nReturns a paginated response from a MongoDB aggregation pipeline.\n\nUsage example:\n\n```js\nimport getPaginatedResponseFromAggregate from \"@reactioncommerce/api-utils/getPaginatedResponseFromAggregate.js\";\n\n// the MongoDB collection you want to run your aggregation on\nconst collection = getYourMongoDBCollectionSomehow();\n\nconst pipeline = [\n  {\n    // for example, here's a $lookup operator\n    $lookup: {\n      // some options\n    }\n  },\n  // but you can add,\n  // any,\n  // other,\n  // operators\n];\n\nconst args = {\n  // connection arguments from your GraphQL query or mutation\n  // more info here: https://facebook.github.io/relay/graphql/connections.htm#sec-Arguments\n  // supported:\n  // offset: Int,\n  // first: Int,\n  // last: Int,\n  // sortBy: String (the name of the MongoDB field you want to sort results by)\n  // sortOrder: String (\"desc\" for descending, or \"asc\" for ascending)\n};\n\nconst options = {\n  // some options to control which optional fields get returned with the results\n  // supported:\n  // includeHasNextPage: Boolean,\n  // includeHasPreviousPage: Boolean,\n  // includeTotalCount: Boolean\n};\n\nconst results = await getPaginatedResponseFromAggregate(collection, pipeline, args, options);\n\nreturn results;\n// {\n//   pipeline: Array (the pipeline that was passed, with the necessary modifications that were added to it by `getPaginatedResponseFromAggregate`)\n//   nodes: Array (the returned items)\n//   pageInfo: Object {\n//     `hasNextPage: Boolean` (if requested in `options`),\n//     `hasPreviousPage: Boolean` (if requested in `options`),\n//     `startCursor`: String (`_id` of the first item in `nodes`),\n//     `endCursor`: String (`_id of the last item in `nodes`)\n//   },\n//   totalCount: Int (if requested in `options`)\n// }\n```\n","packages/api-utils/docs/tagsForCatalogProducts.md":"# tagsForCatalogProducts\n\nGive an array of CatalogProduct objects, returns an array of tags for each product ID.\n\nExample data set:\n\n```js\n// Tags\n[\n  {\n    _id: \"1\",\n    name: \"ONE\"\n  },\n  {\n    _id: \"2\",\n    name: \"TWO\"\n  },\n  {\n    _id: \"3\",\n    name: \"THREE\"\n  }\n]\n\n// CatalogProducts\n[\n  {\n    product: {\n      productId: \"1\",\n      tagIds: [\"1\", \"2\"]\n    }\n  },\n  {\n    product: {\n      productId: \"2\",\n      tagIds: [\"3\"]\n    }\n  }\n]\n```\n\nUsage:\n\n```js\n// Tags is the \"Tags\" Mongo.Collection\n// `catalogProducts` is an array of CatalogItemProduct from Catalog collection\nconst result = await tagsForCatalogProducts(Tags, catalogProducts);\n```\n\nResult will be:\n\n```js\n[\n  {\n    productId: \"1\",\n    tags: [\"ONE\", \"TWO\"]\n  },\n  {\n    productId: \"2\",\n    tags: [\"THREE\"]\n  }\n]\n```\n","packages/db-version-check/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fdb-version-check%2FREADME.md -->","packages/file-collections-sa-base/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections-sa-base%2FREADME.md -->","packages/file-collections-sa-gridfs/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections-sa-gridfs%2FREADME.md -->","packages/file-collections/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections%2FREADME.md -->","packages/logger/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Flogger%2FREADME.md -->","packages/random/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Frandom%2FREADME.md -->","packages/reaction-error/README.md":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Freaction-error%2FREADME.md -->"},"items":[{"name":"generateFilterQuery.md","path":"packages/api-utils/docs/generateFilterQuery.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-utils/docs/generateFilterQuery.md","title":"Docs Skill","category":"anthropic-skill","format":"markdown","content":"\n# generateFilterQuery\n\nA function that generates a MongoDB filter query from an input GraphQL conditions object. It expects the input GraphQL conditions object to be in the format of the `FilterConditionsInput` input type (detailed below) defined in the GraphQL  Schemas along with other parameters like `context`, `collectionName` and `shopId`.\n\nAs seen in the format below, \n* The input object is a nested object where you could use  either `all` or `any` keys.\n* Both the top level `all` & `any` keys are an array of objects with one more level of `all` or `any` keys.\n* The inner `all` or `any` keys is an array of objects with the structure defined by `SingleConditionInput`.\n* The `SingleConditionInput` object has the fields which define a single condition to filter on.\n<br>\n* The `all` key is equivalent of the `$and` operator in MongoDB and the `any` key is equivalent of the `$or` operator in MongoDB.\n* In the `SingleConditionInput` object, mandatory fields are the `key`, `relationalOperator` and exactly any ONE of the value fields. The `key` is the field name to filter on. The `relationalOperator` is the relational operator to use to filter on the field (predefined as enum values). The `stringValue`, `integerValue`, `floatValue`, `booleanValue`, `dateValue`, `stringArrayValue`, `integerArrayValue`, `floatArrayValue` are the values to filter on (use exactly one of this) depending on the key.\n* Finally there are two more optional fields `caseSensitive` and `logicalNot`. The `caseSensitive` is a boolean flag to set if the regex is case sensitive. The `logicalNot` is a boolean flag to set if the condition is to be negated.\n\nFilterConditionsInput format below (from GraphQL Schemas). __Example__ follows the format below:\n\n\n```graphql\n\ninput FilterConditionsInput {\n  all: [ConditionsArray]\n\n  any: [ConditionsArray]\n}\n\n\ninput ConditionsArray {\n  all: [SingleConditionInput]\n\n  any: [SingleConditionInput]\n}\n\n\ninput SingleConditionInput {\n  booleanValue: Boolean\n  caseSensitive: Boolean\n  dateValue: DateTime\n  floatArrayValue: [Float]\n  floatValue: Float\n  integerArrayValue: [Int]\n  integerValue: Int\n  key: String!\n  logicalNot: Boolean\n  relationalOperator: RelationalOperatorTypes!\n  stringArrayValue: [String]\n  stringValue: String\n}\n\n\nenum RelationalOperatorTypes{\n  beginsWith\n  endsWith\n  eq\n  gt\n  gte\n  in\n  lt\n  lte\n  ne\n  nin\n  regex\n}\n\n```\n\n\n## Example\n\nExample of invoking the function with a simple conditions object. Here we are querying for products collection for entries with the handle as 'mens-waterproof-outdoor-rain-jacket'. Since it is single condition, using either `all` or `any` will not make difference. \n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n\nPlease refer to readme in the respective plugins for more detailed examples (example: api-plugin-products).\n\n","isInternal":false,"tokens":765,"sizeBytes":3281},{"name":"getAbsoluteUrl.md","path":"packages/api-utils/docs/getAbsoluteUrl.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-utils/docs/getAbsoluteUrl.md","title":"Docs Skill","category":"anthropic-skill","format":"markdown","content":"# getAbsoluteUrl\n\nA function that takes a root URL and a relative URL and combines them. Handles URLs that do and don't begin and end with slashes.\n\n- It's fine to pass a path that may be undefined. Just the root URL will be returned.\n- It's fine to pass a path that may already be absolute. It will be left alone.\n\nExample:\n\n```js\nconst rootUrl = \"http://localhost:3000/\";\nconst path = \"/media/test.jpg\";\nconst url = getAbsoluteUrl(rootUrl, path); // http://localhost:3000/media/test.jpg\n```\n","isInternal":false,"tokens":123,"sizeBytes":493},{"name":"getPaginatedResponseFromAggregate.md","path":"packages/api-utils/docs/getPaginatedResponseFromAggregate.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-utils/docs/getPaginatedResponseFromAggregate.md","title":"Docs Skill","category":"anthropic-skill","format":"markdown","content":"# getPaginatedResponseFromAggregate\n\nReturns a paginated response from a MongoDB aggregation pipeline.\n\nUsage example:\n\n```js\nimport getPaginatedResponseFromAggregate from \"@reactioncommerce/api-utils/getPaginatedResponseFromAggregate.js\";\n\n// the MongoDB collection you want to run your aggregation on\nconst collection = getYourMongoDBCollectionSomehow();\n\nconst pipeline = [\n  {\n    // for example, here's a $lookup operator\n    $lookup: {\n      // some options\n    }\n  },\n  // but you can add,\n  // any,\n  // other,\n  // operators\n];\n\nconst args = {\n  // connection arguments from your GraphQL query or mutation\n  // more info here: https://facebook.github.io/relay/graphql/connections.htm#sec-Arguments\n  // supported:\n  // offset: Int,\n  // first: Int,\n  // last: Int,\n  // sortBy: String (the name of the MongoDB field you want to sort results by)\n  // sortOrder: String (\"desc\" for descending, or \"asc\" for ascending)\n};\n\nconst options = {\n  // some options to control which optional fields get returned with the results\n  // supported:\n  // includeHasNextPage: Boolean,\n  // includeHasPreviousPage: Boolean,\n  // includeTotalCount: Boolean\n};\n\nconst results = await getPaginatedResponseFromAggregate(collection, pipeline, args, options);\n\nreturn results;\n// {\n//   pipeline: Array (the pipeline that was passed, with the necessary modifications that were added to it by `getPaginatedResponseFromAggregate`)\n//   nodes: Array (the returned items)\n//   pageInfo: Object {\n//     `hasNextPage: Boolean` (if requested in `options`),\n//     `hasPreviousPage: Boolean` (if requested in `options`),\n//     `startCursor`: String (`_id` of the first item in `nodes`),\n//     `endCursor`: String (`_id of the last item in `nodes`)\n//   },\n//   totalCount: Int (if requested in `options`)\n// }\n```\n","isInternal":false,"tokens":425,"sizeBytes":1795},{"name":"tagsForCatalogProducts.md","path":"packages/api-utils/docs/tagsForCatalogProducts.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-utils/docs/tagsForCatalogProducts.md","title":"Docs Skill","category":"anthropic-skill","format":"markdown","content":"# tagsForCatalogProducts\n\nGive an array of CatalogProduct objects, returns an array of tags for each product ID.\n\nExample data set:\n\n```js\n// Tags\n[\n  {\n    _id: \"1\",\n    name: \"ONE\"\n  },\n  {\n    _id: \"2\",\n    name: \"TWO\"\n  },\n  {\n    _id: \"3\",\n    name: \"THREE\"\n  }\n]\n\n// CatalogProducts\n[\n  {\n    product: {\n      productId: \"1\",\n      tagIds: [\"1\", \"2\"]\n    }\n  },\n  {\n    product: {\n      productId: \"2\",\n      tagIds: [\"3\"]\n    }\n  }\n]\n```\n\nUsage:\n\n```js\n// Tags is the \"Tags\" Mongo.Collection\n// `catalogProducts` is an array of CatalogItemProduct from Catalog collection\nconst result = await tagsForCatalogProducts(Tags, catalogProducts);\n```\n\nResult will be:\n\n```js\n[\n  {\n    productId: \"1\",\n    tags: [\"ONE\", \"TWO\"]\n  },\n  {\n    productId: \"2\",\n    tags: [\"THREE\"]\n  }\n]\n```\n","isInternal":false,"tokens":241,"sizeBytes":784},{"name":"README.md","path":"packages/api-core/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-core/README.md","title":"api-core Documentation","category":"plugin-manifest","format":"markdown","content":"# Reaction API Core\n\nThis NPM package provides the `ReactionAPICore` class. Use this to build a NodeJS microservice that is compatible with the Reaction Commerce platform, or to build your main Reaction Commerce API if you don't want to start by forking the `https://github.com/reactioncommerce/reaction` project.\n\nIf you're just looking to run the default Reaction release with all built-in plugins for development, demos, or evaluation, use the released Docker images and the [Reaction Development Platform](https://github.com/reactioncommerce/reaction-development-platform) instead.\n\nThis NPM package also provides the `ReactionTestAPICore` class, which you can use to write automated tests that run GraphQL queries against your API with a real database connection. This class is almost identical to the `ReactionAPICore` class, except that no actual GraphQL server is created and various additional methods are available to help with common testing needs.\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Included Features](#included-features)\n- [Supported Environment Variables](#supported-environment-variables)\n- [ReactionAPICore Configuration](#reactionapicore-configuration)\n- [Plugins](#plugins)\n  - [Plugin Configuration](#plugin-configuration)\n    - [auth](#auth)\n    - [collections](#collections)\n    - [contextAdditions](#contextadditions)\n    - [expressMiddleware](#expressmiddleware)\n    - [functionsByType](#functionsbytype)\n    - [graphQL](#graphql)\n    - [mutations and queries](#mutations-and-queries)\n- [App Context](#app-context)\n- [Writing Tests Using ReactionTestAPICore](#writing-tests-using-reactiontestapicore)\n- [Developer Certificate of Origin](#developer-certificate-of-origin)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\n```sh\nnpm install @reactioncommerce/api-core graphql\n```\n\nThe `graphql` package is a required peer dependency.\n\n## Usage\n\nHere is example usage assuming Node 12.14.1 with experimental modules enabled.\n\n```js\nimport { ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport registerFooPlugin from \"reaction-plugin-foo\";\nimport Logger from \"@reactioncommerce/logger\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // Call this once per plugin.\n  await api.registerPlugin({\n    // Plugin config. See \"Plugin Configuration\" section\n  });\n\n  // Plugin packages export a function that calls `api.registerPlugin` for you, so\n  // for those you just pass `api` to the function.\n  await registerFooPlugin(api);\n\n  // Or you can register multiple at once, passing in either a function or a\n  // registration object for each.\n  await api.registerPlugins({\n    foo: registerFooPlugin,\n    another: {\n      // some plugin config\n    }\n  });\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nAlternatively, you can keep your plugin list in a JSON file:\n\n```js\nimport { importPluginsJSONFile, ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport Logger from \"@reactioncommerce/logger\";\nimport authorizationPlugin from \"@reactioncommerce/reaction-plugin-authorization\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // An optional function allows you to transform the list from the\n  // JSON (add, swap, or remove plugins) before it attempts to load the\n  // plugin modules.\n  const plugins = await importPluginsJSONFile(\"./plugins.json\", (pluginList) => {\n    pluginList.authorization = authorizationPlugin;\n\n    return pluginList;\n  });\n\n  await api.registerPlugins(plugins);\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nSample `plugins.json` file:\n\n```json\n{\n  \"accounts\": \"./core-services/account/index.js\",\n  \"address\": \"./core-services/address/index.js\",\n  \"authentication\": \"@reactioncommerce/plugin-authentication\",\n  \"authorization\": \"@reactioncommerce/plugin-simple-authorization\"\n}\n```\n\nAll relative paths are assumed to be relative to the JSON file and are assumed to be an ES module. All packages are assumed to export the plugin registration function as their default ES module export.\n\n### Included Features\n\nMost Reaction API features are released as [plugins](#plugins), but even if you never register any plugins and run your API, you'll get the following core features automatically:\n\n- A minimal GraphQL API running at `/graphql` on `ROOT_URL`, with a `ping` query, an `echo` mutation, and a `tick` subscription for testing.\n- Commonly used core GraphQL types such as `Date`, `DateTime`, `Money`, and `Rate`, as well as types related to Relay-style pagination\n- A static file server if you passed in the `serveStaticPaths` option\n- A connection to MongoDB, with improved connection retry, if the `MONGO_URL` environment variable or the `mongoDb` option was provided\n- Access to an Express app at `api.expressApp`\n\n## Supported Environment Variables\n\nThe following environment variables are picked up automatically by the `ReactionAPICore` instance.\n\n```js\n{\n  BODY_PARSER_SIZE_LIMIT: bodyParserValidator({\n    default: 5 * 1000000 // value in bytes = 5mb\n  }),\n  GRAPHQL_INTROSPECTION_ENABLED: bool({ default: false, devDefault: true }),\n  GRAPHQL_PLAYGROUND_ENABLED: bool({ default: false, devDefault: true }),\n  MONGO_URL: str({\n    devDefault: \"mongodb://localhost:27017/reaction\",\n    desc: \"A valid MongoDB connection string URI, ending with the database name\",\n    example: \"mongodb://localhost:27017/reaction\"\n  }),\n  PORT: num({\n    default: 3000,\n    desc: \"The port on which the API server should listen\",\n    example: \"8000\"\n  }),\n  REACTION_LOG_LEVEL: str({\n    choices: [\"FATAL\", \"ERROR\", \"WARN\", \"INFO\", \"DEBUG\", \"TRACE\"],\n    default: \"WARN\",\n    devDefault: \"DEBUG\",\n    desc: \"Determines how much logging you see. The options, from least to most logging, are FATAL, ERROR, WARN, INFO, DEBUG, TRACE. See: https://github.com/trentm/node-bunyan#levels\",\n    example: \"ERROR\"\n  }),\n  REACTION_APOLLO_FEDERATION_ENABLED: bool({\n    default: false,\n    desc: \"Set this to true if you need Apollo Federation support.\"\n  }),\n  REACTION_GRAPHQL_SUBSCRIPTIONS_ENABLED: bool({\n    default: true,\n    desc: \"Set this to false if you do not need GraphQL subscription support\"\n  }),\n  REACTION_SHOULD_INIT_REPLICA_SET: bool({\n    default: false,\n    devDefault: true,\n    desc: \"Automatically initialize a replica set for the MongoDB instance. Set this to 'true' when running the app for development or tests.\"\n  }),\n  ROOT_URL: str({\n    devDefault: \"http://localhost:3000\",\n    desc: \"The protocol, domain, and port portion of the URL, to which relative paths will be appended. \" +\n      \"This is used when full URLs are generated for things such as emails and notifications, so it must be publicly accessible.\",\n    example: \"https://shop.mydomain.com\"\n  })\n}\n```\n\n## ReactionAPICore Configuration\n\nThe following options can be passed in the first argument of `ReactionAPICore` when initializing an instance.\n\n- **appEvents**: See the \"Providing a Custom appEvents Implementation\" section.\n- **httpServer**: An HTTP server for GraphQL subscription websocket handlers. In most cases you should omit this and let `ReactionAPICore` create one for you.\n- **mongodb**: Optionally pass in the `mongodb` reference from `import mongodb from \"mongodb\";`. In most cases you should omit this and let `ReactionAPICore` use its own reference, but if you need to ensure a specific version is used, this allows you to do that.\n- **serveStaticPaths**: An optional array of paths (relative to your project root) that should be served as static files. Each of these is passed to [express.static()](https://expressjs.com/en/starter/static-files.html). If you need more control, you can access `api.expressApp` directly.\n- **rootUrl**: Items such as `api.rootUrl`, `context.rootUrl`, and `context.getAbsoluteUrl` are set based on this. If not provided, falls back to `ROOT_URL` environment variable.\n- **version**: Pass any valid version string. This is available to plugins as `api.version` or `context.appVersion`. This allows you to version your API as a whole (with all plugins installed and configured), which is different from the version of this `api-core` package. Use this for whatever purpose you want, but it is not required and will be `null` if you don't set a version.\n\n## Plugins\n\nThe Reaction API server has a plugin system that allows code to be broken into small packages. Plugins can register functions, configuration, and GraphQL schemas and resolvers. The sum of everything registered by every plugin is your Reaction API.\n\nIn some cases a plugin has plugins of its own or has other external components that you also need to install.\n\nA plugin need not be in a separate package. You can simply call `api.registerPlugin`, passing in any valid configuration. This may be fine for prototyping and quick tests, but we highly recommend that all plugins be published as separate NPM packages, which allows you to track and manage dependencies more easily. This does not necessarily mean they need to be published to NPM, but they must be something you can add to `package.json` and NPM will know how to install it. For example, a private GitHub repo will work.\n\nIf you publish a plugin as an NPM package, the default package export should be an async function that accepts `api` as the first argument and calls `api.registerPlugin` with all necessary configuration options.\n\n### Plugin Configuration\n\nWhether you are calling `api.registerPlugin` directly in an API project or within a plugin package, you must pass in an object that includes everything the plugin wants to make available to the core API or other API plugins. This `registerPlugin` object has a specific structure.\n\nThe two keys that every plugin will include are `name` and `label`. `name` must be unique, cannot contain spaces, and identifies your plugin; `label` is the human-readable version of your plugin name, for showing in UIs.\n\nBeyond `name` and `label`, the following standard keys can be included in your `registerPlugin` object and are described in more detail below:\n\n- `auth`\n- `collections`\n- `contextAdditions`\n- `expressMiddleware`\n- `functionsByType`\n- `graphQL`\n- `mutations`\n- `queries`\n\n#### auth\n\nPlugins can pass functions in an `auth` object, which are then used to add permission and account information to `context` for each API request.\n\n```js\nauth: {\n  accountByUserId,\n  permissionsByUserId\n}\n```\n\n- `accountByUserId`: An async function with signature `(context, userId)` that must return an account document for the given `userId`, or `null` if one cannot be found. This will be used to set `context.account` and `context.accountId`.\n- `permissionsByUserId`: An async function with signature `(context, userId)` that must return an array of permissions for the given `userId`, or `null` if no permission list can be generated. This is available for each API request as `context.userPermissions`.\n\nSee also the \"getHasPermissionFunctionForUser\" functionsByType.\n\n#### collections\n\nTo create any non-core MongoDB collection that a plugin needs, use the `collections` option:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\"\n  }\n}\n```\n\nThe `collections` object key is where you will access this collection on `context.collections`, and `name` is the collection name in MongoDB. We recommend you make these the same if you can.\n\nThe example above will make `context.collections.MyCustomCollection` available in all query and mutation functions, and all functions that receive `context`, such as startup functions. Note MongoDB may not actually create the collection until the first time you insert into it.\n\nYou can optionally add indexes for your MongoDB collection:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    indexes: [\n      [{ referenceId: 1 }, { unique: true }]\n    ]\n  }\n}\n```\n\nEach item in the `indexes` array is an array of arguments that will be passed to the Mongo `createIndex` function. The `background` option is always set to `true` so you need not include that.\n\nThere is also experimental support for defining validation options. Add `validator`, `validationLevel`, or `validationAction` options and they will be passed along to the MongoDB library. Refer to [their createCollection documentation](http://mongodb.github.io/node-mongodb-native/3.6/api/Db.html#createCollection).\n\nThere is also a convenience syntax that allows you to pass a JSONSchema directly. This:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    jsonSchema: someJsonSchema\n  }\n}\n```\n\nIs shorthand for this:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    validator: {\n      $jsonSchema: someJsonSchema\n    }\n  }\n}\n```\n\nNOTE: Registering your collections is not required, and in fact it is probably best to NOT register them unless you need to allow other plugins to access your data directly. As long as you do not register them, they remain a private implementation detail that you are free to change without breaking other plugins.\n\n#### contextAdditions\n\nA plugin can add properties to context using the `contextAdditions` option. They are added before any `preStartup` or `startup` functions are run.\n\n```js\ncontextAdditions: {\n  something: \"wicked\"\n}\n```\n\n```js\n// in startup fn or anywhere you have context\nconsole.log(context.something); // \"wicked\"\n```\n\n#### expressMiddleware\n\nPlugins can register Express middleware using the `expressMiddleware` option:\n\n```js\nexpressMiddleware: [\n  {\n    route: \"graphql\",\n    stage: \"authenticate\",\n    fn: tokenMiddleware\n  }\n]\n```\n\nFor now, only the \"graphql\" route is supported, and the following stages are supported in this order:\n\n- `first`\n- `before-authenticate`\n- `authenticate`\n- `before-response`\n\nAn `authenticate` middleware function should do something like look up the user by the Authorization header, and either set `request.user` or send a 401 response if the token is invalid. It should not require a token.\n\nThe `first` middleware stage can be used for loggers or anything else that needs to be first in the middleware list. `before-response` middleware will have the user available if there is one, and is called before the Apollo GraphQL middleware.\n\nA middleware function is passed `context` and must return the Express middleware handler function, which must call `next()` or send a response.\n\n#### functionsByType\n\nThe `functionsByType` object is a map of function types to arrays of functions of that type. This pattern can be used by any plugin to allow any other plugin to register certain types of functions for plugin points.\n\nDocumentation for individual plugins will tell you how to use this for that plugin, but there are also a few core types that any plugin might want to use:\n\n- createDataLoaders\n- getHasPermissionFunctionForUser\n- preStartup\n- registerPluginHandler\n- startup\n- shutdown\n\nLook at built-in plugins for examples of these, and read [How To: Share Code Between API Plugins](https://docs.reactioncommerce.com/docs/how-to-share-code-between-plugins) for more information.\n\n#### graphQL\n\nUse the `graphQL` object to register schemas and resolvers that extend the core GraphQL API.\n\nMore information:\n\n- [How To: Create a new GraphQL mutation](https://docs.reactioncommerce.com/docs/graphql-create-mutation)\n- [How To: Create a new GraphQL query](https://docs.reactioncommerce.com/docs/graphql-create-query)\n- [How To: Extend GraphQL to add a field](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-to-add-field)\n- [How To: Extend GraphQL with Remote Schema Delegation](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-with-remote-schema)\n\n#### mutations and queries\n\nThe `mutations` and `queries` objects are maps of functions that are extended onto `context.mutations` and `context.queries`. These may be functions that are called from GraphQL resolvers of a similar name, or functions that are intended to be called only by other plugin code. Functions that modify data should be registered as `mutations` and all other functions should be registered as `queries`.\n\n## App Context\n\nApollo Server passes a `context` object to every GraphQL resolver. By convention, plugins pass this down as the first argument to all internal query, mutation, and util functions, too. We refer to this as the app context, and many different things live on it. It is the primary way that functions and other information are shared among plugins.\n\nThere are two types of properties on the app context: instance properties and request properties. Most properties are instance properties; they are set when you initialize a `ReactionAPICore` instance or when you register a plugin, and they do not change while the API is running. A few other properties are added to the context at the start of every request that comes in, and these are the request properties.\n\nInstance properties:\n\n- `app`: The `ReactionAPICore` instance that owns this context. (Note that `api.context.app` is a circular reference.)\n- `appEvents`: A simple event mechanism with `on` and `emit` properties. This allows event-based communication among plugins. Unlike Node's built-in `EventEmitter`, `appEvents.on` functions may return Promises and `appEvents.emit` may be awaited in situations where you want to be sure all event listeners have handled the event before continuing.\n- `appVersion`: A string set to whatever the `version` option is when creating the `ReactionAPICore` instance\n- `collections`: An object with references to [MongoDB collections](http://mongodb.github.io/node-mongodb-native/3.5/api/Collection.html), built by any plugins that register collections. Allows direct access to collections from various plugins even if only one plugin \"owns\" that collection.\n- `getInternalContext`: A function that takes no arguments and returns a context with all authentication and authorization mocked to allow anything. Useful when you need to pass down context to another query or mutation but circumvent its normal authorization checks.\n- `getFunctionsOfType`: A function that takes one argument, a type string, and returns an array of all functions that were registered with that type. This is a simple way that plugins can share functions with other plugins for specific purposes\n- `mutations` and `queries`: These objects have references to all functions that plugins have registered in their own `mutations` and `queries` objects, when calling `registerPlugin`. If multiple plugins have mutations or queries with the same name, the last plugin to be registered will win (unlike `getFunctionsOfType` where multiple functions may be registered).\n- `rootUrl`: The root URL string, from `rootUrl` instance option or `ROOT_URL` environment variable\n- `getAbsoluteUrl`: A function that is bound to `rootUrl`, for easy conversion of a relative URL to one that is absolute and begins with `rootUrl`.\n\nThere may be additional instance properties if any plugins have added them using the `contextAdditions` option for `registerPlugin`. Refer to documentation for individual plugins.\n\nRequest properties:\n\n- `user`: The User document for the user who made the request. This is set to the Express `request.user` property, which any plugin can set by registering request middleware.\n- `userId`: If `user` is set, this will be the `user._id`, for convenience.\n- `account`: If `context.auth.accountByUserId` is a function and `context.user` is set, `accountByUserId` will be called for the request, and the return value will be available as `context.account`. The `user` is a generic authentication document for OAuth, whereas `account` is a Reaction-specific concept where additional information about each user is tracked.\n- `accountId`: If `account` is set, this will be the `account._id`, for convenience.\n- `userPermissions`: If `context.auth.permissionsByUserId` is a function, it will be called with `(context, userId)` arguments, and the return value is available as `context.userPermissions`.\n- `userHasPermission`: A function that you can call to determine whether a user has needed permissions. It calls any functions registered as type `getHasPermissionFunctionForUser`, passing in `context`, and then calls the function returned by each. Returns `true` only if every registered function returns `true`.\n- `validatePermissions`: Calls `userHasPermission` and throws an Access Denied error if it returns `false`.\n- `requestHeaders`: An object with all HTTP headers for the current request on it, except with `Authorization` and `Cookie` headers removed for security.\n\nYou can always access the app context on `api.context` if you have a reference to the `api` instance, but this will never have any request properties set because there is no request happening.\n\n## Providing a Custom appEvents Implementation\n\n`context.appEvents` is available to all plugins and is used for communication among plugins. The built-in implementation of this is not highly optimized, but you may provide your own implementation to meet your needs.\n\nTo override the built-in `appEvents` with your own, pass `appEvents` option when constructing your API instance. The provided object must have 4 function properties named `emit`, `on`, `stop`, and `resume`. Here's an example:\n\n```js\nconst appEvents = {\n  async emit(name, ...args) {},\n  on(name, func) {},\n  stop() {},\n  resume() {}\n};\n\nconst api = new ReactionAPICore({ appEvents });\n```\n\n- `stop` should stop emission and `resume` should resume emission. Neither takes any arguments.\n- `emit`:\n  - `emit` may or may not return a Promise, but either way the final returned value must be `undefined`\n  - When emission is stopped, `emit` should do nothing\n  - When emission is not stopped, `emit` should call each handler registered by `on` one by one. If a handler returns a Promise, wait until it resolves or rejects before calling the next handler. `emit` itself should not resolve or reject until all handlers have been called and have resolved or rejected.\n  - Any additional `args` passed to `emit` should be passed along to each handler function.\n- `on` registers a handler function to be called by `emit`.\n- Handlers are called only after they are registered. Any events emitted prior to registering a handler are never handled by that handler.\n\n## Writing Tests Using ReactionTestAPICore\n\nRefer to [Writing Jest Integration Tests](https://docs.reactioncommerce.com/docs/writing-jest-integration-tests).\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing-off all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign-off your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real full name (please no anonymous contributions or pseudonyms) and a real email address. By signing-off your commit you are certifying that you have the right to submit it under the [GNU GPLv3 License](./LICENSE.md).\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO sign-offs of every commit.\n\nIf you forget to sign-off your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction package is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":5411,"sizeBytes":24569},{"name":"README.md","path":"packages/api-plugin-accounts/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-accounts/README.md","title":"api-plugin-accounts Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-accounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-accounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-accounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-accounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-accounts)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nAccounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n","isInternal":false,"tokens":451,"sizeBytes":1954},{"name":"README.md","path":"packages/api-plugin-address-validation-test/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-address-validation-test/README.md","title":"api-plugin-address-validation-test Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-address-validation-test\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation-test.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation-test)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test)\n\n## Summary\n\nAddress Validation Test plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":509,"sizeBytes":2407},{"name":"README.md","path":"packages/api-plugin-address-validation/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-address-validation/README.md","title":"api-plugin-address-validation Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-address-validation\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation)\n\n## Summary\n\nAddress Validation plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":503,"sizeBytes":2377},{"name":"README.md","path":"packages/api-plugin-authentication/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-authentication/README.md","title":"api-plugin-authentication Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-authentication\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authentication.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authentication)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authentication.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authentication)\n\n## Summary\n\nThis plugin provides Authentication middleware for the Reaction API. It relies on token based authentication.\nUtils included in this plugin help connect the [Account-js](https://www.accountsjs.com/) library and the Reaction API via an Auth Token.\n\n## How it works\n\nThis plugin registers the schema and resolvers that are required by account-js.\n\nA express middleware is added whose job is to extract the `Authorization` header from the request and uses account-js to get the user for that token. The format should be `Authorization: Bearer <YOUR_ACCESS_TOKEN>`. Then the user is attached to the `req` object.\n\nA function is added to `functionByType.graphQLContext` which links the graphQL context used in the api-core with the \"internal context\" used by account-js. This is needed because account-js also keeps tracks of the tokens and uses a separate GraphQL server.\n\n## Supported actions\n\n1. Signup\n2. Login\n3. Change Password\n4. Forgot Password - A email is sent with a reset token url of the form `https://<STORE_URL>/?resetToken=<token>`\n\n## Environment Variables:\n\n| Variable Name | Description                                                                                                                     | Default Value           |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |\n| STORE_URL     | This is the public link to the storefront (used to redirect)                                                                    | `http://localhost:4000` |\n| MONGO_URL     | MongoDB used to store session & tokens                                                                                          | None                    |\n| TOKEN_SECRET  | [secret](https://www.accountsjs.com/docs/api/server/interfaces/accountsserveroptions#tokensecret) used while creating the token | `UPDATE_THIS_SECRET`    |\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nCopyright 2020 Reaction Commerce\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","isInternal":false,"tokens":813,"sizeBytes":4178},{"name":"README.md","path":"packages/api-plugin-authorization-simple/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-authorization-simple/README.md","title":"api-plugin-authorization-simple Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-authorization-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authorization-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authorization-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple)\n\n## Summary\n\nThis plugin checks authorization in the Reaction API.\n\nAuthorization is determined by one primary function, `validatePermissions`, which is added onto the `context`. If permissions are valid, nothing will happen when this function is called. If permissions are invalid, this call will throw an `\"Access Denied\"` error.\n\nA secondary function, `userHasPermission`, is also available on the `context`. This will provide a boolean value of the permission status.\n\n`validatePermissions` is our preferred method.\n\n## Usage\n\n`permissions` are attached to account `Groups`, initially by being copied from [defaultRoles.js](https://github.com/reactioncommerce/reaction/blob/trunk/src/core-services/account/util/defaultRoles.js) on startup. Each account can belong to as may groups as needed (including not belonging to any group), and is granted *all* `permissions` from *all* the groups they belong to. This package provides the function `permissionsByUserId` which does the work to build a list of all the `permissions` the user is granted.\n\n### Checking permissions\n\nThe `validatePermissions` function (and `userHasPermission`) takes three parameters: `resource`, `action`, and `context`. For example, this call is checking to see if the current user has permission to `cancel an item` on this particular order:\n\n```js\nawait context.validatePermissions(`reaction:legacy:orders:${order._id}`, \"cancel:item\", {\n  shopId: order.shopId,\n  owner: order.accountId\n});\n```\n\n#### Resource\n\nResource is the name of the resource a user is trying to access. This consists of three required pieces: `organization`, `system`, `entity`; and one optional field: `id`.\n\nFor our purposes in Reaction code:\n\n- `organization` will always be `reaction`.\n- `system` is the service or group of services that provide the resource we want to access control. It will always be `legacy` if the code lives within the Reaction API project, and will be the package name (i.e. `simple-authorization`) if the code live outside of the Reaction API project.\n- `entity` is the actual data entity to access control, such as an `orders`. Entity names are always plural.\n- `id`  is the actual ID of a data entity to access control. This is for super granular Policies and will most of the time be omitted or described with just a * meaning \"all IDs\".\n\n#### Action\n\nThe action the user would like to preform. This can be anything, but we recommend sticking short, intentional words, which can be package-spaced if desired. For example, `create`, `read`, `update`, `delete`, and `publish` are all great actions. If you need more context, `remove:addressBook` would be a good name for the permission to remove `addressBooks` from an `account`, but not have `remove` privileges on the entire `account`.\n\n#### Context\n\nContext is used to pass any extra information to the permissions check. We use it primarily for two things at this time:\n\n1. We pass `shopId` in the context (somtimes referred to as `ketoContext`) everywhere it's avaialble\n1. We pass `owner` into the context anywhere where a regular, non-admin user is allowed permissions to something they themselves own. For example, on an order they placed, they will have `owner` permissions on that particular order.\n\n## Under the hood\n\n- `userHasPermission` is built from `getHasPermissionFunctionForUser`, which is registered to `context` as a `functionsByType` in its respective package, and called `userHasPermission` on `context` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L28-L42)). This plugin will work alongside any other authorization plugin registered in the same way.\n\n- `validatePermissions` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L46-L49)), is created from the value of `context.userHasPermission`, If `userHasPermissions === true`, `validatePermissions` does nothing, and lets the rest of the function continue to run. If `userHasPermission === false`, `validatePermissions` throws an `Access Denied` error.\n\n## Using this package\nImport this package into the [registerPlugins.js](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/registerPlugins.js) file in the Reaction API, and then await its `registerPlugin` function:\n\n```js\nimport registerSimpleAuthorizationPlugin from \"@reactioncommerce/api-plugin-authorization-simple/index.js\";\nawait registerSimpleAuthorizationPlugin(app);\n```\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":1527,"sizeBytes":6843},{"name":"README.md","path":"packages/api-plugin-bull-queue/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-bull-queue/README.md","title":"api-plugin-bull-queue Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-bull-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-bull-queue.svg)](https://www.npmjs.\ncom/package/@reactioncommerce/api-plugin-bull-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-bull-queue.svg?style=svg)](https://circleci.\ncom/gh/reactioncommerce/api-plugin-bull-queue)\n\n## Summary\n\nJob Queue plugin Based on [Bull](https://www.npmjs.com/package/bull) for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\nThe current API includes just 4 commands:\n\n`createQueue` - Which creates a job queue, assigns a processor to it and adds the queue to the context to it's \naccessible everywhere\n\n`addJob` - Allows you to add a job to the queue. You can see an example of this in the include email plugin\n\n`scheduleJob` - Allows you to schedule repeating job using cron syntax. You can see an example of \nthis in the Promotions plugin.\n\n`addDelayedJob` - Similar to `addJob` but just allows you to delay the job by a number of ms.\n\n[Many more commands](https://github.com/OptimalBits/bull/blob/HEAD/REFERENCE.md) are available if you have an instance of the queue\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2022 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":687,"sizeBytes":3030},{"name":"README.md","path":"packages/api-plugin-carts/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-carts/README.md","title":"api-plugin-carts Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-carts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-carts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-carts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-carts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-carts)\n\n## Summary\n\nCarts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":393,"sizeBytes":1769},{"name":"README.md","path":"packages/api-plugin-catalogs/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-catalogs/README.md","title":"api-plugin-catalogs Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-catalogs\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-catalogs.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-catalogs)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs)\n\n## Summary\n\nCatalogs plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":398,"sizeBytes":1787},{"name":"README.md","path":"packages/api-plugin-discounts-codes/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-discounts-codes/README.md","title":"api-plugin-discounts-codes Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-discounts-codes\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts-codes.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts-codes)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n\n## Summary\n\nDiscount Codes plugin for the Reaction API\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":428,"sizeBytes":1954},{"name":"README.md","path":"packages/api-plugin-discounts/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-discounts/README.md","title":"api-plugin-discounts Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-discounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n## Summary\n\nDiscounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":429,"sizeBytes":1966},{"name":"README.md","path":"packages/api-plugin-email-smtp/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-email-smtp/README.md","title":"api-plugin-email-smtp Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-email-smtp\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-smtp.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-smtp)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp)\n\n## Summary\n\nSMTP Email plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":508,"sizeBytes":2330},{"name":"README.md","path":"packages/api-plugin-email-templates/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-email-templates/README.md","title":"api-plugin-email-templates Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-email-templates\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-templates.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-templates)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates)\n\n## Summary\n\nEmail Templates plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":398,"sizeBytes":1829},{"name":"README.md","path":"packages/api-plugin-email/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-email/README.md","title":"api-plugin-email Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-email\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email)\n\n## Summary\n\nEmail plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":387,"sizeBytes":1769},{"name":"README.md","path":"packages/api-plugin-files/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-files/README.md","title":"api-plugin-files Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-files\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-files.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-files)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-files.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-files)\n\n## Summary\n\nFiles plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","isInternal":false,"tokens":387,"sizeBytes":1773},{"name":"README.md","path":"packages/api-plugin-fulfillment-method-pickup-store/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-fulfillment-method-pickup-store/README.md","title":"api-plugin-fulfillment-method-pickup-store Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-fulfillment-method-pickup-store\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-pickup`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesPickupStore - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Store\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/collectStoreDetails - dummy function to simulate api providing store specific info while returning quotes.\n* util/validateOrderMethodsPickupStore - dummy function to simulate store specific validations. Called by prepareOrder.js\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":613,"sizeBytes":2984},{"name":"README.md","path":"packages/api-plugin-fulfillment-method-shipping-dynamic-rate/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-fulfillment-method-shipping-dynamic-rate/README.md","title":"api-plugin-fulfillment-method-shipping-dynamic-rate Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-fulfillment-method-shipping-dynamic-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingDynamicRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Dynamic Rate\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/calculateDynamicRateRate - dummy function to simulate api providing dynamic rate specific info while returning quotes.\n* util/validateOrderMethodsDynamicRate - dummy function to simulate dynamic rate specific validations done. Called by prepareOrder.js\n\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":617,"sizeBytes":3036},{"name":"README.md","path":"packages/api-plugin-fulfillment-method-shipping-flat-rate/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-fulfillment-method-shipping-flat-rate/README.md","title":"api-plugin-fulfillment-method-shipping-flat-rate Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-fulfillment-method-shipping-flat-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingFlatRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to FlatRate (dummy and can be changed)\n* create/update/delete FlatRateFulfillmentMethods\n* create/update/delete FlatRateFulfillmentRestrictions\n* getFlatRateFulfillmentMethod(s) - deprecated\n* getFlatRateFulfillmentRestriction(s) - deprecated\n* flatRateFulfillmentMethod(s)\n* flatRateFulfillmentRestriction(s)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":605,"sizeBytes":2877},{"name":"README.md","path":"packages/api-plugin-fulfillment-type-pickup/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-fulfillment-type-pickup/README.md","title":"api-plugin-fulfillment-type-pickup Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-fulfillment-type-pickup\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like pickup-store). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (pickup) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'pickup' as a ff-type via registeredFulfillmentTypes: [\"pickup\"]\n* Inserts the default entry for pickup ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":515,"sizeBytes":2494},{"name":"README.md","path":"packages/api-plugin-fulfillment-type-shipping/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-fulfillment-type-shipping/README.md","title":"api-plugin-fulfillment-type-shipping Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-fulfillment-type-shipping\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like flat-rate-shipping, dynamic-rate-shipping etc). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (shipping) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'shipping' as a ff-type via registeredFulfillmentTypes: [\"shipping\"]\n* Inserts the default entry for shipping ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":522,"sizeBytes":2537},{"name":"README.md","path":"packages/api-plugin-fulfillment/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-fulfillment/README.md","title":"api-plugin-fulfillment Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-fulfillment\n\nThis is the base fulfillment plugin which would enable other fulfillment types (like shipping, pickup, digital) and fulfillment-methods (like shipping, store, download etc) to be introduced via their own separate plugins. This plugin provides the common functionalities required for implementing fulfillment.\n\nEach of the newly introduced fulfillment type plugin would need to have the specific fulfillment methods also to be added as separate plugins. Example, fulfillment type 'pickup' could have fulfillment methods like 'store pickup' and 'curb-side pickup' and each of them would be separate plugins.","isInternal":false,"tokens":117,"sizeBytes":631},{"name":"README.md","path":"packages/api-plugin-i18n/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-i18n/README.md","title":"api-plugin-i18n Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-i18n\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-i18n.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-i18n)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-i18n.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-i18n)\n\n## Summary\n\ni18n plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","isInternal":false,"tokens":399,"sizeBytes":1767},{"name":"README.md","path":"packages/api-plugin-inventory-simple/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-inventory-simple/README.md","title":"api-plugin-inventory-simple Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-inventory-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple)\n\n## Summary\n\nSimple Inventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":398,"sizeBytes":1835},{"name":"README.md","path":"packages/api-plugin-inventory/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-inventory/README.md","title":"api-plugin-inventory Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-inventory\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory)\n\n## Summary\n\nInventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":502,"sizeBytes":2323},{"name":"README.md","path":"packages/api-plugin-job-queue/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-job-queue/README.md","title":"api-plugin-job-queue Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-job-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-job-queue.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-job-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue)\n\n## Summary\n\nJob Queue plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":508,"sizeBytes":2324},{"name":"README.md","path":"packages/api-plugin-job-queue/src/job-queue/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-job-queue/src/job-queue/README.md","title":"job-queue Documentation","category":"plugin-manifest","format":"markdown","content":"The files in this folder are a rewrite of the @reactioncommerce/job-queue package with an almost identical API but no Meteor dependencies. This is not expected to be the final solution for background jobs in Reaction, but it is a temporary solution that works fairly well for now.\n","isInternal":false,"tokens":55,"sizeBytes":281},{"name":"README.md","path":"packages/api-plugin-navigation/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-navigation/README.md","title":"api-plugin-navigation Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-navigation\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-navigation.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-navigation)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-navigation.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-navigation)\n\n## Summary\n\nThis plugin provides Navigation Item and Navigation Tree `mutations` and `queries` for the Reaction API.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":389,"sizeBytes":1817},{"name":"README.md","path":"packages/api-plugin-notifications/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-notifications/README.md","title":"api-plugin-notifications Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-notifications\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-notifications.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-notifications)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-notifications.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-notifications)\n\n## Summary\n\nNotifications plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":502,"sizeBytes":2348},{"name":"README.md","path":"packages/api-plugin-orders/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-orders/README.md","title":"api-plugin-orders Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-orders\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-orders.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-orders)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-orders.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-orders)\n\n## Summary\n\nOrders plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":387,"sizeBytes":1775},{"name":"README.md","path":"packages/api-plugin-payments-example/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-payments-example/README.md","title":"api-plugin-payments-example Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-payments-example\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments-example.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments-example)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments-example.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments-example)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nExample Payments plugin for the Reaction API\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":446,"sizeBytes":1953},{"name":"README.md","path":"packages/api-plugin-payments-stripe-sca/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-payments-stripe-sca/README.md","title":"api-plugin-payments-stripe-sca Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-payments-stripe-sca\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments-stripe-sca.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments-stripe-sca)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments-stripe-sca.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments-stripe-sca)\n\n## Summary\n\nStripe Payments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction) with support for SCA-compliant Stripe Payment Intents API\n\n### Usage\n\n1. Set the `STRIPE_API_KEY` environment variable in reaction API .env file with the private API key from Stripe.\n2. Set the `STRIPE_PUBLIC_API_KEY` environment variable in the example-storefront .env file with the public API key from Stripe.\n3. Restart containers.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2021 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.","isInternal":false,"tokens":601,"sizeBytes":2713},{"name":"README.md","path":"packages/api-plugin-payments/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-payments/README.md","title":"api-plugin-payments Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-payments\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-payments.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-payments)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-payments.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-payments)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nPayments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":451,"sizeBytes":1953},{"name":"README.md","path":"packages/api-plugin-pricing-simple/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-pricing-simple/README.md","title":"api-plugin-pricing-simple Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-pricing-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-pricing-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-pricing-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-pricing-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-pricing-simple)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSimple Pricing plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":567,"sizeBytes":2519},{"name":"README.md","path":"packages/api-plugin-pricing-simple/src/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-pricing-simple/src/README.md","title":"src Documentation","category":"plugin-manifest","format":"markdown","content":"# Simple Pricing\n\nPricing data falls under it's own domain within the Reaction Commerce system, however it currently needs to be intertwined and available from other system domains (i.e., Catalog, Cart, Checkout, Orders). To give us more flexibility in pricing data management we've begun to move pricing get/set functions into this `simple-pricing` plugin and calling these functions from the `context.queries` object from within their respective functions. Now we can fully replace the pricing management system without modification to core by creating a custom plugin that replaces the `simple-pricing` queries.\n\n## Queries\n\nAny pricing plugin is expected to define and register the following query functions.\n\n### getVariantPrice\n\nThis query function is used to get a product variant's real current price.\n","isInternal":false,"tokens":153,"sizeBytes":810},{"name":"README.md","path":"packages/api-plugin-products/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-products/README.md","title":"api-plugin-products Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-products\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-products.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-products)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-products.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-products)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nProducts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n### Example on how to use Filter Conditions\n\nWe have a query endpoint defined in this plugin which allows us to query products collection based on the input GraphQL conditions object. This query endpoint is defined as `filterProducts.js` and it calls the `generateFilterQuery` function from the `api-utils` plugin to generate the MongoDB filter query.\n\nThe `generateFilterQuery` function expects the input GraphQL conditions object to be in the format of the `FilterConditionsInput` input type defined in the GraphQL Schemas (in api-core plugin) along with other parameters like `context`, `collectionName` and `shopId`.\n\nPlease go through a general introduction of how to use this function which can be found in the [api-utils README](https://github.com/reactioncommerce/reaction/tree/trunk/packages/api-utils/docs) before going through the examples below on how to use this function in the context of the `products` plugin.\n\nIn the query endpoint, we pass the `FilterConditionsInput` input type object as the `conditions` argument. This object is passed to the `generateFilterQuery` function along with other parameters like `context`, `collectionName` and `shopId` to generate the MongoDB filter query. The `generateFilterQuery` function is generic and can be used to generate filter queries for any collection. Since the parametes like `context`, `collectionName` and `shopId` are pretty self-explanatory, we shall focus on explaining the various ways in which the `conditions` object can be used.\n\n1. Single condition.\nHere we are querying products collection for entries with the handle as 'mens-waterproof-outdoor-rain-jacket'. Since it is single condition, using either `all` or `any` will not make difference. \n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n<br>\n\n2. Two conditions.\n\nHere we are querying products collection for entries which have either the handle as 'mens-waterproof-outdoor-rain-jacket' or 'title' begins with the text 'men'. Since we are using the `any` to connect the conditions, it translates to a mongo DB `$or` condition. Please note that the top level `all` condition is only to maintain the structure of the input GraphQL conditions object. It does not impact the results of the inner query.\n\n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }, \n            {\n              key: \"title\",\n              stringValue: \"men\",\n              relationalOperator: beginsWith,\n              logicalNot: false\n              caseSensitive: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n<br>\n\n3. Multiple conditions.\n\nHere we are querying products collection for entries which confirms to multiple conditions.\nWe have 3 distinct group of conditions in the inner level and the results of all these 3 are joined at the top level with `all` meaning `$and` in MongoDB.\n\nThe first group looks for entries matching either of the conditions `handle` as 'mens-waterproof-outdoor-rain-jacket' or `title` begins with the text 'men'. Since we are using the `any` to connect the conditions, it translates to a mongo DB `$or` condition.\n\nThe second group looks for entries matching the `_id` in the array `[\"DZwLHk4EAzitRni8F\", \"Hn4BRaBvLkYffMq36\"]` and `isDeleted` as `false` and `workflow.status` as `new`. Since we are using the `all` to connect the conditions, it translates to a mongo DB `$and` condition.\n\nThe third group looks for entries matching the `price.min` greater than 19.99 and `type` as `simple`. Since we are using the `all` to connect the conditions, it translates to a mongo DB `$and` condition.\n\nAs explained above, the final results are joined at the top level with `all` meaning `$and` in MongoDB.\n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }, \n            {\n              key: \"title\",\n              stringValue: \"men\",\n              relationalOperator: beginsWith,\n              logicalNot: false\n              caseSensitive: false\n            }\n          ]\n        },\n        {\n          all:[\n            {\n              key: \"_id\",\n              stringArrayValue: [\"DZwLHk4EAzitRni8F\", \"Hn4BRaBvLkYffMq36\"],\n              relationalOperator: in,\n              logicalNot: false\n            },\n            {\n              key: \"isDeleted\",\n              booleanValue: false,\n              relationalOperator: eq,\n              logicalNot: false\n            },\n            {\n              key: \"workflow.status\",\n              stringValue: \"new\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        },\n        {\n          all:[\n            {\n              key: \"price.min\",\n              floatValue: 19.99,\n              relationalOperator: gte,\n              logicalNot: false\n            },\n            {\n              key: \"type\",\n              stringValue: \"simple\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":1769,"sizeBytes":8167},{"name":"README.md","path":"packages/api-plugin-promotions-coupons/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-promotions-coupons/README.md","title":"api-plugin-promotions-coupons Documentation","category":"plugin-manifest","format":"markdown","content":"## Promotions-Coupons\n\nA plugin that allows you to create promotions \"coupons\" which can trigger any \"action\"\n\n","isInternal":false,"tokens":26,"sizeBytes":111},{"name":"README.md","path":"packages/api-plugin-promotions-discounts/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-promotions-discounts/README.md","title":"api-plugin-promotions-discounts Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-promotions-discounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-promotions-discounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-promotions-discounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-promotions-discounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-promotions-discounts)\n\n## Summary\n\nDiscounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":403,"sizeBytes":1848},{"name":"README.md","path":"packages/api-plugin-promotions-offers/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-promotions-offers/README.md","title":"api-plugin-promotions-offers Documentation","category":"plugin-manifest","format":"markdown","content":"## Promotions-Offers\n\nA plugin that allows you to create promotions \"offers\" which can trigger any \"action\"\n\n","isInternal":false,"tokens":24,"sizeBytes":109},{"name":"README.md","path":"packages/api-plugin-promotions/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-promotions/README.md","title":"api-plugin-promotions Documentation","category":"plugin-manifest","format":"markdown","content":"## Promotions\n\nThe base plugin for promotions\n\n","isInternal":false,"tokens":10,"sizeBytes":47},{"name":"README.md","path":"packages/api-plugin-sample-data/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-sample-data/README.md","title":"api-plugin-sample-data Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-sample-data\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-example.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-example)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-example.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-example)\n\n## Summary\n\nThis plugin loads the database with sample data that gives the user an idea of how the Storefront would appear with the basic details. The data would also appear in the AdminUI. The sample data includes Account (default admin account), Shop data (includes basic shop data, sample shipping, sample payment), Product data (including variants and images), Tags & Navigation. Instructions to add additional data are also provided below.\n\n#### Where is the sample data stored?\nAll of the initial set of data required by this plugin is present in the `/src/json-data` folder within this plugin. All files are in JSON format.\n\nAdditionally, we have the image files for the products stored in `/src/images` folder.\n#### How to load the default sample data?\nThis plugin has to be explicitly added to your API and configured to load in the initial start-up. Apart from including this plugin, the other pre-requisites are:\n* The LOAD_SAMPLE_DATA flag should be set to true in the .env file in the root API folder. Add a line `LOAD_SAMPLE_DATA=true`\n* There should not be any existing Shop in the database\n\nIf any of the above two conditions turns out to be false, this plugin exits without making any changes to the database.\n\nAt this stage, the database is populated with the initial sample data and you may tweak around with it from the Admin UI. You may add new products, tags, navigation etc from the Admin UI as usual. But in case you want some additional data to be prepopulated along with the provided sample data, then you may follow the below steps to update the JSON files to include the additional data.\n\n#### How to add additional data? \nFor the purpose of the sample data, we are confining our requirement to a single account and shop. The details of the account and the shop are present in the following json files and are customizable (`/src/json-data/Accounts.json`, `/src/json-data/users.json` and `/src/json-data/Shops.json`). Also, the default shipping method is added via `/src/json-data/ShippingMethod.json`.\n\nAs for the remaining items (Products, Images, Tags, Navigation), let us walk through the steps to add them.\n\nLet us add the Tag details first as this will be required before we publish the products.\n\n##### 1. Adding a new Tag\nSample json for a new Tag is provided below. Please make a note of the object's key (menJacket) and the slug (men-jacket), as they will be used later in this plugin. Also the _name_ and _displayTitle_ is what the user would see in the UI as the bread-crumbs and title.\n\n```\n  \"menJacket\": {\n    \"name\": \"Men's Jacket\",\n    \"slug\": \"men-jacket\",\n    \"displayTitle\": \"Men's Jackets\",\n    \"shopId\": \"\",\n    \"isVisible\": true\n  }\n```\nOnce the new tag is present in the Tags.json, we would need to modify the `/src/loaders/loadTags.js` to create an entry (similar to the one below) corresponding to the newly added tag. Here we have hard-coded the variable 'menJacket' to match the property key that we used above to create the tag.\n\n`\n  tagOutput.menJacket = await context.mutations.addTag(context.getInternalContext(), TagsData.menJacket);\n`\n\nThe tag objects output from the `loadTags.js` is used later in the `loadProducts.js` to associate the products with the tags. For the association to happen, we need to create an entry in the `/src/json-data/TagProductMapping.json` also and this will be mentioned in the below section where we add products.\n\n##### 2. Adding new Products\n* For this sample-data plugin, we are considering products that have variants under them and in some examples we have one or more options under these variants. \n* The top level product will have `type: 'simple'` and also the ancestors property will be an empty array. \n* The variants and the options under the variants (if any) will have `type: 'variant'` and the ancestors property will be an array of productIds that defines the hierarchy of the Product.\n\nThe sample entry that we are adding now will be a top-level product (say Jacket), with variants categorized by 'Color' and 'Size'. Example, we will have:\n```\nJacket\n|\n+-- Black (Color)\n|   |\n|   +-- Small (Size)\n|   +-- Large (Size)\n|\n+-- Blue (Color)\n    |\n    +-- Small (Size)\n    +-- Medium (Size)\n```\n\n_Special-case: 'price' property._\n\nThe 'price' property of leaf-level products would be of type 'Number' which contains the actual price of the product. The 'price' property will be an object for all the higher levels of the specific product (basically the top-level and all other variants). This object would contain properties such as range, max, min. This is to capture the max, min, and range of price values of all the products under that level.\n\nIn case of this sample data, for product entries of `type: 'simple'` we add price as an object. For product entries of `type: 'variant'` we shall insert price as a Number. Later, the 'afterVariantUpdate' event which is triggered inside this plugin will transform all the 'price' properties from Number to Object for those entries which are not leaf-level.\n\n\n###### 2.a. Adding top-level product\nHere is a sample json to add a new top-level product (Comments are only for additional info and must be removed before using this template).\n\n```\n{\n    \"_id\": \"DZwLHk4EAzitRni8F\",    // provide NEW productId\n    \"ancestors\": [],              // empty for top-level\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:01:34.445+0000\"\n    },\n    \"handle\": \"mens-jacket\",\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"\",       // this will be updated by the plugin dynamically\n    \"shouldAppearInSitemap\": true,\n    \"supportedFulfillmentTypes\": [\n      \"shipping\"\n    ],\n    \"title\": \"Men's Jacket\",\n    \"type\": \"simple\",         // 'simple' for top-level product\n    \"updatedAt\": {\n      \"$date\": \"2022-01-21T16:53:32.010+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": {               // price as object for top-level\n      \"range\": \"49.99\",\n      \"min\": 49.99,\n      \"max\": 49.99\n    },\n    \"description\": \"Our new rain jacket is crafted with outdoor-inspired details in a city-ready package. Constructed in a durable three-layer waterproof stretch nylon fabric, our rain jacket will be your first line of defense against the elements.\",\n    \"originCountry\": \"US\",\n    \"currentProductHash\": \"3f262d57850e31fbccd2a6eb6a1bb92b1328a327\",\n    \"facebookMsg\": \"Share our listing wth your friends on facebook using the link below www.facebook.com/mens-waterproof-outdoor-rain-jacket\",\n    \"pinterestMsg\": \"Share our listing wth your friends on pinterest using the link below www.pinterest.com/mens-waterproof-outdoor-rain-jacket\",\n    \"twitterMsg\": \"Share our listing wth your friends on twitter using the link below www.twitter.com/mens-waterproof-outdoor-rain-jacket\",\n    \"pageTitle\": null,\n    \"vendor\": \"Reaction Outdoor Apparel\",\n    \"publishedAt\": {\n      \"$date\": \"2022-01-21T16:53:32.010+0000\"\n    },\n    \"publishedProductHash\": \"3f262d57850e31fbccd2a6eb6a1bb92b1328a327\",\n    \"hashtags\": []\n  }\n```\n\n###### 2.b. Adding Variants entries\nSample json for adding the variants 'Color' (entries Black & Blue). Please notice the _attributeLabel_ and _optionTitle_ properties. Also the ancestors property has the productId of the top-level product.\n(Comments are only for additional info and must be removed before using this template)\n```\n  {\n    \"_id\": \"Hn4BRaBvLkYffMq36\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level\n      \"DZwLHk4EAzitRni8F\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:01:34.457+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-05T15:17:49.155+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"isTaxable\": true,\n    \"attributeLabel\": \"Color\",\n    \"height\": 18,\n    \"length\": 10,\n    \"optionTitle\": \"Black\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black\",\n    \"weight\": 2.5,\n    \"width\": 6,\n    \"compareAtPrice\": 24.99,\n    \"taxCode\": \"USCA\",\n    \"taxDescription\": \"California Tax\"\n  },\n  {\n    \"_id\": \"ynNA5rXKZCHF2uKjq\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level\n      \"DZwLHk4EAzitRni8F\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-05T15:38:57.021+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-05T15:39:37.646+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"isTaxable\": true,\n    \"attributeLabel\": \"Color\",\n    \"height\": 15,\n    \"length\": 17,\n    \"optionTitle\": \"Blue\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue\",\n    \"weight\": 2.5,\n    \"width\": 13,\n    \"compareAtPrice\": 24.99\n  }\n```\n###### 2.c. Adding Leaf-level entries\nSample json for adding leaf-level entries under Color-Black with variant type as Size (values Small, Large etc). The 1st entry in the ancestors property is the top-level product and the 2nd entry is the variant with Color = Black (\"Hn4BRaBvLkYffMq36\"). Please notice the _attributeLabel_ and _optionTitle_ properties. \n(Comments are only for additional info and must be removed before using this template)\n\n```\n  {\n    \"_id\": \"4JS386GgmvrxgyooS\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"Hn4BRaBvLkYffMq36\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:50:33.008+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:54:56.478+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Small\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black Small\",\n    \"weight\": null,\n    \"width\": null\n  },\n  {\n    \"_id\": \"MShhiNKGYqyR68ZF7\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"Hn4BRaBvLkYffMq36\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:51:11.147+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:54:58.299+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Large\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Black Large\",\n    \"weight\": null,\n    \"width\": null\n  }\n```\nSample json for adding leaf-level entries under Color-Blue with variant type as Size (values Small, Medium etc). The 1st entry in the ancestors property is the top-level product and the 2nd entry is the variant with Color = Blue (\"ynNA5rXKZCHF2uKjq\"). Please notice the _attributeLabel_ and _optionTitle_ properties.\n\n```\n  {\n    \"_id\": \"je2NxNaHzghJSFNin\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"ynNA5rXKZCHF2uKjq\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:54:03.957+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-19T23:43:39.335+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Small\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue Small\",\n    \"weight\": null,\n    \"width\": null\n  },\n  {\n    \"_id\": \"YGQdZoXEcYBMCrfcJ\",           // provide NEW productId\n    \"ancestors\": [                        // productId of the top-level and sublevel\n      \"DZwLHk4EAzitRni8F\",\n      \"ynNA5rXKZCHF2uKjq\"\n    ],\n    \"createdAt\": {\n      \"$date\": \"2022-01-06T15:54:20.828+0000\"\n    },\n    \"isDeleted\": false,\n    \"isVisible\": true,\n    \"shopId\": \"dSZqgQsyp48EpJzor\",\n    \"type\": \"variant\",                   // 'variant' for non-topLevel entries\n    \"updatedAt\": {\n      \"$date\": \"2022-01-06T15:55:32.251+0000\"\n    },\n    \"workflow\": {\n      \"status\": \"new\"\n    },\n    \"price\": 49.99,                   // price as Number for non-topLevel entries\n    \"attributeLabel\": \"Size\",\n    \"height\": null,\n    \"length\": null,\n    \"optionTitle\": \"Medium\",\n    \"originCountry\": \"US\",\n    \"title\": \"Men's Jacket - Blue Medium\",\n    \"weight\": null,\n    \"width\": null\n  }\n```\n\nNow that we have the product details available, we could complete the entry in the `/src/json-data/TagProductMapping.json` that we mentioned earlier in the '1. Add Tags' section. Since our new product maps to the tag 'menJacket' we should be adding an entry (top-level productId \"DZwLHk4EAzitRni8F\") to the array of products of the specific tag.\n\n##### 3. Adding NavigationItem\n\nWe should be creating a NavigationItem entry in the `/src/json-data/NavigationItems.json` similar to the sample provided below. The value property is what gets displayed on the Storefront UI navigation. The url has to follow the specific format `/tag/<slug_of_the_tag>`. Here we want the NavigationItem to point to the Men's Jacket. That particular product is tagged with a tag entry 'menJacket' which has the slug as 'men-jacket'. So our url value would be _/tag/men-jacket_\n\n```\n  \"MenuOneLeafLevel\": {\n    \"draftData\": {\n      \"classNames\": null,\n      \"content\": [\n        {\n          \"language\": \"en\",\n          \"value\": \"Men's Jacket\"\n        }\n      ],\n      \"isUrlRelative\": true,\n      \"shouldOpenInNewWindow\": false,\n      \"url\": \"/tag/men-jacket\"\n    }\n  }\n```\n\n##### 4. Updating NavigationTree\nNavigation structure can be as complex or simple as we need it to be. In our sample-data, we are defining few top-level entries (like Men/Women/Unisex) and sub-levels under them (like Men's Outdoors, Women's Outdoors) and leaf-level entries (like Men's Jacket). Updating Navigation tree via code involves extensive hardcoding as detailed in `/src/loaders/loadNavigation.js`. The steps are:\n* Create a NavigationItem object by calling the mutaion (createNavigationItem) and providing the NavigationItem data from the above created entry inside `/src/json-data/NavigationItems.json` .\n* This NavigationItem object is updated with the function '_getNavigationItem_'.\n* The NavigationItem under each level of Navigation is defined by the '_items_' property of the that level. Hence we have to add our new NavigationItem entry to the items of the level above it.\n\nThe above steps translate to the below code (for reference)\n```\n  const navItemMenuOneLeafLevel = await context.mutations.createNavigationItem(context.getInternalContext(), {\n    navigationItem: NavigationItemsData.MenuOneLeafLevel\n  });\n\n\n  let m1leaf = getNavigationItem(navItemMenuOneLeafLevel._id);\n\n  m1sub.items = [m1leaf];\n\n```\nInside  `/src/loaders/loadNavigation.js` we can see how this sub-level (`m1sub`) is subsequently added to the _items_ array which in turn is added to the top-level of Navigation. \n\nThe navigation changes are publshed via the _publishNavigationChanges_ mutation and the Shops collection is updated with the _navigationTreeId_.\n\n##### 5. Adding Images to the product\n\nWe could add one (or more) images for each of the leaf-level entries mentioned in the Products.json. But for the simplicity of this sample-data, we are only adding images at the variant-level. This would mean that all of the leaf-level items under a variant would have the same set of images.\n\nTo explain with an example, we have 'Jackets' as top-level product, variants as 'Black'/'Blue' and leaf-level entries as Small/Medium/Large. So in effect, we will have the same set of images for all the sizes (small/medium/large) under each Color.\n\nOnce we have identified the productID (_id) of the variant entries, we just need to update the file-name to include the productId at the begining of the file-name followed by a period '.'. So the specific format of the image would be `productID.<rest_of_file_name>.<extn>`. Allowed image file extensions are jpg/jpeg/png. Once the image with the updated file-name is ready, we just need to place the file in the `/src/images` folder.\n\nNote: We have hard-coded the path to the images folder inside `/src/loaders/loadImages.js` as follows `  let folderPath = \"./custom-packages/api-plugin-sample-data/src/images/\"`\nBy default, when a new plugin is added, the above mentioned path would be correct, but in case we have the plugin folder under a different name, we need to make sure that the above folderPath is updated to match the actual location.\nThe `/src/loaders/loadImages.js` script will update the product images to the database and publish the product. The details of the parent productId which is required by the `loadImages.js` is pulled from the Products.json that we updated initially with product data.\n\n#### Conclusion\nAt this stage, we have all the data that we need to update the database. We could start the API with api-sample-data-plugin enabled and the LOAD_SAMPLE_DATA flag set to true in .env file.\n\n\n#### Login info (for the adminUI) \n\nusername: admin@example.org\npassword: password\n\n## Included in this example plugin\n\n### `.circleci/`\n\nAdds CI scripts that enable Circle CI to run tests and lint your project.\n\n### `src/`\n\nThe `src` folder is where you'll put all the plugin files. An `index.js` with a bear-bones `registerPlugin` is included.\n\n### `.gitignore`\n\nA basic `gitignore` file\n\n### `.nvmrc`\n\n`.nvmrc` sets your plugin to use Node v12.14.1\n\n### `babel.config.cjs`\n\nIf your plugin includes linting and tests, this file is required to allow esmodules to run correctly.\n\n### `jest.config.cjs`\n\nIf your plugin includes tests, this file is required to allow esmodules to run correctly. You'll need to update the `transformIgnorePatterns` and `moduleNameMapper` sections to include any esmodule `npm` packages used in your plugin.\n\n### `License.md`\n\nIf your plugin uses `Apache 2` licensing, you can leave this file as-is. If another type of licensing is used, you need to update this file, and the README, accordingly.\n\n### `package.json`\n\nThe provided `package.json` is set up to install all needed packages and config for linting and testing. You'll need to update the `name`, `description`, and add any new dependencies your plugin files use.\n\n### `index.js`\n\nThe entrypoint file for your npm package, will most likely just export your plugin registration from the `src` folder.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":5566,"sizeBytes":21542},{"name":"README.md","path":"packages/api-plugin-sequences/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-sequences/README.md","title":"api-plugin-sequences Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-sequences\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-sequences.svg)](https://www.npmjs.\ncom/package/@reactioncommerce/api-plugin-sequences)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-sequences.svg?style=svg)](https://circleci.\ncom/gh/reactioncommerce/api-plugin-sequences)\n\n## Summary\n\nProvides functionality for auto-incrementing integer IDs which is not natively supported by Mongo\n\n## Usage\n\nYou can define a new sequence by declaring it in the `Sequences` of your plugin registraion\n\n```javascript\n    sequenceConfig: [\n      {\n        entity: \"Promotions\"\n      }\n    ]\n```\n\nThis will create a sequence starting with 1000000 which can be incremented (returning the next to use) by calling\n`context.mutations.incrementSequence(context, shopId, \"YOUR_ENTITY_NAME\")`;\n\nIf you wish to define the starting sequence you can do that by declaring an env var like:\n\n```bash\nSEQUENCE_INITIAL_VALUES={\"Promotions\":999}\n```\n\nWhere you declare a one-line JSON object which contains any entities you want use a sequence for.\n\nSequences will be created on start-up and should be available to use immediately.\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":664,"sizeBytes":3053},{"name":"README.md","path":"packages/api-plugin-settings/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-settings/README.md","title":"api-plugin-settings Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-settings\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-settings.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-settings)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-settings.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-settings)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSettings plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":556,"sizeBytes":2483},{"name":"README.md","path":"packages/api-plugin-shipments-flat-rate/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-shipments-flat-rate/README.md","title":"api-plugin-shipments-flat-rate Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-shipments-flat-rate\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shipments-flat-rate.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shipments-flat-rate)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shipments-flat-rate.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shipments-flat-rate)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nFlat Rate Shipments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n","isInternal":false,"tokens":469,"sizeBytes":2019},{"name":"README.md","path":"packages/api-plugin-shipments/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-shipments/README.md","title":"api-plugin-shipments Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-shipments\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shipments.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shipments)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shipments.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shipments)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nShipments plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","isInternal":false,"tokens":567,"sizeBytes":2489},{"name":"README.md","path":"packages/api-plugin-shops/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-shops/README.md","title":"api-plugin-shops Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-shops\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-shops.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-shops)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-shops.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-shops)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nShops plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n","isInternal":false,"tokens":452,"sizeBytes":1939},{"name":"README.md","path":"packages/api-plugin-simple-schema/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-simple-schema/README.md","title":"api-plugin-simple-schema Documentation","category":"plugin-manifest","format":"markdown","content":"# api-plugin-simple-schema\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-simple-schema.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-simple-schema)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-simple-schema.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-simple-schema)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nSimpleSchema plugin for the [Reaction API](https://github.com/reactioncommerce/reaction).\n\nThe [SimpleSchema](https://github.com/aldeed/simple-schema-js) package is used by many plugins to validate data, often before inserting or updating MongoDB documents. To allow other plugins to extend these schemas, some plugins register them such that they are accessible in a `preStartup` function.\n\n## Installation\n\n```sh\nnpm install @reactioncommerce/api-plugin-simple-schema\n```\n\nThen add a reference in `plugins.json`, using any key you want. The order in which plugins appear in this file is the order in which they load.\n\n```json\n{\n  simpleSchema: \"@reactioncommerce/api-plugin-simple-schema\"\n}\n```\n\n## Usage\n\nHere's an example of registering a schema:\n\n```js\nimport SimpleSchema from \"simpl-schema\";\n\nconst ProductSchema = new SimpleSchema({\n  // ...\n});\n\nexport default async function register(app) {\n  await app.registerPlugin({\n    // ...\n    simpleSchemas: {\n      Product: ProductSchema\n    }\n  });\n}\n```\n\nNote that a plugin creating a SimpleSchema instance as in the above example will also need to list the `simpl-schema` NPM package as a dependency.\n\nAnd on the other side, if you have a plugin that wants to extend some of the schemas provided by other plugins, do it in a `preStartup` function:\n\n```js\nexport default function preStartup(context) {\n  context.simpleSchemas.Product.extend({\n    price: PriceRange\n  });\n}\n```\n\nThis could be done in a `startup` function, but because startup code sometimes validates against these schemas, it's safer to do it in a `preStartup` function.\n\nA plugin that extends schemas but never calls `new SimpleSchema()` anywhere need not list the `simpl-schema` NPM package as a dependency.\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n","isInternal":false,"tokens":924,"sizeBytes":4156},{"name":"README.md","path":"packages/api-plugin-sitemap-generator/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-sitemap-generator/README.md","title":"api-plugin-sitemap-generator Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-sitemap-generator%2FREADME.md -->","isInternal":false,"tokens":447,"sizeBytes":1959},{"name":"README.md","path":"packages/api-plugin-surcharges/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-surcharges/README.md","title":"api-plugin-surcharges Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-surcharges%2FREADME.md -->","isInternal":false,"tokens":458,"sizeBytes":1965},{"name":"README.md","path":"packages/api-plugin-system-information/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-system-information/README.md","title":"api-plugin-system-information Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-system-information%2FREADME.md -->","isInternal":false,"tokens":579,"sizeBytes":2633},{"name":"README.md","path":"packages/api-plugin-tags/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-tags/README.md","title":"api-plugin-tags Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-tags%2FREADME.md -->","isInternal":false,"tokens":446,"sizeBytes":1933},{"name":"README.md","path":"packages/api-plugin-taxes-flat-rate/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-taxes-flat-rate/README.md","title":"api-plugin-taxes-flat-rate Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-taxes-flat-rate%2FREADME.md -->","isInternal":false,"tokens":463,"sizeBytes":1995},{"name":"README.md","path":"packages/api-plugin-taxes/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-taxes/README.md","title":"api-plugin-taxes Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-taxes%2FREADME.md -->","isInternal":false,"tokens":562,"sizeBytes":2465},{"name":"README.md","path":"packages/api-plugin-translations/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-plugin-translations/README.md","title":"api-plugin-translations Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-plugin-translations%2FREADME.md -->","isInternal":false,"tokens":440,"sizeBytes":1929},{"name":"README.md","path":"packages/api-utils/docs/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-utils/docs/README.md","title":"docs Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-utils%2Fdocs%2FREADME.md -->","isInternal":false,"tokens":63,"sizeBytes":249},{"name":"README.md","path":"packages/api-utils/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/api-utils/README.md","title":"api-utils Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fapi-utils%2FREADME.md -->","isInternal":false,"tokens":226,"sizeBytes":973},{"name":"README.md","path":"packages/db-version-check/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/db-version-check/README.md","title":"db-version-check Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Fdb-version-check%2FREADME.md -->","isInternal":false,"tokens":900,"sizeBytes":4028},{"name":"README.md","path":"packages/file-collections-sa-base/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/file-collections-sa-base/README.md","title":"file-collections-sa-base Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections-sa-base%2FREADME.md -->","isInternal":false,"tokens":26,"sizeBytes":107},{"name":"README.md","path":"packages/file-collections-sa-gridfs/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/file-collections-sa-gridfs/README.md","title":"file-collections-sa-gridfs Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections-sa-gridfs%2FREADME.md -->","isInternal":false,"tokens":27,"sizeBytes":109},{"name":"README.md","path":"packages/file-collections/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/file-collections/README.md","title":"file-collections Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Ffile-collections%2FREADME.md -->","isInternal":false,"tokens":23,"sizeBytes":99},{"name":"README.md","path":"packages/logger/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/logger/README.md","title":"logger Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Flogger%2FREADME.md -->","isInternal":false,"tokens":1433,"sizeBytes":6397},{"name":"README.md","path":"packages/random/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/random/README.md","title":"random Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Frandom%2FREADME.md -->","isInternal":false,"tokens":146,"sizeBytes":648},{"name":"README.md","path":"packages/reaction-error/README.md","rawUrl":"https://raw.githubusercontent.com/reactioncommerce/reaction/HEAD/packages/reaction-error/README.md","title":"reaction-error Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/reactioncommerce/reaction?path=packages%2Freaction-error%2FREADME.md -->","isInternal":false,"tokens":306,"sizeBytes":1230}],"systemPromptSnippet":"<yakaai_skills repo=\"reactioncommerce/reaction\">\n<!-- File: packages/api-utils/docs/generateFilterQuery.md (Tokens: ~765 | Category: anthropic-skill) -->\n# generateFilterQuery\n\nA function that generates a MongoDB filter query from an input GraphQL conditions object. It expects the input GraphQL conditions object to be in the format of the `FilterConditionsInput` input type (detailed below) defined in the GraphQL  Schemas along with other parameters like `context`, `collectionName` and `shopId`.\n\nAs seen in the format below, \n* The input object is a nested object where you could use  either `all` or `any` keys.\n* Both the top level `all` & `any` keys are an array of objects with one more level of `all` or `any` keys.\n* The inner `all` or `any` keys is an array of objects with the structure defined by `SingleConditionInput`.\n* The `SingleConditionInput` object has the fields which define a single condition to filter on.\n<br>\n* The `all` key is equivalent of the `$and` operator in MongoDB and the `any` key is equivalent of the `$or` operator in MongoDB.\n* In the `SingleConditionInput` object, mandatory fields are the `key`, `relationalOperator` and exactly any ONE of the value fields. The `key` is the field name to filter on. The `relationalOperator` is the relational operator to use to filter on the field (predefined as enum values). The `stringValue`, `integerValue`, `floatValue`, `booleanValue`, `dateValue`, `stringArrayValue`, `integerArrayValue`, `floatArrayValue` are the values to filter on (use exactly one of this) depending on the key.\n* Finally there are two more optional fields `caseSensitive` and `logicalNot`. The `caseSensitive` is a boolean flag to set if the regex is case sensitive. The `logicalNot` is a boolean flag to set if the condition is to be negated.\n\nFilterConditionsInput format below (from GraphQL Schemas). __Example__ follows the format below:\n\n\n```graphql\n\ninput FilterConditionsInput {\n  all: [ConditionsArray]\n\n  any: [ConditionsArray]\n}\n\n\ninput ConditionsArray {\n  all: [SingleConditionInput]\n\n  any: [SingleConditionInput]\n}\n\n\ninput SingleConditionInput {\n  booleanValue: Boolean\n  caseSensitive: Boolean\n  dateValue: DateTime\n  floatArrayValue: [Float]\n  floatValue: Float\n  integerArrayValue: [Int]\n  integerValue: Int\n  key: String!\n  logicalNot: Boolean\n  relationalOperator: RelationalOperatorTypes!\n  stringArrayValue: [String]\n  stringValue: String\n}\n\n\nenum RelationalOperatorTypes{\n  beginsWith\n  endsWith\n  eq\n  gt\n  gte\n  in\n  lt\n  lte\n  ne\n  nin\n  regex\n}\n\n```\n\n\n## Example\n\nExample of invoking the function with a simple conditions object. Here we are querying for products collection for entries with the handle as 'mens-waterproof-outdoor-rain-jacket'. Since it is single condition, using either `all` or `any` will not make difference. \n\n```js\nimport generateFilterQuery from \"@reactioncommerce/api-utils/generateFilterQuery.js\";\n\nconst conditions = {\n      all: [\n        {\n          any:[\n            {\n              key: \"handle\",\n              stringValue: \"mens-waterproof-outdoor-rain-jacket\",\n              relationalOperator: eq,\n              logicalNot: false\n            }\n          ]\n        }\n      ]\n    }\n\n  const { filterQuery } = generateFilterQuery(context, \"Product\", conditions, shopId);\n\n  return Products.find(filterQuery);\n```\n\nPlease refer to readme in the respective plugins for more detailed examples (example: api-plugin-products).\n\n<!-- File: packages/api-utils/docs/getAbsoluteUrl.md (Tokens: ~123 | Category: anthropic-skill) -->\n# getAbsoluteUrl\n\nA function that takes a root URL and a relative URL and combines them. Handles URLs that do and don't begin and end with slashes.\n\n- It's fine to pass a path that may be undefined. Just the root URL will be returned.\n- It's fine to pass a path that may already be absolute. It will be left alone.\n\nExample:\n\n```js\nconst rootUrl = \"http://localhost:3000/\";\nconst path = \"/media/test.jpg\";\nconst url = getAbsoluteUrl(rootUrl, path); // http://localhost:3000/media/test.jpg\n```\n\n<!-- File: packages/api-utils/docs/getPaginatedResponseFromAggregate.md (Tokens: ~425 | Category: anthropic-skill) -->\n# getPaginatedResponseFromAggregate\n\nReturns a paginated response from a MongoDB aggregation pipeline.\n\nUsage example:\n\n```js\nimport getPaginatedResponseFromAggregate from \"@reactioncommerce/api-utils/getPaginatedResponseFromAggregate.js\";\n\n// the MongoDB collection you want to run your aggregation on\nconst collection = getYourMongoDBCollectionSomehow();\n\nconst pipeline = [\n  {\n    // for example, here's a $lookup operator\n    $lookup: {\n      // some options\n    }\n  },\n  // but you can add,\n  // any,\n  // other,\n  // operators\n];\n\nconst args = {\n  // connection arguments from your GraphQL query or mutation\n  // more info here: https://facebook.github.io/relay/graphql/connections.htm#sec-Arguments\n  // supported:\n  // offset: Int,\n  // first: Int,\n  // last: Int,\n  // sortBy: String (the name of the MongoDB field you want to sort results by)\n  // sortOrder: String (\"desc\" for descending, or \"asc\" for ascending)\n};\n\nconst options = {\n  // some options to control which optional fields get returned with the results\n  // supported:\n  // includeHasNextPage: Boolean,\n  // includeHasPreviousPage: Boolean,\n  // includeTotalCount: Boolean\n};\n\nconst results = await getPaginatedResponseFromAggregate(collection, pipeline, args, options);\n\nreturn results;\n// {\n//   pipeline: Array (the pipeline that was passed, with the necessary modifications that were added to it by `getPaginatedResponseFromAggregate`)\n//   nodes: Array (the returned items)\n//   pageInfo: Object {\n//     `hasNextPage: Boolean` (if requested in `options`),\n//     `hasPreviousPage: Boolean` (if requested in `options`),\n//     `startCursor`: String (`_id` of the first item in `nodes`),\n//     `endCursor`: String (`_id of the last item in `nodes`)\n//   },\n//   totalCount: Int (if requested in `options`)\n// }\n```\n\n<!-- File: packages/api-utils/docs/tagsForCatalogProducts.md (Tokens: ~241 | Category: anthropic-skill) -->\n# tagsForCatalogProducts\n\nGive an array of CatalogProduct objects, returns an array of tags for each product ID.\n\nExample data set:\n\n```js\n// Tags\n[\n  {\n    _id: \"1\",\n    name: \"ONE\"\n  },\n  {\n    _id: \"2\",\n    name: \"TWO\"\n  },\n  {\n    _id: \"3\",\n    name: \"THREE\"\n  }\n]\n\n// CatalogProducts\n[\n  {\n    product: {\n      productId: \"1\",\n      tagIds: [\"1\", \"2\"]\n    }\n  },\n  {\n    product: {\n      productId: \"2\",\n      tagIds: [\"3\"]\n    }\n  }\n]\n```\n\nUsage:\n\n```js\n// Tags is the \"Tags\" Mongo.Collection\n// `catalogProducts` is an array of CatalogItemProduct from Catalog collection\nconst result = await tagsForCatalogProducts(Tags, catalogProducts);\n```\n\nResult will be:\n\n```js\n[\n  {\n    productId: \"1\",\n    tags: [\"ONE\", \"TWO\"]\n  },\n  {\n    productId: \"2\",\n    tags: [\"THREE\"]\n  }\n]\n```\n\n<!-- File: packages/api-core/README.md (Tokens: ~5411 | Category: plugin-manifest) -->\n# Reaction API Core\n\nThis NPM package provides the `ReactionAPICore` class. Use this to build a NodeJS microservice that is compatible with the Reaction Commerce platform, or to build your main Reaction Commerce API if you don't want to start by forking the `https://github.com/reactioncommerce/reaction` project.\n\nIf you're just looking to run the default Reaction release with all built-in plugins for development, demos, or evaluation, use the released Docker images and the [Reaction Development Platform](https://github.com/reactioncommerce/reaction-development-platform) instead.\n\nThis NPM package also provides the `ReactionTestAPICore` class, which you can use to write automated tests that run GraphQL queries against your API with a real database connection. This class is almost identical to the `ReactionAPICore` class, except that no actual GraphQL server is created and various additional methods are available to help with common testing needs.\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Included Features](#included-features)\n- [Supported Environment Variables](#supported-environment-variables)\n- [ReactionAPICore Configuration](#reactionapicore-configuration)\n- [Plugins](#plugins)\n  - [Plugin Configuration](#plugin-configuration)\n    - [auth](#auth)\n    - [collections](#collections)\n    - [contextAdditions](#contextadditions)\n    - [expressMiddleware](#expressmiddleware)\n    - [functionsByType](#functionsbytype)\n    - [graphQL](#graphql)\n    - [mutations and queries](#mutations-and-queries)\n- [App Context](#app-context)\n- [Writing Tests Using ReactionTestAPICore](#writing-tests-using-reactiontestapicore)\n- [Developer Certificate of Origin](#developer-certificate-of-origin)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\n```sh\nnpm install @reactioncommerce/api-core graphql\n```\n\nThe `graphql` package is a required peer dependency.\n\n## Usage\n\nHere is example usage assuming Node 12.14.1 with experimental modules enabled.\n\n```js\nimport { ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport registerFooPlugin from \"reaction-plugin-foo\";\nimport Logger from \"@reactioncommerce/logger\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // Call this once per plugin.\n  await api.registerPlugin({\n    // Plugin config. See \"Plugin Configuration\" section\n  });\n\n  // Plugin packages export a function that calls `api.registerPlugin` for you, so\n  // for those you just pass `api` to the function.\n  await registerFooPlugin(api);\n\n  // Or you can register multiple at once, passing in either a function or a\n  // registration object for each.\n  await api.registerPlugins({\n    foo: registerFooPlugin,\n    another: {\n      // some plugin config\n    }\n  });\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nAlternatively, you can keep your plugin list in a JSON file:\n\n```js\nimport { importPluginsJSONFile, ReactionAPICore } from \"@reactioncommerce/api-core\";\nimport Logger from \"@reactioncommerce/logger\";\nimport authorizationPlugin from \"@reactioncommerce/reaction-plugin-authorization\";\nimport packageJson from \"../package.json\";\n\nconst api = new ReactionAPICore({\n  // See \"ReactionAPICore Configuration\" section. Many options are also configured\n  // by environment variables. See \"Supported Environment Variables\" section.\n  serveStaticPaths: [\"public\"],\n  version: packageJson.version\n});\n\nasync function run() {\n  // An optional function allows you to transform the list from the\n  // JSON (add, swap, or remove plugins) before it attempts to load the\n  // plugin modules.\n  const plugins = await importPluginsJSONFile(\"./plugins.json\", (pluginList) => {\n    pluginList.authorization = authorizationPlugin;\n\n    return pluginList;\n  });\n\n  await api.registerPlugins(plugins);\n\n  await api.start();\n}\n\nrun().catch((error) => {\n  Logger.error(error);\n  process.exit(1);\n});\n```\n\nSample `plugins.json` file:\n\n```json\n{\n  \"accounts\": \"./core-services/account/index.js\",\n  \"address\": \"./core-services/address/index.js\",\n  \"authentication\": \"@reactioncommerce/plugin-authentication\",\n  \"authorization\": \"@reactioncommerce/plugin-simple-authorization\"\n}\n```\n\nAll relative paths are assumed to be relative to the JSON file and are assumed to be an ES module. All packages are assumed to export the plugin registration function as their default ES module export.\n\n### Included Features\n\nMost Reaction API features are released as [plugins](#plugins), but even if you never register any plugins and run your API, you'll get the following core features automatically:\n\n- A minimal GraphQL API running at `/graphql` on `ROOT_URL`, with a `ping` query, an `echo` mutation, and a `tick` subscription for testing.\n- Commonly used core GraphQL types such as `Date`, `DateTime`, `Money`, and `Rate`, as well as types related to Relay-style pagination\n- A static file server if you passed in the `serveStaticPaths` option\n- A connection to MongoDB, with improved connection retry, if the `MONGO_URL` environment variable or the `mongoDb` option was provided\n- Access to an Express app at `api.expressApp`\n\n## Supported Environment Variables\n\nThe following environment variables are picked up automatically by the `ReactionAPICore` instance.\n\n```js\n{\n  BODY_PARSER_SIZE_LIMIT: bodyParserValidator({\n    default: 5 * 1000000 // value in bytes = 5mb\n  }),\n  GRAPHQL_INTROSPECTION_ENABLED: bool({ default: false, devDefault: true }),\n  GRAPHQL_PLAYGROUND_ENABLED: bool({ default: false, devDefault: true }),\n  MONGO_URL: str({\n    devDefault: \"mongodb://localhost:27017/reaction\",\n    desc: \"A valid MongoDB connection string URI, ending with the database name\",\n    example: \"mongodb://localhost:27017/reaction\"\n  }),\n  PORT: num({\n    default: 3000,\n    desc: \"The port on which the API server should listen\",\n    example: \"8000\"\n  }),\n  REACTION_LOG_LEVEL: str({\n    choices: [\"FATAL\", \"ERROR\", \"WARN\", \"INFO\", \"DEBUG\", \"TRACE\"],\n    default: \"WARN\",\n    devDefault: \"DEBUG\",\n    desc: \"Determines how much logging you see. The options, from least to most logging, are FATAL, ERROR, WARN, INFO, DEBUG, TRACE. See: https://github.com/trentm/node-bunyan#levels\",\n    example: \"ERROR\"\n  }),\n  REACTION_APOLLO_FEDERATION_ENABLED: bool({\n    default: false,\n    desc: \"Set this to true if you need Apollo Federation support.\"\n  }),\n  REACTION_GRAPHQL_SUBSCRIPTIONS_ENABLED: bool({\n    default: true,\n    desc: \"Set this to false if you do not need GraphQL subscription support\"\n  }),\n  REACTION_SHOULD_INIT_REPLICA_SET: bool({\n    default: false,\n    devDefault: true,\n    desc: \"Automatically initialize a replica set for the MongoDB instance. Set this to 'true' when running the app for development or tests.\"\n  }),\n  ROOT_URL: str({\n    devDefault: \"http://localhost:3000\",\n    desc: \"The protocol, domain, and port portion of the URL, to which relative paths will be appended. \" +\n      \"This is used when full URLs are generated for things such as emails and notifications, so it must be publicly accessible.\",\n    example: \"https://shop.mydomain.com\"\n  })\n}\n```\n\n## ReactionAPICore Configuration\n\nThe following options can be passed in the first argument of `ReactionAPICore` when initializing an instance.\n\n- **appEvents**: See the \"Providing a Custom appEvents Implementation\" section.\n- **httpServer**: An HTTP server for GraphQL subscription websocket handlers. In most cases you should omit this and let `ReactionAPICore` create one for you.\n- **mongodb**: Optionally pass in the `mongodb` reference from `import mongodb from \"mongodb\";`. In most cases you should omit this and let `ReactionAPICore` use its own reference, but if you need to ensure a specific version is used, this allows you to do that.\n- **serveStaticPaths**: An optional array of paths (relative to your project root) that should be served as static files. Each of these is passed to [express.static()](https://expressjs.com/en/starter/static-files.html). If you need more control, you can access `api.expressApp` directly.\n- **rootUrl**: Items such as `api.rootUrl`, `context.rootUrl`, and `context.getAbsoluteUrl` are set based on this. If not provided, falls back to `ROOT_URL` environment variable.\n- **version**: Pass any valid version string. This is available to plugins as `api.version` or `context.appVersion`. This allows you to version your API as a whole (with all plugins installed and configured), which is different from the version of this `api-core` package. Use this for whatever purpose you want, but it is not required and will be `null` if you don't set a version.\n\n## Plugins\n\nThe Reaction API server has a plugin system that allows code to be broken into small packages. Plugins can register functions, configuration, and GraphQL schemas and resolvers. The sum of everything registered by every plugin is your Reaction API.\n\nIn some cases a plugin has plugins of its own or has other external components that you also need to install.\n\nA plugin need not be in a separate package. You can simply call `api.registerPlugin`, passing in any valid configuration. This may be fine for prototyping and quick tests, but we highly recommend that all plugins be published as separate NPM packages, which allows you to track and manage dependencies more easily. This does not necessarily mean they need to be published to NPM, but they must be something you can add to `package.json` and NPM will know how to install it. For example, a private GitHub repo will work.\n\nIf you publish a plugin as an NPM package, the default package export should be an async function that accepts `api` as the first argument and calls `api.registerPlugin` with all necessary configuration options.\n\n### Plugin Configuration\n\nWhether you are calling `api.registerPlugin` directly in an API project or within a plugin package, you must pass in an object that includes everything the plugin wants to make available to the core API or other API plugins. This `registerPlugin` object has a specific structure.\n\nThe two keys that every plugin will include are `name` and `label`. `name` must be unique, cannot contain spaces, and identifies your plugin; `label` is the human-readable version of your plugin name, for showing in UIs.\n\nBeyond `name` and `label`, the following standard keys can be included in your `registerPlugin` object and are described in more detail below:\n\n- `auth`\n- `collections`\n- `contextAdditions`\n- `expressMiddleware`\n- `functionsByType`\n- `graphQL`\n- `mutations`\n- `queries`\n\n#### auth\n\nPlugins can pass functions in an `auth` object, which are then used to add permission and account information to `context` for each API request.\n\n```js\nauth: {\n  accountByUserId,\n  permissionsByUserId\n}\n```\n\n- `accountByUserId`: An async function with signature `(context, userId)` that must return an account document for the given `userId`, or `null` if one cannot be found. This will be used to set `context.account` and `context.accountId`.\n- `permissionsByUserId`: An async function with signature `(context, userId)` that must return an array of permissions for the given `userId`, or `null` if no permission list can be generated. This is available for each API request as `context.userPermissions`.\n\nSee also the \"getHasPermissionFunctionForUser\" functionsByType.\n\n#### collections\n\nTo create any non-core MongoDB collection that a plugin needs, use the `collections` option:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\"\n  }\n}\n```\n\nThe `collections` object key is where you will access this collection on `context.collections`, and `name` is the collection name in MongoDB. We recommend you make these the same if you can.\n\nThe example above will make `context.collections.MyCustomCollection` available in all query and mutation functions, and all functions that receive `context`, such as startup functions. Note MongoDB may not actually create the collection until the first time you insert into it.\n\nYou can optionally add indexes for your MongoDB collection:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    indexes: [\n      [{ referenceId: 1 }, { unique: true }]\n    ]\n  }\n}\n```\n\nEach item in the `indexes` array is an array of arguments that will be passed to the Mongo `createIndex` function. The `background` option is always set to `true` so you need not include that.\n\nThere is also experimental support for defining validation options. Add `validator`, `validationLevel`, or `validationAction` options and they will be passed along to the MongoDB library. Refer to [their createCollection documentation](http://mongodb.github.io/node-mongodb-native/3.6/api/Db.html#createCollection).\n\nThere is also a convenience syntax that allows you to pass a JSONSchema directly. This:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    jsonSchema: someJsonSchema\n  }\n}\n```\n\nIs shorthand for this:\n\n```js\ncollections: {\n  MyCustomCollection: {\n    name: \"MyCustomCollection\",\n    validator: {\n      $jsonSchema: someJsonSchema\n    }\n  }\n}\n```\n\nNOTE: Registering your collections is not required, and in fact it is probably best to NOT register them unless you need to allow other plugins to access your data directly. As long as you do not register them, they remain a private implementation detail that you are free to change without breaking other plugins.\n\n#### contextAdditions\n\nA plugin can add properties to context using the `contextAdditions` option. They are added before any `preStartup` or `startup` functions are run.\n\n```js\ncontextAdditions: {\n  something: \"wicked\"\n}\n```\n\n```js\n// in startup fn or anywhere you have context\nconsole.log(context.something); // \"wicked\"\n```\n\n#### expressMiddleware\n\nPlugins can register Express middleware using the `expressMiddleware` option:\n\n```js\nexpressMiddleware: [\n  {\n    route: \"graphql\",\n    stage: \"authenticate\",\n    fn: tokenMiddleware\n  }\n]\n```\n\nFor now, only the \"graphql\" route is supported, and the following stages are supported in this order:\n\n- `first`\n- `before-authenticate`\n- `authenticate`\n- `before-response`\n\nAn `authenticate` middleware function should do something like look up the user by the Authorization header, and either set `request.user` or send a 401 response if the token is invalid. It should not require a token.\n\nThe `first` middleware stage can be used for loggers or anything else that needs to be first in the middleware list. `before-response` middleware will have the user available if there is one, and is called before the Apollo GraphQL middleware.\n\nA middleware function is passed `context` and must return the Express middleware handler function, which must call `next()` or send a response.\n\n#### functionsByType\n\nThe `functionsByType` object is a map of function types to arrays of functions of that type. This pattern can be used by any plugin to allow any other plugin to register certain types of functions for plugin points.\n\nDocumentation for individual plugins will tell you how to use this for that plugin, but there are also a few core types that any plugin might want to use:\n\n- createDataLoaders\n- getHasPermissionFunctionForUser\n- preStartup\n- registerPluginHandler\n- startup\n- shutdown\n\nLook at built-in plugins for examples of these, and read [How To: Share Code Between API Plugins](https://docs.reactioncommerce.com/docs/how-to-share-code-between-plugins) for more information.\n\n#### graphQL\n\nUse the `graphQL` object to register schemas and resolvers that extend the core GraphQL API.\n\nMore information:\n\n- [How To: Create a new GraphQL mutation](https://docs.reactioncommerce.com/docs/graphql-create-mutation)\n- [How To: Create a new GraphQL query](https://docs.reactioncommerce.com/docs/graphql-create-query)\n- [How To: Extend GraphQL to add a field](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-to-add-field)\n- [How To: Extend GraphQL with Remote Schema Delegation](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-with-remote-schema)\n\n#### mutations and queries\n\nThe `mutations` and `queries` objects are maps of functions that are extended onto `context.mutations` and `context.queries`. These may be functions that are called from GraphQL resolvers of a similar name, or functions that are intended to be called only by other plugin code. Functions that modify data should be registered as `mutations` and all other functions should be registered as `queries`.\n\n## App Context\n\nApollo Server passes a `context` object to every GraphQL resolver. By convention, plugins pass this down as the first argument to all internal query, mutation, and util functions, too. We refer to this as the app context, and many different things live on it. It is the primary way that functions and other information are shared among plugins.\n\nThere are two types of properties on the app context: instance properties and request properties. Most properties are instance properties; they are set when you initialize a `ReactionAPICore` instance or when you register a plugin, and they do not change while the API is running. A few other properties are added to the context at the start of every request that comes in, and these are the request properties.\n\nInstance properties:\n\n- `app`: The `ReactionAPICore` instance that owns this context. (Note that `api.context.app` is a circular reference.)\n- `appEvents`: A simple event mechanism with `on` and `emit` properties. This allows event-based communication among plugins. Unlike Node's built-in `EventEmitter`, `appEvents.on` functions may return Promises and `appEvents.emit` may be awaited in situations where you want to be sure all event listeners have handled the event before continuing.\n- `appVersion`: A string set to whatever the `version` option is when creating the `ReactionAPICore` instance\n- `collections`: An object with references to [MongoDB collections](http://mongodb.github.io/node-mongodb-native/3.5/api/Collection.html), built by any plugins that register collections. Allows direct access to collections from various plugins even if only one plugin \"owns\" that collection.\n- `getInternalContext`: A function that takes no arguments and returns a context with all authentication and authorization mocked to allow anything. Useful when you need to pass down context to another query or mutation but circumvent its normal authorization checks.\n- `getFunctionsOfType`: A function that takes one argument, a type string, and returns an array of all functions that were registered with that type. This is a simple way that plugins can share functions with other plugins for specific purposes\n- `mutations` and `queries`: These objects have references to all functions that plugins have registered in their own `mutations` and `queries` objects, when calling `registerPlugin`. If multiple plugins have mutations or queries with the same name, the last plugin to be registered will win (unlike `getFunctionsOfType` where multiple functions may be registered).\n- `rootUrl`: The root URL string, from `rootUrl` instance option or `ROOT_URL` environment variable\n- `getAbsoluteUrl`: A function that is bound to `rootUrl`, for easy conversion of a relative URL to one that is absolute and begins with `rootUrl`.\n\nThere may be additional instance properties if any plugins have added them using the `contextAdditions` option for `registerPlugin`. Refer to documentation for individual plugins.\n\nRequest properties:\n\n- `user`: The User document for the user who made the request. This is set to the Express `request.user` property, which any plugin can set by registering request middleware.\n- `userId`: If `user` is set, this will be the `user._id`, for convenience.\n- `account`: If `context.auth.accountByUserId` is a function and `context.user` is set, `accountByUserId` will be called for the request, and the return value will be available as `context.account`. The `user` is a generic authentication document for OAuth, whereas `account` is a Reaction-specific concept where additional information about each user is tracked.\n- `accountId`: If `account` is set, this will be the `account._id`, for convenience.\n- `userPermissions`: If `context.auth.permissionsByUserId` is a function, it will be called with `(context, userId)` arguments, and the return value is available as `context.userPermissions`.\n- `userHasPermission`: A function that you can call to determine whether a user has needed permissions. It calls any functions registered as type `getHasPermissionFunctionForUser`, passing in `context`, and then calls the function returned by each. Returns `true` only if every registered function returns `true`.\n- `validatePermissions`: Calls `userHasPermission` and throws an Access Denied error if it returns `false`.\n- `requestHeaders`: An object with all HTTP headers for the current request on it, except with `Authorization` and `Cookie` headers removed for security.\n\nYou can always access the app context on `api.context` if you have a reference to the `api` instance, but this will never have any request properties set because there is no request happening.\n\n## Providing a Custom appEvents Implementation\n\n`context.appEvents` is available to all plugins and is used for communication among plugins. The built-in implementation of this is not highly optimized, but you may provide your own implementation to meet your needs.\n\nTo override the built-in `appEvents` with your own, pass `appEvents` option when constructing your API instance. The provided object must have 4 function properties named `emit`, `on`, `stop`, and `resume`. Here's an example:\n\n```js\nconst appEvents = {\n  async emit(name, ...args) {},\n  on(name, func) {},\n  stop() {},\n  resume() {}\n};\n\nconst api = new ReactionAPICore({ appEvents });\n```\n\n- `stop` should stop emission and `resume` should resume emission. Neither takes any arguments.\n- `emit`:\n  - `emit` may or may not return a Promise, but either way the final returned value must be `undefined`\n  - When emission is stopped, `emit` should do nothing\n  - When emission is not stopped, `emit` should call each handler registered by `on` one by one. If a handler returns a Promise, wait until it resolves or rejects before calling the next handler. `emit` itself should not resolve or reject until all handlers have been called and have resolved or rejected.\n  - Any additional `args` passed to `emit` should be passed along to each handler function.\n- `on` registers a handler function to be called by `emit`.\n- Handlers are called only after they are registered. Any events emitted prior to registering a handler are never handled by that handler.\n\n## Writing Tests Using ReactionTestAPICore\n\nRefer to [Writing Jest Integration Tests](https://docs.reactioncommerce.com/docs/writing-jest-integration-tests).\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing-off all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign-off your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real full name (please no anonymous contributions or pseudonyms) and a real email address. By signing-off your commit you are certifying that you have the right to submit it under the [GNU GPLv3 License](./LICENSE.md).\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO sign-offs of every commit.\n\nIf you forget to sign-off your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction package is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-accounts/README.md (Tokens: ~451 | Category: plugin-manifest) -->\n# api-plugin-accounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-accounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-accounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-accounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-accounts)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Summary\n\nAccounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-address-validation-test/README.md (Tokens: ~509 | Category: plugin-manifest) -->\n# api-plugin-address-validation-test\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation-test.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation-test)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation-test)\n\n## Summary\n\nAddress Validation Test plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-address-validation/README.md (Tokens: ~503 | Category: plugin-manifest) -->\n# api-plugin-address-validation\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-address-validation.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-address-validation)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-address-validation)\n\n## Summary\n\nAddress Validation plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-authentication/README.md (Tokens: ~813 | Category: plugin-manifest) -->\n# api-plugin-authentication\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authentication.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authentication)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authentication.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authentication)\n\n## Summary\n\nThis plugin provides Authentication middleware for the Reaction API. It relies on token based authentication.\nUtils included in this plugin help connect the [Account-js](https://www.accountsjs.com/) library and the Reaction API via an Auth Token.\n\n## How it works\n\nThis plugin registers the schema and resolvers that are required by account-js.\n\nA express middleware is added whose job is to extract the `Authorization` header from the request and uses account-js to get the user for that token. The format should be `Authorization: Bearer <YOUR_ACCESS_TOKEN>`. Then the user is attached to the `req` object.\n\nA function is added to `functionByType.graphQLContext` which links the graphQL context used in the api-core with the \"internal context\" used by account-js. This is needed because account-js also keeps tracks of the tokens and uses a separate GraphQL server.\n\n## Supported actions\n\n1. Signup\n2. Login\n3. Change Password\n4. Forgot Password - A email is sent with a reset token url of the form `https://<STORE_URL>/?resetToken=<token>`\n\n## Environment Variables:\n\n| Variable Name | Description                                                                                                                     | Default Value           |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |\n| STORE_URL     | This is the public link to the storefront (used to redirect)                                                                    | `http://localhost:4000` |\n| MONGO_URL     | MongoDB used to store session & tokens                                                                                          | None                    |\n| TOKEN_SECRET  | [secret](https://www.accountsjs.com/docs/api/server/interfaces/accountsserveroptions#tokensecret) used while creating the token | `UPDATE_THIS_SECRET`    |\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nCopyright 2020 Reaction Commerce\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n<!-- File: packages/api-plugin-authorization-simple/README.md (Tokens: ~1527 | Category: plugin-manifest) -->\n# api-plugin-authorization-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-authorization-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-authorization-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-authorization-simple)\n\n## Summary\n\nThis plugin checks authorization in the Reaction API.\n\nAuthorization is determined by one primary function, `validatePermissions`, which is added onto the `context`. If permissions are valid, nothing will happen when this function is called. If permissions are invalid, this call will throw an `\"Access Denied\"` error.\n\nA secondary function, `userHasPermission`, is also available on the `context`. This will provide a boolean value of the permission status.\n\n`validatePermissions` is our preferred method.\n\n## Usage\n\n`permissions` are attached to account `Groups`, initially by being copied from [defaultRoles.js](https://github.com/reactioncommerce/reaction/blob/trunk/src/core-services/account/util/defaultRoles.js) on startup. Each account can belong to as may groups as needed (including not belonging to any group), and is granted *all* `permissions` from *all* the groups they belong to. This package provides the function `permissionsByUserId` which does the work to build a list of all the `permissions` the user is granted.\n\n### Checking permissions\n\nThe `validatePermissions` function (and `userHasPermission`) takes three parameters: `resource`, `action`, and `context`. For example, this call is checking to see if the current user has permission to `cancel an item` on this particular order:\n\n```js\nawait context.validatePermissions(`reaction:legacy:orders:${order._id}`, \"cancel:item\", {\n  shopId: order.shopId,\n  owner: order.accountId\n});\n```\n\n#### Resource\n\nResource is the name of the resource a user is trying to access. This consists of three required pieces: `organization`, `system`, `entity`; and one optional field: `id`.\n\nFor our purposes in Reaction code:\n\n- `organization` will always be `reaction`.\n- `system` is the service or group of services that provide the resource we want to access control. It will always be `legacy` if the code lives within the Reaction API project, and will be the package name (i.e. `simple-authorization`) if the code live outside of the Reaction API project.\n- `entity` is the actual data entity to access control, such as an `orders`. Entity names are always plural.\n- `id`  is the actual ID of a data entity to access control. This is for super granular Policies and will most of the time be omitted or described with just a * meaning \"all IDs\".\n\n#### Action\n\nThe action the user would like to preform. This can be anything, but we recommend sticking short, intentional words, which can be package-spaced if desired. For example, `create`, `read`, `update`, `delete`, and `publish` are all great actions. If you need more context, `remove:addressBook` would be a good name for the permission to remove `addressBooks` from an `account`, but not have `remove` privileges on the entire `account`.\n\n#### Context\n\nContext is used to pass any extra information to the permissions check. We use it primarily for two things at this time:\n\n1. We pass `shopId` in the context (somtimes referred to as `ketoContext`) everywhere it's avaialble\n1. We pass `owner` into the context anywhere where a regular, non-admin user is allowed permissions to something they themselves own. For example, on an order they placed, they will have `owner` permissions on that particular order.\n\n## Under the hood\n\n- `userHasPermission` is built from `getHasPermissionFunctionForUser`, which is registered to `context` as a `functionsByType` in its respective package, and called `userHasPermission` on `context` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L28-L42)). This plugin will work alongside any other authorization plugin registered in the same way.\n\n- `validatePermissions` ([See code here](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/core/util/buildContext.js#L46-L49)), is created from the value of `context.userHasPermission`, If `userHasPermissions === true`, `validatePermissions` does nothing, and lets the rest of the function continue to run. If `userHasPermission === false`, `validatePermissions` throws an `Access Denied` error.\n\n## Using this package\nImport this package into the [registerPlugins.js](https://github.com/reactioncommerce/reaction/blob/8b3d66d758c8fe0e2ba1df1958767587ddb7a046/src/registerPlugins.js) file in the Reaction API, and then await its `registerPlugin` function:\n\n```js\nimport registerSimpleAuthorizationPlugin from \"@reactioncommerce/api-plugin-authorization-simple/index.js\";\nawait registerSimpleAuthorizationPlugin(app);\n```\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-bull-queue/README.md (Tokens: ~687 | Category: plugin-manifest) -->\n# api-plugin-bull-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-bull-queue.svg)](https://www.npmjs.\ncom/package/@reactioncommerce/api-plugin-bull-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-bull-queue.svg?style=svg)](https://circleci.\ncom/gh/reactioncommerce/api-plugin-bull-queue)\n\n## Summary\n\nJob Queue plugin Based on [Bull](https://www.npmjs.com/package/bull) for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\nThe current API includes just 4 commands:\n\n`createQueue` - Which creates a job queue, assigns a processor to it and adds the queue to the context to it's \naccessible everywhere\n\n`addJob` - Allows you to add a job to the queue. You can see an example of this in the include email plugin\n\n`scheduleJob` - Allows you to schedule repeating job using cron syntax. You can see an example of \nthis in the Promotions plugin.\n\n`addDelayedJob` - Similar to `addJob` but just allows you to delay the job by a number of ms.\n\n[Many more commands](https://github.com/OptimalBits/bull/blob/HEAD/REFERENCE.md) are available if you have an instance of the queue\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2022 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-carts/README.md (Tokens: ~393 | Category: plugin-manifest) -->\n# api-plugin-carts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-carts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-carts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-carts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-carts)\n\n## Summary\n\nCarts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-catalogs/README.md (Tokens: ~398 | Category: plugin-manifest) -->\n# api-plugin-catalogs\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-catalogs.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-catalogs)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-catalogs)\n\n## Summary\n\nCatalogs plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-discounts-codes/README.md (Tokens: ~428 | Category: plugin-manifest) -->\n# api-plugin-discounts-codes\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts-codes.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts-codes)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts-codes)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n\n## Summary\n\nDiscount Codes plugin for the Reaction API\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-discounts/README.md (Tokens: ~429 | Category: plugin-manifest) -->\n# api-plugin-discounts\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-discounts.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-discounts)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-discounts.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-discounts)\n\n## This repository is deprecated\nThis plugin is deprecated and will be removed in a future release. Please use the `@reactioncommetce/api-plugin-promotions` plugin instead.\n## Summary\n\nDiscounts plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-email-smtp/README.md (Tokens: ~508 | Category: plugin-manifest) -->\n# api-plugin-email-smtp\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-smtp.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-smtp)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-smtp)\n\n## Summary\n\nSMTP Email plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-email-templates/README.md (Tokens: ~398 | Category: plugin-manifest) -->\n# api-plugin-email-templates\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email-templates.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email-templates)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email-templates)\n\n## Summary\n\nEmail Templates plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-email/README.md (Tokens: ~387 | Category: plugin-manifest) -->\n# api-plugin-email\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-email.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-email)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-email.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-email)\n\n## Summary\n\nEmail plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-files/README.md (Tokens: ~387 | Category: plugin-manifest) -->\n# api-plugin-files\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-files.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-files)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-files.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-files)\n\n## Summary\n\nFiles plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n\n<!-- File: packages/api-plugin-fulfillment-method-pickup-store/README.md (Tokens: ~613 | Category: plugin-manifest) -->\n# api-plugin-fulfillment-method-pickup-store\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-pickup`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesPickupStore - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Store\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/collectStoreDetails - dummy function to simulate api providing store specific info while returning quotes.\n* util/validateOrderMethodsPickupStore - dummy function to simulate store specific validations. Called by prepareOrder.js\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-fulfillment-method-shipping-dynamic-rate/README.md (Tokens: ~617 | Category: plugin-manifest) -->\n# api-plugin-fulfillment-method-shipping-dynamic-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingDynamicRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to Dynamic Rate\n* startup - Inserts the required ff-method entry into Fulfillment collection\n* util/checkAndCreateFulfillmentMethod - confirms existing ff-type entry and adds a new ff-method under it.\n* util/calculateDynamicRateRate - dummy function to simulate api providing dynamic rate specific info while returning quotes.\n* util/validateOrderMethodsDynamicRate - dummy function to simulate dynamic rate specific validations done. Called by prepareOrder.js\n\n\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-fulfillment-method-shipping-flat-rate/README.md (Tokens: ~605 | Category: plugin-manifest) -->\n# api-plugin-fulfillment-method-shipping-flat-rate\n\nThis is a fulfillment-method plugin which which works along with the base `api-plugin-fulfillment` and the ff-type plugin `api-plugin-fulfillment-type-shipping`. This plugin actually implements all the functionality associated with this fulfillment-method. It can work along-side other fulfillment-methods under the same ff-type.\n\nThis main features/functionalities of this plugin includes the following:\n* fulfillmentMethodsWithQuotesShippingFlatRate - returns the quote or equivalent details for the method when called from base ff plugin\n* preStartup - extends the union of \"methodAdditionalData\" with data structure specific to FlatRate (dummy and can be changed)\n* create/update/delete FlatRateFulfillmentMethods\n* create/update/delete FlatRateFulfillmentRestrictions\n* getFlatRateFulfillmentMethod(s) - deprecated\n* getFlatRateFulfillmentRestriction(s) - deprecated\n* flatRateFulfillmentMethod(s)\n* flatRateFulfillmentRestriction(s)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-fulfillment-type-pickup/README.md (Tokens: ~515 | Category: plugin-manifest) -->\n# api-plugin-fulfillment-type-pickup\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like pickup-store). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (pickup) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'pickup' as a ff-type via registeredFulfillmentTypes: [\"pickup\"]\n* Inserts the default entry for pickup ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-fulfillment-type-shipping/README.md (Tokens: ~522 | Category: plugin-manifest) -->\n# api-plugin-fulfillment-type-shipping\n\nThis is a fulfillment-type plugin which which works along with the base `api-plugin-fulfillment` and other fulfillment-method plugins (like flat-rate-shipping, dynamic-rate-shipping etc). This plugin provides the basic updates needed to establish the fulfillment-type.\n\nEach of the newly introduced fulfillment-method plugins under this fulfillment-type (shipping) would need to bee implemented as separate plugins. \n\nThis plugins does the following:\n* Registers the 'shipping' as a ff-type via registeredFulfillmentTypes: [\"shipping\"]\n* Inserts the default entry for shipping ff-type in Fulfillment collection\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-fulfillment/README.md (Tokens: ~117 | Category: plugin-manifest) -->\n# api-plugin-fulfillment\n\nThis is the base fulfillment plugin which would enable other fulfillment types (like shipping, pickup, digital) and fulfillment-methods (like shipping, store, download etc) to be introduced via their own separate plugins. This plugin provides the common functionalities required for implementing fulfillment.\n\nEach of the newly introduced fulfillment type plugin would need to have the specific fulfillment methods also to be added as separate plugins. Example, fulfillment type 'pickup' could have fulfillment methods like 'store pickup' and 'curb-side pickup' and each of them would be separate plugins.\n\n<!-- File: packages/api-plugin-i18n/README.md (Tokens: ~399 | Category: plugin-manifest) -->\n# api-plugin-i18n\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-i18n.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-i18n)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-i18n.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-i18n)\n\n## Summary\n\ni18n plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\n\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md).\n\n<!-- File: packages/api-plugin-inventory-simple/README.md (Tokens: ~398 | Category: plugin-manifest) -->\n# api-plugin-inventory-simple\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory-simple.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory-simple)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory-simple)\n\n## Summary\n\nSimple Inventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\nThis Reaction plugin is [GNU GPLv3 Licensed](./LICENSE.md)\n\n<!-- File: packages/api-plugin-inventory/README.md (Tokens: ~502 | Category: plugin-manifest) -->\n# api-plugin-inventory\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-inventory.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-inventory)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-inventory.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-inventory)\n\n## Summary\n\nInventory plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-job-queue/README.md (Tokens: ~508 | Category: plugin-manifest) -->\n# api-plugin-job-queue\n\n[![npm (scoped)](https://img.shields.io/npm/v/@reactioncommerce/api-plugin-job-queue.svg)](https://www.npmjs.com/package/@reactioncommerce/api-plugin-job-queue)\n[![CircleCI](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue.svg?style=svg)](https://circleci.com/gh/reactioncommerce/api-plugin-job-queue)\n\n## Summary\n\nJob Queue plugin for the [Reaction API](https://github.com/reactioncommerce/reaction)\n\n## Developer Certificate of Origin\nWe use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed:\n```\nSigned-off-by: Jane Doe <jane.doe@example.com>\n```\n\nYou can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration.\n\nWe ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.)\n\nWe use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit.\n\nIf you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature.\n\n## License\n\n   Copyright 2020 Reaction Commerce\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n<!-- File: packages/api-plugin-job-queue/src/job-queue/README.md (Tokens: ~55 | Category: plugin-manifest) -->\nThe files in this folder are a rewrite of the @reactioncommerce/job-queue package with an almost identical API but no Meteor dependencies. This is not expected to be the final solution for background jobs in Reaction, but it is a temporary solution that works fairly well for now.\n\n<!-- ... +36 more modular skills available via /api/skills/reactioncommerce/reaction?path={path} -->\n</yakaai_skills>"}