@commet/node 5.0.0 → 5.2.0

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.
package/README.md CHANGED
@@ -59,7 +59,7 @@ await commet.subscriptions.create({
59
59
  });
60
60
 
61
61
  // Track usage events
62
- await commet.usage.create({
62
+ await commet.usage.track({
63
63
  feature: 'api_call',
64
64
  value: 1,
65
65
  customerId: 'cus_123'
@@ -68,12 +68,25 @@ await commet.usage.create({
68
68
  // Manage seats
69
69
  await commet.seats.add({
70
70
  customerId: 'cus_123',
71
- seatType: 'admin',
71
+ featureCode: 'admin',
72
72
  count: 5
73
73
  });
74
74
 
75
+ // Track durable quota (e.g. projects, tasks)
76
+ await commet.quota.add({
77
+ customerId: 'cus_123',
78
+ featureCode: 'projects',
79
+ count: 5
80
+ });
81
+
82
+ // Read the current quota allowance (held vs included)
83
+ const projects = await commet.quota.get({
84
+ customerId: 'cus_123',
85
+ featureCode: 'projects'
86
+ });
87
+
75
88
  // Check feature access
76
- const feature = await commet.features.check({
89
+ const feature = await commet.features.get({
77
90
  externalId: 'user_123',
78
91
  code: 'api_calls'
79
92
  });