@gofynd/fdk-client-javascript 1.1.2 → 1.1.3
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 -2
- package/index.d.ts +4 -7
- package/index.js +5 -12
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +20 -20
- package/sdk/application/ApplicationClient.js +26 -26
- package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
- package/sdk/application/Cart/CartApplicationClient.js +105 -10
- package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
- package/sdk/application/Cart/CartApplicationModel.js +105 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
- package/sdk/application/Cart/CartApplicationValidator.js +15 -1
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +3 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationClient.js +2 -2
- package/sdk/application/Order/OrderApplicationModel.js +18 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
- package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
- package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +459 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2480 -340
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +250 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +52 -0
- package/sdk/platform/Cart/CartPlatformModel.js +580 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
- package/sdk/platform/Content/ContentPlatformModel.js +3 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +159 -79
- package/sdk/platform/Order/OrderPlatformClient.js +541 -114
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +569 -159
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +51 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
- package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +1149 -938
- package/sdk/platform/PlatformApplicationClient.js +1259 -1035
- package/sdk/platform/PlatformClient.d.ts +9888 -8286
- package/sdk/platform/PlatformClient.js +10960 -9038
- package/sdk/platform/index.d.ts +15 -14
- package/sdk/platform/index.js +20 -18
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +2 -2
- package/partner.d.ts +0 -4
- package/partner.js +0 -7
- package/sdk/partner/OAuthClient.d.ts +0 -14
- package/sdk/partner/OAuthClient.js +0 -112
- package/sdk/partner/PartnerAPIClient.d.ts +0 -12
- package/sdk/partner/PartnerAPIClient.js +0 -42
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -17
- package/sdk/partner/PartnerConfig.d.ts +0 -30
- package/sdk/partner/PartnerConfig.js +0 -39
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -5
|
@@ -128,14 +128,15 @@ class PosCart {
|
|
|
128
128
|
* @param {boolean} [arg.b] -
|
|
129
129
|
* @param {string} [arg.areaCode] -
|
|
130
130
|
* @param {boolean} [arg.buyNow] -
|
|
131
|
+
* @param {string} [arg.id] -
|
|
131
132
|
* @param {AddCartRequest} arg.body
|
|
132
133
|
* @returns {Promise<AddCartDetailResponse>} - Success response
|
|
133
134
|
* @summary: Add items to cart
|
|
134
135
|
* @description: Use this API to add items to the cart.
|
|
135
136
|
*/
|
|
136
|
-
async addItems({ body, i, b, areaCode, buyNow } = {}) {
|
|
137
|
+
async addItems({ body, i, b, areaCode, buyNow, id } = {}) {
|
|
137
138
|
const { error } = PosCartValidator.addItems().validate(
|
|
138
|
-
{ body, i, b, areaCode, buyNow },
|
|
139
|
+
{ body, i, b, areaCode, buyNow, id },
|
|
139
140
|
{ abortEarly: false, allowUnknown: true }
|
|
140
141
|
);
|
|
141
142
|
if (error) {
|
|
@@ -144,7 +145,7 @@ class PosCart {
|
|
|
144
145
|
|
|
145
146
|
// Showing warrnings if extra unknown parameters are found
|
|
146
147
|
const { error: warrning } = PosCartValidator.addItems().validate(
|
|
147
|
-
{ body, i, b, areaCode, buyNow },
|
|
148
|
+
{ body, i, b, areaCode, buyNow, id },
|
|
148
149
|
{ abortEarly: false, allowUnknown: false }
|
|
149
150
|
);
|
|
150
151
|
if (warrning) {
|
|
@@ -160,6 +161,7 @@ class PosCart {
|
|
|
160
161
|
query_params["b"] = b;
|
|
161
162
|
query_params["area_code"] = areaCode;
|
|
162
163
|
query_params["buy_now"] = buyNow;
|
|
164
|
+
query_params["id"] = id;
|
|
163
165
|
|
|
164
166
|
const xHeaders = {};
|
|
165
167
|
|
|
@@ -1815,6 +1817,8 @@ class PosCart {
|
|
|
1815
1817
|
* getting a payment option in response.
|
|
1816
1818
|
* @param {string} [arg.id] - The unique identifier of the cart
|
|
1817
1819
|
* @param {string} [arg.addressId] - ID allotted to an address
|
|
1820
|
+
* @param {string} [arg.areaCode] - The PIN Code of the destination address,
|
|
1821
|
+
* e.g. 400059
|
|
1818
1822
|
* @param {string} [arg.orderType] - The order type of shipment HomeDelivery
|
|
1819
1823
|
* - If the customer wants the order home-delivered PickAtStore - If the
|
|
1820
1824
|
* customer wants the handover of an order at the store itself.
|
|
@@ -1823,9 +1827,17 @@ class PosCart {
|
|
|
1823
1827
|
* @summary: Update shipment delivery type and quantity before checkout
|
|
1824
1828
|
* @description: Use this API to update the delivery type and quantity as per customer's preference for either store pick-up or home-delivery.
|
|
1825
1829
|
*/
|
|
1826
|
-
async updateShipments({
|
|
1830
|
+
async updateShipments({
|
|
1831
|
+
body,
|
|
1832
|
+
i,
|
|
1833
|
+
p,
|
|
1834
|
+
id,
|
|
1835
|
+
addressId,
|
|
1836
|
+
areaCode,
|
|
1837
|
+
orderType,
|
|
1838
|
+
} = {}) {
|
|
1827
1839
|
const { error } = PosCartValidator.updateShipments().validate(
|
|
1828
|
-
{ body, i, p, id, addressId, orderType },
|
|
1840
|
+
{ body, i, p, id, addressId, areaCode, orderType },
|
|
1829
1841
|
{ abortEarly: false, allowUnknown: true }
|
|
1830
1842
|
);
|
|
1831
1843
|
if (error) {
|
|
@@ -1834,7 +1846,7 @@ class PosCart {
|
|
|
1834
1846
|
|
|
1835
1847
|
// Showing warrnings if extra unknown parameters are found
|
|
1836
1848
|
const { error: warrning } = PosCartValidator.updateShipments().validate(
|
|
1837
|
-
{ body, i, p, id, addressId, orderType },
|
|
1849
|
+
{ body, i, p, id, addressId, areaCode, orderType },
|
|
1838
1850
|
{ abortEarly: false, allowUnknown: false }
|
|
1839
1851
|
);
|
|
1840
1852
|
if (warrning) {
|
|
@@ -1850,6 +1862,7 @@ class PosCart {
|
|
|
1850
1862
|
query_params["p"] = p;
|
|
1851
1863
|
query_params["id"] = id;
|
|
1852
1864
|
query_params["address_id"] = addressId;
|
|
1865
|
+
query_params["area_code"] = areaCode;
|
|
1853
1866
|
query_params["order_type"] = orderType;
|
|
1854
1867
|
|
|
1855
1868
|
const xHeaders = {};
|
|
@@ -1893,6 +1906,10 @@ class PosCart {
|
|
|
1893
1906
|
* @param {string} [arg.paymentIdentifier] -
|
|
1894
1907
|
* @param {string} [arg.aggregatorName] -
|
|
1895
1908
|
* @param {string} [arg.merchantCode] -
|
|
1909
|
+
* @param {string} [arg.iin] -
|
|
1910
|
+
* @param {string} [arg.network] -
|
|
1911
|
+
* @param {string} [arg.type] -
|
|
1912
|
+
* @param {string} [arg.cardId] -
|
|
1896
1913
|
* @returns {Promise<PaymentCouponValidate>} - Success response
|
|
1897
1914
|
* @summary: Verify the coupon eligibility against the payment mode
|
|
1898
1915
|
* @description: Use this API to validate a coupon against the payment mode such as NetBanking, Wallet, UPI etc.
|
|
@@ -1905,6 +1922,10 @@ class PosCart {
|
|
|
1905
1922
|
paymentIdentifier,
|
|
1906
1923
|
aggregatorName,
|
|
1907
1924
|
merchantCode,
|
|
1925
|
+
iin,
|
|
1926
|
+
network,
|
|
1927
|
+
type,
|
|
1928
|
+
cardId,
|
|
1908
1929
|
} = {}) {
|
|
1909
1930
|
const { error } = PosCartValidator.validateCouponForPayment().validate(
|
|
1910
1931
|
{
|
|
@@ -1915,6 +1936,10 @@ class PosCart {
|
|
|
1915
1936
|
paymentIdentifier,
|
|
1916
1937
|
aggregatorName,
|
|
1917
1938
|
merchantCode,
|
|
1939
|
+
iin,
|
|
1940
|
+
network,
|
|
1941
|
+
type,
|
|
1942
|
+
cardId,
|
|
1918
1943
|
},
|
|
1919
1944
|
{ abortEarly: false, allowUnknown: true }
|
|
1920
1945
|
);
|
|
@@ -1934,6 +1959,10 @@ class PosCart {
|
|
|
1934
1959
|
paymentIdentifier,
|
|
1935
1960
|
aggregatorName,
|
|
1936
1961
|
merchantCode,
|
|
1962
|
+
iin,
|
|
1963
|
+
network,
|
|
1964
|
+
type,
|
|
1965
|
+
cardId,
|
|
1937
1966
|
},
|
|
1938
1967
|
{ abortEarly: false, allowUnknown: false }
|
|
1939
1968
|
);
|
|
@@ -1953,6 +1982,10 @@ class PosCart {
|
|
|
1953
1982
|
query_params["payment_identifier"] = paymentIdentifier;
|
|
1954
1983
|
query_params["aggregator_name"] = aggregatorName;
|
|
1955
1984
|
query_params["merchant_code"] = merchantCode;
|
|
1985
|
+
query_params["iin"] = iin;
|
|
1986
|
+
query_params["network"] = network;
|
|
1987
|
+
query_params["type"] = type;
|
|
1988
|
+
query_params["card_id"] = cardId;
|
|
1956
1989
|
|
|
1957
1990
|
const xHeaders = {};
|
|
1958
1991
|
|
|
@@ -8,6 +8,7 @@ declare class PosCartModel {
|
|
|
8
8
|
static AppliedFreeArticles(): any;
|
|
9
9
|
static AppliedPromotion(): any;
|
|
10
10
|
static ApplyCouponRequest(): any;
|
|
11
|
+
static ArticleGiftDetail(): any;
|
|
11
12
|
static ArticlePriceInfo(): any;
|
|
12
13
|
static BaseInfo(): any;
|
|
13
14
|
static BasePrice(): any;
|
|
@@ -33,7 +34,9 @@ declare class PosCartModel {
|
|
|
33
34
|
static CheckCart(): any;
|
|
34
35
|
static Coupon(): any;
|
|
35
36
|
static CouponBreakup(): any;
|
|
37
|
+
static CouponDetails(): any;
|
|
36
38
|
static CouponValidity(): any;
|
|
39
|
+
static CustomerDetails(): any;
|
|
37
40
|
static DeleteAddressResponse(): any;
|
|
38
41
|
static DiscountRulesApp(): any;
|
|
39
42
|
static DisplayBreakup(): any;
|
|
@@ -44,6 +47,7 @@ declare class PosCartModel {
|
|
|
44
47
|
static GetCouponResponse(): any;
|
|
45
48
|
static GetShareCartLinkRequest(): any;
|
|
46
49
|
static GetShareCartLinkResponse(): any;
|
|
50
|
+
static GiftDetail(): any;
|
|
47
51
|
static LoyaltyPoints(): any;
|
|
48
52
|
static OfferItem(): any;
|
|
49
53
|
static OfferPrice(): any;
|
|
@@ -74,6 +78,8 @@ declare class PosCartModel {
|
|
|
74
78
|
static ShipmentResponse(): any;
|
|
75
79
|
static StaffCheckout(): any;
|
|
76
80
|
static StoreDetailsResponse(): any;
|
|
81
|
+
static StoreInfo(): any;
|
|
82
|
+
static Tags(): any;
|
|
77
83
|
static UpdateAddressResponse(): any;
|
|
78
84
|
static UpdateCartDetailResponse(): any;
|
|
79
85
|
static UpdateCartPaymentRequest(): any;
|
|
@@ -17,6 +17,7 @@ class PosCartModel {
|
|
|
17
17
|
static AddCartRequest() {
|
|
18
18
|
return Joi.object({
|
|
19
19
|
items: Joi.array().items(PosCartModel.AddProductCart()),
|
|
20
|
+
new_cart: Joi.boolean(),
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
static AddProductCart() {
|
|
@@ -28,6 +29,7 @@ class PosCartModel {
|
|
|
28
29
|
extra_meta: Joi.any(),
|
|
29
30
|
item_id: Joi.number(),
|
|
30
31
|
item_size: Joi.string().allow(""),
|
|
32
|
+
meta: Joi.any(),
|
|
31
33
|
parent_item_identifiers: Joi.array().items(
|
|
32
34
|
Joi.object().pattern(/\S/, Joi.string().allow(""))
|
|
33
35
|
),
|
|
@@ -40,6 +42,7 @@ class PosCartModel {
|
|
|
40
42
|
}
|
|
41
43
|
static Address() {
|
|
42
44
|
return Joi.object({
|
|
45
|
+
_custom_json: Joi.any(),
|
|
43
46
|
address: Joi.string().allow(""),
|
|
44
47
|
address_type: Joi.string().allow(""),
|
|
45
48
|
area: Joi.string().allow(""),
|
|
@@ -51,6 +54,7 @@ class PosCartModel {
|
|
|
51
54
|
country_code: Joi.string().allow(""),
|
|
52
55
|
country_iso_code: Joi.string().allow(""),
|
|
53
56
|
country_phone_code: Joi.string().allow(""),
|
|
57
|
+
created_by_user_id: Joi.string().allow(""),
|
|
54
58
|
email: Joi.string().allow(""),
|
|
55
59
|
geo_location: PosCartModel.GeoLocation(),
|
|
56
60
|
google_map_point: Joi.any(),
|
|
@@ -97,6 +101,11 @@ class PosCartModel {
|
|
|
97
101
|
coupon_code: Joi.string().allow("").required(),
|
|
98
102
|
});
|
|
99
103
|
}
|
|
104
|
+
static ArticleGiftDetail() {
|
|
105
|
+
return Joi.object({
|
|
106
|
+
article_id: PosCartModel.GiftDetail(),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
100
109
|
static ArticlePriceInfo() {
|
|
101
110
|
return Joi.object({
|
|
102
111
|
base: PosCartModel.BasePrice(),
|
|
@@ -189,6 +198,8 @@ class PosCartModel {
|
|
|
189
198
|
items: Joi.array().items(PosCartModel.CartProductInfo()),
|
|
190
199
|
last_modified: Joi.string().allow(""),
|
|
191
200
|
message: Joi.string().allow(""),
|
|
201
|
+
pan_config: Joi.any(),
|
|
202
|
+
pan_no: Joi.string().allow(""),
|
|
192
203
|
payment_selection_lock: PosCartModel.PaymentSelectionLock(),
|
|
193
204
|
restrict_checkout: Joi.boolean(),
|
|
194
205
|
});
|
|
@@ -207,12 +218,15 @@ class PosCartModel {
|
|
|
207
218
|
return Joi.object({
|
|
208
219
|
checkout_mode: Joi.string().allow(""),
|
|
209
220
|
comment: Joi.string().allow(""),
|
|
221
|
+
delivery_slots: Joi.any(),
|
|
222
|
+
gift_details: PosCartModel.ArticleGiftDetail(),
|
|
210
223
|
gstin: Joi.string().allow(""),
|
|
211
224
|
pick_up_customer_details: Joi.any(),
|
|
212
225
|
});
|
|
213
226
|
}
|
|
214
227
|
static CartMetaResponse() {
|
|
215
228
|
return Joi.object({
|
|
229
|
+
is_valid: Joi.boolean(),
|
|
216
230
|
message: Joi.string().allow(""),
|
|
217
231
|
});
|
|
218
232
|
}
|
|
@@ -224,9 +238,11 @@ class PosCartModel {
|
|
|
224
238
|
billing_address_id: Joi.string().allow(""),
|
|
225
239
|
callback_url: Joi.string().allow("").allow(null),
|
|
226
240
|
custom_meta: Joi.array().items(PosCartModel.CartCheckoutCustomMeta()),
|
|
241
|
+
customer_details: PosCartModel.CustomerDetails(),
|
|
227
242
|
delivery_address: Joi.any(),
|
|
228
243
|
extra_meta: Joi.any(),
|
|
229
244
|
files: Joi.array().items(PosCartModel.Files()),
|
|
245
|
+
id: Joi.string().allow("").allow(null),
|
|
230
246
|
merchant_code: Joi.string().allow(""),
|
|
231
247
|
meta: Joi.any(),
|
|
232
248
|
order_type: Joi.string().allow("").required(),
|
|
@@ -242,12 +258,16 @@ class PosCartModel {
|
|
|
242
258
|
}
|
|
243
259
|
static CartProduct() {
|
|
244
260
|
return Joi.object({
|
|
261
|
+
_custom_json: Joi.any(),
|
|
245
262
|
action: PosCartModel.ProductAction(),
|
|
246
263
|
brand: PosCartModel.BaseInfo(),
|
|
247
264
|
categories: Joi.array().items(PosCartModel.CategoryInfo()),
|
|
248
265
|
images: Joi.array().items(PosCartModel.ProductImage()),
|
|
266
|
+
item_code: Joi.string().allow("").allow(null),
|
|
249
267
|
name: Joi.string().allow(""),
|
|
250
268
|
slug: Joi.string().allow(""),
|
|
269
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
270
|
+
teaser_tag: PosCartModel.Tags(),
|
|
251
271
|
type: Joi.string().allow(""),
|
|
252
272
|
uid: Joi.number(),
|
|
253
273
|
});
|
|
@@ -262,7 +282,9 @@ class PosCartModel {
|
|
|
262
282
|
article: PosCartModel.ProductArticle(),
|
|
263
283
|
availability: PosCartModel.ProductAvailability(),
|
|
264
284
|
bulk_offer: Joi.any(),
|
|
285
|
+
coupon: PosCartModel.CouponDetails(),
|
|
265
286
|
coupon_message: Joi.string().allow(""),
|
|
287
|
+
custom_order: Joi.any(),
|
|
266
288
|
delivery_promise: PosCartModel.ShipmentPromise(),
|
|
267
289
|
discount: Joi.string().allow(""),
|
|
268
290
|
identifiers: PosCartModel.CartProductIdentifer().required(),
|
|
@@ -374,15 +396,30 @@ class PosCartModel {
|
|
|
374
396
|
value: Joi.number(),
|
|
375
397
|
});
|
|
376
398
|
}
|
|
399
|
+
static CouponDetails() {
|
|
400
|
+
return Joi.object({
|
|
401
|
+
code: Joi.string().allow(""),
|
|
402
|
+
discount_single_quantity: Joi.number(),
|
|
403
|
+
discount_total_quantity: Joi.number(),
|
|
404
|
+
});
|
|
405
|
+
}
|
|
377
406
|
static CouponValidity() {
|
|
378
407
|
return Joi.object({
|
|
379
408
|
code: Joi.string().allow("").allow(null),
|
|
380
409
|
discount: Joi.number(),
|
|
381
410
|
display_message_en: Joi.string().allow("").allow(null),
|
|
411
|
+
next_validation_required: Joi.boolean().allow(null),
|
|
382
412
|
title: Joi.string().allow(""),
|
|
383
413
|
valid: Joi.boolean(),
|
|
384
414
|
});
|
|
385
415
|
}
|
|
416
|
+
static CustomerDetails() {
|
|
417
|
+
return Joi.object({
|
|
418
|
+
email: Joi.string().allow("").allow(null),
|
|
419
|
+
mobile: Joi.string().allow("").required(),
|
|
420
|
+
name: Joi.string().allow(""),
|
|
421
|
+
});
|
|
422
|
+
}
|
|
386
423
|
static DeleteAddressResponse() {
|
|
387
424
|
return Joi.object({
|
|
388
425
|
id: Joi.string().allow(""),
|
|
@@ -453,6 +490,12 @@ class PosCartModel {
|
|
|
453
490
|
token: Joi.string().allow(""),
|
|
454
491
|
});
|
|
455
492
|
}
|
|
493
|
+
static GiftDetail() {
|
|
494
|
+
return Joi.object({
|
|
495
|
+
gift_message: Joi.string().allow(""),
|
|
496
|
+
is_gift_applied: Joi.boolean(),
|
|
497
|
+
});
|
|
498
|
+
}
|
|
456
499
|
static LoyaltyPoints() {
|
|
457
500
|
return Joi.object({
|
|
458
501
|
applicable: Joi.number(),
|
|
@@ -546,8 +589,13 @@ class PosCartModel {
|
|
|
546
589
|
static ProductArticle() {
|
|
547
590
|
return Joi.object({
|
|
548
591
|
_custom_json: Joi.any(),
|
|
592
|
+
cart_item_meta: Joi.any(),
|
|
549
593
|
extra_meta: Joi.any(),
|
|
594
|
+
gift_card: Joi.any(),
|
|
550
595
|
identifier: Joi.any(),
|
|
596
|
+
is_gift_visible: Joi.boolean(),
|
|
597
|
+
meta: Joi.any(),
|
|
598
|
+
mto_quantity: Joi.number(),
|
|
551
599
|
parent_item_identifiers: Joi.any(),
|
|
552
600
|
price: PosCartModel.ArticlePriceInfo(),
|
|
553
601
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -555,7 +603,7 @@ class PosCartModel {
|
|
|
555
603
|
seller: PosCartModel.BaseInfo(),
|
|
556
604
|
seller_identifier: Joi.string().allow(""),
|
|
557
605
|
size: Joi.string().allow(""),
|
|
558
|
-
store: PosCartModel.
|
|
606
|
+
store: PosCartModel.StoreInfo(),
|
|
559
607
|
type: Joi.string().allow(""),
|
|
560
608
|
uid: Joi.string().allow(""),
|
|
561
609
|
});
|
|
@@ -627,6 +675,7 @@ class PosCartModel {
|
|
|
627
675
|
delivery_charge: Joi.number(),
|
|
628
676
|
discount: Joi.number(),
|
|
629
677
|
fynd_cash: Joi.number(),
|
|
678
|
+
gift_card: Joi.number(),
|
|
630
679
|
gst_charges: Joi.number(),
|
|
631
680
|
mrp_total: Joi.number(),
|
|
632
681
|
subtotal: Joi.number(),
|
|
@@ -726,6 +775,18 @@ class PosCartModel {
|
|
|
726
775
|
items: Joi.array().items(PosCartModel.PickupStoreDetail()),
|
|
727
776
|
});
|
|
728
777
|
}
|
|
778
|
+
static StoreInfo() {
|
|
779
|
+
return Joi.object({
|
|
780
|
+
name: Joi.string().allow(""),
|
|
781
|
+
store_code: Joi.string().allow(""),
|
|
782
|
+
uid: Joi.number(),
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
static Tags() {
|
|
786
|
+
return Joi.object({
|
|
787
|
+
tags: Joi.any(),
|
|
788
|
+
});
|
|
789
|
+
}
|
|
729
790
|
static UpdateAddressResponse() {
|
|
730
791
|
return Joi.object({
|
|
731
792
|
id: Joi.string().allow(""),
|
|
@@ -780,6 +841,7 @@ class PosCartModel {
|
|
|
780
841
|
item_id: Joi.number(),
|
|
781
842
|
item_index: Joi.number(),
|
|
782
843
|
item_size: Joi.string().allow(""),
|
|
844
|
+
meta: Joi.any(),
|
|
783
845
|
parent_item_identifiers: Joi.any(),
|
|
784
846
|
quantity: Joi.number(),
|
|
785
847
|
});
|
|
@@ -14,6 +14,7 @@ class PosCartValidator {
|
|
|
14
14
|
b: Joi.boolean(),
|
|
15
15
|
areaCode: Joi.string().allow(""),
|
|
16
16
|
buyNow: Joi.boolean(),
|
|
17
|
+
id: Joi.string().allow(""),
|
|
17
18
|
body: PosCartModel.AddCartRequest().required(),
|
|
18
19
|
}).required();
|
|
19
20
|
}
|
|
@@ -216,6 +217,7 @@ class PosCartValidator {
|
|
|
216
217
|
p: Joi.boolean(),
|
|
217
218
|
id: Joi.string().allow(""),
|
|
218
219
|
addressId: Joi.string().allow(""),
|
|
220
|
+
areaCode: Joi.string().allow(""),
|
|
219
221
|
orderType: Joi.string().allow(""),
|
|
220
222
|
body: PosCartModel.UpdateCartShipmentRequest().required(),
|
|
221
223
|
}).required();
|
|
@@ -230,6 +232,10 @@ class PosCartValidator {
|
|
|
230
232
|
paymentIdentifier: Joi.string().allow(""),
|
|
231
233
|
aggregatorName: Joi.string().allow(""),
|
|
232
234
|
merchantCode: Joi.string().allow(""),
|
|
235
|
+
iin: Joi.string().allow(""),
|
|
236
|
+
network: Joi.string().allow(""),
|
|
237
|
+
type: Joi.string().allow(""),
|
|
238
|
+
cardId: Joi.string().allow(""),
|
|
233
239
|
});
|
|
234
240
|
}
|
|
235
241
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export const ApplicationConfig: typeof import("./ApplicationConfig");
|
|
2
2
|
export const ApplicationClient: typeof import("./ApplicationClient");
|
|
3
3
|
export namespace ApplicationModel {
|
|
4
|
-
const CatalogApplicationModel: typeof import("./Catalog/CatalogApplicationModel");
|
|
5
4
|
const CartApplicationModel: typeof import("./Cart/CartApplicationModel");
|
|
5
|
+
const CatalogApplicationModel: typeof import("./Catalog/CatalogApplicationModel");
|
|
6
6
|
const CommonApplicationModel: typeof import("./Common/CommonApplicationModel");
|
|
7
|
-
const LeadApplicationModel: typeof import("./Lead/LeadApplicationModel");
|
|
8
|
-
const ThemeApplicationModel: typeof import("./Theme/ThemeApplicationModel");
|
|
9
|
-
const UserApplicationModel: typeof import("./User/UserApplicationModel");
|
|
10
|
-
const ContentApplicationModel: typeof import("./Content/ContentApplicationModel");
|
|
11
7
|
const CommunicationApplicationModel: typeof import("./Communication/CommunicationApplicationModel");
|
|
12
|
-
const ShareApplicationModel: typeof import("./Share/ShareApplicationModel");
|
|
13
|
-
const FileStorageApplicationModel: typeof import("./FileStorage/FileStorageApplicationModel");
|
|
14
8
|
const ConfigurationApplicationModel: typeof import("./Configuration/ConfigurationApplicationModel");
|
|
15
|
-
const
|
|
9
|
+
const ContentApplicationModel: typeof import("./Content/ContentApplicationModel");
|
|
10
|
+
const FileStorageApplicationModel: typeof import("./FileStorage/FileStorageApplicationModel");
|
|
11
|
+
const LeadApplicationModel: typeof import("./Lead/LeadApplicationModel");
|
|
12
|
+
const LogisticApplicationModel: typeof import("./Logistic/LogisticApplicationModel");
|
|
16
13
|
const OrderApplicationModel: typeof import("./Order/OrderApplicationModel");
|
|
17
|
-
const
|
|
14
|
+
const PaymentApplicationModel: typeof import("./Payment/PaymentApplicationModel");
|
|
18
15
|
const PosCartApplicationModel: typeof import("./PosCart/PosCartApplicationModel");
|
|
19
|
-
const
|
|
16
|
+
const RewardsApplicationModel: typeof import("./Rewards/RewardsApplicationModel");
|
|
17
|
+
const ShareApplicationModel: typeof import("./Share/ShareApplicationModel");
|
|
18
|
+
const ThemeApplicationModel: typeof import("./Theme/ThemeApplicationModel");
|
|
19
|
+
const UserApplicationModel: typeof import("./User/UserApplicationModel");
|
|
20
20
|
}
|
package/sdk/application/index.js
CHANGED
|
@@ -2,36 +2,36 @@ module.exports = {
|
|
|
2
2
|
ApplicationConfig: require("./ApplicationConfig"),
|
|
3
3
|
ApplicationClient: require("./ApplicationClient"),
|
|
4
4
|
ApplicationModel: {
|
|
5
|
-
CatalogApplicationModel: require("./Catalog/CatalogApplicationModel"),
|
|
6
|
-
|
|
7
5
|
CartApplicationModel: require("./Cart/CartApplicationModel"),
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
CatalogApplicationModel: require("./Catalog/CatalogApplicationModel"),
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
CommonApplicationModel: require("./Common/CommonApplicationModel"),
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
CommunicationApplicationModel: require("./Communication/CommunicationApplicationModel"),
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
ConfigurationApplicationModel: require("./Configuration/ConfigurationApplicationModel"),
|
|
16
14
|
|
|
17
15
|
ContentApplicationModel: require("./Content/ContentApplicationModel"),
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
FileStorageApplicationModel: require("./FileStorage/FileStorageApplicationModel"),
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
LeadApplicationModel: require("./Lead/LeadApplicationModel"),
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
LogisticApplicationModel: require("./Logistic/LogisticApplicationModel"),
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
OrderApplicationModel: require("./Order/OrderApplicationModel"),
|
|
26
24
|
|
|
27
25
|
PaymentApplicationModel: require("./Payment/PaymentApplicationModel"),
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
PosCartApplicationModel: require("./PosCart/PosCartApplicationModel"),
|
|
30
28
|
|
|
31
29
|
RewardsApplicationModel: require("./Rewards/RewardsApplicationModel"),
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
ShareApplicationModel: require("./Share/ShareApplicationModel"),
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
ThemeApplicationModel: require("./Theme/ThemeApplicationModel"),
|
|
34
|
+
|
|
35
|
+
UserApplicationModel: require("./User/UserApplicationModel"),
|
|
36
36
|
},
|
|
37
37
|
};
|
package/sdk/common/Constant.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export namespace AVAILABLE_PAGE_TYPE {
|
|
|
44
44
|
const REGISTER: string;
|
|
45
45
|
const SHIPPING_POLICY: string;
|
|
46
46
|
const RETURN_POLICY: string;
|
|
47
|
+
const ORDER_STATUS: string;
|
|
47
48
|
}
|
|
48
49
|
export const NAVIGATORS: {
|
|
49
50
|
"about-us": {
|
|
@@ -282,4 +283,8 @@ export const NAVIGATORS: {
|
|
|
282
283
|
name: string;
|
|
283
284
|
link: string;
|
|
284
285
|
};
|
|
286
|
+
"order-status": {
|
|
287
|
+
name: string;
|
|
288
|
+
link: string;
|
|
289
|
+
};
|
|
285
290
|
};
|
package/sdk/common/Constant.js
CHANGED
|
@@ -44,6 +44,7 @@ const AVAILABLE_PAGE_TYPE = {
|
|
|
44
44
|
REGISTER: "register",
|
|
45
45
|
SHIPPING_POLICY: "shipping-policy",
|
|
46
46
|
RETURN_POLICY: "return-policy",
|
|
47
|
+
ORDER_STATUS: "order-status",
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
Object.freeze(AVAILABLE_PAGE_TYPE);
|
|
@@ -313,6 +314,10 @@ const NAVIGATORS = {
|
|
|
313
314
|
name: "Return policy",
|
|
314
315
|
link: "/return-policy",
|
|
315
316
|
},
|
|
317
|
+
"order-status": {
|
|
318
|
+
name: "Order status",
|
|
319
|
+
link: "/cart/order-status",
|
|
320
|
+
},
|
|
316
321
|
};
|
|
317
322
|
|
|
318
323
|
module.exports = {
|
|
@@ -100,6 +100,7 @@ class BillingModel {
|
|
|
100
100
|
}
|
|
101
101
|
static DetailedPlanComponents() {
|
|
102
102
|
return Joi.object({
|
|
103
|
+
config: Joi.any(),
|
|
103
104
|
description: Joi.string().allow(""),
|
|
104
105
|
display_text: Joi.string().allow(""),
|
|
105
106
|
enabled: Joi.boolean(),
|
|
@@ -438,6 +439,7 @@ class BillingModel {
|
|
|
438
439
|
return Joi.object({
|
|
439
440
|
_id: Joi.string().allow(""),
|
|
440
441
|
cancel_at_period_end: Joi.boolean(),
|
|
442
|
+
channel_type: Joi.string().allow(""),
|
|
441
443
|
collection_method: Joi.string().allow(""),
|
|
442
444
|
created_at: Joi.string().allow(""),
|
|
443
445
|
current_period: BillingModel.SubscriptionCurrentPeriod(),
|
|
@@ -593,8 +595,11 @@ class BillingModel {
|
|
|
593
595
|
}
|
|
594
596
|
static SubscriptionStatus() {
|
|
595
597
|
return Joi.object({
|
|
598
|
+
current_subscriptions: Joi.array().items(BillingModel.Subscription()),
|
|
596
599
|
is_enabled: Joi.boolean(),
|
|
597
|
-
|
|
600
|
+
latest_invoice: BillingModel.InvoicesData(),
|
|
601
|
+
mandate_amount: Joi.string().allow(""),
|
|
602
|
+
next_plan: BillingModel.Plan(),
|
|
598
603
|
subscription: BillingModel.Subscription(),
|
|
599
604
|
});
|
|
600
605
|
}
|