DayOne: feat: Initial commit
This commit is contained in:
60
DayOne.js
Normal file
60
DayOne.js
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
const featureBundle = {
|
||||||
|
"bundleName": "premium",
|
||||||
|
"reason": "purchase",
|
||||||
|
"features": [{
|
||||||
|
"name": "imagesPerEntry",
|
||||||
|
"limit": 30,
|
||||||
|
"canUpgrade": false
|
||||||
|
}, {
|
||||||
|
"name": "journalLimit",
|
||||||
|
"limit": 100,
|
||||||
|
"canUpgrade": false
|
||||||
|
}, {
|
||||||
|
"name": "audioPerEntry",
|
||||||
|
"limit": 10,
|
||||||
|
"canUpgrade": false
|
||||||
|
}, {
|
||||||
|
"name": "backup",
|
||||||
|
"limit": null,
|
||||||
|
"canUpgrade": false
|
||||||
|
}, {
|
||||||
|
"name": "sync",
|
||||||
|
"limit": null,
|
||||||
|
"canUpgrade": false
|
||||||
|
}, {
|
||||||
|
"name": "syncMac",
|
||||||
|
"limit": null,
|
||||||
|
"canUpgrade": false
|
||||||
|
}, {
|
||||||
|
"name": "printingDiscount",
|
||||||
|
"limit": null,
|
||||||
|
"canUpgrade": false
|
||||||
|
}, {
|
||||||
|
"name": "prioritySupport",
|
||||||
|
"limit": null,
|
||||||
|
"canUpgrade": false
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
const featureEnrollments_Sync = {
|
||||||
|
"id": 0,
|
||||||
|
"feature": "sync",
|
||||||
|
"createDate": "2011-11-11T00:00:00.000Z",
|
||||||
|
"status": "active",
|
||||||
|
"isActive": true
|
||||||
|
}
|
||||||
|
|
||||||
|
var bodyOG = $response.body;
|
||||||
|
var body = JSON.parse(bodyOG);
|
||||||
|
|
||||||
|
body["featureBundle"] = featureBundle
|
||||||
|
body["subscription"]["premium"] = true
|
||||||
|
body["subscription"]["plus_on_mac"] = true
|
||||||
|
body["subscription"]["source"] = ["Receipt"]
|
||||||
|
body["subscription"]["auto_renew"] = true
|
||||||
|
body["subscription"]["expires"] = "2021-06-20T14:28:46.000Z"
|
||||||
|
body["subscription"]["product_id"] = "com.bloombuilt.dayoneios.subscription.premium.yearly_discounted_trial"
|
||||||
|
|
||||||
|
bodyOG = JSON.stringify(body);
|
||||||
|
console.log(bodyOG);
|
||||||
|
$done(bodyOG);
|
||||||
Reference in New Issue
Block a user