@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.
- package/README.md +8 -7
- 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
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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.
|
|
64
|
-
|
|
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
|
|
80
|
+
This generates type-safe autocomplete for your plan codes, feature codes, and seat types.
|
|
80
81
|
|
|
81
82
|
## Documentation
|
|
82
83
|
|