@gofynd/fdk-client-javascript 1.5.2 → 1.6.1
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/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +293 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
- package/sdk/application/Common/CommonApplicationClient.js +21 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
- package/sdk/application/Content/ContentApplicationClient.js +226 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +192 -3
- package/sdk/application/Order/OrderApplicationClient.js +202 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +454 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
- package/sdk/application/User/UserApplicationClient.js +412 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +75 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +6 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +16 -3
- package/sdk/partner/Webhook/WebhookPartnerModel.js +5 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +46 -23
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -23
- package/sdk/platform/Cart/CartPlatformModel.d.ts +90 -1
- package/sdk/platform/Cart/CartPlatformModel.js +51 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -81
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +82 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +10 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +108 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +77 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -14
- package/sdk/platform/Webhook/WebhookPlatformModel.js +15 -14
- package/sdk/public/Catalog/CatalogPublicClient.js +15 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +116 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
- package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
|
@@ -1434,6 +1434,19 @@ export = CartPlatformModel;
|
|
|
1434
1434
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
1435
1435
|
* added. True if only few are added.
|
|
1436
1436
|
* @property {string} [message] - Message of add cart API response
|
|
1437
|
+
* @property {Object} [result] - Add to cart result data
|
|
1438
|
+
* @property {CartItemInfo[]} [items] - List of items that needs to be added in cart.
|
|
1439
|
+
*/
|
|
1440
|
+
/**
|
|
1441
|
+
* @typedef CartItemInfo
|
|
1442
|
+
* @property {number} [item_id] - Item id of the product that needs to be
|
|
1443
|
+
* added/updated/removed.
|
|
1444
|
+
* @property {string} [size] - Item size of the product that needs to be
|
|
1445
|
+
* added/updated/removed.
|
|
1446
|
+
* @property {number} [store_id] - Unique identifier of the store selected by
|
|
1447
|
+
* the user from which user want to buy a product.
|
|
1448
|
+
* @property {boolean} [success] - True if items are added/updated/removed successfully.
|
|
1449
|
+
* @property {string} [message] - Message for added/updated/removed item.
|
|
1437
1450
|
*/
|
|
1438
1451
|
/**
|
|
1439
1452
|
* @typedef UpdateProductCart
|
|
@@ -1468,6 +1481,8 @@ export = CartPlatformModel;
|
|
|
1468
1481
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1469
1482
|
* False if partially added or not added.
|
|
1470
1483
|
* @property {CartDetailResult} [cart]
|
|
1484
|
+
* @property {Object} [result] - Contains article related result info
|
|
1485
|
+
* @property {CartItemInfo[]} [items] - List of items that needs to be updated in cart.
|
|
1471
1486
|
* @property {string} [message] - Message of update cart API response
|
|
1472
1487
|
*/
|
|
1473
1488
|
/**
|
|
@@ -1935,6 +1950,11 @@ export = CartPlatformModel;
|
|
|
1935
1950
|
* @property {string} key - Key name of custom meta
|
|
1936
1951
|
* @property {string} value - Value to be added in key
|
|
1937
1952
|
*/
|
|
1953
|
+
/**
|
|
1954
|
+
* @typedef OrderTag
|
|
1955
|
+
* @property {string} [display_text] - Display text for order tag
|
|
1956
|
+
* @property {string} [slug] - Slug to be used for tagging order with any unique value
|
|
1957
|
+
*/
|
|
1938
1958
|
/**
|
|
1939
1959
|
* @typedef PlatformCartCheckoutDetailCreation
|
|
1940
1960
|
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
@@ -1972,6 +1992,8 @@ export = CartPlatformModel;
|
|
|
1972
1992
|
* redirected after payment received
|
|
1973
1993
|
* @property {string} [failure_callback_url] - Failure callback url to be
|
|
1974
1994
|
* redirected after payment failed
|
|
1995
|
+
* @property {OrderTag[]} [order_tags] - Order tags used to identify specific
|
|
1996
|
+
* type of order which is tagged using order tags
|
|
1975
1997
|
*/
|
|
1976
1998
|
/**
|
|
1977
1999
|
* @typedef CheckCart
|
|
@@ -2174,6 +2196,8 @@ export = CartPlatformModel;
|
|
|
2174
2196
|
* redirected after payment received
|
|
2175
2197
|
* @property {string} [failure_callback_url] - Failure callback url to be
|
|
2176
2198
|
* redirected after payment failed
|
|
2199
|
+
* @property {OrderTag[]} [order_tags] - Order tags used to identify specific
|
|
2200
|
+
* type of order which is tagged using order tags
|
|
2177
2201
|
*/
|
|
2178
2202
|
/**
|
|
2179
2203
|
* @typedef UpdateCartPaymentRequestV2
|
|
@@ -2266,7 +2290,7 @@ export = CartPlatformModel;
|
|
|
2266
2290
|
declare class CartPlatformModel {
|
|
2267
2291
|
}
|
|
2268
2292
|
declare namespace CartPlatformModel {
|
|
2269
|
-
export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError };
|
|
2293
|
+
export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, CartItemInfo, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, OrderTag, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError };
|
|
2270
2294
|
}
|
|
2271
2295
|
/** @returns {CouponDateMeta} */
|
|
2272
2296
|
declare function CouponDateMeta(): CouponDateMeta;
|
|
@@ -5863,6 +5887,41 @@ type AddCartDetailResult = {
|
|
|
5863
5887
|
* - Message of add cart API response
|
|
5864
5888
|
*/
|
|
5865
5889
|
message?: string;
|
|
5890
|
+
/**
|
|
5891
|
+
* - Add to cart result data
|
|
5892
|
+
*/
|
|
5893
|
+
result?: any;
|
|
5894
|
+
/**
|
|
5895
|
+
* - List of items that needs to be added in cart.
|
|
5896
|
+
*/
|
|
5897
|
+
items?: CartItemInfo[];
|
|
5898
|
+
};
|
|
5899
|
+
/** @returns {CartItemInfo} */
|
|
5900
|
+
declare function CartItemInfo(): CartItemInfo;
|
|
5901
|
+
type CartItemInfo = {
|
|
5902
|
+
/**
|
|
5903
|
+
* - Item id of the product that needs to be
|
|
5904
|
+
* added/updated/removed.
|
|
5905
|
+
*/
|
|
5906
|
+
item_id?: number;
|
|
5907
|
+
/**
|
|
5908
|
+
* - Item size of the product that needs to be
|
|
5909
|
+
* added/updated/removed.
|
|
5910
|
+
*/
|
|
5911
|
+
size?: string;
|
|
5912
|
+
/**
|
|
5913
|
+
* - Unique identifier of the store selected by
|
|
5914
|
+
* the user from which user want to buy a product.
|
|
5915
|
+
*/
|
|
5916
|
+
store_id?: number;
|
|
5917
|
+
/**
|
|
5918
|
+
* - True if items are added/updated/removed successfully.
|
|
5919
|
+
*/
|
|
5920
|
+
success?: boolean;
|
|
5921
|
+
/**
|
|
5922
|
+
* - Message for added/updated/removed item.
|
|
5923
|
+
*/
|
|
5924
|
+
message?: string;
|
|
5866
5925
|
};
|
|
5867
5926
|
/** @returns {UpdateProductCart} */
|
|
5868
5927
|
declare function UpdateProductCart(): UpdateProductCart;
|
|
@@ -5946,6 +6005,14 @@ type UpdateCartDetailResult = {
|
|
|
5946
6005
|
*/
|
|
5947
6006
|
success?: boolean;
|
|
5948
6007
|
cart?: CartDetailResult;
|
|
6008
|
+
/**
|
|
6009
|
+
* - Contains article related result info
|
|
6010
|
+
*/
|
|
6011
|
+
result?: any;
|
|
6012
|
+
/**
|
|
6013
|
+
* - List of items that needs to be updated in cart.
|
|
6014
|
+
*/
|
|
6015
|
+
items?: CartItemInfo[];
|
|
5949
6016
|
/**
|
|
5950
6017
|
* - Message of update cart API response
|
|
5951
6018
|
*/
|
|
@@ -7149,6 +7216,18 @@ type CartCheckoutCustomMeta = {
|
|
|
7149
7216
|
*/
|
|
7150
7217
|
value: string;
|
|
7151
7218
|
};
|
|
7219
|
+
/** @returns {OrderTag} */
|
|
7220
|
+
declare function OrderTag(): OrderTag;
|
|
7221
|
+
type OrderTag = {
|
|
7222
|
+
/**
|
|
7223
|
+
* - Display text for order tag
|
|
7224
|
+
*/
|
|
7225
|
+
display_text?: string;
|
|
7226
|
+
/**
|
|
7227
|
+
* - Slug to be used for tagging order with any unique value
|
|
7228
|
+
*/
|
|
7229
|
+
slug?: string;
|
|
7230
|
+
};
|
|
7152
7231
|
/** @returns {PlatformCartCheckoutDetailCreation} */
|
|
7153
7232
|
declare function PlatformCartCheckoutDetailCreation(): PlatformCartCheckoutDetailCreation;
|
|
7154
7233
|
type PlatformCartCheckoutDetailCreation = {
|
|
@@ -7199,6 +7278,11 @@ type PlatformCartCheckoutDetailCreation = {
|
|
|
7199
7278
|
* redirected after payment failed
|
|
7200
7279
|
*/
|
|
7201
7280
|
failure_callback_url?: string;
|
|
7281
|
+
/**
|
|
7282
|
+
* - Order tags used to identify specific
|
|
7283
|
+
* type of order which is tagged using order tags
|
|
7284
|
+
*/
|
|
7285
|
+
order_tags?: OrderTag[];
|
|
7202
7286
|
};
|
|
7203
7287
|
/** @returns {CheckCart} */
|
|
7204
7288
|
declare function CheckCart(): CheckCart;
|
|
@@ -7737,6 +7821,11 @@ type PlatformCartCheckoutDetailV2Creation = {
|
|
|
7737
7821
|
* redirected after payment failed
|
|
7738
7822
|
*/
|
|
7739
7823
|
failure_callback_url?: string;
|
|
7824
|
+
/**
|
|
7825
|
+
* - Order tags used to identify specific
|
|
7826
|
+
* type of order which is tagged using order tags
|
|
7827
|
+
*/
|
|
7828
|
+
order_tags?: OrderTag[];
|
|
7740
7829
|
};
|
|
7741
7830
|
/** @returns {UpdateCartPaymentRequestV2} */
|
|
7742
7831
|
declare function UpdateCartPaymentRequestV2(): UpdateCartPaymentRequestV2;
|
|
@@ -1566,6 +1566,20 @@ const Joi = require("joi");
|
|
|
1566
1566
|
* @property {boolean} [partial] - When adding multiple items check if all
|
|
1567
1567
|
* added. True if only few are added.
|
|
1568
1568
|
* @property {string} [message] - Message of add cart API response
|
|
1569
|
+
* @property {Object} [result] - Add to cart result data
|
|
1570
|
+
* @property {CartItemInfo[]} [items] - List of items that needs to be added in cart.
|
|
1571
|
+
*/
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* @typedef CartItemInfo
|
|
1575
|
+
* @property {number} [item_id] - Item id of the product that needs to be
|
|
1576
|
+
* added/updated/removed.
|
|
1577
|
+
* @property {string} [size] - Item size of the product that needs to be
|
|
1578
|
+
* added/updated/removed.
|
|
1579
|
+
* @property {number} [store_id] - Unique identifier of the store selected by
|
|
1580
|
+
* the user from which user want to buy a product.
|
|
1581
|
+
* @property {boolean} [success] - True if items are added/updated/removed successfully.
|
|
1582
|
+
* @property {string} [message] - Message for added/updated/removed item.
|
|
1569
1583
|
*/
|
|
1570
1584
|
|
|
1571
1585
|
/**
|
|
@@ -1604,6 +1618,8 @@ const Joi = require("joi");
|
|
|
1604
1618
|
* @property {boolean} [success] - True if all items are added successfully.
|
|
1605
1619
|
* False if partially added or not added.
|
|
1606
1620
|
* @property {CartDetailResult} [cart]
|
|
1621
|
+
* @property {Object} [result] - Contains article related result info
|
|
1622
|
+
* @property {CartItemInfo[]} [items] - List of items that needs to be updated in cart.
|
|
1607
1623
|
* @property {string} [message] - Message of update cart API response
|
|
1608
1624
|
*/
|
|
1609
1625
|
|
|
@@ -2115,6 +2131,12 @@ const Joi = require("joi");
|
|
|
2115
2131
|
* @property {string} value - Value to be added in key
|
|
2116
2132
|
*/
|
|
2117
2133
|
|
|
2134
|
+
/**
|
|
2135
|
+
* @typedef OrderTag
|
|
2136
|
+
* @property {string} [display_text] - Display text for order tag
|
|
2137
|
+
* @property {string} [slug] - Slug to be used for tagging order with any unique value
|
|
2138
|
+
*/
|
|
2139
|
+
|
|
2118
2140
|
/**
|
|
2119
2141
|
* @typedef PlatformCartCheckoutDetailCreation
|
|
2120
2142
|
* @property {CartCheckoutCustomMeta[]} [custom_meta]
|
|
@@ -2152,6 +2174,8 @@ const Joi = require("joi");
|
|
|
2152
2174
|
* redirected after payment received
|
|
2153
2175
|
* @property {string} [failure_callback_url] - Failure callback url to be
|
|
2154
2176
|
* redirected after payment failed
|
|
2177
|
+
* @property {OrderTag[]} [order_tags] - Order tags used to identify specific
|
|
2178
|
+
* type of order which is tagged using order tags
|
|
2155
2179
|
*/
|
|
2156
2180
|
|
|
2157
2181
|
/**
|
|
@@ -2366,6 +2390,8 @@ const Joi = require("joi");
|
|
|
2366
2390
|
* redirected after payment received
|
|
2367
2391
|
* @property {string} [failure_callback_url] - Failure callback url to be
|
|
2368
2392
|
* redirected after payment failed
|
|
2393
|
+
* @property {OrderTag[]} [order_tags] - Order tags used to identify specific
|
|
2394
|
+
* type of order which is tagged using order tags
|
|
2369
2395
|
*/
|
|
2370
2396
|
|
|
2371
2397
|
/**
|
|
@@ -4112,6 +4138,19 @@ class CartPlatformModel {
|
|
|
4112
4138
|
cart: CartPlatformModel.CartDetailResult(),
|
|
4113
4139
|
partial: Joi.boolean(),
|
|
4114
4140
|
message: Joi.string().allow(""),
|
|
4141
|
+
result: Joi.object().pattern(/\S/, Joi.any()),
|
|
4142
|
+
items: Joi.array().items(CartPlatformModel.CartItemInfo()),
|
|
4143
|
+
});
|
|
4144
|
+
}
|
|
4145
|
+
|
|
4146
|
+
/** @returns {CartItemInfo} */
|
|
4147
|
+
static CartItemInfo() {
|
|
4148
|
+
return Joi.object({
|
|
4149
|
+
item_id: Joi.number(),
|
|
4150
|
+
size: Joi.string().allow(""),
|
|
4151
|
+
store_id: Joi.number(),
|
|
4152
|
+
success: Joi.boolean(),
|
|
4153
|
+
message: Joi.string().allow(""),
|
|
4115
4154
|
});
|
|
4116
4155
|
}
|
|
4117
4156
|
|
|
@@ -4156,6 +4195,8 @@ class CartPlatformModel {
|
|
|
4156
4195
|
return Joi.object({
|
|
4157
4196
|
success: Joi.boolean(),
|
|
4158
4197
|
cart: CartPlatformModel.CartDetailResult(),
|
|
4198
|
+
result: Joi.object().pattern(/\S/, Joi.any()),
|
|
4199
|
+
items: Joi.array().items(CartPlatformModel.CartItemInfo()),
|
|
4159
4200
|
message: Joi.string().allow(""),
|
|
4160
4201
|
});
|
|
4161
4202
|
}
|
|
@@ -4678,6 +4719,14 @@ class CartPlatformModel {
|
|
|
4678
4719
|
});
|
|
4679
4720
|
}
|
|
4680
4721
|
|
|
4722
|
+
/** @returns {OrderTag} */
|
|
4723
|
+
static OrderTag() {
|
|
4724
|
+
return Joi.object({
|
|
4725
|
+
display_text: Joi.string().allow(""),
|
|
4726
|
+
slug: Joi.string().allow(""),
|
|
4727
|
+
});
|
|
4728
|
+
}
|
|
4729
|
+
|
|
4681
4730
|
/** @returns {PlatformCartCheckoutDetailCreation} */
|
|
4682
4731
|
static PlatformCartCheckoutDetailCreation() {
|
|
4683
4732
|
return Joi.object({
|
|
@@ -4716,6 +4765,7 @@ class CartPlatformModel {
|
|
|
4716
4765
|
card_id: Joi.string().allow(""),
|
|
4717
4766
|
success_callback_url: Joi.string().allow("").allow(null),
|
|
4718
4767
|
failure_callback_url: Joi.string().allow("").allow(null),
|
|
4768
|
+
order_tags: Joi.array().items(CartPlatformModel.OrderTag()),
|
|
4719
4769
|
});
|
|
4720
4770
|
}
|
|
4721
4771
|
|
|
@@ -4917,6 +4967,7 @@ class CartPlatformModel {
|
|
|
4917
4967
|
card_id: Joi.string().allow(""),
|
|
4918
4968
|
success_callback_url: Joi.string().allow("").allow(null),
|
|
4919
4969
|
failure_callback_url: Joi.string().allow("").allow(null),
|
|
4970
|
+
order_tags: Joi.array().items(CartPlatformModel.OrderTag()),
|
|
4920
4971
|
});
|
|
4921
4972
|
}
|
|
4922
4973
|
|
|
@@ -153,18 +153,6 @@ declare class Content {
|
|
|
153
153
|
* @description: Generate and add a new page to the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPage/).
|
|
154
154
|
*/
|
|
155
155
|
createPage({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreatePageParam, { responseHeaders }?: object): Promise<ContentPlatformModel.PageSchema>;
|
|
156
|
-
/**
|
|
157
|
-
* @param {ContentPlatformApplicationValidator.CreatePagePreviewParam} arg
|
|
158
|
-
* - Arg object
|
|
159
|
-
*
|
|
160
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
161
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
162
|
-
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
163
|
-
* @name createPagePreview
|
|
164
|
-
* @summary: Create page preview
|
|
165
|
-
* @description: Generate and add a new page preview. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/).
|
|
166
|
-
*/
|
|
167
|
-
createPagePreview({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreatePagePreviewParam, { responseHeaders }?: object): Promise<ContentPlatformModel.PageSchema>;
|
|
168
156
|
/**
|
|
169
157
|
* @param {ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam} arg
|
|
170
158
|
* - Arg object
|
|
@@ -1062,87 +1062,6 @@ class Content {
|
|
|
1062
1062
|
return response;
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
|
-
/**
|
|
1066
|
-
* @param {ContentPlatformApplicationValidator.CreatePagePreviewParam} arg
|
|
1067
|
-
* - Arg object
|
|
1068
|
-
*
|
|
1069
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1070
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1071
|
-
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
1072
|
-
* @name createPagePreview
|
|
1073
|
-
* @summary: Create page preview
|
|
1074
|
-
* @description: Generate and add a new page preview. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/).
|
|
1075
|
-
*/
|
|
1076
|
-
async createPagePreview(
|
|
1077
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1078
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1079
|
-
) {
|
|
1080
|
-
const {
|
|
1081
|
-
error,
|
|
1082
|
-
} = ContentPlatformApplicationValidator.createPagePreview().validate(
|
|
1083
|
-
{
|
|
1084
|
-
body,
|
|
1085
|
-
},
|
|
1086
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1087
|
-
);
|
|
1088
|
-
if (error) {
|
|
1089
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1093
|
-
const {
|
|
1094
|
-
error: warrning,
|
|
1095
|
-
} = ContentPlatformApplicationValidator.createPagePreview().validate(
|
|
1096
|
-
{
|
|
1097
|
-
body,
|
|
1098
|
-
},
|
|
1099
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1100
|
-
);
|
|
1101
|
-
if (warrning) {
|
|
1102
|
-
Logger({
|
|
1103
|
-
level: "WARN",
|
|
1104
|
-
message: `Parameter Validation warrnings for platform > Content > createPagePreview \n ${warrning}`,
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
const query_params = {};
|
|
1109
|
-
|
|
1110
|
-
const response = await PlatformAPIClient.execute(
|
|
1111
|
-
this.config,
|
|
1112
|
-
"post",
|
|
1113
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/preview/`,
|
|
1114
|
-
query_params,
|
|
1115
|
-
body,
|
|
1116
|
-
requestHeaders,
|
|
1117
|
-
{ responseHeaders }
|
|
1118
|
-
);
|
|
1119
|
-
|
|
1120
|
-
let responseData = response;
|
|
1121
|
-
if (responseHeaders) {
|
|
1122
|
-
responseData = response[0];
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
const {
|
|
1126
|
-
error: res_error,
|
|
1127
|
-
} = ContentPlatformModel.PageSchema().validate(responseData, {
|
|
1128
|
-
abortEarly: false,
|
|
1129
|
-
allowUnknown: true,
|
|
1130
|
-
});
|
|
1131
|
-
|
|
1132
|
-
if (res_error) {
|
|
1133
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1134
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1135
|
-
} else {
|
|
1136
|
-
Logger({
|
|
1137
|
-
level: "WARN",
|
|
1138
|
-
message: `Response Validation Warnings for platform > Content > createPagePreview \n ${res_error}`,
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
return response;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
1065
|
/**
|
|
1147
1066
|
* @param {ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam} arg
|
|
1148
1067
|
* - Arg object
|
|
@@ -54,10 +54,6 @@ export = ContentPlatformApplicationValidator;
|
|
|
54
54
|
* @typedef CreatePageParam
|
|
55
55
|
* @property {ContentPlatformModel.PagePayload} body
|
|
56
56
|
*/
|
|
57
|
-
/**
|
|
58
|
-
* @typedef CreatePagePreviewParam
|
|
59
|
-
* @property {ContentPlatformModel.PagePayload} body
|
|
60
|
-
*/
|
|
61
57
|
/**
|
|
62
58
|
* @typedef CreateSEOMarkupSchemaParam
|
|
63
59
|
* @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body
|
|
@@ -474,8 +470,6 @@ declare class ContentPlatformApplicationValidator {
|
|
|
474
470
|
static createNavigation(): CreateNavigationParam;
|
|
475
471
|
/** @returns {CreatePageParam} */
|
|
476
472
|
static createPage(): CreatePageParam;
|
|
477
|
-
/** @returns {CreatePagePreviewParam} */
|
|
478
|
-
static createPagePreview(): CreatePagePreviewParam;
|
|
479
473
|
/** @returns {CreateSEOMarkupSchemaParam} */
|
|
480
474
|
static createSEOMarkupSchema(): CreateSEOMarkupSchemaParam;
|
|
481
475
|
/** @returns {DeleteAnnouncementParam} */
|
|
@@ -638,7 +632,7 @@ declare class ContentPlatformApplicationValidator {
|
|
|
638
632
|
static updateSupportInformation(): UpdateSupportInformationParam;
|
|
639
633
|
}
|
|
640
634
|
declare namespace ContentPlatformApplicationValidator {
|
|
641
|
-
export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam,
|
|
635
|
+
export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreateSEOMarkupSchemaParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSupportInformationParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSupportInformationParam };
|
|
642
636
|
}
|
|
643
637
|
type AddDataLoaderParam = {
|
|
644
638
|
body: ContentPlatformModel.DataLoaderSchema;
|
|
@@ -685,9 +679,6 @@ type CreateNavigationParam = {
|
|
|
685
679
|
type CreatePageParam = {
|
|
686
680
|
body: ContentPlatformModel.PagePayload;
|
|
687
681
|
};
|
|
688
|
-
type CreatePagePreviewParam = {
|
|
689
|
-
body: ContentPlatformModel.PagePayload;
|
|
690
|
-
};
|
|
691
682
|
type CreateSEOMarkupSchemaParam = {
|
|
692
683
|
body: ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody;
|
|
693
684
|
};
|
|
@@ -70,11 +70,6 @@ const ContentPlatformModel = require("./ContentPlatformModel");
|
|
|
70
70
|
* @property {ContentPlatformModel.PagePayload} body
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
|
-
/**
|
|
74
|
-
* @typedef CreatePagePreviewParam
|
|
75
|
-
* @property {ContentPlatformModel.PagePayload} body
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
73
|
/**
|
|
79
74
|
* @typedef CreateSEOMarkupSchemaParam
|
|
80
75
|
* @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body
|
|
@@ -639,13 +634,6 @@ class ContentPlatformApplicationValidator {
|
|
|
639
634
|
}).required();
|
|
640
635
|
}
|
|
641
636
|
|
|
642
|
-
/** @returns {CreatePagePreviewParam} */
|
|
643
|
-
static createPagePreview() {
|
|
644
|
-
return Joi.object({
|
|
645
|
-
body: ContentPlatformModel.PagePayload().required(),
|
|
646
|
-
}).required();
|
|
647
|
-
}
|
|
648
|
-
|
|
649
637
|
/** @returns {CreateSEOMarkupSchemaParam} */
|
|
650
638
|
static createSEOMarkupSchema() {
|
|
651
639
|
return Joi.object({
|
|
@@ -603,6 +603,19 @@ declare class Payment {
|
|
|
603
603
|
* @description: Allows users to update the details of a refund session associated with a specific global identifier (GID) and request ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateRefundSession/).
|
|
604
604
|
*/
|
|
605
605
|
updateRefundSession({ gid, requestId, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateRefundSessionParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.RefundSessionDetails>;
|
|
606
|
+
/**
|
|
607
|
+
* @param {PaymentPlatformApplicationValidator.ValidateCustomerAndCreditSummaryParam} arg
|
|
608
|
+
* - Arg object
|
|
609
|
+
*
|
|
610
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
611
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
612
|
+
* @returns {Promise<PaymentPlatformModel.ValidateCustomerCreditSchema>} -
|
|
613
|
+
* Success response
|
|
614
|
+
* @name validateCustomerAndCreditSummary
|
|
615
|
+
* @summary: Verify payment customer and show credit summary
|
|
616
|
+
* @description: Verify if the user is eligible for payment and also show credit summary if activated. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/validateCustomerAndCreditSummary/).
|
|
617
|
+
*/
|
|
618
|
+
validateCustomerAndCreditSummary({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ValidateCustomerAndCreditSummaryParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.ValidateCustomerCreditSchema>;
|
|
606
619
|
/**
|
|
607
620
|
* @param {PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam} arg
|
|
608
621
|
* - Arg object
|
|
@@ -4122,6 +4122,88 @@ class Payment {
|
|
|
4122
4122
|
return response;
|
|
4123
4123
|
}
|
|
4124
4124
|
|
|
4125
|
+
/**
|
|
4126
|
+
* @param {PaymentPlatformApplicationValidator.ValidateCustomerAndCreditSummaryParam} arg
|
|
4127
|
+
* - Arg object
|
|
4128
|
+
*
|
|
4129
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4130
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4131
|
+
* @returns {Promise<PaymentPlatformModel.ValidateCustomerCreditSchema>} -
|
|
4132
|
+
* Success response
|
|
4133
|
+
* @name validateCustomerAndCreditSummary
|
|
4134
|
+
* @summary: Verify payment customer and show credit summary
|
|
4135
|
+
* @description: Verify if the user is eligible for payment and also show credit summary if activated. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/validateCustomerAndCreditSummary/).
|
|
4136
|
+
*/
|
|
4137
|
+
async validateCustomerAndCreditSummary(
|
|
4138
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4139
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4140
|
+
) {
|
|
4141
|
+
const {
|
|
4142
|
+
error,
|
|
4143
|
+
} = PaymentPlatformApplicationValidator.validateCustomerAndCreditSummary().validate(
|
|
4144
|
+
{
|
|
4145
|
+
body,
|
|
4146
|
+
},
|
|
4147
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4148
|
+
);
|
|
4149
|
+
if (error) {
|
|
4150
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4151
|
+
}
|
|
4152
|
+
|
|
4153
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4154
|
+
const {
|
|
4155
|
+
error: warrning,
|
|
4156
|
+
} = PaymentPlatformApplicationValidator.validateCustomerAndCreditSummary().validate(
|
|
4157
|
+
{
|
|
4158
|
+
body,
|
|
4159
|
+
},
|
|
4160
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4161
|
+
);
|
|
4162
|
+
if (warrning) {
|
|
4163
|
+
Logger({
|
|
4164
|
+
level: "WARN",
|
|
4165
|
+
message: `Parameter Validation warrnings for platform > Payment > validateCustomerAndCreditSummary \n ${warrning}`,
|
|
4166
|
+
});
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4169
|
+
const query_params = {};
|
|
4170
|
+
|
|
4171
|
+
const response = await PlatformAPIClient.execute(
|
|
4172
|
+
this.config,
|
|
4173
|
+
"post",
|
|
4174
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/validate/customer-credits`,
|
|
4175
|
+
query_params,
|
|
4176
|
+
body,
|
|
4177
|
+
requestHeaders,
|
|
4178
|
+
{ responseHeaders }
|
|
4179
|
+
);
|
|
4180
|
+
|
|
4181
|
+
let responseData = response;
|
|
4182
|
+
if (responseHeaders) {
|
|
4183
|
+
responseData = response[0];
|
|
4184
|
+
}
|
|
4185
|
+
|
|
4186
|
+
const {
|
|
4187
|
+
error: res_error,
|
|
4188
|
+
} = PaymentPlatformModel.ValidateCustomerCreditSchema().validate(
|
|
4189
|
+
responseData,
|
|
4190
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4191
|
+
);
|
|
4192
|
+
|
|
4193
|
+
if (res_error) {
|
|
4194
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4195
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4196
|
+
} else {
|
|
4197
|
+
Logger({
|
|
4198
|
+
level: "WARN",
|
|
4199
|
+
message: `Response Validation Warnings for platform > Payment > validateCustomerAndCreditSummary \n ${res_error}`,
|
|
4200
|
+
});
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
return response;
|
|
4205
|
+
}
|
|
4206
|
+
|
|
4125
4207
|
/**
|
|
4126
4208
|
* @param {PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam} arg
|
|
4127
4209
|
* - Arg object
|
|
@@ -239,6 +239,10 @@ export = PaymentPlatformApplicationValidator;
|
|
|
239
239
|
* session. This is generated by Fynd platform and is usually shipment_id.
|
|
240
240
|
* @property {PaymentPlatformModel.RefundSessionCreation} body
|
|
241
241
|
*/
|
|
242
|
+
/**
|
|
243
|
+
* @typedef ValidateCustomerAndCreditSummaryParam
|
|
244
|
+
* @property {PaymentPlatformModel.CustomerValidationSchema} body
|
|
245
|
+
*/
|
|
242
246
|
/**
|
|
243
247
|
* @typedef VerifyCustomerForPaymentParam
|
|
244
248
|
* @property {PaymentPlatformModel.ValidateCustomerCreation} body
|
|
@@ -342,11 +346,13 @@ declare class PaymentPlatformApplicationValidator {
|
|
|
342
346
|
static updatePaymentSession(): UpdatePaymentSessionParam;
|
|
343
347
|
/** @returns {UpdateRefundSessionParam} */
|
|
344
348
|
static updateRefundSession(): UpdateRefundSessionParam;
|
|
349
|
+
/** @returns {ValidateCustomerAndCreditSummaryParam} */
|
|
350
|
+
static validateCustomerAndCreditSummary(): ValidateCustomerAndCreditSummaryParam;
|
|
345
351
|
/** @returns {VerifyCustomerForPaymentParam} */
|
|
346
352
|
static verifyCustomerForPayment(): VerifyCustomerForPaymentParam;
|
|
347
353
|
}
|
|
348
354
|
declare namespace PaymentPlatformApplicationValidator {
|
|
349
|
-
export { AddEdcDeviceParam, AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, CreatePaymentOrderParam, EdcAggregatorsAndModelListParam, EdcDeviceListParam, EdcDeviceStatsParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetEdcDeviceParam, GetMerchantAggregatorAppVersionParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeControlRoutesParam, GetPaymentModeCustomConfigParam, GetPaymentModeRoutesParam, GetPaymentSessionParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, MerchantOnBoardingParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PatchMerchantPaymentOptionVersionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, RepaymentDetailsParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SetMerchantModeControlRoutesParam, SetPaymentModeCustomConfigParam, SetUserCODlimitRoutesParam, UpdateEdcDeviceParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, VerifyCustomerForPaymentParam };
|
|
355
|
+
export { AddEdcDeviceParam, AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, CreatePaymentOrderParam, EdcAggregatorsAndModelListParam, EdcDeviceListParam, EdcDeviceStatsParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetEdcDeviceParam, GetMerchantAggregatorAppVersionParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeControlRoutesParam, GetPaymentModeCustomConfigParam, GetPaymentModeRoutesParam, GetPaymentSessionParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, MerchantOnBoardingParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PatchMerchantPaymentOptionVersionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, RepaymentDetailsParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SetMerchantModeControlRoutesParam, SetPaymentModeCustomConfigParam, SetUserCODlimitRoutesParam, UpdateEdcDeviceParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, ValidateCustomerAndCreditSummaryParam, VerifyCustomerForPaymentParam };
|
|
350
356
|
}
|
|
351
357
|
type AddEdcDeviceParam = {
|
|
352
358
|
/**
|
|
@@ -647,6 +653,9 @@ type UpdateRefundSessionParam = {
|
|
|
647
653
|
requestId: string;
|
|
648
654
|
body: PaymentPlatformModel.RefundSessionCreation;
|
|
649
655
|
};
|
|
656
|
+
type ValidateCustomerAndCreditSummaryParam = {
|
|
657
|
+
body: PaymentPlatformModel.CustomerValidationSchema;
|
|
658
|
+
};
|
|
650
659
|
type VerifyCustomerForPaymentParam = {
|
|
651
660
|
body: PaymentPlatformModel.ValidateCustomerCreation;
|
|
652
661
|
};
|
|
@@ -291,6 +291,11 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
291
291
|
* @property {PaymentPlatformModel.RefundSessionCreation} body
|
|
292
292
|
*/
|
|
293
293
|
|
|
294
|
+
/**
|
|
295
|
+
* @typedef ValidateCustomerAndCreditSummaryParam
|
|
296
|
+
* @property {PaymentPlatformModel.CustomerValidationSchema} body
|
|
297
|
+
*/
|
|
298
|
+
|
|
294
299
|
/**
|
|
295
300
|
* @typedef VerifyCustomerForPaymentParam
|
|
296
301
|
* @property {PaymentPlatformModel.ValidateCustomerCreation} body
|
|
@@ -671,6 +676,13 @@ class PaymentPlatformApplicationValidator {
|
|
|
671
676
|
}).required();
|
|
672
677
|
}
|
|
673
678
|
|
|
679
|
+
/** @returns {ValidateCustomerAndCreditSummaryParam} */
|
|
680
|
+
static validateCustomerAndCreditSummary() {
|
|
681
|
+
return Joi.object({
|
|
682
|
+
body: PaymentPlatformModel.CustomerValidationSchema().required(),
|
|
683
|
+
}).required();
|
|
684
|
+
}
|
|
685
|
+
|
|
674
686
|
/** @returns {VerifyCustomerForPaymentParam} */
|
|
675
687
|
static verifyCustomerForPayment() {
|
|
676
688
|
return Joi.object({
|