@commet/node 1.4.0 → 1.4.1

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.
Files changed (2) hide show
  1. package/README.md +8 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -35,7 +35,8 @@ const commet = new Commet({
35
35
  ```typescript
36
36
  // Track usage events
37
37
  await commet.usage.create({
38
- eventType: 'api_call',
38
+ feature: 'api_call',
39
+ value: 1,
39
40
  customerId: 'cus_123'
40
41
  });
41
42
 
@@ -48,9 +49,9 @@ await commet.seats.add({
48
49
 
49
50
  // Create subscriptions
50
51
  await commet.subscriptions.create({
51
- productId: 'prod_xxx',
52
- customerId: 'cus_123',
53
- status: 'active'
52
+ externalId: 'user_123',
53
+ planCode: 'pro', // autocomplete works after `commet pull`
54
+ billingInterval: 'yearly',
54
55
  });
55
56
 
56
57
  // Manage customers
@@ -60,8 +61,8 @@ await commet.customers.create({
60
61
  });
61
62
 
62
63
  // Generate customer portal access
63
- await commet.portal.requestAccess({
64
- externalId: 'my-customer-123'
64
+ await commet.portal.getUrl({
65
+ externalId: 'my-customer-123'
65
66
  });
66
67
  ```
67
68
 
@@ -76,7 +77,7 @@ commet link
76
77
  commet pull
77
78
  ```
78
79
 
79
- This generates type-safe autocomplete for your event types, seat types, and products.
80
+ This generates type-safe autocomplete for your plan codes, feature codes, and seat types.
80
81
 
81
82
  ## Documentation
82
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commet/node",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Commet SDK for Node.js - Billing and usage tracking",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",