Commit graph

139 commits

Author SHA1 Message Date
Evan Morikawa 6ac46d1079 remove console log 2016-12-06 17:20:43 -08:00
Evan Morikawa 7e485228af [cloud-api] fix param names 2016-12-06 16:03:31 -08:00
Evan Morikawa 8cbda7505a [*] fix auth 2016-12-06 16:03:31 -08:00
Evan Morikawa 2cbb90bb3b [*] DRY Auth 2016-12-06 16:03:31 -08:00
Evan Morikawa 896f981408 [isomorphic-core] extract AuthHelpers to DRY 2016-12-06 16:03:31 -08:00
Halla Moore e785d73bdc [local-sync, iso-core] feat(send): add finishing touches to gmail multi-send
Delete the sent messages that gmail automatically creates and save our
generic form of the draft as a sent message.
2016-12-06 11:37:47 -08:00
Karim Hamidou 04b1763965 [fix] Fix transaction creation for contacts
Summary:
Fixes T7283. We weren't creating deltas for contacts because we were inserting contacts using `UPSERT`, which requires us to add another sequelize hook.  Unfortunately, support for this hook is only available on sequelize 4.x.

I didn't want to upgrade our sequelize version right now and cause of bunch of mysterious failures, so I've simply changed the `UPSERT` to be either an `INSERT`or `UPDATE`. We didn't really need it anyway.

Test Plan: Checked that N1 was receiving contact deltas.

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T7283

Differential Revision: https://phab.nylas.com/D3481
2016-12-05 15:37:17 -08:00
Halla Moore 6a51036e48 [local-sync, iso-core, cloud-core] feat(send): add multi-send support
Also renames JSONType() -> buildJSONColumnOptions() and
JSONARRAYType() -> buildJSONARRAYColumnOptions() to prevent passing
those return values in as just the type value instead of the entire
options object.
2016-12-02 15:20:31 -08:00
Evan Morikawa d9f3edad0f [isomorphic-core] ignore folder deltas due to just syncState version issues 2016-12-02 16:25:42 -05:00
Juan Tejada f1491fa4cc fix observable disposable 2016-12-02 12:09:35 -08:00
Ben Gotow 5ff7a92197 [*] fix(deltas): 0 as first cursor, deltas from redis are already JSON 2016-12-01 18:54:26 -08:00
Ben Gotow 7712269402 [*] fix(deltas): Cloud-API not filtering deltas at all, refactor a few things
- Don’t need functions in delta.js which must be called to return promsies. Fun of promsies is that you don’t need to care when they’re built to attach a .then.

- Make boundary between route handler and delta stream builder more explicit, don’t do query parsing in helpers, always reply from handler.

- Remove pushJSON extension to outputStream which never actually received JSON.

- Remove `takeUntil` - disposing of the downstream observable should dispose of all the merged/upstream observables

- Rename inflate => stringify since the returned value is a string not an object.

- Remove support for delta streams with no cursors. Don’t think this was supposed to be a feature.

- Add accountId to Transaction models

- Make database hooks shared in isomorphic core
2016-12-01 18:41:46 -08:00
Ben Gotow 4b4ab726e2 [💄] fix eslint issues before they get overwhelming 2016-12-01 15:37:48 -08:00
Juan Tejada 2d932dd090 [*] Generate persistent id for Accounts based on email+settings
This also ensures that we can use the accountId as part of the ids for
other models, like labels and folders

Before this commit, labels and folders with the same name for different
accounts would have the same id, screwing things up in n1
2016-12-01 14:51:33 -08:00
Evan Morikawa aba77ca637 [cloud-api] add npm start for pm2 launch 2016-12-01 16:33:05 -05:00
Ben Gotow 209122c346 [cloud-api] Fix more broken package.jsons 2016-12-01 11:39:25 -08:00
Ben Gotow d8703b90c4 [local-sync] Fix deletion of labels 2016-11-30 16:26:53 -08:00
Juan Tejada 1470565bcf [local-sync] Fix observable for deltas
We were missing a return :'(
2016-11-30 16:12:35 -08:00
Evan Morikawa a36b1e1f28 [*] add delta endpoints and DRY deltaStreamBuilder
[cloud-core] add objectType to Metadata

[*] binding fixes to delta stream
2016-11-30 13:41:09 -05:00
Ben Gotow ece519553f fix(sync): Issue with CONDSTORE args not passed to fetch 2016-11-29 18:02:25 -08:00
Juan Tejada 2fe5f73401 [iso-core] Fix dependencyin model 2016-11-29 11:56:00 -08:00
Evan Morikawa fc24ffea63 [isomorphic-core]: move Transaction model to isomorphic-core 2016-11-29 13:57:19 -05:00
Halla Moore 10f62f6b5a [local-sync, iso-core] feat(send): Support basic sending for gmail accounts 2016-11-28 14:46:31 -08:00
Juan Tejada 64cb03f4cd Move non shared-models to local sync / remove duplicate DatabaseTypes 2016-11-26 12:48:48 -08:00
Ben Gotow cfb1356be6 fix(account): Include name 2016-11-23 15:24:41 -08:00
Ben Gotow e7386ff4ae Gmail auth: resolved settings tests 2016-11-23 15:23:46 -08:00
Ben Gotow 30a94a6c9b [cloud] Store resolved settings for returning to client 2016-11-23 14:51:39 -08:00
Evan Morikawa 78b96d24ca [local-sync] fix promise instance of check 2016-11-23 14:22:38 -08:00
Juan Tejada f98c38fef4 [iso-core]: Make loadModels reusable by cloud-core 2016-11-23 12:16:58 -08:00
Karim Hamidou c05bc8ee63 Remove redis dependency
Conflicts:
	packages/local-sync/src/local-sync-worker/sync-process-manager.js
2016-11-23 11:50:13 -08:00
Juan Tejada f2a032c87c [iso-core]: Update api for loadModels 2016-11-23 11:49:32 -08:00
Juan Tejada 654260b1a5 [iso-core] Use sequelize.import now that eval is enabled 2016-11-23 11:01:29 -08:00
Karim Hamidou ba58409f2c Fix module loading bug
Conflicts:
	packages/isomorphic-core/src/models/index.js
	packages/local-sync/package.json
2016-11-23 10:51:03 -08:00
Juan Tejada dcb78302b8 fix loadModels 2016-11-23 10:32:46 -08:00
Juan Tejada 5b7214e464 [local-sync]: Let local-sync start, add loadModels to iso-core 2016-11-23 10:18:35 -08:00
Evan Morikawa cd65135feb [isomorphic-core] add trailing ./ 2016-11-23 09:34:38 -08:00
Evan Morikawa c3cca9f518 [isomorphic-core] Remove packages no longer used in isomorphic-core 2016-11-23 09:12:59 -08:00
Evan Morikawa b5bf4e07c4 [isomorphic-core] Move files into src folder for isomorphic-core 2016-11-23 09:12:54 -08:00
Evan Morikawa 21977a25ca [isomorphic-core] Rename nylas-core -> isomorphic-core 2016-11-23 09:12:50 -08:00