How to use the doctypes.triggersConn.as function in doctypes

To help you get started, we’ve selected a few doctypes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / KonnectorAction / index.jsx View on Github external
const mkFetchTriggers = client => () =>
  client.query(triggersConn.query(client), { as: triggersConn.as })
const addFetchTriggers = Component => {
github cozy / cozy.github.io / en / cozy-banks / src / ducks / client / checks.js View on Github external
async checkToLaunchJobs() {
    const client = this.client
    let triggers
    const triggersFromState = client.getQueryFromState(triggersConn.as)
    if (triggersFromState) {
      triggers = triggersFromState.data
    } else {
      triggers = (await client.query(triggersConn.query(client))).data
    }
    for (const launchOpts of this.options.launchTriggers || []) {
      await this.checkToLaunchJob(triggers, launchOpts)
    }
  }

doctypes

Shorthands for commonly used doctypes

MIT
Latest version published 8 years ago

Package Health Score

68 / 100
Full package analysis