This file contains hidden or 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 {actionChannel} = require('redux-saga/effects'); | |
| // const {buffers} = require('redux-saga'); | |
| const {createStore, applyMiddleware} = require('redux'); | |
| const reduxSaga = require('redux-saga'); | |
| const sagaMiddleware = reduxSaga.default(); | |
| const store = createStore((state={}) => state, applyMiddleware(sagaMiddleware)); | |
| sagaMiddleware.run(function* () { | 
  
    
      This file contains hidden or 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 React from 'react'; | |
| import { | |
| typedConnect, | |
| createPropsMapper, | |
| PropsOf | |
| } from 'react-redux-typed-connect'; | |
| export function makeTestComponent<E,RS>(getEntity:(state:RS, id:string) => E | undefined) { | 
  
    
      This file contains hidden or 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 React from 'react'; | |
| import { | |
| typedConnect, | |
| createPropsMapper, | |
| PropsOf | |
| } from 'react-redux-typed-connect'; | |
| export function makeTestComponent<E,RS>(getEntity:(state:RS, id:string) => E | undefined) { | 
  
    
      This file contains hidden or 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 AWS from 'aws-sdk'; | |
| import cfg from '../config'; | |
| import archiver from 'archiver'; | |
| import {Archiver} from 'archiver'; | |
| const s3 = new AWS.S3({ | |
| region: cfg.awsRegion, | |
| signatureVersion: 'v4' | |
| }); | |
| export type ObjectKeyWithPath = { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | package fi.example.app; | |
| import android.Manifest; | |
| import android.annotation.SuppressLint; | |
| import android.content.Intent; | |
| import android.content.pm.PackageManager; | |
| import android.net.Uri; | |
| import android.os.Environment; | 
  
    
      This file contains hidden or 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 React from 'react'; | |
| import { | |
| typedConnect, | |
| createPropsMapper, | |
| PropsOf | |
| } from 'react-redux-typed-connect'; | |
| import SearchBar from '../components/search-bar'; | |
| import {Selectors, Actions} from '../actions/crud'; | |
| import * as qn from '../actions/crud-query-names'; | |
| export interface CreateCrudSearchBar<C,E,Q,RS,EI> { | 
  
    
      This file contains hidden or 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 * as t from 'io-ts'; | |
| function request<P extends t.Props>(type:string, props:P) { | |
| return t.type({ | |
| type: t.literal(type), | |
| props: t.type(props) | |
| }); | |
| } | |
| export const RequestT = t.union([ | |
| request('foo', { | |
| baz: t.string, | 
  
    
      This file contains hidden or 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 {select, put, call, takeEvery} from 'redux-saga/effects'; | |
| import {Request} from '../../backend/db/requests-api-types'; | |
| import {getType, ActionType} from 'typesafe-actions'; | |
| import {actions} from './requests'; | |
| import {actions as uiActions} from './ui'; | |
| import * as client from '../client/requests'; | |
| import {i18nSelector} from './locale'; | |
| function* onSuccess(request:Request, _response:Response) { | |
| const i18n = yield select(i18nSelector); | |
| let successText:string | undefined; | 
  
    
      This file contains hidden or 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 {createStandardAction} from 'typesafe-actions'; | |
| import {Request} from '../../backend/db/requests-api-types'; | |
| export const request = createStandardAction('REQUESTS_NEW')<Request>(); | 
  
    
      This file contains hidden or 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 * as express from 'express'; | |
| import {processRequest} from '../db/admin-api'; | |
| import db from '../db/sbas-db'; | |
| import {validationFailed} from './errors'; | |
| import authRoute from './auth-route'; | |
| import {RequestT} from '../db/admin-api-types'; | |
| const router = express.Router(); | |
| router.post('/admin/:requestType', authRoute(async (auth, req, res, next) => { | |
| try { | |
| const payload = Object.assign({}, req.body, {type: req.params.requestType}); | 
NewerOlder