@schematichq/schematic-react 1.11.0 → 1.13.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/schematic-react.cjs.js +1125 -14
- package/dist/schematic-react.d.ts +1060 -11
- package/dist/schematic-react.esm.js +1125 -14
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/@schematichq+schematic-js@1.
|
|
1
|
+
// node_modules/.pnpm/@schematichq+schematic-js@1.13.0/node_modules/@schematichq/schematic-js/dist/schematic.esm.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -658,6 +658,7 @@ function FeatureEntitlementFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
658
658
|
metricPeriod: json["metric_period"] == null ? void 0 : MetricPeriodFromJSON(json["metric_period"]),
|
|
659
659
|
metricResetAt: json["metric_reset_at"] == null ? void 0 : new Date(json["metric_reset_at"]),
|
|
660
660
|
monthReset: json["month_reset"] == null ? void 0 : MetricPeriodMonthResetFromJSON(json["month_reset"]),
|
|
661
|
+
quantityRates: json["quantity_rates"] == null ? void 0 : json["quantity_rates"],
|
|
661
662
|
softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
|
|
662
663
|
usage: json["usage"] == null ? void 0 : json["usage"],
|
|
663
664
|
valueType: EntitlementValueTypeFromJSON(json["value_type"]),
|
|
@@ -1325,7 +1326,7 @@ var ContextSignatureManager = class {
|
|
|
1325
1326
|
}
|
|
1326
1327
|
}
|
|
1327
1328
|
};
|
|
1328
|
-
var version = "1.
|
|
1329
|
+
var version = "1.13.0";
|
|
1329
1330
|
var SINGLETON = {};
|
|
1330
1331
|
var models_exports = {};
|
|
1331
1332
|
__export(models_exports, {
|
|
@@ -1333,6 +1334,11 @@ __export(models_exports, {
|
|
|
1333
1334
|
ApiErrorFromJSONTyped: () => ApiErrorFromJSONTyped,
|
|
1334
1335
|
ApiErrorToJSON: () => ApiErrorToJSON,
|
|
1335
1336
|
ApiErrorToJSONTyped: () => ApiErrorToJSONTyped,
|
|
1337
|
+
BillingCreditGrantReason: () => BillingCreditGrantReason,
|
|
1338
|
+
BillingCreditGrantReasonFromJSON: () => BillingCreditGrantReasonFromJSON,
|
|
1339
|
+
BillingCreditGrantReasonFromJSONTyped: () => BillingCreditGrantReasonFromJSONTyped,
|
|
1340
|
+
BillingCreditGrantReasonToJSON: () => BillingCreditGrantReasonToJSON,
|
|
1341
|
+
BillingCreditGrantReasonToJSONTyped: () => BillingCreditGrantReasonToJSONTyped,
|
|
1336
1342
|
BillingPlanCreditGrantResetCadence: () => BillingPlanCreditGrantResetCadence,
|
|
1337
1343
|
BillingPlanCreditGrantResetCadenceFromJSON: () => BillingPlanCreditGrantResetCadenceFromJSON2,
|
|
1338
1344
|
BillingPlanCreditGrantResetCadenceFromJSONTyped: () => BillingPlanCreditGrantResetCadenceFromJSONTyped3,
|
|
@@ -1370,6 +1376,54 @@ __export(models_exports, {
|
|
|
1370
1376
|
CatalogPriceTierResponseDataFromJSONTyped: () => CatalogPriceTierResponseDataFromJSONTyped,
|
|
1371
1377
|
CatalogPriceTierResponseDataToJSON: () => CatalogPriceTierResponseDataToJSON,
|
|
1372
1378
|
CatalogPriceTierResponseDataToJSONTyped: () => CatalogPriceTierResponseDataToJSONTyped,
|
|
1379
|
+
CompanyContextCustomPlanBillingResponseDataFromJSON: () => CompanyContextCustomPlanBillingResponseDataFromJSON,
|
|
1380
|
+
CompanyContextCustomPlanBillingResponseDataFromJSONTyped: () => CompanyContextCustomPlanBillingResponseDataFromJSONTyped,
|
|
1381
|
+
CompanyContextCustomPlanBillingResponseDataToJSON: () => CompanyContextCustomPlanBillingResponseDataToJSON,
|
|
1382
|
+
CompanyContextCustomPlanBillingResponseDataToJSONTyped: () => CompanyContextCustomPlanBillingResponseDataToJSONTyped,
|
|
1383
|
+
CompanyContextPlanResponseDataFromJSON: () => CompanyContextPlanResponseDataFromJSON,
|
|
1384
|
+
CompanyContextPlanResponseDataFromJSONTyped: () => CompanyContextPlanResponseDataFromJSONTyped,
|
|
1385
|
+
CompanyContextPlanResponseDataToJSON: () => CompanyContextPlanResponseDataToJSON,
|
|
1386
|
+
CompanyContextPlanResponseDataToJSONTyped: () => CompanyContextPlanResponseDataToJSONTyped,
|
|
1387
|
+
CompanyContextResponseDataFromJSON: () => CompanyContextResponseDataFromJSON,
|
|
1388
|
+
CompanyContextResponseDataFromJSONTyped: () => CompanyContextResponseDataFromJSONTyped,
|
|
1389
|
+
CompanyContextResponseDataToJSON: () => CompanyContextResponseDataToJSON,
|
|
1390
|
+
CompanyContextResponseDataToJSONTyped: () => CompanyContextResponseDataToJSONTyped,
|
|
1391
|
+
CompanyContextScheduledDowngradeResponseDataFromJSON: () => CompanyContextScheduledDowngradeResponseDataFromJSON,
|
|
1392
|
+
CompanyContextScheduledDowngradeResponseDataFromJSONTyped: () => CompanyContextScheduledDowngradeResponseDataFromJSONTyped,
|
|
1393
|
+
CompanyContextScheduledDowngradeResponseDataToJSON: () => CompanyContextScheduledDowngradeResponseDataToJSON,
|
|
1394
|
+
CompanyContextScheduledDowngradeResponseDataToJSONTyped: () => CompanyContextScheduledDowngradeResponseDataToJSONTyped,
|
|
1395
|
+
CompanyContextSubscriptionResponseDataFromJSON: () => CompanyContextSubscriptionResponseDataFromJSON,
|
|
1396
|
+
CompanyContextSubscriptionResponseDataFromJSONTyped: () => CompanyContextSubscriptionResponseDataFromJSONTyped,
|
|
1397
|
+
CompanyContextSubscriptionResponseDataToJSON: () => CompanyContextSubscriptionResponseDataToJSON,
|
|
1398
|
+
CompanyContextSubscriptionResponseDataToJSONTyped: () => CompanyContextSubscriptionResponseDataToJSONTyped,
|
|
1399
|
+
CompanyCreditAutoTopupResponseDataFromJSON: () => CompanyCreditAutoTopupResponseDataFromJSON,
|
|
1400
|
+
CompanyCreditAutoTopupResponseDataFromJSONTyped: () => CompanyCreditAutoTopupResponseDataFromJSONTyped,
|
|
1401
|
+
CompanyCreditAutoTopupResponseDataToJSON: () => CompanyCreditAutoTopupResponseDataToJSON,
|
|
1402
|
+
CompanyCreditAutoTopupResponseDataToJSONTyped: () => CompanyCreditAutoTopupResponseDataToJSONTyped,
|
|
1403
|
+
CompanyCreditBalanceResponseDataFromJSON: () => CompanyCreditBalanceResponseDataFromJSON,
|
|
1404
|
+
CompanyCreditBalanceResponseDataFromJSONTyped: () => CompanyCreditBalanceResponseDataFromJSONTyped,
|
|
1405
|
+
CompanyCreditBalanceResponseDataToJSON: () => CompanyCreditBalanceResponseDataToJSON,
|
|
1406
|
+
CompanyCreditBalanceResponseDataToJSONTyped: () => CompanyCreditBalanceResponseDataToJSONTyped,
|
|
1407
|
+
CompanyCreditBalancesResponseDataFromJSON: () => CompanyCreditBalancesResponseDataFromJSON,
|
|
1408
|
+
CompanyCreditBalancesResponseDataFromJSONTyped: () => CompanyCreditBalancesResponseDataFromJSONTyped,
|
|
1409
|
+
CompanyCreditBalancesResponseDataToJSON: () => CompanyCreditBalancesResponseDataToJSON,
|
|
1410
|
+
CompanyCreditBalancesResponseDataToJSONTyped: () => CompanyCreditBalancesResponseDataToJSONTyped,
|
|
1411
|
+
CompanyCreditCompositionResponseDataFromJSON: () => CompanyCreditCompositionResponseDataFromJSON,
|
|
1412
|
+
CompanyCreditCompositionResponseDataFromJSONTyped: () => CompanyCreditCompositionResponseDataFromJSONTyped,
|
|
1413
|
+
CompanyCreditCompositionResponseDataToJSON: () => CompanyCreditCompositionResponseDataToJSON,
|
|
1414
|
+
CompanyCreditCompositionResponseDataToJSONTyped: () => CompanyCreditCompositionResponseDataToJSONTyped,
|
|
1415
|
+
CompanyCreditGrantResponseDataFromJSON: () => CompanyCreditGrantResponseDataFromJSON,
|
|
1416
|
+
CompanyCreditGrantResponseDataFromJSONTyped: () => CompanyCreditGrantResponseDataFromJSONTyped,
|
|
1417
|
+
CompanyCreditGrantResponseDataToJSON: () => CompanyCreditGrantResponseDataToJSON,
|
|
1418
|
+
CompanyCreditGrantResponseDataToJSONTyped: () => CompanyCreditGrantResponseDataToJSONTyped,
|
|
1419
|
+
CompanyCreditUserUsageResponseDataFromJSON: () => CompanyCreditUserUsageResponseDataFromJSON,
|
|
1420
|
+
CompanyCreditUserUsageResponseDataFromJSONTyped: () => CompanyCreditUserUsageResponseDataFromJSONTyped,
|
|
1421
|
+
CompanyCreditUserUsageResponseDataToJSON: () => CompanyCreditUserUsageResponseDataToJSON,
|
|
1422
|
+
CompanyCreditUserUsageResponseDataToJSONTyped: () => CompanyCreditUserUsageResponseDataToJSONTyped,
|
|
1423
|
+
CompanyCreditUserUsageRowResponseDataFromJSON: () => CompanyCreditUserUsageRowResponseDataFromJSON,
|
|
1424
|
+
CompanyCreditUserUsageRowResponseDataFromJSONTyped: () => CompanyCreditUserUsageRowResponseDataFromJSONTyped,
|
|
1425
|
+
CompanyCreditUserUsageRowResponseDataToJSON: () => CompanyCreditUserUsageRowResponseDataToJSON,
|
|
1426
|
+
CompanyCreditUserUsageRowResponseDataToJSONTyped: () => CompanyCreditUserUsageRowResponseDataToJSONTyped,
|
|
1373
1427
|
CompanyDiscountResponseDataFromJSON: () => CompanyDiscountResponseDataFromJSON,
|
|
1374
1428
|
CompanyDiscountResponseDataFromJSONTyped: () => CompanyDiscountResponseDataFromJSONTyped,
|
|
1375
1429
|
CompanyDiscountResponseDataToJSON: () => CompanyDiscountResponseDataToJSON,
|
|
@@ -1414,6 +1468,16 @@ __export(models_exports, {
|
|
|
1414
1468
|
CreateSetupIntentResponseFromJSONTyped: () => CreateSetupIntentResponseFromJSONTyped,
|
|
1415
1469
|
CreateSetupIntentResponseToJSON: () => CreateSetupIntentResponseToJSON,
|
|
1416
1470
|
CreateSetupIntentResponseToJSONTyped: () => CreateSetupIntentResponseToJSONTyped,
|
|
1471
|
+
Currency: () => Currency,
|
|
1472
|
+
CurrencyFromJSON: () => CurrencyFromJSON2,
|
|
1473
|
+
CurrencyFromJSONTyped: () => CurrencyFromJSONTyped8,
|
|
1474
|
+
CurrencyToJSON: () => CurrencyToJSON2,
|
|
1475
|
+
CurrencyToJSONTyped: () => CurrencyToJSONTyped8,
|
|
1476
|
+
CustomPlanActivationStrategy: () => CustomPlanActivationStrategy,
|
|
1477
|
+
CustomPlanActivationStrategyFromJSON: () => CustomPlanActivationStrategyFromJSON,
|
|
1478
|
+
CustomPlanActivationStrategyFromJSONTyped: () => CustomPlanActivationStrategyFromJSONTyped,
|
|
1479
|
+
CustomPlanActivationStrategyToJSON: () => CustomPlanActivationStrategyToJSON,
|
|
1480
|
+
CustomPlanActivationStrategyToJSONTyped: () => CustomPlanActivationStrategyToJSONTyped,
|
|
1417
1481
|
DeletePaymentMethodResponseFromJSON: () => DeletePaymentMethodResponseFromJSON,
|
|
1418
1482
|
DeletePaymentMethodResponseFromJSONTyped: () => DeletePaymentMethodResponseFromJSONTyped,
|
|
1419
1483
|
DeletePaymentMethodResponseToJSON: () => DeletePaymentMethodResponseToJSON,
|
|
@@ -1442,6 +1506,18 @@ __export(models_exports, {
|
|
|
1442
1506
|
FeatureTypeFromJSONTyped: () => FeatureTypeFromJSONTyped3,
|
|
1443
1507
|
FeatureTypeToJSON: () => FeatureTypeToJSON2,
|
|
1444
1508
|
FeatureTypeToJSONTyped: () => FeatureTypeToJSONTyped3,
|
|
1509
|
+
GetCompanyCreditBalancesResponseFromJSON: () => GetCompanyCreditBalancesResponseFromJSON,
|
|
1510
|
+
GetCompanyCreditBalancesResponseFromJSONTyped: () => GetCompanyCreditBalancesResponseFromJSONTyped,
|
|
1511
|
+
GetCompanyCreditBalancesResponseToJSON: () => GetCompanyCreditBalancesResponseToJSON,
|
|
1512
|
+
GetCompanyCreditBalancesResponseToJSONTyped: () => GetCompanyCreditBalancesResponseToJSONTyped,
|
|
1513
|
+
GetCompanyCreditUserUsageParamsFromJSON: () => GetCompanyCreditUserUsageParamsFromJSON,
|
|
1514
|
+
GetCompanyCreditUserUsageParamsFromJSONTyped: () => GetCompanyCreditUserUsageParamsFromJSONTyped,
|
|
1515
|
+
GetCompanyCreditUserUsageParamsToJSON: () => GetCompanyCreditUserUsageParamsToJSON,
|
|
1516
|
+
GetCompanyCreditUserUsageParamsToJSONTyped: () => GetCompanyCreditUserUsageParamsToJSONTyped,
|
|
1517
|
+
GetCompanyCreditUserUsageResponseFromJSON: () => GetCompanyCreditUserUsageResponseFromJSON,
|
|
1518
|
+
GetCompanyCreditUserUsageResponseFromJSONTyped: () => GetCompanyCreditUserUsageResponseFromJSONTyped,
|
|
1519
|
+
GetCompanyCreditUserUsageResponseToJSON: () => GetCompanyCreditUserUsageResponseToJSON,
|
|
1520
|
+
GetCompanyCreditUserUsageResponseToJSONTyped: () => GetCompanyCreditUserUsageResponseToJSONTyped,
|
|
1445
1521
|
GetCompanyFeatureUsageResponseFromJSON: () => GetCompanyFeatureUsageResponseFromJSON,
|
|
1446
1522
|
GetCompanyFeatureUsageResponseFromJSONTyped: () => GetCompanyFeatureUsageResponseFromJSONTyped,
|
|
1447
1523
|
GetCompanyFeatureUsageResponseToJSON: () => GetCompanyFeatureUsageResponseToJSON,
|
|
@@ -1466,6 +1542,10 @@ __export(models_exports, {
|
|
|
1466
1542
|
GetCompanyPaymentMethodsResponseFromJSONTyped: () => GetCompanyPaymentMethodsResponseFromJSONTyped,
|
|
1467
1543
|
GetCompanyPaymentMethodsResponseToJSON: () => GetCompanyPaymentMethodsResponseToJSON,
|
|
1468
1544
|
GetCompanyPaymentMethodsResponseToJSONTyped: () => GetCompanyPaymentMethodsResponseToJSONTyped,
|
|
1545
|
+
GetCompanyResponseFromJSON: () => GetCompanyResponseFromJSON,
|
|
1546
|
+
GetCompanyResponseFromJSONTyped: () => GetCompanyResponseFromJSONTyped,
|
|
1547
|
+
GetCompanyResponseToJSON: () => GetCompanyResponseToJSON,
|
|
1548
|
+
GetCompanyResponseToJSONTyped: () => GetCompanyResponseToJSONTyped,
|
|
1469
1549
|
GetCompanyUpcomingInvoiceResponseFromJSON: () => GetCompanyUpcomingInvoiceResponseFromJSON,
|
|
1470
1550
|
GetCompanyUpcomingInvoiceResponseFromJSONTyped: () => GetCompanyUpcomingInvoiceResponseFromJSONTyped,
|
|
1471
1551
|
GetCompanyUpcomingInvoiceResponseToJSON: () => GetCompanyUpcomingInvoiceResponseToJSON,
|
|
@@ -1507,6 +1587,7 @@ __export(models_exports, {
|
|
|
1507
1587
|
UpdatePaymentMethodResponseToJSON: () => UpdatePaymentMethodResponseToJSON,
|
|
1508
1588
|
UpdatePaymentMethodResponseToJSONTyped: () => UpdatePaymentMethodResponseToJSONTyped,
|
|
1509
1589
|
instanceOfApiError: () => instanceOfApiError,
|
|
1590
|
+
instanceOfBillingCreditGrantReason: () => instanceOfBillingCreditGrantReason,
|
|
1510
1591
|
instanceOfBillingPlanCreditGrantResetCadence: () => instanceOfBillingPlanCreditGrantResetCadence,
|
|
1511
1592
|
instanceOfBillingPriceScheme: () => instanceOfBillingPriceScheme,
|
|
1512
1593
|
instanceOfBillingProductPriceInterval: () => instanceOfBillingProductPriceInterval,
|
|
@@ -1515,6 +1596,18 @@ __export(models_exports, {
|
|
|
1515
1596
|
instanceOfCatalogCreditGrantResponseData: () => instanceOfCatalogCreditGrantResponseData,
|
|
1516
1597
|
instanceOfCatalogPriceResponseData: () => instanceOfCatalogPriceResponseData,
|
|
1517
1598
|
instanceOfCatalogPriceTierResponseData: () => instanceOfCatalogPriceTierResponseData,
|
|
1599
|
+
instanceOfCompanyContextCustomPlanBillingResponseData: () => instanceOfCompanyContextCustomPlanBillingResponseData,
|
|
1600
|
+
instanceOfCompanyContextPlanResponseData: () => instanceOfCompanyContextPlanResponseData,
|
|
1601
|
+
instanceOfCompanyContextResponseData: () => instanceOfCompanyContextResponseData,
|
|
1602
|
+
instanceOfCompanyContextScheduledDowngradeResponseData: () => instanceOfCompanyContextScheduledDowngradeResponseData,
|
|
1603
|
+
instanceOfCompanyContextSubscriptionResponseData: () => instanceOfCompanyContextSubscriptionResponseData,
|
|
1604
|
+
instanceOfCompanyCreditAutoTopupResponseData: () => instanceOfCompanyCreditAutoTopupResponseData,
|
|
1605
|
+
instanceOfCompanyCreditBalanceResponseData: () => instanceOfCompanyCreditBalanceResponseData,
|
|
1606
|
+
instanceOfCompanyCreditBalancesResponseData: () => instanceOfCompanyCreditBalancesResponseData,
|
|
1607
|
+
instanceOfCompanyCreditCompositionResponseData: () => instanceOfCompanyCreditCompositionResponseData,
|
|
1608
|
+
instanceOfCompanyCreditGrantResponseData: () => instanceOfCompanyCreditGrantResponseData,
|
|
1609
|
+
instanceOfCompanyCreditUserUsageResponseData: () => instanceOfCompanyCreditUserUsageResponseData,
|
|
1610
|
+
instanceOfCompanyCreditUserUsageRowResponseData: () => instanceOfCompanyCreditUserUsageRowResponseData,
|
|
1518
1611
|
instanceOfCompanyDiscountResponseData: () => instanceOfCompanyDiscountResponseData,
|
|
1519
1612
|
instanceOfCompanyFeatureUsageListResponseData: () => instanceOfCompanyFeatureUsageListResponseData,
|
|
1520
1613
|
instanceOfCompanyFeatureUsageResponseData: () => instanceOfCompanyFeatureUsageResponseData,
|
|
@@ -1526,18 +1619,24 @@ __export(models_exports, {
|
|
|
1526
1619
|
instanceOfCompanyUpcomingInvoiceResponseData: () => instanceOfCompanyUpcomingInvoiceResponseData,
|
|
1527
1620
|
instanceOfCompanyUserUsageResponseData: () => instanceOfCompanyUserUsageResponseData,
|
|
1528
1621
|
instanceOfCreateSetupIntentResponse: () => instanceOfCreateSetupIntentResponse,
|
|
1622
|
+
instanceOfCurrency: () => instanceOfCurrency,
|
|
1623
|
+
instanceOfCustomPlanActivationStrategy: () => instanceOfCustomPlanActivationStrategy,
|
|
1529
1624
|
instanceOfDeletePaymentMethodResponse: () => instanceOfDeletePaymentMethodResponse,
|
|
1530
1625
|
instanceOfDeleteResponse: () => instanceOfDeleteResponse,
|
|
1531
1626
|
instanceOfEntitlementPriceBehavior: () => instanceOfEntitlementPriceBehavior,
|
|
1532
1627
|
instanceOfEntitlementType: () => instanceOfEntitlementType,
|
|
1533
1628
|
instanceOfEntitlementValueType: () => instanceOfEntitlementValueType,
|
|
1534
1629
|
instanceOfFeatureType: () => instanceOfFeatureType,
|
|
1630
|
+
instanceOfGetCompanyCreditBalancesResponse: () => instanceOfGetCompanyCreditBalancesResponse,
|
|
1631
|
+
instanceOfGetCompanyCreditUserUsageParams: () => instanceOfGetCompanyCreditUserUsageParams,
|
|
1632
|
+
instanceOfGetCompanyCreditUserUsageResponse: () => instanceOfGetCompanyCreditUserUsageResponse,
|
|
1535
1633
|
instanceOfGetCompanyFeatureUsageResponse: () => instanceOfGetCompanyFeatureUsageResponse,
|
|
1536
1634
|
instanceOfGetCompanyFeatureUserUsageParams: () => instanceOfGetCompanyFeatureUserUsageParams,
|
|
1537
1635
|
instanceOfGetCompanyFeatureUserUsageResponse: () => instanceOfGetCompanyFeatureUserUsageResponse,
|
|
1538
1636
|
instanceOfGetCompanyInvoicesParams: () => instanceOfGetCompanyInvoicesParams,
|
|
1539
1637
|
instanceOfGetCompanyInvoicesResponse: () => instanceOfGetCompanyInvoicesResponse,
|
|
1540
1638
|
instanceOfGetCompanyPaymentMethodsResponse: () => instanceOfGetCompanyPaymentMethodsResponse,
|
|
1639
|
+
instanceOfGetCompanyResponse: () => instanceOfGetCompanyResponse,
|
|
1541
1640
|
instanceOfGetCompanyUpcomingInvoiceResponse: () => instanceOfGetCompanyUpcomingInvoiceResponse,
|
|
1542
1641
|
instanceOfInvoiceStatus: () => instanceOfInvoiceStatus,
|
|
1543
1642
|
instanceOfMetricPeriod: () => instanceOfMetricPeriod,
|
|
@@ -1574,6 +1673,39 @@ function ApiErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1574
1673
|
error: value["error"]
|
|
1575
1674
|
};
|
|
1576
1675
|
}
|
|
1676
|
+
var BillingCreditGrantReason = {
|
|
1677
|
+
Adjustment: "adjustment",
|
|
1678
|
+
BillingCreditAutoTopup: "billing_credit_auto_topup",
|
|
1679
|
+
Free: "free",
|
|
1680
|
+
Plan: "plan",
|
|
1681
|
+
PostpaidForgiven: "postpaid_forgiven",
|
|
1682
|
+
PostpaidOverdraft: "postpaid_overdraft",
|
|
1683
|
+
PostpaidSettlement: "postpaid_settlement",
|
|
1684
|
+
Purchased: "purchased",
|
|
1685
|
+
Rollover: "rollover"
|
|
1686
|
+
};
|
|
1687
|
+
function instanceOfBillingCreditGrantReason(value) {
|
|
1688
|
+
for (const key in BillingCreditGrantReason) {
|
|
1689
|
+
if (Object.prototype.hasOwnProperty.call(BillingCreditGrantReason, key)) {
|
|
1690
|
+
if (BillingCreditGrantReason[key] === value) {
|
|
1691
|
+
return true;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
return false;
|
|
1696
|
+
}
|
|
1697
|
+
function BillingCreditGrantReasonFromJSON(json) {
|
|
1698
|
+
return BillingCreditGrantReasonFromJSONTyped(json, false);
|
|
1699
|
+
}
|
|
1700
|
+
function BillingCreditGrantReasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
1701
|
+
return json;
|
|
1702
|
+
}
|
|
1703
|
+
function BillingCreditGrantReasonToJSON(value) {
|
|
1704
|
+
return value;
|
|
1705
|
+
}
|
|
1706
|
+
function BillingCreditGrantReasonToJSONTyped(value, ignoreDiscriminator) {
|
|
1707
|
+
return value;
|
|
1708
|
+
}
|
|
1577
1709
|
var BillingPlanCreditGrantResetCadence = {
|
|
1578
1710
|
Daily: "daily",
|
|
1579
1711
|
Every6Months: "every_6_months",
|
|
@@ -1831,6 +1963,164 @@ function CatalogPriceTierResponseDataToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
1831
1963
|
to: value["to"]
|
|
1832
1964
|
};
|
|
1833
1965
|
}
|
|
1966
|
+
var Currency = {
|
|
1967
|
+
Aed: "aed",
|
|
1968
|
+
Afn: "afn",
|
|
1969
|
+
All: "all",
|
|
1970
|
+
Amd: "amd",
|
|
1971
|
+
Ang: "ang",
|
|
1972
|
+
Aoa: "aoa",
|
|
1973
|
+
Ars: "ars",
|
|
1974
|
+
Aud: "aud",
|
|
1975
|
+
Awg: "awg",
|
|
1976
|
+
Azn: "azn",
|
|
1977
|
+
Bam: "bam",
|
|
1978
|
+
Bbd: "bbd",
|
|
1979
|
+
Bdt: "bdt",
|
|
1980
|
+
Bif: "bif",
|
|
1981
|
+
Bmd: "bmd",
|
|
1982
|
+
Bnd: "bnd",
|
|
1983
|
+
Bob: "bob",
|
|
1984
|
+
Brl: "brl",
|
|
1985
|
+
Bsd: "bsd",
|
|
1986
|
+
Bwp: "bwp",
|
|
1987
|
+
Byn: "byn",
|
|
1988
|
+
Bzd: "bzd",
|
|
1989
|
+
Cad: "cad",
|
|
1990
|
+
Cdf: "cdf",
|
|
1991
|
+
Chf: "chf",
|
|
1992
|
+
Clp: "clp",
|
|
1993
|
+
Cny: "cny",
|
|
1994
|
+
Cop: "cop",
|
|
1995
|
+
Crc: "crc",
|
|
1996
|
+
Cve: "cve",
|
|
1997
|
+
Czk: "czk",
|
|
1998
|
+
Djf: "djf",
|
|
1999
|
+
Dkk: "dkk",
|
|
2000
|
+
Dop: "dop",
|
|
2001
|
+
Dzd: "dzd",
|
|
2002
|
+
Egp: "egp",
|
|
2003
|
+
Etb: "etb",
|
|
2004
|
+
Eur: "eur",
|
|
2005
|
+
Fjd: "fjd",
|
|
2006
|
+
Fkp: "fkp",
|
|
2007
|
+
Gbp: "gbp",
|
|
2008
|
+
Gel: "gel",
|
|
2009
|
+
Gip: "gip",
|
|
2010
|
+
Gmd: "gmd",
|
|
2011
|
+
Gnf: "gnf",
|
|
2012
|
+
Gtq: "gtq",
|
|
2013
|
+
Gyd: "gyd",
|
|
2014
|
+
Hkd: "hkd",
|
|
2015
|
+
Hnl: "hnl",
|
|
2016
|
+
Htg: "htg",
|
|
2017
|
+
Huf: "huf",
|
|
2018
|
+
Idr: "idr",
|
|
2019
|
+
Ils: "ils",
|
|
2020
|
+
Inr: "inr",
|
|
2021
|
+
Isk: "isk",
|
|
2022
|
+
Jmd: "jmd",
|
|
2023
|
+
Jpy: "jpy",
|
|
2024
|
+
Kes: "kes",
|
|
2025
|
+
Kgs: "kgs",
|
|
2026
|
+
Khr: "khr",
|
|
2027
|
+
Kmf: "kmf",
|
|
2028
|
+
Krw: "krw",
|
|
2029
|
+
Kyd: "kyd",
|
|
2030
|
+
Kzt: "kzt",
|
|
2031
|
+
Lak: "lak",
|
|
2032
|
+
Lbp: "lbp",
|
|
2033
|
+
Lkr: "lkr",
|
|
2034
|
+
Lrd: "lrd",
|
|
2035
|
+
Lsl: "lsl",
|
|
2036
|
+
Mad: "mad",
|
|
2037
|
+
Mdl: "mdl",
|
|
2038
|
+
Mga: "mga",
|
|
2039
|
+
Mkd: "mkd",
|
|
2040
|
+
Mmk: "mmk",
|
|
2041
|
+
Mnt: "mnt",
|
|
2042
|
+
Mop: "mop",
|
|
2043
|
+
Mur: "mur",
|
|
2044
|
+
Mvr: "mvr",
|
|
2045
|
+
Mwk: "mwk",
|
|
2046
|
+
Mxn: "mxn",
|
|
2047
|
+
Myr: "myr",
|
|
2048
|
+
Mzn: "mzn",
|
|
2049
|
+
Nad: "nad",
|
|
2050
|
+
Ngn: "ngn",
|
|
2051
|
+
Nio: "nio",
|
|
2052
|
+
Nok: "nok",
|
|
2053
|
+
Npr: "npr",
|
|
2054
|
+
Nzd: "nzd",
|
|
2055
|
+
Pab: "pab",
|
|
2056
|
+
Pen: "pen",
|
|
2057
|
+
Pgk: "pgk",
|
|
2058
|
+
Php: "php",
|
|
2059
|
+
Pkr: "pkr",
|
|
2060
|
+
Pln: "pln",
|
|
2061
|
+
Pyg: "pyg",
|
|
2062
|
+
Qar: "qar",
|
|
2063
|
+
Ron: "ron",
|
|
2064
|
+
Rsd: "rsd",
|
|
2065
|
+
Rub: "rub",
|
|
2066
|
+
Rwf: "rwf",
|
|
2067
|
+
Sar: "sar",
|
|
2068
|
+
Sbd: "sbd",
|
|
2069
|
+
Scr: "scr",
|
|
2070
|
+
Sek: "sek",
|
|
2071
|
+
Sgd: "sgd",
|
|
2072
|
+
Shp: "shp",
|
|
2073
|
+
Sle: "sle",
|
|
2074
|
+
Sos: "sos",
|
|
2075
|
+
Srd: "srd",
|
|
2076
|
+
Std: "std",
|
|
2077
|
+
Szl: "szl",
|
|
2078
|
+
Thb: "thb",
|
|
2079
|
+
Tjs: "tjs",
|
|
2080
|
+
Top: "top",
|
|
2081
|
+
Try: "try",
|
|
2082
|
+
Ttd: "ttd",
|
|
2083
|
+
Twd: "twd",
|
|
2084
|
+
Tzs: "tzs",
|
|
2085
|
+
Uah: "uah",
|
|
2086
|
+
Ugx: "ugx",
|
|
2087
|
+
Usd: "usd",
|
|
2088
|
+
Uyu: "uyu",
|
|
2089
|
+
Uzs: "uzs",
|
|
2090
|
+
Vnd: "vnd",
|
|
2091
|
+
Vuv: "vuv",
|
|
2092
|
+
Wst: "wst",
|
|
2093
|
+
Xaf: "xaf",
|
|
2094
|
+
Xcd: "xcd",
|
|
2095
|
+
Xcg: "xcg",
|
|
2096
|
+
Xof: "xof",
|
|
2097
|
+
Xpf: "xpf",
|
|
2098
|
+
Yer: "yer",
|
|
2099
|
+
Zar: "zar",
|
|
2100
|
+
Zmw: "zmw"
|
|
2101
|
+
};
|
|
2102
|
+
function instanceOfCurrency(value) {
|
|
2103
|
+
for (const key in Currency) {
|
|
2104
|
+
if (Object.prototype.hasOwnProperty.call(Currency, key)) {
|
|
2105
|
+
if (Currency[key] === value) {
|
|
2106
|
+
return true;
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
return false;
|
|
2111
|
+
}
|
|
2112
|
+
function CurrencyFromJSON2(json) {
|
|
2113
|
+
return CurrencyFromJSONTyped8(json, false);
|
|
2114
|
+
}
|
|
2115
|
+
function CurrencyFromJSONTyped8(json, ignoreDiscriminator) {
|
|
2116
|
+
return json;
|
|
2117
|
+
}
|
|
2118
|
+
function CurrencyToJSON2(value) {
|
|
2119
|
+
return value;
|
|
2120
|
+
}
|
|
2121
|
+
function CurrencyToJSONTyped8(value, ignoreDiscriminator) {
|
|
2122
|
+
return value;
|
|
2123
|
+
}
|
|
1834
2124
|
function instanceOfCatalogPriceResponseData(value) {
|
|
1835
2125
|
if (!("currency" in value) || value["currency"] === void 0) return false;
|
|
1836
2126
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
@@ -1853,7 +2143,7 @@ function CatalogPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1853
2143
|
return json;
|
|
1854
2144
|
}
|
|
1855
2145
|
return {
|
|
1856
|
-
currency: json["currency"],
|
|
2146
|
+
currency: CurrencyFromJSON2(json["currency"]),
|
|
1857
2147
|
id: json["id"],
|
|
1858
2148
|
interval: BillingProductPriceIntervalFromJSON2(json["interval"]),
|
|
1859
2149
|
intervalCount: json["interval_count"],
|
|
@@ -1876,7 +2166,7 @@ function CatalogPriceResponseDataToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
1876
2166
|
return value;
|
|
1877
2167
|
}
|
|
1878
2168
|
return {
|
|
1879
|
-
currency: value["currency"],
|
|
2169
|
+
currency: CurrencyToJSON2(value["currency"]),
|
|
1880
2170
|
id: value["id"],
|
|
1881
2171
|
interval: BillingProductPriceIntervalToJSON2(value["interval"]),
|
|
1882
2172
|
interval_count: value["intervalCount"],
|
|
@@ -1891,6 +2181,575 @@ function CatalogPriceResponseDataToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
1891
2181
|
tiers_mode: BillingTiersModeToJSON2(value["tiersMode"])
|
|
1892
2182
|
};
|
|
1893
2183
|
}
|
|
2184
|
+
var CustomPlanActivationStrategy = {
|
|
2185
|
+
Payment: "on_payment",
|
|
2186
|
+
Publish: "on_publish"
|
|
2187
|
+
};
|
|
2188
|
+
function instanceOfCustomPlanActivationStrategy(value) {
|
|
2189
|
+
for (const key in CustomPlanActivationStrategy) {
|
|
2190
|
+
if (Object.prototype.hasOwnProperty.call(CustomPlanActivationStrategy, key)) {
|
|
2191
|
+
if (CustomPlanActivationStrategy[key] === value) {
|
|
2192
|
+
return true;
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
return false;
|
|
2197
|
+
}
|
|
2198
|
+
function CustomPlanActivationStrategyFromJSON(json) {
|
|
2199
|
+
return CustomPlanActivationStrategyFromJSONTyped(json, false);
|
|
2200
|
+
}
|
|
2201
|
+
function CustomPlanActivationStrategyFromJSONTyped(json, ignoreDiscriminator) {
|
|
2202
|
+
return json;
|
|
2203
|
+
}
|
|
2204
|
+
function CustomPlanActivationStrategyToJSON(value) {
|
|
2205
|
+
return value;
|
|
2206
|
+
}
|
|
2207
|
+
function CustomPlanActivationStrategyToJSONTyped(value, ignoreDiscriminator) {
|
|
2208
|
+
return value;
|
|
2209
|
+
}
|
|
2210
|
+
function instanceOfCompanyContextCustomPlanBillingResponseData(value) {
|
|
2211
|
+
if (!("activationStrategy" in value) || value["activationStrategy"] === void 0)
|
|
2212
|
+
return false;
|
|
2213
|
+
if (!("dueAt" in value) || value["dueAt"] === void 0) return false;
|
|
2214
|
+
if (!("planId" in value) || value["planId"] === void 0) return false;
|
|
2215
|
+
return true;
|
|
2216
|
+
}
|
|
2217
|
+
function CompanyContextCustomPlanBillingResponseDataFromJSON(json) {
|
|
2218
|
+
return CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, false);
|
|
2219
|
+
}
|
|
2220
|
+
function CompanyContextCustomPlanBillingResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2221
|
+
if (json == null) {
|
|
2222
|
+
return json;
|
|
2223
|
+
}
|
|
2224
|
+
return {
|
|
2225
|
+
activationStrategy: CustomPlanActivationStrategyFromJSON(
|
|
2226
|
+
json["activation_strategy"]
|
|
2227
|
+
),
|
|
2228
|
+
dueAt: new Date(json["due_at"]),
|
|
2229
|
+
invoiceUrl: json["invoice_url"] == null ? void 0 : json["invoice_url"],
|
|
2230
|
+
planId: json["plan_id"],
|
|
2231
|
+
planName: json["plan_name"] == null ? void 0 : json["plan_name"]
|
|
2232
|
+
};
|
|
2233
|
+
}
|
|
2234
|
+
function CompanyContextCustomPlanBillingResponseDataToJSON(json) {
|
|
2235
|
+
return CompanyContextCustomPlanBillingResponseDataToJSONTyped(json, false);
|
|
2236
|
+
}
|
|
2237
|
+
function CompanyContextCustomPlanBillingResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2238
|
+
if (value == null) {
|
|
2239
|
+
return value;
|
|
2240
|
+
}
|
|
2241
|
+
return {
|
|
2242
|
+
activation_strategy: CustomPlanActivationStrategyToJSON(
|
|
2243
|
+
value["activationStrategy"]
|
|
2244
|
+
),
|
|
2245
|
+
due_at: value["dueAt"].toISOString(),
|
|
2246
|
+
invoice_url: value["invoiceUrl"],
|
|
2247
|
+
plan_id: value["planId"],
|
|
2248
|
+
plan_name: value["planName"]
|
|
2249
|
+
};
|
|
2250
|
+
}
|
|
2251
|
+
function instanceOfCompanyContextPlanResponseData(value) {
|
|
2252
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
2253
|
+
if (!("includedCreditIds" in value) || value["includedCreditIds"] === void 0)
|
|
2254
|
+
return false;
|
|
2255
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2256
|
+
return true;
|
|
2257
|
+
}
|
|
2258
|
+
function CompanyContextPlanResponseDataFromJSON(json) {
|
|
2259
|
+
return CompanyContextPlanResponseDataFromJSONTyped(json, false);
|
|
2260
|
+
}
|
|
2261
|
+
function CompanyContextPlanResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2262
|
+
if (json == null) {
|
|
2263
|
+
return json;
|
|
2264
|
+
}
|
|
2265
|
+
return {
|
|
2266
|
+
description: json["description"] == null ? void 0 : json["description"],
|
|
2267
|
+
id: json["id"],
|
|
2268
|
+
includedCreditIds: json["included_credit_ids"],
|
|
2269
|
+
name: json["name"],
|
|
2270
|
+
period: json["period"] == null ? void 0 : json["period"],
|
|
2271
|
+
price: json["price"] == null ? void 0 : json["price"]
|
|
2272
|
+
};
|
|
2273
|
+
}
|
|
2274
|
+
function CompanyContextPlanResponseDataToJSON(json) {
|
|
2275
|
+
return CompanyContextPlanResponseDataToJSONTyped(json, false);
|
|
2276
|
+
}
|
|
2277
|
+
function CompanyContextPlanResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2278
|
+
if (value == null) {
|
|
2279
|
+
return value;
|
|
2280
|
+
}
|
|
2281
|
+
return {
|
|
2282
|
+
description: value["description"],
|
|
2283
|
+
id: value["id"],
|
|
2284
|
+
included_credit_ids: value["includedCreditIds"],
|
|
2285
|
+
name: value["name"],
|
|
2286
|
+
period: value["period"],
|
|
2287
|
+
price: value["price"]
|
|
2288
|
+
};
|
|
2289
|
+
}
|
|
2290
|
+
function instanceOfCompanyContextScheduledDowngradeResponseData(value) {
|
|
2291
|
+
if (!("fromPlanId" in value) || value["fromPlanId"] === void 0)
|
|
2292
|
+
return false;
|
|
2293
|
+
if (!("fromPlanName" in value) || value["fromPlanName"] === void 0)
|
|
2294
|
+
return false;
|
|
2295
|
+
if (!("toPlanId" in value) || value["toPlanId"] === void 0) return false;
|
|
2296
|
+
if (!("toPlanName" in value) || value["toPlanName"] === void 0)
|
|
2297
|
+
return false;
|
|
2298
|
+
return true;
|
|
2299
|
+
}
|
|
2300
|
+
function CompanyContextScheduledDowngradeResponseDataFromJSON(json) {
|
|
2301
|
+
return CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, false);
|
|
2302
|
+
}
|
|
2303
|
+
function CompanyContextScheduledDowngradeResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2304
|
+
if (json == null) {
|
|
2305
|
+
return json;
|
|
2306
|
+
}
|
|
2307
|
+
return {
|
|
2308
|
+
fromPlanId: json["from_plan_id"],
|
|
2309
|
+
fromPlanName: json["from_plan_name"],
|
|
2310
|
+
toPlanId: json["to_plan_id"],
|
|
2311
|
+
toPlanName: json["to_plan_name"]
|
|
2312
|
+
};
|
|
2313
|
+
}
|
|
2314
|
+
function CompanyContextScheduledDowngradeResponseDataToJSON(json) {
|
|
2315
|
+
return CompanyContextScheduledDowngradeResponseDataToJSONTyped(json, false);
|
|
2316
|
+
}
|
|
2317
|
+
function CompanyContextScheduledDowngradeResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2318
|
+
if (value == null) {
|
|
2319
|
+
return value;
|
|
2320
|
+
}
|
|
2321
|
+
return {
|
|
2322
|
+
from_plan_id: value["fromPlanId"],
|
|
2323
|
+
from_plan_name: value["fromPlanName"],
|
|
2324
|
+
to_plan_id: value["toPlanId"],
|
|
2325
|
+
to_plan_name: value["toPlanName"]
|
|
2326
|
+
};
|
|
2327
|
+
}
|
|
2328
|
+
function instanceOfCompanyContextSubscriptionResponseData(value) {
|
|
2329
|
+
if (!("cancelAtPeriodEnd" in value) || value["cancelAtPeriodEnd"] === void 0)
|
|
2330
|
+
return false;
|
|
2331
|
+
if (!("currency" in value) || value["currency"] === void 0) return false;
|
|
2332
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
2333
|
+
return true;
|
|
2334
|
+
}
|
|
2335
|
+
function CompanyContextSubscriptionResponseDataFromJSON(json) {
|
|
2336
|
+
return CompanyContextSubscriptionResponseDataFromJSONTyped(json, false);
|
|
2337
|
+
}
|
|
2338
|
+
function CompanyContextSubscriptionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2339
|
+
if (json == null) {
|
|
2340
|
+
return json;
|
|
2341
|
+
}
|
|
2342
|
+
return {
|
|
2343
|
+
cancelAt: json["cancel_at"] == null ? void 0 : new Date(json["cancel_at"]),
|
|
2344
|
+
cancelAtPeriodEnd: json["cancel_at_period_end"],
|
|
2345
|
+
currency: CurrencyFromJSON2(json["currency"]),
|
|
2346
|
+
nextBillAt: json["next_bill_at"] == null ? void 0 : new Date(json["next_bill_at"]),
|
|
2347
|
+
period: json["period"] == null ? void 0 : json["period"],
|
|
2348
|
+
periodEnd: json["period_end"] == null ? void 0 : new Date(json["period_end"]),
|
|
2349
|
+
status: json["status"],
|
|
2350
|
+
trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
function CompanyContextSubscriptionResponseDataToJSON(json) {
|
|
2354
|
+
return CompanyContextSubscriptionResponseDataToJSONTyped(json, false);
|
|
2355
|
+
}
|
|
2356
|
+
function CompanyContextSubscriptionResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2357
|
+
if (value == null) {
|
|
2358
|
+
return value;
|
|
2359
|
+
}
|
|
2360
|
+
return {
|
|
2361
|
+
cancel_at: value["cancelAt"] == null ? void 0 : value["cancelAt"].toISOString(),
|
|
2362
|
+
cancel_at_period_end: value["cancelAtPeriodEnd"],
|
|
2363
|
+
currency: CurrencyToJSON2(value["currency"]),
|
|
2364
|
+
next_bill_at: value["nextBillAt"] == null ? void 0 : value["nextBillAt"].toISOString(),
|
|
2365
|
+
period: value["period"],
|
|
2366
|
+
period_end: value["periodEnd"] == null ? void 0 : value["periodEnd"].toISOString(),
|
|
2367
|
+
status: value["status"],
|
|
2368
|
+
trial_end: value["trialEnd"] == null ? void 0 : value["trialEnd"].toISOString()
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
function instanceOfCompanyContextResponseData(value) {
|
|
2372
|
+
if (!("addOns" in value) || value["addOns"] === void 0) return false;
|
|
2373
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
2374
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2375
|
+
return true;
|
|
2376
|
+
}
|
|
2377
|
+
function CompanyContextResponseDataFromJSON(json) {
|
|
2378
|
+
return CompanyContextResponseDataFromJSONTyped(json, false);
|
|
2379
|
+
}
|
|
2380
|
+
function CompanyContextResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2381
|
+
if (json == null) {
|
|
2382
|
+
return json;
|
|
2383
|
+
}
|
|
2384
|
+
return {
|
|
2385
|
+
addOns: json["add_ons"].map(
|
|
2386
|
+
CompanyContextPlanResponseDataFromJSON
|
|
2387
|
+
),
|
|
2388
|
+
customPlanBilling: json["custom_plan_billing"] == null ? void 0 : CompanyContextCustomPlanBillingResponseDataFromJSON(
|
|
2389
|
+
json["custom_plan_billing"]
|
|
2390
|
+
),
|
|
2391
|
+
id: json["id"],
|
|
2392
|
+
name: json["name"],
|
|
2393
|
+
plan: json["plan"] == null ? void 0 : CompanyContextPlanResponseDataFromJSON(json["plan"]),
|
|
2394
|
+
scheduledDowngrade: json["scheduled_downgrade"] == null ? void 0 : CompanyContextScheduledDowngradeResponseDataFromJSON(
|
|
2395
|
+
json["scheduled_downgrade"]
|
|
2396
|
+
),
|
|
2397
|
+
subscription: json["subscription"] == null ? void 0 : CompanyContextSubscriptionResponseDataFromJSON(json["subscription"])
|
|
2398
|
+
};
|
|
2399
|
+
}
|
|
2400
|
+
function CompanyContextResponseDataToJSON(json) {
|
|
2401
|
+
return CompanyContextResponseDataToJSONTyped(json, false);
|
|
2402
|
+
}
|
|
2403
|
+
function CompanyContextResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2404
|
+
if (value == null) {
|
|
2405
|
+
return value;
|
|
2406
|
+
}
|
|
2407
|
+
return {
|
|
2408
|
+
add_ons: value["addOns"].map(
|
|
2409
|
+
CompanyContextPlanResponseDataToJSON
|
|
2410
|
+
),
|
|
2411
|
+
custom_plan_billing: CompanyContextCustomPlanBillingResponseDataToJSON(
|
|
2412
|
+
value["customPlanBilling"]
|
|
2413
|
+
),
|
|
2414
|
+
id: value["id"],
|
|
2415
|
+
name: value["name"],
|
|
2416
|
+
plan: CompanyContextPlanResponseDataToJSON(value["plan"]),
|
|
2417
|
+
scheduled_downgrade: CompanyContextScheduledDowngradeResponseDataToJSON(
|
|
2418
|
+
value["scheduledDowngrade"]
|
|
2419
|
+
),
|
|
2420
|
+
subscription: CompanyContextSubscriptionResponseDataToJSON(
|
|
2421
|
+
value["subscription"]
|
|
2422
|
+
)
|
|
2423
|
+
};
|
|
2424
|
+
}
|
|
2425
|
+
function instanceOfCompanyCreditAutoTopupResponseData(value) {
|
|
2426
|
+
if (!("enabled" in value) || value["enabled"] === void 0) return false;
|
|
2427
|
+
if (!("selfService" in value) || value["selfService"] === void 0)
|
|
2428
|
+
return false;
|
|
2429
|
+
return true;
|
|
2430
|
+
}
|
|
2431
|
+
function CompanyCreditAutoTopupResponseDataFromJSON(json) {
|
|
2432
|
+
return CompanyCreditAutoTopupResponseDataFromJSONTyped(json, false);
|
|
2433
|
+
}
|
|
2434
|
+
function CompanyCreditAutoTopupResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2435
|
+
if (json == null) {
|
|
2436
|
+
return json;
|
|
2437
|
+
}
|
|
2438
|
+
return {
|
|
2439
|
+
amount: json["amount"] == null ? void 0 : json["amount"],
|
|
2440
|
+
enabled: json["enabled"],
|
|
2441
|
+
selfService: json["self_service"],
|
|
2442
|
+
thresholdCredits: json["threshold_credits"] == null ? void 0 : json["threshold_credits"]
|
|
2443
|
+
};
|
|
2444
|
+
}
|
|
2445
|
+
function CompanyCreditAutoTopupResponseDataToJSON(json) {
|
|
2446
|
+
return CompanyCreditAutoTopupResponseDataToJSONTyped(json, false);
|
|
2447
|
+
}
|
|
2448
|
+
function CompanyCreditAutoTopupResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2449
|
+
if (value == null) {
|
|
2450
|
+
return value;
|
|
2451
|
+
}
|
|
2452
|
+
return {
|
|
2453
|
+
amount: value["amount"],
|
|
2454
|
+
enabled: value["enabled"],
|
|
2455
|
+
self_service: value["selfService"],
|
|
2456
|
+
threshold_credits: value["thresholdCredits"]
|
|
2457
|
+
};
|
|
2458
|
+
}
|
|
2459
|
+
function instanceOfCompanyCreditGrantResponseData(value) {
|
|
2460
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
2461
|
+
if (!("grantReason" in value) || value["grantReason"] === void 0)
|
|
2462
|
+
return false;
|
|
2463
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
2464
|
+
if (!("quantity" in value) || value["quantity"] === void 0) return false;
|
|
2465
|
+
if (!("quantityRemaining" in value) || value["quantityRemaining"] === void 0)
|
|
2466
|
+
return false;
|
|
2467
|
+
if (!("quantityUsed" in value) || value["quantityUsed"] === void 0)
|
|
2468
|
+
return false;
|
|
2469
|
+
return true;
|
|
2470
|
+
}
|
|
2471
|
+
function CompanyCreditGrantResponseDataFromJSON(json) {
|
|
2472
|
+
return CompanyCreditGrantResponseDataFromJSONTyped(json, false);
|
|
2473
|
+
}
|
|
2474
|
+
function CompanyCreditGrantResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2475
|
+
if (json == null) {
|
|
2476
|
+
return json;
|
|
2477
|
+
}
|
|
2478
|
+
return {
|
|
2479
|
+
bundleId: json["bundle_id"] == null ? void 0 : json["bundle_id"],
|
|
2480
|
+
bundleName: json["bundle_name"] == null ? void 0 : json["bundle_name"],
|
|
2481
|
+
createdAt: new Date(json["created_at"]),
|
|
2482
|
+
expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
|
|
2483
|
+
grantReason: BillingCreditGrantReasonFromJSON(json["grant_reason"]),
|
|
2484
|
+
id: json["id"],
|
|
2485
|
+
planId: json["plan_id"] == null ? void 0 : json["plan_id"],
|
|
2486
|
+
planName: json["plan_name"] == null ? void 0 : json["plan_name"],
|
|
2487
|
+
quantity: json["quantity"],
|
|
2488
|
+
quantityRemaining: json["quantity_remaining"],
|
|
2489
|
+
quantityUsed: json["quantity_used"],
|
|
2490
|
+
renewalPeriod: json["renewal_period"] == null ? void 0 : BillingPlanCreditGrantResetCadenceFromJSON2(json["renewal_period"]),
|
|
2491
|
+
resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
|
|
2492
|
+
validFrom: json["valid_from"] == null ? void 0 : new Date(json["valid_from"])
|
|
2493
|
+
};
|
|
2494
|
+
}
|
|
2495
|
+
function CompanyCreditGrantResponseDataToJSON(json) {
|
|
2496
|
+
return CompanyCreditGrantResponseDataToJSONTyped(json, false);
|
|
2497
|
+
}
|
|
2498
|
+
function CompanyCreditGrantResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2499
|
+
if (value == null) {
|
|
2500
|
+
return value;
|
|
2501
|
+
}
|
|
2502
|
+
return {
|
|
2503
|
+
bundle_id: value["bundleId"],
|
|
2504
|
+
bundle_name: value["bundleName"],
|
|
2505
|
+
created_at: value["createdAt"].toISOString(),
|
|
2506
|
+
expires_at: value["expiresAt"] == null ? void 0 : value["expiresAt"].toISOString(),
|
|
2507
|
+
grant_reason: BillingCreditGrantReasonToJSON(value["grantReason"]),
|
|
2508
|
+
id: value["id"],
|
|
2509
|
+
plan_id: value["planId"],
|
|
2510
|
+
plan_name: value["planName"],
|
|
2511
|
+
quantity: value["quantity"],
|
|
2512
|
+
quantity_remaining: value["quantityRemaining"],
|
|
2513
|
+
quantity_used: value["quantityUsed"],
|
|
2514
|
+
renewal_period: BillingPlanCreditGrantResetCadenceToJSON2(
|
|
2515
|
+
value["renewalPeriod"]
|
|
2516
|
+
),
|
|
2517
|
+
resets_at: value["resetsAt"] == null ? void 0 : value["resetsAt"].toISOString(),
|
|
2518
|
+
valid_from: value["validFrom"] == null ? void 0 : value["validFrom"].toISOString()
|
|
2519
|
+
};
|
|
2520
|
+
}
|
|
2521
|
+
function instanceOfCompanyCreditCompositionResponseData(value) {
|
|
2522
|
+
if (!("fixedQuantity" in value) || value["fixedQuantity"] === void 0)
|
|
2523
|
+
return false;
|
|
2524
|
+
if (!("licenseName" in value) || value["licenseName"] === void 0)
|
|
2525
|
+
return false;
|
|
2526
|
+
if (!("licenseQuantity" in value) || value["licenseQuantity"] === void 0)
|
|
2527
|
+
return false;
|
|
2528
|
+
if (!("perLicenseAmount" in value) || value["perLicenseAmount"] === void 0)
|
|
2529
|
+
return false;
|
|
2530
|
+
if (!("period" in value) || value["period"] === void 0) return false;
|
|
2531
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
2532
|
+
return true;
|
|
2533
|
+
}
|
|
2534
|
+
function CompanyCreditCompositionResponseDataFromJSON(json) {
|
|
2535
|
+
return CompanyCreditCompositionResponseDataFromJSONTyped(json, false);
|
|
2536
|
+
}
|
|
2537
|
+
function CompanyCreditCompositionResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2538
|
+
if (json == null) {
|
|
2539
|
+
return json;
|
|
2540
|
+
}
|
|
2541
|
+
return {
|
|
2542
|
+
fixedQuantity: json["fixed_quantity"],
|
|
2543
|
+
licenseId: json["license_id"] == null ? void 0 : json["license_id"],
|
|
2544
|
+
licenseName: json["license_name"],
|
|
2545
|
+
licensePluralName: json["license_plural_name"] == null ? void 0 : json["license_plural_name"],
|
|
2546
|
+
licenseQuantity: json["license_quantity"],
|
|
2547
|
+
licenseSingularName: json["license_singular_name"] == null ? void 0 : json["license_singular_name"],
|
|
2548
|
+
perLicenseAmount: json["per_license_amount"],
|
|
2549
|
+
period: json["period"],
|
|
2550
|
+
renewsAt: json["renews_at"] == null ? void 0 : new Date(json["renews_at"]),
|
|
2551
|
+
total: json["total"]
|
|
2552
|
+
};
|
|
2553
|
+
}
|
|
2554
|
+
function CompanyCreditCompositionResponseDataToJSON(json) {
|
|
2555
|
+
return CompanyCreditCompositionResponseDataToJSONTyped(json, false);
|
|
2556
|
+
}
|
|
2557
|
+
function CompanyCreditCompositionResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2558
|
+
if (value == null) {
|
|
2559
|
+
return value;
|
|
2560
|
+
}
|
|
2561
|
+
return {
|
|
2562
|
+
fixed_quantity: value["fixedQuantity"],
|
|
2563
|
+
license_id: value["licenseId"],
|
|
2564
|
+
license_name: value["licenseName"],
|
|
2565
|
+
license_plural_name: value["licensePluralName"],
|
|
2566
|
+
license_quantity: value["licenseQuantity"],
|
|
2567
|
+
license_singular_name: value["licenseSingularName"],
|
|
2568
|
+
per_license_amount: value["perLicenseAmount"],
|
|
2569
|
+
period: value["period"],
|
|
2570
|
+
renews_at: value["renewsAt"] == null ? void 0 : value["renewsAt"].toISOString(),
|
|
2571
|
+
total: value["total"]
|
|
2572
|
+
};
|
|
2573
|
+
}
|
|
2574
|
+
function instanceOfCompanyCreditBalanceResponseData(value) {
|
|
2575
|
+
if (!("creditDescription" in value) || value["creditDescription"] === void 0)
|
|
2576
|
+
return false;
|
|
2577
|
+
if (!("creditId" in value) || value["creditId"] === void 0) return false;
|
|
2578
|
+
if (!("creditName" in value) || value["creditName"] === void 0)
|
|
2579
|
+
return false;
|
|
2580
|
+
if (!("grants" in value) || value["grants"] === void 0) return false;
|
|
2581
|
+
if (!("purchasable" in value) || value["purchasable"] === void 0)
|
|
2582
|
+
return false;
|
|
2583
|
+
if (!("remaining" in value) || value["remaining"] === void 0) return false;
|
|
2584
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
2585
|
+
if (!("used" in value) || value["used"] === void 0) return false;
|
|
2586
|
+
return true;
|
|
2587
|
+
}
|
|
2588
|
+
function CompanyCreditBalanceResponseDataFromJSON(json) {
|
|
2589
|
+
return CompanyCreditBalanceResponseDataFromJSONTyped(json, false);
|
|
2590
|
+
}
|
|
2591
|
+
function CompanyCreditBalanceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2592
|
+
if (json == null) {
|
|
2593
|
+
return json;
|
|
2594
|
+
}
|
|
2595
|
+
return {
|
|
2596
|
+
autoTopup: json["auto_topup"] == null ? void 0 : CompanyCreditAutoTopupResponseDataFromJSON(json["auto_topup"]),
|
|
2597
|
+
composition: json["composition"] == null ? void 0 : CompanyCreditCompositionResponseDataFromJSON(json["composition"]),
|
|
2598
|
+
creditDescription: json["credit_description"],
|
|
2599
|
+
creditIcon: json["credit_icon"] == null ? void 0 : json["credit_icon"],
|
|
2600
|
+
creditId: json["credit_id"],
|
|
2601
|
+
creditName: json["credit_name"],
|
|
2602
|
+
creditPluralName: json["credit_plural_name"] == null ? void 0 : json["credit_plural_name"],
|
|
2603
|
+
creditSingularName: json["credit_singular_name"] == null ? void 0 : json["credit_singular_name"],
|
|
2604
|
+
expiresAt: json["expires_at"] == null ? void 0 : new Date(json["expires_at"]),
|
|
2605
|
+
grants: json["grants"].map(
|
|
2606
|
+
CompanyCreditGrantResponseDataFromJSON
|
|
2607
|
+
),
|
|
2608
|
+
purchasable: json["purchasable"],
|
|
2609
|
+
remaining: json["remaining"],
|
|
2610
|
+
resetsAt: json["resets_at"] == null ? void 0 : new Date(json["resets_at"]),
|
|
2611
|
+
total: json["total"],
|
|
2612
|
+
used: json["used"]
|
|
2613
|
+
};
|
|
2614
|
+
}
|
|
2615
|
+
function CompanyCreditBalanceResponseDataToJSON(json) {
|
|
2616
|
+
return CompanyCreditBalanceResponseDataToJSONTyped(json, false);
|
|
2617
|
+
}
|
|
2618
|
+
function CompanyCreditBalanceResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2619
|
+
if (value == null) {
|
|
2620
|
+
return value;
|
|
2621
|
+
}
|
|
2622
|
+
return {
|
|
2623
|
+
auto_topup: CompanyCreditAutoTopupResponseDataToJSON(value["autoTopup"]),
|
|
2624
|
+
composition: CompanyCreditCompositionResponseDataToJSON(
|
|
2625
|
+
value["composition"]
|
|
2626
|
+
),
|
|
2627
|
+
credit_description: value["creditDescription"],
|
|
2628
|
+
credit_icon: value["creditIcon"],
|
|
2629
|
+
credit_id: value["creditId"],
|
|
2630
|
+
credit_name: value["creditName"],
|
|
2631
|
+
credit_plural_name: value["creditPluralName"],
|
|
2632
|
+
credit_singular_name: value["creditSingularName"],
|
|
2633
|
+
expires_at: value["expiresAt"] == null ? void 0 : value["expiresAt"].toISOString(),
|
|
2634
|
+
grants: value["grants"].map(
|
|
2635
|
+
CompanyCreditGrantResponseDataToJSON
|
|
2636
|
+
),
|
|
2637
|
+
purchasable: value["purchasable"],
|
|
2638
|
+
remaining: value["remaining"],
|
|
2639
|
+
resets_at: value["resetsAt"] == null ? void 0 : value["resetsAt"].toISOString(),
|
|
2640
|
+
total: value["total"],
|
|
2641
|
+
used: value["used"]
|
|
2642
|
+
};
|
|
2643
|
+
}
|
|
2644
|
+
function instanceOfCompanyCreditBalancesResponseData(value) {
|
|
2645
|
+
if (!("balances" in value) || value["balances"] === void 0) return false;
|
|
2646
|
+
if (!("count" in value) || value["count"] === void 0) return false;
|
|
2647
|
+
return true;
|
|
2648
|
+
}
|
|
2649
|
+
function CompanyCreditBalancesResponseDataFromJSON(json) {
|
|
2650
|
+
return CompanyCreditBalancesResponseDataFromJSONTyped(json, false);
|
|
2651
|
+
}
|
|
2652
|
+
function CompanyCreditBalancesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2653
|
+
if (json == null) {
|
|
2654
|
+
return json;
|
|
2655
|
+
}
|
|
2656
|
+
return {
|
|
2657
|
+
balances: json["balances"].map(
|
|
2658
|
+
CompanyCreditBalanceResponseDataFromJSON
|
|
2659
|
+
),
|
|
2660
|
+
count: json["count"]
|
|
2661
|
+
};
|
|
2662
|
+
}
|
|
2663
|
+
function CompanyCreditBalancesResponseDataToJSON(json) {
|
|
2664
|
+
return CompanyCreditBalancesResponseDataToJSONTyped(json, false);
|
|
2665
|
+
}
|
|
2666
|
+
function CompanyCreditBalancesResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2667
|
+
if (value == null) {
|
|
2668
|
+
return value;
|
|
2669
|
+
}
|
|
2670
|
+
return {
|
|
2671
|
+
balances: value["balances"].map(
|
|
2672
|
+
CompanyCreditBalanceResponseDataToJSON
|
|
2673
|
+
),
|
|
2674
|
+
count: value["count"]
|
|
2675
|
+
};
|
|
2676
|
+
}
|
|
2677
|
+
function instanceOfCompanyCreditUserUsageRowResponseData(value) {
|
|
2678
|
+
if (!("share" in value) || value["share"] === void 0) return false;
|
|
2679
|
+
if (!("used" in value) || value["used"] === void 0) return false;
|
|
2680
|
+
if (!("userId" in value) || value["userId"] === void 0) return false;
|
|
2681
|
+
return true;
|
|
2682
|
+
}
|
|
2683
|
+
function CompanyCreditUserUsageRowResponseDataFromJSON(json) {
|
|
2684
|
+
return CompanyCreditUserUsageRowResponseDataFromJSONTyped(json, false);
|
|
2685
|
+
}
|
|
2686
|
+
function CompanyCreditUserUsageRowResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2687
|
+
if (json == null) {
|
|
2688
|
+
return json;
|
|
2689
|
+
}
|
|
2690
|
+
return {
|
|
2691
|
+
name: json["name"] == null ? void 0 : json["name"],
|
|
2692
|
+
share: json["share"],
|
|
2693
|
+
used: json["used"],
|
|
2694
|
+
userId: json["user_id"]
|
|
2695
|
+
};
|
|
2696
|
+
}
|
|
2697
|
+
function CompanyCreditUserUsageRowResponseDataToJSON(json) {
|
|
2698
|
+
return CompanyCreditUserUsageRowResponseDataToJSONTyped(json, false);
|
|
2699
|
+
}
|
|
2700
|
+
function CompanyCreditUserUsageRowResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2701
|
+
if (value == null) {
|
|
2702
|
+
return value;
|
|
2703
|
+
}
|
|
2704
|
+
return {
|
|
2705
|
+
name: value["name"],
|
|
2706
|
+
share: value["share"],
|
|
2707
|
+
used: value["used"],
|
|
2708
|
+
user_id: value["userId"]
|
|
2709
|
+
};
|
|
2710
|
+
}
|
|
2711
|
+
function instanceOfCompanyCreditUserUsageResponseData(value) {
|
|
2712
|
+
if (!("count" in value) || value["count"] === void 0) return false;
|
|
2713
|
+
if (!("total" in value) || value["total"] === void 0) return false;
|
|
2714
|
+
if (!("users" in value) || value["users"] === void 0) return false;
|
|
2715
|
+
return true;
|
|
2716
|
+
}
|
|
2717
|
+
function CompanyCreditUserUsageResponseDataFromJSON(json) {
|
|
2718
|
+
return CompanyCreditUserUsageResponseDataFromJSONTyped(json, false);
|
|
2719
|
+
}
|
|
2720
|
+
function CompanyCreditUserUsageResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2721
|
+
if (json == null) {
|
|
2722
|
+
return json;
|
|
2723
|
+
}
|
|
2724
|
+
return {
|
|
2725
|
+
count: json["count"],
|
|
2726
|
+
endTime: json["end_time"] == null ? void 0 : new Date(json["end_time"]),
|
|
2727
|
+
startTime: json["start_time"] == null ? void 0 : new Date(json["start_time"]),
|
|
2728
|
+
total: json["total"],
|
|
2729
|
+
unattributed: json["unattributed"] == null ? void 0 : json["unattributed"],
|
|
2730
|
+
users: json["users"].map(
|
|
2731
|
+
CompanyCreditUserUsageRowResponseDataFromJSON
|
|
2732
|
+
)
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
function CompanyCreditUserUsageResponseDataToJSON(json) {
|
|
2736
|
+
return CompanyCreditUserUsageResponseDataToJSONTyped(json, false);
|
|
2737
|
+
}
|
|
2738
|
+
function CompanyCreditUserUsageResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2739
|
+
if (value == null) {
|
|
2740
|
+
return value;
|
|
2741
|
+
}
|
|
2742
|
+
return {
|
|
2743
|
+
count: value["count"],
|
|
2744
|
+
end_time: value["endTime"] == null ? void 0 : value["endTime"].toISOString(),
|
|
2745
|
+
start_time: value["startTime"] == null ? void 0 : value["startTime"].toISOString(),
|
|
2746
|
+
total: value["total"],
|
|
2747
|
+
unattributed: value["unattributed"],
|
|
2748
|
+
users: value["users"].map(
|
|
2749
|
+
CompanyCreditUserUsageRowResponseDataToJSON
|
|
2750
|
+
)
|
|
2751
|
+
};
|
|
2752
|
+
}
|
|
1894
2753
|
function instanceOfCompanyDiscountResponseData(value) {
|
|
1895
2754
|
if (!("couponName" in value) || value["couponName"] === void 0)
|
|
1896
2755
|
return false;
|
|
@@ -1907,7 +2766,7 @@ function CompanyDiscountResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1907
2766
|
return {
|
|
1908
2767
|
amountOff: json["amount_off"] == null ? void 0 : json["amount_off"],
|
|
1909
2768
|
couponName: json["coupon_name"],
|
|
1910
|
-
currency: json["currency"] == null ? void 0 : json["currency"],
|
|
2769
|
+
currency: json["currency"] == null ? void 0 : CurrencyFromJSON2(json["currency"]),
|
|
1911
2770
|
customerFacingCode: json["customer_facing_code"] == null ? void 0 : json["customer_facing_code"],
|
|
1912
2771
|
duration: json["duration"],
|
|
1913
2772
|
durationInMonths: json["duration_in_months"] == null ? void 0 : json["duration_in_months"],
|
|
@@ -1924,7 +2783,7 @@ function CompanyDiscountResponseDataToJSONTyped(value, ignoreDiscriminator = fal
|
|
|
1924
2783
|
return {
|
|
1925
2784
|
amount_off: value["amountOff"],
|
|
1926
2785
|
coupon_name: value["couponName"],
|
|
1927
|
-
currency: value["currency"],
|
|
2786
|
+
currency: CurrencyToJSON2(value["currency"]),
|
|
1928
2787
|
customer_facing_code: value["customerFacingCode"],
|
|
1929
2788
|
duration: value["duration"],
|
|
1930
2789
|
duration_in_months: value["durationInMonths"],
|
|
@@ -2365,7 +3224,7 @@ function CompanyInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2365
3224
|
return {
|
|
2366
3225
|
amountDue: json["amount_due"],
|
|
2367
3226
|
createdAt: new Date(json["created_at"]),
|
|
2368
|
-
currency: json["currency"],
|
|
3227
|
+
currency: CurrencyFromJSON2(json["currency"]),
|
|
2369
3228
|
dueDate: json["due_date"] == null ? void 0 : new Date(json["due_date"]),
|
|
2370
3229
|
id: json["id"],
|
|
2371
3230
|
status: json["status"] == null ? void 0 : InvoiceStatusFromJSON(json["status"]),
|
|
@@ -2382,7 +3241,7 @@ function CompanyInvoiceResponseDataToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
2382
3241
|
return {
|
|
2383
3242
|
amount_due: value["amountDue"],
|
|
2384
3243
|
created_at: value["createdAt"].toISOString(),
|
|
2385
|
-
currency: value["currency"],
|
|
3244
|
+
currency: CurrencyToJSON2(value["currency"]),
|
|
2386
3245
|
due_date: value["dueDate"] == null ? void 0 : value["dueDate"].toISOString(),
|
|
2387
3246
|
id: value["id"],
|
|
2388
3247
|
status: InvoiceStatusToJSON(value["status"]),
|
|
@@ -2533,7 +3392,7 @@ function CompanyUpcomingInvoiceResponseDataFromJSONTyped(json, ignoreDiscriminat
|
|
|
2533
3392
|
}
|
|
2534
3393
|
return {
|
|
2535
3394
|
amountDue: json["amount_due"],
|
|
2536
|
-
currency: json["currency"],
|
|
3395
|
+
currency: CurrencyFromJSON2(json["currency"]),
|
|
2537
3396
|
customerBalanceApplied: json["customer_balance_applied"],
|
|
2538
3397
|
customerBalanceRemaining: json["customer_balance_remaining"],
|
|
2539
3398
|
discounts: json["discounts"].map(
|
|
@@ -2552,7 +3411,7 @@ function CompanyUpcomingInvoiceResponseDataToJSONTyped(value, ignoreDiscriminato
|
|
|
2552
3411
|
}
|
|
2553
3412
|
return {
|
|
2554
3413
|
amount_due: value["amountDue"],
|
|
2555
|
-
currency: value["currency"],
|
|
3414
|
+
currency: CurrencyToJSON2(value["currency"]),
|
|
2556
3415
|
customer_balance_applied: value["customerBalanceApplied"],
|
|
2557
3416
|
customer_balance_remaining: value["customerBalanceRemaining"],
|
|
2558
3417
|
discounts: value["discounts"].map(
|
|
@@ -2678,6 +3537,91 @@ function DeletePaymentMethodResponseToJSONTyped(value, ignoreDiscriminator = fal
|
|
|
2678
3537
|
params: value["params"]
|
|
2679
3538
|
};
|
|
2680
3539
|
}
|
|
3540
|
+
function instanceOfGetCompanyCreditBalancesResponse(value) {
|
|
3541
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
3542
|
+
if (!("params" in value) || value["params"] === void 0) return false;
|
|
3543
|
+
return true;
|
|
3544
|
+
}
|
|
3545
|
+
function GetCompanyCreditBalancesResponseFromJSON(json) {
|
|
3546
|
+
return GetCompanyCreditBalancesResponseFromJSONTyped(json, false);
|
|
3547
|
+
}
|
|
3548
|
+
function GetCompanyCreditBalancesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
3549
|
+
if (json == null) {
|
|
3550
|
+
return json;
|
|
3551
|
+
}
|
|
3552
|
+
return {
|
|
3553
|
+
data: CompanyCreditBalancesResponseDataFromJSON(json["data"]),
|
|
3554
|
+
params: json["params"]
|
|
3555
|
+
};
|
|
3556
|
+
}
|
|
3557
|
+
function GetCompanyCreditBalancesResponseToJSON(json) {
|
|
3558
|
+
return GetCompanyCreditBalancesResponseToJSONTyped(json, false);
|
|
3559
|
+
}
|
|
3560
|
+
function GetCompanyCreditBalancesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3561
|
+
if (value == null) {
|
|
3562
|
+
return value;
|
|
3563
|
+
}
|
|
3564
|
+
return {
|
|
3565
|
+
data: CompanyCreditBalancesResponseDataToJSON(value["data"]),
|
|
3566
|
+
params: value["params"]
|
|
3567
|
+
};
|
|
3568
|
+
}
|
|
3569
|
+
function instanceOfGetCompanyCreditUserUsageParams(value) {
|
|
3570
|
+
return true;
|
|
3571
|
+
}
|
|
3572
|
+
function GetCompanyCreditUserUsageParamsFromJSON(json) {
|
|
3573
|
+
return GetCompanyCreditUserUsageParamsFromJSONTyped(json, false);
|
|
3574
|
+
}
|
|
3575
|
+
function GetCompanyCreditUserUsageParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
3576
|
+
if (json == null) {
|
|
3577
|
+
return json;
|
|
3578
|
+
}
|
|
3579
|
+
return {
|
|
3580
|
+
limit: json["limit"] == null ? void 0 : json["limit"],
|
|
3581
|
+
offset: json["offset"] == null ? void 0 : json["offset"]
|
|
3582
|
+
};
|
|
3583
|
+
}
|
|
3584
|
+
function GetCompanyCreditUserUsageParamsToJSON(json) {
|
|
3585
|
+
return GetCompanyCreditUserUsageParamsToJSONTyped(json, false);
|
|
3586
|
+
}
|
|
3587
|
+
function GetCompanyCreditUserUsageParamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3588
|
+
if (value == null) {
|
|
3589
|
+
return value;
|
|
3590
|
+
}
|
|
3591
|
+
return {
|
|
3592
|
+
limit: value["limit"],
|
|
3593
|
+
offset: value["offset"]
|
|
3594
|
+
};
|
|
3595
|
+
}
|
|
3596
|
+
function instanceOfGetCompanyCreditUserUsageResponse(value) {
|
|
3597
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
3598
|
+
if (!("params" in value) || value["params"] === void 0) return false;
|
|
3599
|
+
return true;
|
|
3600
|
+
}
|
|
3601
|
+
function GetCompanyCreditUserUsageResponseFromJSON(json) {
|
|
3602
|
+
return GetCompanyCreditUserUsageResponseFromJSONTyped(json, false);
|
|
3603
|
+
}
|
|
3604
|
+
function GetCompanyCreditUserUsageResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
3605
|
+
if (json == null) {
|
|
3606
|
+
return json;
|
|
3607
|
+
}
|
|
3608
|
+
return {
|
|
3609
|
+
data: CompanyCreditUserUsageResponseDataFromJSON(json["data"]),
|
|
3610
|
+
params: GetCompanyCreditUserUsageParamsFromJSON(json["params"])
|
|
3611
|
+
};
|
|
3612
|
+
}
|
|
3613
|
+
function GetCompanyCreditUserUsageResponseToJSON(json) {
|
|
3614
|
+
return GetCompanyCreditUserUsageResponseToJSONTyped(json, false);
|
|
3615
|
+
}
|
|
3616
|
+
function GetCompanyCreditUserUsageResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3617
|
+
if (value == null) {
|
|
3618
|
+
return value;
|
|
3619
|
+
}
|
|
3620
|
+
return {
|
|
3621
|
+
data: CompanyCreditUserUsageResponseDataToJSON(value["data"]),
|
|
3622
|
+
params: GetCompanyCreditUserUsageParamsToJSON(value["params"])
|
|
3623
|
+
};
|
|
3624
|
+
}
|
|
2681
3625
|
function instanceOfGetCompanyFeatureUsageResponse(value) {
|
|
2682
3626
|
if (!("data" in value) || value["data"] === void 0) return false;
|
|
2683
3627
|
if (!("params" in value) || value["params"] === void 0) return false;
|
|
@@ -2850,6 +3794,35 @@ function GetCompanyPaymentMethodsResponseToJSONTyped(value, ignoreDiscriminator
|
|
|
2850
3794
|
params: value["params"]
|
|
2851
3795
|
};
|
|
2852
3796
|
}
|
|
3797
|
+
function instanceOfGetCompanyResponse(value) {
|
|
3798
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
3799
|
+
if (!("params" in value) || value["params"] === void 0) return false;
|
|
3800
|
+
return true;
|
|
3801
|
+
}
|
|
3802
|
+
function GetCompanyResponseFromJSON(json) {
|
|
3803
|
+
return GetCompanyResponseFromJSONTyped(json, false);
|
|
3804
|
+
}
|
|
3805
|
+
function GetCompanyResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
3806
|
+
if (json == null) {
|
|
3807
|
+
return json;
|
|
3808
|
+
}
|
|
3809
|
+
return {
|
|
3810
|
+
data: CompanyContextResponseDataFromJSON(json["data"]),
|
|
3811
|
+
params: json["params"]
|
|
3812
|
+
};
|
|
3813
|
+
}
|
|
3814
|
+
function GetCompanyResponseToJSON(json) {
|
|
3815
|
+
return GetCompanyResponseToJSONTyped(json, false);
|
|
3816
|
+
}
|
|
3817
|
+
function GetCompanyResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3818
|
+
if (value == null) {
|
|
3819
|
+
return value;
|
|
3820
|
+
}
|
|
3821
|
+
return {
|
|
3822
|
+
data: CompanyContextResponseDataToJSON(value["data"]),
|
|
3823
|
+
params: value["params"]
|
|
3824
|
+
};
|
|
3825
|
+
}
|
|
2853
3826
|
function instanceOfGetCompanyUpcomingInvoiceResponse(value) {
|
|
2854
3827
|
if (!("data" in value) || value["data"] === void 0) return false;
|
|
2855
3828
|
if (!("params" in value) || value["params"] === void 0) return false;
|
|
@@ -3377,6 +4350,45 @@ var SchematicBillingClient = class {
|
|
|
3377
4350
|
return GetCompanyFeatureUsageResponseFromJSON(body).data.features;
|
|
3378
4351
|
});
|
|
3379
4352
|
}
|
|
4353
|
+
fetchCompany() {
|
|
4354
|
+
const path = "/company";
|
|
4355
|
+
return this.session.request(path).then((body) => {
|
|
4356
|
+
if (body === null || typeof body !== "object" || !("data" in body) || body.data == null) {
|
|
4357
|
+
throw new Error(`Malformed response from ${path}`);
|
|
4358
|
+
}
|
|
4359
|
+
return GetCompanyResponseFromJSON(body).data;
|
|
4360
|
+
});
|
|
4361
|
+
}
|
|
4362
|
+
fetchCreditBalances() {
|
|
4363
|
+
const path = "/company/credits";
|
|
4364
|
+
return this.session.request(path).then((body) => {
|
|
4365
|
+
if (body === null || typeof body !== "object" || !("data" in body)) {
|
|
4366
|
+
throw new Error(`Malformed response from ${path}`);
|
|
4367
|
+
}
|
|
4368
|
+
const data = body.data;
|
|
4369
|
+
if (data == null || data.balances == null) {
|
|
4370
|
+
return [];
|
|
4371
|
+
}
|
|
4372
|
+
return GetCompanyCreditBalancesResponseFromJSON(body).data.balances;
|
|
4373
|
+
});
|
|
4374
|
+
}
|
|
4375
|
+
fetchCreditUserUsage(params) {
|
|
4376
|
+
const query = new URLSearchParams();
|
|
4377
|
+
if (params.limit !== void 0) {
|
|
4378
|
+
query.set("limit", String(params.limit));
|
|
4379
|
+
}
|
|
4380
|
+
if (params.offset !== void 0) {
|
|
4381
|
+
query.set("offset", String(params.offset));
|
|
4382
|
+
}
|
|
4383
|
+
const search = query.toString();
|
|
4384
|
+
const path = `/company/credits/${encodeURIComponent(params.creditId)}/users${search === "" ? "" : `?${search}`}`;
|
|
4385
|
+
return this.session.request(path).then((body) => {
|
|
4386
|
+
if (body === null || typeof body !== "object" || !("data" in body)) {
|
|
4387
|
+
throw new Error(`Malformed response from ${path}`);
|
|
4388
|
+
}
|
|
4389
|
+
return GetCompanyCreditUserUsageResponseFromJSON(body).data;
|
|
4390
|
+
});
|
|
4391
|
+
}
|
|
3380
4392
|
fetchFeatureUserUsage(params) {
|
|
3381
4393
|
const query = new URLSearchParams();
|
|
3382
4394
|
if (params.limit !== void 0) {
|
|
@@ -5667,6 +6679,20 @@ var BillingStore = class {
|
|
|
5667
6679
|
}),
|
|
5668
6680
|
{ readiness }
|
|
5669
6681
|
);
|
|
6682
|
+
this.creditBalances = new KeyedResource(
|
|
6683
|
+
() => this._client.fetchCreditBalances(),
|
|
6684
|
+
{ readiness }
|
|
6685
|
+
);
|
|
6686
|
+
this.company = new KeyedResource(() => this._client.fetchCompany(), {
|
|
6687
|
+
readiness
|
|
6688
|
+
});
|
|
6689
|
+
this.creditUserUsage = new KeyedResource(
|
|
6690
|
+
({ creditId }) => this._client.fetchCreditUserUsage({
|
|
6691
|
+
creditId,
|
|
6692
|
+
limit: FEATURE_USER_USAGE_LIMIT
|
|
6693
|
+
}),
|
|
6694
|
+
{ readiness }
|
|
6695
|
+
);
|
|
5670
6696
|
const held = { key: initialData.sessionKey };
|
|
5671
6697
|
if (initialData.invoices !== void 0) {
|
|
5672
6698
|
held.invoices = {
|
|
@@ -5687,7 +6713,13 @@ var BillingStore = class {
|
|
|
5687
6713
|
if (initialData.featureUsage !== void 0) {
|
|
5688
6714
|
held.featureUsage = initialData.featureUsage;
|
|
5689
6715
|
}
|
|
5690
|
-
if (
|
|
6716
|
+
if (initialData.creditBalances !== void 0) {
|
|
6717
|
+
held.creditBalances = initialData.creditBalances;
|
|
6718
|
+
}
|
|
6719
|
+
if (initialData.company !== void 0) {
|
|
6720
|
+
held.company = initialData.company;
|
|
6721
|
+
}
|
|
6722
|
+
if (held.invoices !== void 0 || held.upcomingInvoice !== void 0 || held.paymentMethods !== void 0 || held.featureUsage !== void 0 || held.creditBalances !== void 0 || held.company !== void 0) {
|
|
5691
6723
|
this._held = held;
|
|
5692
6724
|
this._settleSeed(claimFrom(options.session) ?? claimOf(this._client));
|
|
5693
6725
|
}
|
|
@@ -5697,6 +6729,9 @@ var BillingStore = class {
|
|
|
5697
6729
|
upcomingInvoice;
|
|
5698
6730
|
paymentMethods;
|
|
5699
6731
|
featureUsage;
|
|
6732
|
+
creditBalances;
|
|
6733
|
+
company;
|
|
6734
|
+
creditUserUsage;
|
|
5700
6735
|
featureUserUsage;
|
|
5701
6736
|
_pageSize;
|
|
5702
6737
|
_unsubscribe;
|
|
@@ -5779,6 +6814,12 @@ var BillingStore = class {
|
|
|
5779
6814
|
if (held.featureUsage !== void 0) {
|
|
5780
6815
|
this.featureUsage.seed(SINGLETON, held.featureUsage);
|
|
5781
6816
|
}
|
|
6817
|
+
if (held.creditBalances !== void 0) {
|
|
6818
|
+
this.creditBalances.seed(SINGLETON, held.creditBalances);
|
|
6819
|
+
}
|
|
6820
|
+
if (held.company !== void 0) {
|
|
6821
|
+
this.company.seed(SINGLETON, held.company);
|
|
6822
|
+
}
|
|
5782
6823
|
this._seedKey = held.key;
|
|
5783
6824
|
this._seeded = true;
|
|
5784
6825
|
}
|
|
@@ -5792,6 +6833,7 @@ var BillingStore = class {
|
|
|
5792
6833
|
this[name].resetAll();
|
|
5793
6834
|
}
|
|
5794
6835
|
this.featureUserUsage.resetAll();
|
|
6836
|
+
this.creditUserUsage.resetAll();
|
|
5795
6837
|
}
|
|
5796
6838
|
/** Forgets every resource and leaves them empty; nothing reloads. */
|
|
5797
6839
|
clearAll() {
|
|
@@ -5799,6 +6841,7 @@ var BillingStore = class {
|
|
|
5799
6841
|
this[name].clearAll();
|
|
5800
6842
|
}
|
|
5801
6843
|
this.featureUserUsage.clearAll();
|
|
6844
|
+
this.creditUserUsage.clearAll();
|
|
5802
6845
|
}
|
|
5803
6846
|
/** Loads every resource that is subscribed and has nothing yet. */
|
|
5804
6847
|
resumeAll() {
|
|
@@ -5806,6 +6849,7 @@ var BillingStore = class {
|
|
|
5806
6849
|
this[name].resumeAll();
|
|
5807
6850
|
}
|
|
5808
6851
|
this.featureUserUsage.resumeAll();
|
|
6852
|
+
this.creditUserUsage.resumeAll();
|
|
5809
6853
|
}
|
|
5810
6854
|
/** Reloads every resource that has been loaded, keeping its current data. */
|
|
5811
6855
|
invalidateAll() {
|
|
@@ -5813,6 +6857,7 @@ var BillingStore = class {
|
|
|
5813
6857
|
this[name].invalidateAll();
|
|
5814
6858
|
}
|
|
5815
6859
|
this.featureUserUsage.invalidateAll();
|
|
6860
|
+
this.creditUserUsage.invalidateAll();
|
|
5816
6861
|
}
|
|
5817
6862
|
/**
|
|
5818
6863
|
* Appends the next page to the invoices list for `query`, when there is
|
|
@@ -5925,7 +6970,9 @@ var RESOURCE_NAMES = [
|
|
|
5925
6970
|
"invoices",
|
|
5926
6971
|
"upcomingInvoice",
|
|
5927
6972
|
"paymentMethods",
|
|
5928
|
-
"featureUsage"
|
|
6973
|
+
"featureUsage",
|
|
6974
|
+
"creditBalances",
|
|
6975
|
+
"company"
|
|
5929
6976
|
];
|
|
5930
6977
|
|
|
5931
6978
|
// src/billing/context.tsx
|
|
@@ -6008,6 +7055,9 @@ var missingBillingSource = {
|
|
|
6008
7055
|
subscribeFeatureUserUsage: () => () => {
|
|
6009
7056
|
},
|
|
6010
7057
|
featureUserUsage: () => missingHandle,
|
|
7058
|
+
subscribeCreditUserUsage: () => () => {
|
|
7059
|
+
},
|
|
7060
|
+
creditUserUsage: () => missingHandle,
|
|
6011
7061
|
loadMoreInvoices: () => Promise.resolve(),
|
|
6012
7062
|
invalidateAll: () => {
|
|
6013
7063
|
},
|
|
@@ -6021,6 +7071,7 @@ function useBillingDataSource() {
|
|
|
6021
7071
|
function BillingDataProvider({
|
|
6022
7072
|
actions,
|
|
6023
7073
|
children,
|
|
7074
|
+
creditUserUsage,
|
|
6024
7075
|
data,
|
|
6025
7076
|
featureUserUsage,
|
|
6026
7077
|
locale,
|
|
@@ -6034,6 +7085,7 @@ function BillingDataProvider({
|
|
|
6034
7085
|
const source = useMemo2(() => {
|
|
6035
7086
|
const handles = /* @__PURE__ */ new Map();
|
|
6036
7087
|
const userUsageHandles = /* @__PURE__ */ new Map();
|
|
7088
|
+
const creditUsageHandles = /* @__PURE__ */ new Map();
|
|
6037
7089
|
return {
|
|
6038
7090
|
actions: rejectingActions(
|
|
6039
7091
|
(name) => new Error(BILLING_ACTION_UNAVAILABLE_MESSAGE(name)),
|
|
@@ -6075,6 +7127,24 @@ function BillingDataProvider({
|
|
|
6075
7127
|
userUsageHandles.set(featureId, handle);
|
|
6076
7128
|
return handle;
|
|
6077
7129
|
},
|
|
7130
|
+
subscribeCreditUserUsage: () => () => {
|
|
7131
|
+
},
|
|
7132
|
+
creditUserUsage: (creditId) => {
|
|
7133
|
+
const cached = creditUsageHandles.get(creditId);
|
|
7134
|
+
if (cached !== void 0) {
|
|
7135
|
+
return cached;
|
|
7136
|
+
}
|
|
7137
|
+
const value = creditUserUsage?.[creditId];
|
|
7138
|
+
const handle = {
|
|
7139
|
+
data: value,
|
|
7140
|
+
error: void 0,
|
|
7141
|
+
isPending: value === void 0,
|
|
7142
|
+
refetch: () => {
|
|
7143
|
+
}
|
|
7144
|
+
};
|
|
7145
|
+
creditUsageHandles.set(creditId, handle);
|
|
7146
|
+
return handle;
|
|
7147
|
+
},
|
|
6078
7148
|
loadMoreInvoices: (query) => {
|
|
6079
7149
|
onLoadMoreInvoices?.(query);
|
|
6080
7150
|
return Promise.resolve();
|
|
@@ -6082,7 +7152,15 @@ function BillingDataProvider({
|
|
|
6082
7152
|
invalidateAll: () => {
|
|
6083
7153
|
}
|
|
6084
7154
|
};
|
|
6085
|
-
}, [
|
|
7155
|
+
}, [
|
|
7156
|
+
actions,
|
|
7157
|
+
creditUserUsage,
|
|
7158
|
+
data,
|
|
7159
|
+
featureUserUsage,
|
|
7160
|
+
onLoadMoreInvoices,
|
|
7161
|
+
onRefetch,
|
|
7162
|
+
status
|
|
7163
|
+
]);
|
|
6086
7164
|
return /* @__PURE__ */ jsx2(BillingDataContext.Provider, { value: source, children: /* @__PURE__ */ jsx2(
|
|
6087
7165
|
SchematicI18nProvider,
|
|
6088
7166
|
{
|
|
@@ -6193,6 +7271,24 @@ function useFeatureUserUsage(featureId) {
|
|
|
6193
7271
|
);
|
|
6194
7272
|
return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
6195
7273
|
}
|
|
7274
|
+
function useCompany() {
|
|
7275
|
+
return useBillingResource("company", SINGLETON);
|
|
7276
|
+
}
|
|
7277
|
+
function useCreditBalances() {
|
|
7278
|
+
return useBillingResource("creditBalances", SINGLETON);
|
|
7279
|
+
}
|
|
7280
|
+
function useCreditUserUsage(creditId) {
|
|
7281
|
+
const source = useBillingDataSource();
|
|
7282
|
+
const subscribe = useCallback(
|
|
7283
|
+
(listener) => source.subscribeCreditUserUsage(creditId, listener),
|
|
7284
|
+
[creditId, source]
|
|
7285
|
+
);
|
|
7286
|
+
const getSnapshot = useCallback(
|
|
7287
|
+
() => source.creditUserUsage(creditId),
|
|
7288
|
+
[creditId, source]
|
|
7289
|
+
);
|
|
7290
|
+
return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
7291
|
+
}
|
|
6196
7292
|
function useInvalidateBillingData() {
|
|
6197
7293
|
return useBillingDataSource().invalidateAll;
|
|
6198
7294
|
}
|
|
@@ -6270,6 +7366,8 @@ function BillingProvider({
|
|
|
6270
7366
|
handle,
|
|
6271
7367
|
subscribeFeatureUserUsage: (featureId, listener) => store.featureUserUsage.subscribe({ featureId }, listener),
|
|
6272
7368
|
featureUserUsage: (featureId) => handleOf(store.featureUserUsage.get({ featureId })),
|
|
7369
|
+
subscribeCreditUserUsage: (creditId, listener) => store.creditUserUsage.subscribe({ creditId }, listener),
|
|
7370
|
+
creditUserUsage: (creditId) => handleOf(store.creditUserUsage.get({ creditId })),
|
|
6273
7371
|
loadMoreInvoices: (query) => store.loadMoreInvoices(query),
|
|
6274
7372
|
invalidateAll: () => store.invalidateAll(),
|
|
6275
7373
|
actions: {
|
|
@@ -6303,10 +7401,20 @@ function staticSource(data) {
|
|
|
6303
7401
|
refetch: () => {
|
|
6304
7402
|
}
|
|
6305
7403
|
};
|
|
7404
|
+
const pendingCreditUsage = {
|
|
7405
|
+
data: void 0,
|
|
7406
|
+
error: void 0,
|
|
7407
|
+
isPending: true,
|
|
7408
|
+
refetch: () => {
|
|
7409
|
+
}
|
|
7410
|
+
};
|
|
6306
7411
|
return {
|
|
6307
7412
|
subscribeFeatureUserUsage: () => () => {
|
|
6308
7413
|
},
|
|
6309
7414
|
featureUserUsage: () => pendingUserUsage,
|
|
7415
|
+
subscribeCreditUserUsage: () => () => {
|
|
7416
|
+
},
|
|
7417
|
+
creditUserUsage: () => pendingCreditUsage,
|
|
6310
7418
|
subscribe: () => () => {
|
|
6311
7419
|
},
|
|
6312
7420
|
handle: (name) => {
|
|
@@ -6332,7 +7440,7 @@ function staticSource(data) {
|
|
|
6332
7440
|
}
|
|
6333
7441
|
|
|
6334
7442
|
// src/version.ts
|
|
6335
|
-
var version2 = "1.
|
|
7443
|
+
var version2 = "1.13.0";
|
|
6336
7444
|
|
|
6337
7445
|
// src/context/schematic.tsx
|
|
6338
7446
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
@@ -6595,6 +7703,9 @@ export {
|
|
|
6595
7703
|
UsagePeriod,
|
|
6596
7704
|
normalizeInvoiceQuery2 as normalizeInvoiceQuery,
|
|
6597
7705
|
useBillingDataSource,
|
|
7706
|
+
useCompany,
|
|
7707
|
+
useCreditBalances,
|
|
7708
|
+
useCreditUserUsage,
|
|
6598
7709
|
useFeatureUsage,
|
|
6599
7710
|
useFeatureUserUsage,
|
|
6600
7711
|
useInvalidateBillingData,
|