@flashbacktech/tsclient 0.4.47 → 0.4.49

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/dist/index.d.cts CHANGED
@@ -1748,18 +1748,22 @@ declare class SystemEventsClient {
1748
1748
 
1749
1749
  interface SubscriptionPeriod {
1750
1750
  id: string;
1751
- name: string;
1752
- amount: number;
1753
- currency: string;
1754
- interval: string;
1755
- intervalCount?: number;
1751
+ subscriptionId: string;
1752
+ /** Billing interval: MONTHLY | YEARLY | WEEKLY | DAILY | ALL_TIME. */
1753
+ periodType: string;
1754
+ /** Price in USD (dollars). */
1755
+ price: number;
1756
1756
  /** Per-period grant in USD micros. 0 means no grant attached. */
1757
1757
  creditsGrantedMicros: number;
1758
1758
  }
1759
1759
  interface SubscriptionCapability {
1760
- key: string;
1761
- label?: string;
1762
- limit?: number | null;
1760
+ id: string;
1761
+ code: string;
1762
+ description: string;
1763
+ type: string;
1764
+ price: number;
1765
+ periodType: string;
1766
+ value: number;
1763
1767
  }
1764
1768
  interface Subscription {
1765
1769
  id: string;
@@ -1767,18 +1771,20 @@ interface Subscription {
1767
1771
  description?: string;
1768
1772
  periods: SubscriptionPeriod[];
1769
1773
  capabilities: SubscriptionCapability[];
1770
- /** Plan-level 24h rolling debit cap in USD micros. null = no cap. */
1771
- dailyCreditCapMicros?: number | null;
1772
1774
  }
1775
+ /** The org's currently active subscription (GET /subscriptions/my). */
1773
1776
  interface OrgSubscription {
1774
1777
  id: string;
1775
- subscriptionId: string;
1776
- subscriptionName: string;
1778
+ name: string;
1779
+ description?: string;
1780
+ periodId: string;
1781
+ periodType: string;
1782
+ /** Price in USD (dollars). */
1783
+ price: number;
1784
+ dateFrom: string;
1785
+ dateTo: string | null;
1777
1786
  status: string;
1778
- currentPeriodStart?: string;
1779
- currentPeriodEnd?: string;
1780
- cancelAt?: string | null;
1781
- capabilities: SubscriptionCapability[];
1787
+ autoRenew: boolean;
1782
1788
  }
1783
1789
  interface BuySubscriptionRequest {
1784
1790
  subscriptionPeriodId: string;
@@ -1801,11 +1807,11 @@ interface CancelSubscriptionResponse {
1801
1807
  }
1802
1808
  interface Payment {
1803
1809
  id: string;
1804
- status: string;
1805
1810
  amount: number;
1806
1811
  currency: string;
1807
- createdAt: string;
1808
- description?: string;
1812
+ status: string;
1813
+ /** ISO-8601; paidAt when available, else createdAt. */
1814
+ timestamp: string;
1809
1815
  }
1810
1816
  interface ListPaymentsResponse {
1811
1817
  success: boolean;
@@ -1834,7 +1840,7 @@ interface CreditBalance {
1834
1840
  totalActiveMicros: number;
1835
1841
  }
1836
1842
  /** Source of a credit ledger row. Matches the kind enum from migration 0017. */
1837
- type CreditTransactionKind = 'grant_initial' | 'grant_renewal' | 'grant_pack' | 'debit_llm' | 'debit_sandbox' | 'admin_adjust';
1843
+ type CreditTransactionKind = 'grant_initial' | 'grant_renewal' | 'grant_pack' | 'debit_llm' | 'debit_sandbox' | 'debit_llm_platform' | 'meter_llm_byok' | 'admin_adjust';
1838
1844
  /** Display category for the transactions list. */
1839
1845
  type CreditTransactionType = 'consumption' | 'purchase' | 'grant';
1840
1846
  interface CreditTransaction {
package/dist/index.d.ts CHANGED
@@ -1748,18 +1748,22 @@ declare class SystemEventsClient {
1748
1748
 
1749
1749
  interface SubscriptionPeriod {
1750
1750
  id: string;
1751
- name: string;
1752
- amount: number;
1753
- currency: string;
1754
- interval: string;
1755
- intervalCount?: number;
1751
+ subscriptionId: string;
1752
+ /** Billing interval: MONTHLY | YEARLY | WEEKLY | DAILY | ALL_TIME. */
1753
+ periodType: string;
1754
+ /** Price in USD (dollars). */
1755
+ price: number;
1756
1756
  /** Per-period grant in USD micros. 0 means no grant attached. */
1757
1757
  creditsGrantedMicros: number;
1758
1758
  }
1759
1759
  interface SubscriptionCapability {
1760
- key: string;
1761
- label?: string;
1762
- limit?: number | null;
1760
+ id: string;
1761
+ code: string;
1762
+ description: string;
1763
+ type: string;
1764
+ price: number;
1765
+ periodType: string;
1766
+ value: number;
1763
1767
  }
1764
1768
  interface Subscription {
1765
1769
  id: string;
@@ -1767,18 +1771,20 @@ interface Subscription {
1767
1771
  description?: string;
1768
1772
  periods: SubscriptionPeriod[];
1769
1773
  capabilities: SubscriptionCapability[];
1770
- /** Plan-level 24h rolling debit cap in USD micros. null = no cap. */
1771
- dailyCreditCapMicros?: number | null;
1772
1774
  }
1775
+ /** The org's currently active subscription (GET /subscriptions/my). */
1773
1776
  interface OrgSubscription {
1774
1777
  id: string;
1775
- subscriptionId: string;
1776
- subscriptionName: string;
1778
+ name: string;
1779
+ description?: string;
1780
+ periodId: string;
1781
+ periodType: string;
1782
+ /** Price in USD (dollars). */
1783
+ price: number;
1784
+ dateFrom: string;
1785
+ dateTo: string | null;
1777
1786
  status: string;
1778
- currentPeriodStart?: string;
1779
- currentPeriodEnd?: string;
1780
- cancelAt?: string | null;
1781
- capabilities: SubscriptionCapability[];
1787
+ autoRenew: boolean;
1782
1788
  }
1783
1789
  interface BuySubscriptionRequest {
1784
1790
  subscriptionPeriodId: string;
@@ -1801,11 +1807,11 @@ interface CancelSubscriptionResponse {
1801
1807
  }
1802
1808
  interface Payment {
1803
1809
  id: string;
1804
- status: string;
1805
1810
  amount: number;
1806
1811
  currency: string;
1807
- createdAt: string;
1808
- description?: string;
1812
+ status: string;
1813
+ /** ISO-8601; paidAt when available, else createdAt. */
1814
+ timestamp: string;
1809
1815
  }
1810
1816
  interface ListPaymentsResponse {
1811
1817
  success: boolean;
@@ -1834,7 +1840,7 @@ interface CreditBalance {
1834
1840
  totalActiveMicros: number;
1835
1841
  }
1836
1842
  /** Source of a credit ledger row. Matches the kind enum from migration 0017. */
1837
- type CreditTransactionKind = 'grant_initial' | 'grant_renewal' | 'grant_pack' | 'debit_llm' | 'debit_sandbox' | 'admin_adjust';
1843
+ type CreditTransactionKind = 'grant_initial' | 'grant_renewal' | 'grant_pack' | 'debit_llm' | 'debit_sandbox' | 'debit_llm_platform' | 'meter_llm_byok' | 'admin_adjust';
1838
1844
  /** Display category for the transactions list. */
1839
1845
  type CreditTransactionType = 'consumption' | 'purchase' | 'grant';
1840
1846
  interface CreditTransaction {
package/dist/index.js CHANGED
@@ -357,6 +357,8 @@ function normalize(wire) {
357
357
  name: wire.name,
358
358
  orgId: wire.orgId,
359
359
  default: wire.default ?? false,
360
+ isReferenceProject: wire.isReferenceProject ?? false,
361
+ preferredAiProvider: wire.preferredAiProvider ?? null,
360
362
  users: wire.users ?? []
361
363
  };
362
364
  }