@commet/node 9.1.1 → 9.3.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/docs/webhooks.md CHANGED
@@ -545,6 +545,102 @@ Aggregate entitlement event answering one question: what can this customer acces
545
545
  - `credits` (`WebhookCreditsBalance | null`, required) — For credits plans: planCredits, purchasedCredits, totalCredits. Null otherwise.
546
546
  - `balance` (`WebhookBalance | null`, required) — For balance plans: currentBalance in rate scale (10000 = $1.00). Null otherwise.
547
547
 
548
+ ## plan_grant.created
549
+
550
+ Fired after a plan grant is durably created. The payload is the grant snapshot at creation.
551
+
552
+ ### Data
553
+
554
+ - `id` (`string`, required) — The public plan grant ID.
555
+ - `customerId` (`string`, required) — The public customer ID.
556
+ - `subscriptionId` (`string`, required) — The public subscription ID.
557
+ - `basePlanId` (`string`, required) — The public ID of the subscribed base plan.
558
+ - `targetPlanId` (`string`, required) — The public ID of the plan whose access was granted.
559
+ - `targetPlanReleaseId` (`string`, required) — The public ID of the immutable target plan release.
560
+ - `status` (`"active" | "expired" | "revoked"`, required) — The plan grant status at this transition.
561
+ - `duration` (`"cycles" | "until_date" | "until_revoked"`, required) — How the plan grant duration is defined at this transition.
562
+ - `durationCycles` (`number | null`, required) — The cycle count when duration is cycles.
563
+ - `startsAt` (`string`, required) — When the plan grant started.
564
+ - `expiresAt` (`string | null`, required) — The effective expiration deadline, if any.
565
+ - `reason` (`string`, required) — The reason recorded for this transition.
566
+ - `source` (`"dashboard" | "api" | "system"`, required) — Where this transition originated.
567
+ - `revokedAt` (`string | null`, required) — When the plan grant was revoked, otherwise null.
568
+ - `createdAt` (`string`, required) — When the plan grant was created.
569
+ - `updatedAt` (`string`, required) — When the represented transition occurred.
570
+ - `events` (`Array<WebhookPlanGrantTimelineEvent>`, required) — The grant timeline through the represented transition.
571
+
572
+ ## plan_grant.updated
573
+
574
+ Fired after a plan grant duration or deadline is durably changed. The payload is the grant snapshot at that update.
575
+
576
+ ### Data
577
+
578
+ - `id` (`string`, required) — The public plan grant ID.
579
+ - `customerId` (`string`, required) — The public customer ID.
580
+ - `subscriptionId` (`string`, required) — The public subscription ID.
581
+ - `basePlanId` (`string`, required) — The public ID of the subscribed base plan.
582
+ - `targetPlanId` (`string`, required) — The public ID of the plan whose access was granted.
583
+ - `targetPlanReleaseId` (`string`, required) — The public ID of the immutable target plan release.
584
+ - `status` (`"active" | "expired" | "revoked"`, required) — The plan grant status at this transition.
585
+ - `duration` (`"cycles" | "until_date" | "until_revoked"`, required) — How the plan grant duration is defined at this transition.
586
+ - `durationCycles` (`number | null`, required) — The cycle count when duration is cycles.
587
+ - `startsAt` (`string`, required) — When the plan grant started.
588
+ - `expiresAt` (`string | null`, required) — The effective expiration deadline, if any.
589
+ - `reason` (`string`, required) — The reason recorded for this transition.
590
+ - `source` (`"dashboard" | "api" | "system"`, required) — Where this transition originated.
591
+ - `revokedAt` (`string | null`, required) — When the plan grant was revoked, otherwise null.
592
+ - `createdAt` (`string`, required) — When the plan grant was created.
593
+ - `updatedAt` (`string`, required) — When the represented transition occurred.
594
+ - `events` (`Array<WebhookPlanGrantTimelineEvent>`, required) — The grant timeline through the represented transition.
595
+
596
+ ## plan_grant.expired
597
+
598
+ Fired after a plan grant is durably expired, whether discovered automatically or while replacing an expired grant.
599
+
600
+ ### Data
601
+
602
+ - `id` (`string`, required) — The public plan grant ID.
603
+ - `customerId` (`string`, required) — The public customer ID.
604
+ - `subscriptionId` (`string`, required) — The public subscription ID.
605
+ - `basePlanId` (`string`, required) — The public ID of the subscribed base plan.
606
+ - `targetPlanId` (`string`, required) — The public ID of the plan whose access was granted.
607
+ - `targetPlanReleaseId` (`string`, required) — The public ID of the immutable target plan release.
608
+ - `status` (`"active" | "expired" | "revoked"`, required) — The plan grant status at this transition.
609
+ - `duration` (`"cycles" | "until_date" | "until_revoked"`, required) — How the plan grant duration is defined at this transition.
610
+ - `durationCycles` (`number | null`, required) — The cycle count when duration is cycles.
611
+ - `startsAt` (`string`, required) — When the plan grant started.
612
+ - `expiresAt` (`string | null`, required) — The effective expiration deadline, if any.
613
+ - `reason` (`string`, required) — The reason recorded for this transition.
614
+ - `source` (`"dashboard" | "api" | "system"`, required) — Where this transition originated.
615
+ - `revokedAt` (`string | null`, required) — When the plan grant was revoked, otherwise null.
616
+ - `createdAt` (`string`, required) — When the plan grant was created.
617
+ - `updatedAt` (`string`, required) — When the represented transition occurred.
618
+ - `events` (`Array<WebhookPlanGrantTimelineEvent>`, required) — The grant timeline through the represented transition.
619
+
620
+ ## plan_grant.revoked
621
+
622
+ Fired after an active plan grant is durably revoked. The payload is the grant snapshot at revocation.
623
+
624
+ ### Data
625
+
626
+ - `id` (`string`, required) — The public plan grant ID.
627
+ - `customerId` (`string`, required) — The public customer ID.
628
+ - `subscriptionId` (`string`, required) — The public subscription ID.
629
+ - `basePlanId` (`string`, required) — The public ID of the subscribed base plan.
630
+ - `targetPlanId` (`string`, required) — The public ID of the plan whose access was granted.
631
+ - `targetPlanReleaseId` (`string`, required) — The public ID of the immutable target plan release.
632
+ - `status` (`"active" | "expired" | "revoked"`, required) — The plan grant status at this transition.
633
+ - `duration` (`"cycles" | "until_date" | "until_revoked"`, required) — How the plan grant duration is defined at this transition.
634
+ - `durationCycles` (`number | null`, required) — The cycle count when duration is cycles.
635
+ - `startsAt` (`string`, required) — When the plan grant started.
636
+ - `expiresAt` (`string | null`, required) — The effective expiration deadline, if any.
637
+ - `reason` (`string`, required) — The reason recorded for this transition.
638
+ - `source` (`"dashboard" | "api" | "system"`, required) — Where this transition originated.
639
+ - `revokedAt` (`string | null`, required) — When the plan grant was revoked, otherwise null.
640
+ - `createdAt` (`string`, required) — When the plan grant was created.
641
+ - `updatedAt` (`string`, required) — When the represented transition occurred.
642
+ - `events` (`Array<WebhookPlanGrantTimelineEvent>`, required) — The grant timeline through the represented transition.
643
+
548
644
  ## credits.granted
549
645
 
550
646
  Fired when non-purchase credits are granted to a subscription: plan-included credits at the start of each billing period, or a manual adjustment from the dashboard. Credit pack purchases fire credits.purchased instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commet/node",
3
- "version": "9.1.1",
3
+ "version": "9.3.0",
4
4
  "description": "Commet SDK for Node.js - Billing and usage tracking",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",