This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ZBClient } = require('zeebe-node') | |
const zbc = new ZBClient({ | |
camundaCloud: { | |
clientId: connectionInfo.clientId, | |
clientSecret: connectionInfo.clientSecret, | |
clusterId: connectionInfo.clusterId, | |
}, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios' | |
import * as functions from 'firebase-functions' | |
import { v4 } from 'uuid' | |
import { Document } from '../types/Document.type' | |
import { StorageController } from './storage.controller' | |
const BASEURL = 'https://api.trello.com/1' | |
export enum TRELLO { | |
KEY = 'key', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StorageController } from '../storage.controller' | |
import { TrelloController } from '../trello.controller' | |
import { ZeebeController } from '../zeebe.controller' | |
export class TrelloWorkerController { | |
constructor( | |
private zeebeController: ZeebeController, | |
private store: StorageController, | |
) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
import { NextFunction, Request, Response } from 'express' | |
import { StorageController } from '../../controller/storage.controller' | |
import { ZeebeController } from '../../controller/zeebe.controller' | |
import { TrelloBoardType } from '../../types/TrelloBoard.type' | |
import { Error, ErrorType } from '../../utils/Error' | |
export class TrelloWebhookRouter { | |
public router = express.Router({ mergeParams: true }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { v4 } from 'uuid' | |
import { Document } from '../types/Document.type' | |
import { Mood, MoodRequest } from '../types/Mood.type' | |
import { User } from '../types/User.type' | |
import { Error, ErrorType } from '../utils/Error' | |
import { StorageController } from './storage.controller' | |
export class MoodController { | |
constructor(private store: StorageController) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nodemailer = require('nodemailer') | |
import * as functions from 'firebase-functions' | |
import { User } from '../../types/User.type' | |
import { MoodController } from '../mood.controller' | |
import { StorageController } from '../storage.controller' | |
import { ZeebeController } from '../zeebe.controller' | |
const PORT = 465 | |
export class MailWorkerController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
import { NextFunction, Request, Response } from 'express' | |
import { MoodController } from '../../controller/mood.controller' | |
import { StorageController } from '../../controller/storage.controller' | |
import { Error, ErrorType } from '../../utils/Error' | |
export class MoodRouter { | |
public router = express.Router({ mergeParams: true }) | |
constructor(store: StorageController) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IncomingWebhook } from '@slack/webhook' | |
import { ZeebeController } from '../zeebe.controller' | |
const SLACK_WEBHOOK_BASE = 'https://hooks.slack.com/services' | |
export class SlackWorkerController { | |
private webhook: IncomingWebhook | null = null | |
constructor(private zeebeController: ZeebeController) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class WebsiteshotWorker { | |
constructor(private zeebeController: ZeebeController) {} | |
public create() { | |
this.zeebeController.getZeebeClient().createWorker({ | |
taskType: Worker.WEBSITESHOT_CREATE_JOB, | |
taskHandler: async (job: any, complete: any, worker: any) => { | |
const templateId = job.customHeaders.templateid; | |
if (!templateId) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class BucketWorker { | |
constructor(private zeebeController: ZeebeController) {} | |
public create() { | |
this.zeebeController.getZeebeClient().createWorker({ | |
taskType: Worker.AWS_BUCKET_UPLOAD, | |
taskHandler: async (job: any, complete: any, worker: any) => { | |
const jobId = job.variables.jobId; | |
if (!jobId) { | |
complete.failure('Job Id not found on process context: <jobId>'); |
OlderNewer