globodai-fam-sdk 1.4.0 → 1.5.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/dist/index.d.cts CHANGED
@@ -1500,26 +1500,47 @@ interface RecurringSubscription {
1500
1500
  updatedAt: string;
1501
1501
  }
1502
1502
  /**
1503
- * Subscription payment entity
1503
+ * Subscription payment entity (matches FAM API response)
1504
1504
  */
1505
1505
  interface SubscriptionPayment {
1506
1506
  id: string;
1507
- subscriptionId: string;
1508
1507
  payinId?: string;
1508
+ type: 'CIT' | 'MIT';
1509
+ status: SubscriptionPaymentStatus;
1509
1510
  amount: number;
1511
+ fees?: number;
1510
1512
  currency: Currency;
1511
- status: SubscriptionPaymentStatus;
1512
- scheduledDate: string;
1513
+ resultCode?: string;
1514
+ resultMessage?: string;
1513
1515
  processedAt?: string;
1514
- errorMessage?: string;
1515
1516
  createdAt: string;
1516
- updatedAt: string;
1517
1517
  }
1518
1518
  /**
1519
- * Subscription with payments
1519
+ * Subscription with payments (matches FAM API response for GET /subscriptions/:id)
1520
1520
  */
1521
- interface SubscriptionWithPayments extends RecurringSubscription {
1521
+ interface SubscriptionWithPayments {
1522
+ id: string;
1523
+ registrationId: string;
1524
+ externalUserId: string;
1525
+ externalSubscriptionId?: string;
1526
+ subscriptionName?: string;
1527
+ subscriptionType?: string;
1528
+ billingPeriod?: string;
1529
+ status: string;
1530
+ amount: number;
1531
+ currency: Currency;
1532
+ frequency: SubscriptionFrequency;
1533
+ payinsLinked?: number;
1534
+ freeCycles?: number;
1535
+ isInFreeCycle?: boolean;
1536
+ processingEnabled: boolean;
1537
+ nextProcessingAt?: string;
1538
+ lastSyncedAt?: string;
1539
+ metadata?: Record<string, unknown>;
1540
+ mangopayData?: Record<string, unknown>;
1522
1541
  payments: SubscriptionPayment[];
1542
+ createdAt: string;
1543
+ updatedAt: string;
1523
1544
  }
1524
1545
  /**
1525
1546
  * Register subscription request
package/dist/index.d.ts CHANGED
@@ -1500,26 +1500,47 @@ interface RecurringSubscription {
1500
1500
  updatedAt: string;
1501
1501
  }
1502
1502
  /**
1503
- * Subscription payment entity
1503
+ * Subscription payment entity (matches FAM API response)
1504
1504
  */
1505
1505
  interface SubscriptionPayment {
1506
1506
  id: string;
1507
- subscriptionId: string;
1508
1507
  payinId?: string;
1508
+ type: 'CIT' | 'MIT';
1509
+ status: SubscriptionPaymentStatus;
1509
1510
  amount: number;
1511
+ fees?: number;
1510
1512
  currency: Currency;
1511
- status: SubscriptionPaymentStatus;
1512
- scheduledDate: string;
1513
+ resultCode?: string;
1514
+ resultMessage?: string;
1513
1515
  processedAt?: string;
1514
- errorMessage?: string;
1515
1516
  createdAt: string;
1516
- updatedAt: string;
1517
1517
  }
1518
1518
  /**
1519
- * Subscription with payments
1519
+ * Subscription with payments (matches FAM API response for GET /subscriptions/:id)
1520
1520
  */
1521
- interface SubscriptionWithPayments extends RecurringSubscription {
1521
+ interface SubscriptionWithPayments {
1522
+ id: string;
1523
+ registrationId: string;
1524
+ externalUserId: string;
1525
+ externalSubscriptionId?: string;
1526
+ subscriptionName?: string;
1527
+ subscriptionType?: string;
1528
+ billingPeriod?: string;
1529
+ status: string;
1530
+ amount: number;
1531
+ currency: Currency;
1532
+ frequency: SubscriptionFrequency;
1533
+ payinsLinked?: number;
1534
+ freeCycles?: number;
1535
+ isInFreeCycle?: boolean;
1536
+ processingEnabled: boolean;
1537
+ nextProcessingAt?: string;
1538
+ lastSyncedAt?: string;
1539
+ metadata?: Record<string, unknown>;
1540
+ mangopayData?: Record<string, unknown>;
1522
1541
  payments: SubscriptionPayment[];
1542
+ createdAt: string;
1543
+ updatedAt: string;
1523
1544
  }
1524
1545
  /**
1525
1546
  * Register subscription request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "globodai-fam-sdk",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Official TypeScript SDK for the FAM API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",