Skip to content

Commit f1af4b0

Browse files
committed
[Auto Generated] 3.16.1
1 parent d9c4644 commit f1af4b0

15 files changed

+1117
-24
lines changed

CHANGELOG.md

Lines changed: 512 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
234234
The above code will log the curl command in the console
235235

236236
```bash
237-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.16.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
237+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.16.1' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
238238
Active Theme: Emerge
239239
```
240240

dist/application.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gofynd/fdk-client-javascript",
3-
"version": "3.16.0",
3+
"version": "3.16.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

sdk/platform/Cart/CartPlatformModel.d.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,14 +1206,20 @@ export = CartPlatformModel;
12061206
*/
12071207
/**
12081208
* @typedef ProductPrice
1209-
* @property {number} [marked] - Maximum price of the product
1209+
* @property {number} [marked] - Original MRP of product.
12101210
* @property {number} [add_on] - Price before promotion and coupon amount
12111211
* applied for calculation
12121212
* @property {string} [currency_code] - Currency code of the price defined for the product
12131213
* @property {string} [currency_symbol] - Currency symbol of the price defined
12141214
* for the product
1215-
* @property {number} [effective] - Selling price of the product
1215+
* @property {number} [effective] - Price of the product after applying
1216+
* inventory discount and before applying promotion, coupon and engage discount.
12161217
* @property {number} [selling] - Selling price of the product
1218+
* @property {number} [final_price] - Final price of the product in cart after
1219+
* applying all discounts such as promotion, coupon and engage discount."
1220+
* @property {number} [discount] - Net discount applied on product, contains
1221+
* total discount amount including promotions, coupons and engage discount
1222+
* [excluding inventory discount].
12171223
*/
12181224
/**
12191225
* @typedef ProductPriceInfo
@@ -5507,7 +5513,7 @@ type CouponDetails = {
55075513
declare function ProductPrice(): ProductPrice;
55085514
type ProductPrice = {
55095515
/**
5510-
* - Maximum price of the product
5516+
* - Original MRP of product.
55115517
*/
55125518
marked?: number;
55135519
/**
@@ -5525,13 +5531,25 @@ type ProductPrice = {
55255531
*/
55265532
currency_symbol?: string;
55275533
/**
5528-
* - Selling price of the product
5534+
* - Price of the product after applying
5535+
* inventory discount and before applying promotion, coupon and engage discount.
55295536
*/
55305537
effective?: number;
55315538
/**
55325539
* - Selling price of the product
55335540
*/
55345541
selling?: number;
5542+
/**
5543+
* - Final price of the product in cart after
5544+
* applying all discounts such as promotion, coupon and engage discount."
5545+
*/
5546+
final_price?: number;
5547+
/**
5548+
* - Net discount applied on product, contains
5549+
* total discount amount including promotions, coupons and engage discount
5550+
* [excluding inventory discount].
5551+
*/
5552+
discount?: number;
55355553
};
55365554
/** @returns {ProductPriceInfo} */
55375555
declare function ProductPriceInfo(): ProductPriceInfo;

sdk/platform/Cart/CartPlatformModel.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,14 +1315,20 @@ const Joi = require("joi");
13151315

13161316
/**
13171317
* @typedef ProductPrice
1318-
* @property {number} [marked] - Maximum price of the product
1318+
* @property {number} [marked] - Original MRP of product.
13191319
* @property {number} [add_on] - Price before promotion and coupon amount
13201320
* applied for calculation
13211321
* @property {string} [currency_code] - Currency code of the price defined for the product
13221322
* @property {string} [currency_symbol] - Currency symbol of the price defined
13231323
* for the product
1324-
* @property {number} [effective] - Selling price of the product
1324+
* @property {number} [effective] - Price of the product after applying
1325+
* inventory discount and before applying promotion, coupon and engage discount.
13251326
* @property {number} [selling] - Selling price of the product
1327+
* @property {number} [final_price] - Final price of the product in cart after
1328+
* applying all discounts such as promotion, coupon and engage discount."
1329+
* @property {number} [discount] - Net discount applied on product, contains
1330+
* total discount amount including promotions, coupons and engage discount
1331+
* [excluding inventory discount].
13261332
*/
13271333

