+ /**
+ * Converts engine subscription fields to native types.
+ * @param {Object} data
+ */
+ static _subscriptionDataToNative(data) {
+ const epochToDate = (epoch) => new Date(Number(epoch) * 1000);
+ if (data) {
+ ['created', 'verified', 'expires', 'contentDelivered'].forEach((field) => {
+ // eslint-disable-next-line security/detect-object-injection
+ data[field] = epochToDate(data[field]);
+ });
+ }
+ return data;
+ }
+
+