@repobit/dex-store 1.3.39 → 1.3.41
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.3.41](https://github.com/bitdefender/dex-core/compare/@repobit/dex-store@1.3.40...@repobit/dex-store@1.3.41) (2026-06-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @repobit/dex-store
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.3.40](https://github.com/bitdefender/dex-core/compare/@repobit/dex-store@1.3.39...@repobit/dex-store@1.3.40) (2026-06-08)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **DEX-27633:** update platform ID retrieval in ProductLoadedEvent and VlaicuProvider
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
## [1.3.39](https://github.com/bitdefender/dex-core/compare/@repobit/dex-store@1.3.38...@repobit/dex-store@1.3.39) (2026-06-05)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @repobit/dex-store
|
|
@@ -44,7 +44,7 @@ export class VlaicuProvider extends Provider {
|
|
|
44
44
|
campaignType: fetchResponse.campaignType || '',
|
|
45
45
|
buyLinkBaseUrl: fetchResponse.buyLinkBaseUrl,
|
|
46
46
|
currency,
|
|
47
|
-
platformId: fetchResponse.platformProductId,
|
|
47
|
+
platformId: fetchResponse.platformProductId || fetchResponse.product.productId,
|
|
48
48
|
options
|
|
49
49
|
}
|
|
50
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.vlaicu.js","sourceRoot":"","sources":["../../../src/providers/provider.vlaicu.ts"],"names":[],"mappings":"AACA,OAAO,EAA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OAAO;gBACxC,kBAAkB,EAAK,SAAS,CAAC,kBAAkB;gBACnD,iBAAiB,EAAM,SAAS,CAAC,iBAAiB;gBAClD,MAAM,EAAiB,SAAS,CAAC,MAAM;gBACvC,qBAAqB,EAAE,SAAS,CAAC,qBAAqB;gBACtD,MAAM,EAAiB,EAAE;aAC1B,CAAC;YAEF,uBAAuB;YACvB,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YAE9B,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAC/B,CAAC;CACF","sourcesContent":["import { Product, UnboundProductData, UnboundProductOptionData } from \"@/products/product.base.js\";\nimport { VlaicuProduct } from \"@/products/product.vlaicu.js\";\nimport { STORE_LOCALE } from \"@/store.constants\";\nimport type { Locale, ProductSelector } from \"@/store.js\";\nimport { FetchedProduct, INGNORE_CAMPAIGN, Provider, ProviderData } from \"./provider.base.js\";\n\nexport interface FetchResponse {\n code : number;\n message : string;\n campaign : string;\n campaignType : string;\n platformProductId : string;\n buyLinkBaseUrl? : string;\n verifoneProductCode: string;\n product : ProductData;\n}\n\nexport interface ProductData {\n productId : string;\n productName : string;\n buyLinkBaseUrl?: string;\n options : OptionData[];\n}\n\nexport interface OptionData {\n slots : number;\n months : number;\n currency : string;\n price : number;\n discountedPrice : number;\n discountAmount : number;\n discountPercentage : number;\n buyLink : string;\n verifoneOptionCode? : string;\n verifoneProductId? : string;\n coupon? : string;\n checkoutPaymentPeriod?: string;\n optionCode? : string\n}\nexport class VlaicuProvider extends Provider {\n constructor(param: ProviderData) {\n super(param)\n }\n\n protected _getProduct(product: UnboundProductData | undefined): Product | undefined {\n return product ? new VlaicuProduct({ ...product, store: this.store }) : product;\n }\n\n async fetch({ id, campaign }: ProductSelector): Promise<FetchedProduct | undefined> {\n const adaptedId = (await this.adaptTo({ id })).id;\n const computedCampaign = await this.getCampaign(adaptedId, campaign)\n const apiURL = this.buildApiURL(adaptedId, this.store[STORE_LOCALE], computedCampaign);\n\n let fetchResponse: FetchResponse;\n try {\n const response = await fetch(apiURL.href, {\n method : \"get\",\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n\n if (!response.ok) return undefined;\n\n fetchResponse = await response.json();\n } catch (error) {\n console.error(\"Failed to fetch product:\", error);\n return undefined;\n }\n\n // Process variations into option data.\n const { options, currency } = await this.processVariations(\n adaptedId,\n fetchResponse.product.options\n );\n\n // Return an UnboundProductData.\n return {\n overrides: {\n oldCampaign: campaign,\n newCampaign: computedCampaign\n },\n product: {\n id : adaptedId,\n alias : id,\n name : fetchResponse.product.productName,\n campaign : computedCampaign || fetchResponse.campaign,\n campaignType : fetchResponse.campaignType || '',\n buyLinkBaseUrl: fetchResponse.buyLinkBaseUrl,\n currency,\n platformId : fetchResponse.platformProductId || fetchResponse.product.productId,\n options\n }\n }\n }\n\n private buildApiURL(id: string, locale: Locale, campaign?: string): URL {\n const apiParams = [\"products\", id, \"locale\", locale];\n if (campaign) {\n apiParams.push(\"campaign\", INGNORE_CAMPAIGN.includes(String(campaign)) ? \"null\" : campaign);\n }\n const url = new URL(`https://www.bitdefender.com/p-api/v1/${apiParams.join(\"/\")}`);\n return url;\n }\n\n private async processVariations(\n id: string,\n variations: OptionData[]\n ): Promise<{ options: Map<string, UnboundProductOptionData>; currency: string }> {\n const options = new Map<string, UnboundProductOptionData>();\n let currency = \"\";\n\n // Loop through devices and subscriptions.\n for (const variation of variations) {\n const variationData: UnboundProductOptionData = {\n devices : variation.slots,\n subscription : variation.months,\n price : Number(variation.price),\n discountedPrice : Number(variation.price === variation.discountedPrice ? NaN : variation.discountedPrice),\n buyLink : variation.buyLink,\n verifoneOptionCode : variation.verifoneOptionCode,\n verifoneProductId : variation.verifoneProductId,\n coupon : variation.coupon,\n checkoutPaymentPeriod: variation.checkoutPaymentPeriod,\n bundle : []\n };\n\n // Capture common info.\n currency = variation.currency;\n\n options.set(`${variation.slots}-${variation.months}`, variationData);\n }\n return { options, currency };\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-store",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.41",
|
|
4
4
|
"description": "Client for pricing API",
|
|
5
5
|
"author": "Buga Adrian Alexandru <abuga@bitdefender.com>",
|
|
6
6
|
"homepage": "https://github.com/bitdefender/dex-core#readme",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"node": "24.14.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@repobit/dex-constants": "2.1.
|
|
42
|
+
"@repobit/dex-constants": "2.1.28"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "4190c326ac7c927733f43d087aa910585d4bf39c"
|
|
45
45
|
}
|