13281334
/**
@@ -4113,6 +4119,8 @@ class CartPlatformModel {
41134119
currency_symbol: Joi.string().allow(""),
41144120
effective: Joi.number(),
41154121
selling: Joi.number(),
4122+
final_price: Joi.number(),
4123+
discount: Joi.number(),
41164124
});
41174125
}
41184126

sdk/platform/Content/ContentPlatformApplicationClient.d.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ declare class Content {
757757
* @summary: Get all HTML tags
758758
* @description: Retrieve a list of injectable tags. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getInjectableTags/).
759759
*/
760-
getInjectableTags({ all, requestHeaders }?: ContentPlatformApplicationValidator.GetInjectableTagsParam, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsSchema>;
760+
getInjectableTags({ all, pageNo, pageSize, search, requestHeaders }?: ContentPlatformApplicationValidator.GetInjectableTagsParam, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsSchema>;
761761
/**
762762
* @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object
763763
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -914,6 +914,16 @@ declare class Content {
914914
* @description: Retrieve information related to customer support. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getSupportInformation/).
915915
*/
916916
getSupportInformation({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ContentPlatformModel.Support>;
917+
/**
918+
* @param {ContentPlatformApplicationValidator.GetTagsTemplateParam} arg - Arg object
919+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
920+
* @param {import("../PlatformAPIClient").Options} - Options
921+
* @returns {Promise<ContentPlatformModel.TagsTemplateSchema>} - Success response
922+
* @name getTagsTemplate
923+
* @summary: Get Script Tags Templates
924+
* @description: Retrieve the available script tag templates - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getTagsTemplate/).
925+
*/
926+
getTagsTemplate({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsTemplateSchema>;
917927
/**
918928
* @param {ContentPlatformApplicationValidator.GetTranslateUILabelsParam} arg
919929
* - Arg object

sdk/platform/Content/ContentPlatformApplicationClient.js

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5207,14 +5207,17 @@ class Content {
52075207
* @description: Retrieve a list of injectable tags. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getInjectableTags/).
52085208
*/
52095209
async getInjectableTags(
5210-
{ all, requestHeaders } = { requestHeaders: {} },
5210+
{ all, pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} },
52115211
{ responseHeaders } = { responseHeaders: false }
52125212
) {
52135213
const {
52145214
error,
52155215
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
52165216
{
52175217
all,
5218+
pageNo,
5219+
pageSize,
5220+
search,
52185221
},
52195222
{ abortEarly: false, allowUnknown: true }
52205223
);
@@ -5228,6 +5231,9 @@ class Content {
52285231
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
52295232
{
52305233
all,
5234+
pageNo,
5235+
pageSize,
5236+
search,
52315237
},
52325238
{ abortEarly: false, allowUnknown: false }
52335239
);
@@ -5240,6 +5246,9 @@ class Content {
52405246

52415247
const query_params = {};
52425248
query_params["all"] = all;
5249+
query_params["page_no"] = pageNo;
5250+
query_params["page_size"] = pageSize;
5251+
query_params["search"] = search;
52435252

52445253
const response = await PlatformAPIClient.execute(
52455254
this.config,
@@ -6413,6 +6422,81 @@ class Content {
64136422
return response;
64146423
}
64156424

6425+
/**
6426+
* @param {ContentPlatformApplicationValidator.GetTagsTemplateParam} arg - Arg object
6427+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6428+
* @param {import("../PlatformAPIClient").Options} - Options
6429+
* @returns {Promise<ContentPlatformModel.TagsTemplateSchema>} - Success response
6430+
* @name getTagsTemplate
6431+
* @summary: Get Script Tags Templates
6432+
* @description: Retrieve the available script tag templates - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getTagsTemplate/).
6433+
*/
6434+
async getTagsTemplate(
6435+
{ requestHeaders } = { requestHeaders: {} },
6436+
{ responseHeaders } = { responseHeaders: false }
6437+
) {
6438+
const {
6439+
error,
6440+
} = ContentPlatformApplicationValidator.getTagsTemplate().validate(
6441+
{},
6442+
{ abortEarly: false, allowUnknown: true }
6443+
);
6444+
if (error) {
6445+
return Promise.reject(new FDKClientValidationError(error));
6446+
}
6447+
6448+
// Showing warrnings if extra unknown parameters are found
6449+
const {
6450+
error: warrning,
6451+
} = ContentPlatformApplicationValidator.getTagsTemplate().validate(
6452+
{},
6453+
{ abortEarly: false, allowUnknown: false }
6454+
);
6455+
if (warrning) {
6456+
Logger({
6457+
level: "WARN",
6458+
message: `Parameter Validation warrnings for platform > Content > getTagsTemplate \n ${warrning}`,
6459+
});
6460+
}
6461+
6462+
const query_params = {};
6463+
6464+
const response = await PlatformAPIClient.execute(
6465+
this.config,
6466+
"get",
6467+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags/templates`,
6468+
query_params,
6469+
undefined,
6470+
requestHeaders,
6471+
{ responseHeaders }
6472+
);
6473+
6474+
let responseData = response;
6475+
if (responseHeaders) {
6476+
responseData = response[0];
6477+
}
6478+
6479+
const {
6480+
error: res_error,
6481+
} = ContentPlatformModel.TagsTemplateSchema().validate(responseData, {
6482+
abortEarly: false,
6483+
allowUnknown: true,
6484+
});
6485+
6486+
if (res_error) {
6487+
if (this.config.options.strictResponseCheck === true) {
6488+
return Promise.reject(new FDKResponseValidationError(res_error));
6489+
} else {
6490+
Logger({
6491+
level: "WARN",
6492+
message: `Response Validation Warnings for platform > Content > getTagsTemplate \n ${res_error}`,
6493+
});
6494+
}
6495+
}
6496+
6497+
return response;
6498+
}
6499+
64166500
/**
64176501
* @param {ContentPlatformApplicationValidator.GetTranslateUILabelsParam} arg
64186502
* - Arg object

0 commit comments

Comments
 (0)