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
iimport { | |
isArray, | |
isObject, | |
isNull, | |
isNil, | |
isEqual, | |
isUndefined, | |
keys, | |
uniq, | |
each, |
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
// Gulp | |
import gulp from 'gulp'; | |
import plumber from 'gulp-plumber'; | |
import file from 'gulp-file'; | |
import filter from 'gulp-filter'; | |
import rename from 'gulp-rename'; | |
import sourcemaps from 'gulp-sourcemaps'; | |
import uglify from 'gulp-uglify'; | |
// Rollup | |
import { rollup } from 'rollup'; |
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
{ | |
eventStream: { | |
modelChange: function(stream) { | |
stream.filter(function(val){ | |
return val.model.name == 'receiptModel' | |
}) | |
.filter(function(val){ | |
return val == val.model.isNew(); | |
}) | |
.onValue(onNewReceipt); |
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
POST preapprovalsummaries | |
{ | |
data: { | |
type: 'preapprovalsummaries', | |
attributes: { | |
expenseReportId: 1, | |
preApprovalId: 2 | |
} | |
} | |
} |
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
// GET /preapprovals/1?applyExpenseHeaderId=3 HTTP/1.1 | |
{ | |
"links": { | |
"self": "/preapprovals/1" | |
}, | |
"data" : { | |
"type" : "preapprovals", | |
"id" : "1", | |
"attributes" : { |
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
//GET /expensereports/1/relationships/applicablepreapprovals HTTP/1.1 | |
//Content-Type: application/vnd.api+json | |
//Accept: application/vnd.api+json | |
{ | |
"links": { | |
"self" : "/expensereports/1/relationships/applicablepreapprovals", | |
"related": "/expensereports/1/applicablepreapprovals" | |
}, | |
"data" : [ |
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
PATCH /preapprovallinitems/1 | |
{ | |
"data": { | |
"type": "preapprovallinitems", | |
"id": "1", | |
"attributes": { | |
"name": "Updated Report" | |
} | |
}, | |
"included": [{ |
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
// I'm proposing we use the CR version at the bottom with the flexibility | |
// to later wrap it in the JSON API envelope. | |
// JSON API | |
// GET http://chromeriver.com/transactionAggregates | |
{ | |
"links": { | |
"self": "http://chromeriver.com/transactionAggregates", | |
"next": "http://chromeriver.com/transactionAggregates?page[offset]=2", |
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
// Retrieving a TransactionGroup | |
// ------------------------------------------------------ | |
// GET /transactionGroups | |
// Content-Type: application/vnd.api+json | |
// Accept: application/vnd.api+json | |
{ | |
"links": { | |
"self": "http://chromeriver.com/transactionGroups", | |
"next": "http://chromeriver.com/transactionGroups?page[offset]=2", |
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
// REQUEST | |
// transactionSets POST | |
// transactionSets/23 PUT | |
{ | |
transactionIds: [315, 311] | |
} | |
// RESPONSE |
NewerOlder