UNPKG

component-dbs-core

Version:

DTO objects shared among device backend

40 lines 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createClient = exports.apiKeyAuth = exports.oidcAuth = void 0; const aws_appsync_1 = require("aws-appsync"); require("isomorphic-fetch"); global.WebSocket = require('ws'); exports.oidcAuth = { type: aws_appsync_1.AUTH_TYPE.OPENID_CONNECT, jwtToken: () => process.env.JWTTOKEN, }; const iamAuth = { type: aws_appsync_1.AUTH_TYPE.AWS_IAM, credentials: { accessKeyId: 'AKIARVTVOSMUJEQTBUWZ', secretAccessKey: '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', }, }; exports.apiKeyAuth = { type: aws_appsync_1.AUTH_TYPE.API_KEY, apiKey: 'da2-g6astjsrdfhr5omhpxrdou3pcm', }; exports.createClient = (url, auth) => { const client = new aws_appsync_1.AWSAppSyncClient({ url, region: 'ap-southeast-2', auth, disableOffline: true, offlineConfig: { callback: (err, succ) => { if (err) console.error(err); else { console.log('SUCCESS', succ); } }, }, }); return client; }; //# sourceMappingURL=appsyncClient.js.map