payment-kit 1.15.9 → 1.15.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -335,7 +335,7 @@ export async function forwardUsageRecordToStripe(
|
|
|
335
335
|
action: subscription.billing_thresholds?.amount_gte ? 'increment' : updates.action,
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
logger.info('usage record forwarded to stripe', { subscriptionItemId: subscriptionItem.id, result });
|
|
338
|
+
logger.info('usage record forwarded to stripe', { subscriptionItemId: subscriptionItem.id, updates, result });
|
|
339
339
|
|
|
340
340
|
return result;
|
|
341
341
|
}
|
|
@@ -10,6 +10,7 @@ import dayjs from '../libs/dayjs';
|
|
|
10
10
|
import { authenticate } from '../libs/security';
|
|
11
11
|
import { usageRecordQueue } from '../queues/usage-record';
|
|
12
12
|
import { Invoice, Price, Subscription, SubscriptionItem, UsageRecord } from '../store/models';
|
|
13
|
+
import logger from '../libs/logger';
|
|
13
14
|
|
|
14
15
|
const router = Router();
|
|
15
16
|
const auth = authenticate<UsageRecord>({ component: true, roles: ['owner', 'admin'] });
|
|
@@ -37,6 +38,8 @@ router.post('/', auth, async (req, res) => {
|
|
|
37
38
|
raw.timestamp = dayjs().unix();
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
logger.info('Usage reporting', { subscriptionId: item.subscription_id, subscriptionItemId: item.id, body: req.body });
|
|
42
|
+
|
|
40
43
|
let doc = await UsageRecord.findOne({
|
|
41
44
|
where: { timestamp: raw.timestamp, subscription_item_id: raw.subscription_item_id },
|
|
42
45
|
});
|
package/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "blocklet dev --open",
|
|
6
6
|
"eject": "vite eject",
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@abtnode/cron": "^1.16.
|
|
45
|
+
"@abtnode/cron": "^1.16.32",
|
|
46
46
|
"@arcblock/did": "^1.18.135",
|
|
47
47
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
48
|
-
"@arcblock/did-connect": "^2.10.
|
|
48
|
+
"@arcblock/did-connect": "^2.10.39",
|
|
49
49
|
"@arcblock/did-util": "^1.18.135",
|
|
50
50
|
"@arcblock/jwt": "^1.18.135",
|
|
51
|
-
"@arcblock/ux": "^2.10.
|
|
51
|
+
"@arcblock/ux": "^2.10.39",
|
|
52
52
|
"@arcblock/validator": "^1.18.135",
|
|
53
|
-
"@blocklet/js-sdk": "^1.16.
|
|
54
|
-
"@blocklet/logger": "^1.16.
|
|
55
|
-
"@blocklet/payment-react": "1.15.
|
|
56
|
-
"@blocklet/sdk": "^1.16.
|
|
57
|
-
"@blocklet/ui-react": "^2.10.
|
|
58
|
-
"@blocklet/uploader": "^0.1.
|
|
53
|
+
"@blocklet/js-sdk": "^1.16.32",
|
|
54
|
+
"@blocklet/logger": "^1.16.32",
|
|
55
|
+
"@blocklet/payment-react": "1.15.11",
|
|
56
|
+
"@blocklet/sdk": "^1.16.32",
|
|
57
|
+
"@blocklet/ui-react": "^2.10.39",
|
|
58
|
+
"@blocklet/uploader": "^0.1.40",
|
|
59
59
|
"@blocklet/xss": "^0.1.7",
|
|
60
60
|
"@mui/icons-material": "^5.16.6",
|
|
61
61
|
"@mui/lab": "^5.0.0-alpha.173",
|
|
@@ -116,9 +116,9 @@
|
|
|
116
116
|
"validator": "^13.12.0"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
|
-
"@abtnode/types": "^1.16.
|
|
119
|
+
"@abtnode/types": "^1.16.32",
|
|
120
120
|
"@arcblock/eslint-config-ts": "^0.3.2",
|
|
121
|
-
"@blocklet/payment-types": "1.15.
|
|
121
|
+
"@blocklet/payment-types": "1.15.11",
|
|
122
122
|
"@types/cookie-parser": "^1.4.7",
|
|
123
123
|
"@types/cors": "^2.8.17",
|
|
124
124
|
"@types/debug": "^4.1.12",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"typescript": "^4.9.5",
|
|
145
145
|
"vite": "^5.3.5",
|
|
146
146
|
"vite-node": "^2.0.4",
|
|
147
|
-
"vite-plugin-blocklet": "^0.9.
|
|
147
|
+
"vite-plugin-blocklet": "^0.9.8",
|
|
148
148
|
"vite-plugin-node-polyfills": "^0.21.0",
|
|
149
149
|
"vite-plugin-svgr": "^4.2.0",
|
|
150
150
|
"vite-tsconfig-paths": "^4.3.2",
|
|
@@ -160,5 +160,5 @@
|
|
|
160
160
|
"parser": "typescript"
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
|
-
"gitHead": "
|
|
163
|
+
"gitHead": "5bd043b55fb78faab5da626eaf02519fa5f0fe9a"
|
|
164
164
|
}
|