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
//see reference implementation in ews-javascript-api_repo@github\test\MockXHRApi.ts, this one is transpiled JS | |
// ----- Updated to process errors in ntlm library gracefully | |
var PromiseFactory = require("ews-javascript-api").PromiseFactory; | |
var httpntlm = require('httpntlm'); | |
var ntlmXHRApi = (function () { | |
function ntlmXHRApi(user, password) { | |
this.userName = user; | |
this.password = password; | |
} | |
ntlmXHRApi.prototype.xhr = function (xhroptions) { |
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 { ExchangeService, ExchangeVersion, WebCredentials, Uri, DateTime, CalendarView, WellKnownFolderName, EwsLogging } from "ews-javascript-api"; | |
import credentials = require("./credentials"); //for username and password | |
EwsLogging.DebugLogEnabled = false; | |
var service = new ExchangeService(ExchangeVersion.Exchange2010); | |
service.Credentials = new WebCredentials(credentials.userName, credentials.password); | |
service.Url = new Uri("https://outlook.office365.com/Ews/Exchange.asmx"); | |
var view = new CalendarView(DateTime.Now.Add(-1, "week"), DateTime.Now); // appointments in last one week. |
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
"use strict"; | |
var ews = require("ews-javascript-api"); | |
var credentials = require("../credentials"); | |
ews.EwsLogging.DebugLogEnabled = false; | |
var exch = new ews.ExchangeService(ews.ExchangeVersion.Exchange2013); | |
exch.Credentials = new ews.ExchangeCredentials(credentials.userName, credentials.password); | |
exch.Url = new ews.Uri("https://outlook.office365.com/Ews/Exchange.asmx"); | |
exch.SubscribeToStreamingNotifications([new ews.FolderId(ews.WellKnownFolderName.Inbox)], ews.EventType.NewMail, ews.EventType.Created, ews.EventType.Deleted, ews.EventType.Modified, ews.EventType.Moved, ews.EventType.Copied, ews.EventType.FreeBusyChanged) | |
.then(function (streamingSubscription) { | |
var connection = new ews.StreamingSubscriptionConnection(exch, 1); |
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 { KeystoneContext } from '@keystone-next/keystone/types'; | |
import admin from 'firebase-admin'; | |
const firebase = admin.initializeApp(); | |
export const authMutations = ` | |
authenticateWithFirebase(token: String!): User | |
signupWithFirebase( | |
token: String! | |
name: String! | |
email: String |