commit 25edf3a8b53b7494eef5de5b7674f68474f30ea1 Author: PorridgePi Date: Wed Nov 23 14:23:09 2022 +0800 DayOne: feat: Initial commit diff --git a/DayOne.js b/DayOne.js new file mode 100644 index 0000000..978d5cc --- /dev/null +++ b/DayOne.js @@ -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);