taxtank-core 0.30.11 → 0.30.13
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/esm2020/lib/collections/subscription/service-subscription.collection.mjs +6 -5
- package/esm2020/lib/models/endpoint/endpoints.const.mjs +2 -2
- package/fesm2015/taxtank-core.mjs +6 -4
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +5 -4
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/subscription/service-subscription.collection.d.ts +2 -3
- package/package.json +1 -1
|
@@ -5740,11 +5740,12 @@ class ServiceSubscriptionCollection extends Collection {
|
|
|
5740
5740
|
return new SubscriptionItemCollection(flatten(this.mapBy('items')));
|
|
5741
5741
|
}
|
|
5742
5742
|
groupByProduct(products) {
|
|
5743
|
-
const
|
|
5743
|
+
const dictionary = new Dictionary([]);
|
|
5744
5744
|
products.toArray().forEach((product) => {
|
|
5745
|
-
|
|
5745
|
+
const subscriptions = this.filterByProduct(product);
|
|
5746
|
+
dictionary.add(product.id, (subscriptions.getPaid().first ?? subscriptions.getTrials().first));
|
|
5746
5747
|
});
|
|
5747
|
-
return
|
|
5748
|
+
return dictionary;
|
|
5748
5749
|
}
|
|
5749
5750
|
findByProduct(product) {
|
|
5750
5751
|
return this.find((subscription) => {
|
|
@@ -8326,7 +8327,7 @@ const ENDPOINTS = {
|
|
|
8326
8327
|
PROPERTIES_POST: new Endpoint('POST', '\\/properties'),
|
|
8327
8328
|
PROPERTY_PUT: new Endpoint('PUT', '\\/properties/\\d+'),
|
|
8328
8329
|
PROPERTY_SUBSCRIPTIONS_DELETE: new Endpoint('DELETE', '\\/property-subscriptions\\/\\d+'),
|
|
8329
|
-
|
|
8330
|
+
PROPERTY_SUBSCRIPTIONS_POST: new Endpoint('POST', '\\/property-subscriptions'),
|
|
8330
8331
|
PROPERTIES_PUT: new Endpoint('PUT', '\\/properties'),
|
|
8331
8332
|
PROPERTIES_CATEGORIES_EQUITY_GET: new Endpoint('GET', '\\/properties\\/categories\\/equity'),
|
|
8332
8333
|
PROPERTIES_CATEGORIES_GET: new Endpoint('GET', '\\/properties\\/categories'),
|