@gofynd/fdk-client-javascript 1.3.3-beta.2 → 1.3.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.
Files changed (29) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +4 -0
  4. package/sdk/application/Cart/CartApplicationModel.js +4 -0
  5. package/sdk/application/Theme/ThemeApplicationModel.d.ts +6 -8
  6. package/sdk/application/Theme/ThemeApplicationModel.js +6 -8
  7. package/sdk/common/AxiosHelper.js +2 -2
  8. package/sdk/platform/Cart/CartPlatformModel.d.ts +11 -2
  9. package/sdk/platform/Cart/CartPlatformModel.js +8 -2
  10. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +56 -0
  11. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +308 -0
  12. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -1
  13. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +38 -0
  14. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
  15. package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
  16. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +344 -66
  17. package/sdk/platform/Catalog/CatalogPlatformModel.js +247 -65
  18. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +26 -0
  19. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +152 -0
  20. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +14 -1
  21. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -0
  22. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +22 -1
  23. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +24 -0
  24. package/sdk/platform/Order/OrderPlatformClient.d.ts +121 -3
  25. package/sdk/platform/Order/OrderPlatformClient.js +211 -0
  26. package/sdk/platform/Order/OrderPlatformModel.d.ts +16 -4
  27. package/sdk/platform/Order/OrderPlatformModel.js +513 -501
  28. package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
  29. package/sdk/platform/Order/OrderPlatformValidator.js +6 -0
@@ -1587,6 +1587,7 @@ class Order {
1587
1587
  paymentMethods,
1588
1588
  myOrders,
1589
1589
  showCrossCompanyData,
1590
+ orderType,
1590
1591
  requestHeaders,
1591
1592
  } = { requestHeaders: {} },
1592
1593
  { responseHeaders } = { responseHeaders: false }
@@ -1609,6 +1610,7 @@ class Order {
1609
1610
  paymentMethods,
1610
1611
  myOrders,
1611
1612
  showCrossCompanyData,
1613
+ orderType,
1612
1614
  },
1613
1615
  { abortEarly: false, allowUnknown: true }
1614
1616
  );
@@ -1635,6 +1637,7 @@ class Order {
1635
1637
  paymentMethods,
1636
1638
  myOrders,
1637
1639
  showCrossCompanyData,
1640
+ orderType,
1638
1641
  },
1639
1642
  { abortEarly: false, allowUnknown: false }
1640
1643
  );
@@ -1662,6 +1665,7 @@ class Order {
1662
1665
  query_params["payment_methods"] = paymentMethods;
1663
1666
  query_params["my_orders"] = myOrders;
1664
1667
  query_params["show_cross_company_data"] = showCrossCompanyData;
1668
+ query_params["order_type"] = orderType;
1665
1669
 
1666
1670
  const xHeaders = {};
1667
1671
 
@@ -1801,6 +1805,7 @@ class Order {
1801
1805
  myOrders,
1802
1806
  showCrossCompanyData,
1803
1807
  customerId,
1808
+ orderType,
1804
1809
  requestHeaders,
1805
1810
  } = { requestHeaders: {} },
1806
1811
  { responseHeaders } = { responseHeaders: false }
@@ -1826,6 +1831,7 @@ class Order {
1826
1831
  myOrders,
1827
1832
  showCrossCompanyData,
1828
1833
  customerId,
1834
+ orderType,
1829
1835
  },
1830
1836
  { abortEarly: false, allowUnknown: true }
1831
1837
  );
@@ -1855,6 +1861,7 @@ class Order {
1855
1861
  myOrders,
1856
1862
  showCrossCompanyData,
1857
1863
  customerId,
1864
+ orderType,
1858
1865
  },
1859
1866
  { abortEarly: false, allowUnknown: false }
1860
1867
  );
@@ -1885,6 +1892,7 @@ class Order {
1885
1892
  query_params["my_orders"] = myOrders;
1886
1893
  query_params["show_cross_company_data"] = showCrossCompanyData;
1887
1894
  query_params["customer_id"] = customerId;
1895
+ query_params["order_type"] = orderType;
1888
1896
 
1889
1897
  const xHeaders = {};
1890
1898
 
@@ -1920,6 +1928,96 @@ class Order {
1920
1928
  return response;
1921
1929
  }
1922
1930
 
1931
+ /**
1932
+ * @param {Object} arg - Arg object.
1933
+ * @param {string} [arg.lane] - Lane refers to a section where orders are
1934
+ * assigned, indicating its grouping
1935
+ * @param {string} [arg.searchType] - Search_type refers to the field that
1936
+ * will be used as the target for the search operation
1937
+ * @param {string} [arg.bagStatus] - Bag_status refers to status of the
1938
+ * entity. Filters orders based on the status.
1939
+ * @param {string} [arg.timeToDispatch] - Time_to_dispatch refers to
1940
+ * estimated SLA time.
1941
+ * @param {string} [arg.paymentMethods] -
1942
+ * @param {string} [arg.tags] - Tags refers to additional descriptive labels
1943
+ * associated with the order
1944
+ * @param {string} [arg.searchValue] - Search_value is matched against the
1945
+ * field specified by the search_type
1946
+ * @param {string} [arg.fromDate] -
1947
+ * @param {string} [arg.toDate] -
1948
+ * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
1949
+ * @param {string} [arg.stores] -
1950
+ * @param {string} [arg.salesChannels] -
1951
+ * @param {number} [arg.pageSize] -
1952
+ * @param {boolean} [arg.isPrioritySort] -
1953
+ * @param {string} [arg.customMeta] -
1954
+ * @param {boolean} [arg.myOrders] -
1955
+ * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
1956
+ * non-cross company order
1957
+ * @param {string} [arg.customerId] -
1958
+ * @param {string} [arg.orderType] -
1959
+ * @returns {Paginator<OrderPlatformModel.OrderListingResponse>}
1960
+ * @summary:
1961
+ * @description: Get Orders Listing
1962
+ */
1963
+ getOrdersPaginator({
1964
+ lane,
1965
+ searchType,
1966
+ bagStatus,
1967
+ timeToDispatch,
1968
+ paymentMethods,
1969
+ tags,
1970
+ searchValue,
1971
+ fromDate,
1972
+ toDate,
1973
+ dpIds,
1974
+ stores,
1975
+ salesChannels,
1976
+ pageSize,
1977
+ isPrioritySort,
1978
+ customMeta,
1979
+ myOrders,
1980
+ showCrossCompanyData,
1981
+ customerId,
1982
+ orderType,
1983
+ } = {}) {
1984
+ const paginator = new Paginator();
1985
+ const callback = async () => {
1986
+ const pageId = paginator.nextId;
1987
+ const pageNo = paginator.pageNo;
1988
+ const pageType = "number";
1989
+ const data = await this.getOrders({
1990
+ lane: lane,
1991
+ searchType: searchType,
1992
+ bagStatus: bagStatus,
1993
+ timeToDispatch: timeToDispatch,
1994
+ paymentMethods: paymentMethods,
1995
+ tags: tags,
1996
+ searchValue: searchValue,
1997
+ fromDate: fromDate,
1998
+ toDate: toDate,
1999
+ dpIds: dpIds,
2000
+ stores: stores,
2001
+ salesChannels: salesChannels,
2002
+ pageNo: pageNo,
2003
+ pageSize: pageSize,
2004
+ isPrioritySort: isPrioritySort,
2005
+ customMeta: customMeta,
2006
+ myOrders: myOrders,
2007
+ showCrossCompanyData: showCrossCompanyData,
2008
+ customerId: customerId,
2009
+ orderType: orderType,
2010
+ });
2011
+ paginator.setPaginator({
2012
+ hasNext: data.page.has_next ? true : false,
2013
+ nextId: data.page.next_id,
2014
+ });
2015
+ return data;
2016
+ };
2017
+ paginator.setCallback(callback.bind(this));
2018
+ return paginator;
2019
+ }
2020
+
1923
2021
  /**
1924
2022
  * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
1925
2023
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -2269,6 +2367,7 @@ class Order {
2269
2367
  showCrossCompanyData,
2270
2368
  tags,
2271
2369
  customerId,
2370
+ orderType,
2272
2371
  requestHeaders,
2273
2372
  } = { requestHeaders: {} },
2274
2373
  { responseHeaders } = { responseHeaders: false }
@@ -2302,6 +2401,7 @@ class Order {
2302
2401
  showCrossCompanyData,
2303
2402
  tags,
2304
2403
  customerId,
2404
+ orderType,
2305
2405
  },
2306
2406
  { abortEarly: false, allowUnknown: true }
2307
2407
  );
@@ -2339,6 +2439,7 @@ class Order {
2339
2439
  showCrossCompanyData,
2340
2440
  tags,
2341
2441
  customerId,
2442
+ orderType,
2342
2443
  },
2343
2444
  { abortEarly: false, allowUnknown: false }
2344
2445
  );
@@ -2377,6 +2478,7 @@ class Order {
2377
2478
  query_params["show_cross_company_data"] = showCrossCompanyData;
2378
2479
  query_params["tags"] = tags;
2379
2480
  query_params["customer_id"] = customerId;
2481
+ query_params["order_type"] = orderType;
2380
2482
 
2381
2483
  const xHeaders = {};
2382
2484
 
@@ -2412,6 +2514,115 @@ class Order {
2412
2514
  return response;
2413
2515
  }
2414
2516
 
2517
+ /**
2518
+ * @param {Object} arg - Arg object.
2519
+ * @param {string} [arg.lane] - Name of lane for which data is to be fetched
2520
+ * @param {string} [arg.bagStatus] - Comma separated values of bag statuses
2521
+ * @param {boolean} [arg.statusOverrideLane] - Use this flag to fetch by
2522
+ * bag_status and override lane
2523
+ * @param {number} [arg.timeToDispatch] -
2524
+ * @param {string} [arg.searchType] - Search type key
2525
+ * @param {string} [arg.searchValue] - Search type value
2526
+ * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
2527
+ * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
2528
+ * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
2529
+ * @param {string} [arg.stores] - Comma separated values of store ids
2530
+ * @param {string} [arg.salesChannels] - Comma separated values of sales channel ids
2531
+ * @param {number} [arg.pageSize] - Page size of data received per page
2532
+ * @param {boolean} [arg.fetchActiveShipment] - Flag to fetch active shipments
2533
+ * @param {boolean} [arg.excludeLockedShipments] - Flag to fetch locked shipments
2534
+ * @param {string} [arg.paymentMethods] - Comma separated values of payment methods
2535
+ * @param {string} [arg.channelShipmentId] - App Shipment Id
2536
+ * @param {string} [arg.channelOrderId] - App Order Id
2537
+ * @param {string} [arg.customMeta] -
2538
+ * @param {string} [arg.orderingChannel] -
2539
+ * @param {string} [arg.companyAffiliateTag] -
2540
+ * @param {boolean} [arg.myOrders] -
2541
+ * @param {string} [arg.platformUserId] -
2542
+ * @param {string} [arg.sortType] - Sort the result data on basis of input
2543
+ * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
2544
+ * non-cross company order
2545
+ * @param {string} [arg.tags] - Comma separated values of tags
2546
+ * @param {string} [arg.customerId] -
2547
+ * @param {string} [arg.orderType] -
2548
+ * @returns {Paginator<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
2549
+ * @summary:
2550
+ * @description: Get Shipments Listing for the company id
2551
+ */
2552
+ getShipmentsPaginator({
2553
+ lane,
2554
+ bagStatus,
2555
+ statusOverrideLane,
2556
+ timeToDispatch,
2557
+ searchType,
2558
+ searchValue,
2559
+ fromDate,
2560
+ toDate,
2561
+ dpIds,
2562
+ stores,
2563
+ salesChannels,
2564
+ pageSize,
2565
+ fetchActiveShipment,
2566
+ excludeLockedShipments,
2567
+ paymentMethods,
2568
+ channelShipmentId,
2569
+ channelOrderId,
2570
+ customMeta,
2571
+ orderingChannel,
2572
+ companyAffiliateTag,
2573
+ myOrders,
2574
+ platformUserId,
2575
+ sortType,
2576
+ showCrossCompanyData,
2577
+ tags,
2578
+ customerId,
2579
+ orderType,
2580
+ } = {}) {
2581
+ const paginator = new Paginator();
2582
+ const callback = async () => {
2583
+ const pageId = paginator.nextId;
2584
+ const pageNo = paginator.pageNo;
2585
+ const pageType = "number";
2586
+ const data = await this.getShipments({
2587
+ lane: lane,
2588
+ bagStatus: bagStatus,
2589
+ statusOverrideLane: statusOverrideLane,
2590
+ timeToDispatch: timeToDispatch,
2591
+ searchType: searchType,
2592
+ searchValue: searchValue,
2593
+ fromDate: fromDate,
2594
+ toDate: toDate,
2595
+ dpIds: dpIds,
2596
+ stores: stores,
2597
+ salesChannels: salesChannels,
2598
+ pageNo: pageNo,
2599
+ pageSize: pageSize,
2600
+ fetchActiveShipment: fetchActiveShipment,
2601
+ excludeLockedShipments: excludeLockedShipments,
2602
+ paymentMethods: paymentMethods,
2603
+ channelShipmentId: channelShipmentId,
2604
+ channelOrderId: channelOrderId,
2605
+ customMeta: customMeta,
2606
+ orderingChannel: orderingChannel,
2607
+ companyAffiliateTag: companyAffiliateTag,
2608
+ myOrders: myOrders,
2609
+ platformUserId: platformUserId,
2610
+ sortType: sortType,
2611
+ showCrossCompanyData: showCrossCompanyData,
2612
+ tags: tags,
2613
+ customerId: customerId,
2614
+ orderType: orderType,
2615
+ });
2616
+ paginator.setPaginator({
2617
+ hasNext: data.page.has_next ? true : false,
2618
+ nextId: data.page.next_id,
2619
+ });
2620
+ return data;
2621
+ };
2622
+ paginator.setCallback(callback.bind(this));
2623
+ return paginator;
2624
+ }
2625
+
2415
2626
  /**
2416
2627
  * @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object
2417
2628
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -276,7 +276,7 @@ export = OrderPlatformModel;
276
276
  * @property {string} [display_name]
277
277
  * @property {string} [entity_type]
278
278
  * @property {FinancialBreakup[]} [financial_breakup]
279
- * @property {BagGSTDetails} [gst_details]
279
+ * @property {GSTDetailsData} [gst_details]
280
280
  * @property {number} [id]
281
281
  * @property {string} [identifier]
282
282
  * @property {Item} [item]
@@ -1165,8 +1165,9 @@ export = OrderPlatformModel;
1165
1165
  * @property {string} [entity_type]
1166
1166
  * @property {FinancialBreakup} [financial_breakup]
1167
1167
  * @property {string} [group_id]
1168
- * @property {BagGST} [gst_details]
1168
+ * @property {GSTDetailsData} [gst_details]
1169
1169
  * @property {string} [identifier]
1170
+ * @property {boolean} [is_parent]
1170
1171
  * @property {PlatformItem} [item]
1171
1172
  * @property {number} [line_number]
1172
1173
  * @property {BagMeta} [meta]
@@ -1276,6 +1277,7 @@ export = OrderPlatformModel;
1276
1277
  * @typedef OrderMeta
1277
1278
  * @property {BillingStaffDetails} [billing_staff_details]
1278
1279
  * @property {number} [cart_id]
1280
+ * @property {string} [cart_object_id]
1279
1281
  * @property {string} [comment]
1280
1282
  * @property {string} [company_logo]
1281
1283
  * @property {string} [currency_symbol]
@@ -1503,9 +1505,11 @@ export = OrderPlatformModel;
1503
1505
  * @property {InvoiceInfo} [invoice]
1504
1506
  * @property {string} [invoice_id]
1505
1507
  * @property {boolean} [is_dp_assign_enabled]
1508
+ * @property {boolean} [is_self_ship]
1506
1509
  * @property {string} [journey_type]
1507
1510
  * @property {boolean} [lock_status]
1508
1511
  * @property {ShipmentMeta} [meta]
1512
+ * @property {string} [mode_of_payment]
1509
1513
  * @property {string} [operational_status]
1510
1514
  * @property {OrderDetailsData} [order]
1511
1515
  * @property {OrderingStoreDetails} [ordering_store]
@@ -1830,6 +1834,7 @@ export = OrderPlatformModel;
1830
1834
  * @property {string} [invoice_id]
1831
1835
  * @property {boolean} [lock_status]
1832
1836
  * @property {ShipmentItemMeta} [meta]
1837
+ * @property {string} [mode_of_payment]
1833
1838
  * @property {string} [order_date]
1834
1839
  * @property {string} order_id
1835
1840
  * @property {string} [ordering_channnel]
@@ -1934,6 +1939,7 @@ export = OrderPlatformModel;
1934
1939
  * @property {string} [packaging_name]
1935
1940
  * @property {string} [parent_dp_id]
1936
1941
  * @property {string} [po_number]
1942
+ * @property {string} [refund_to]
1937
1943
  * @property {string} [return_affiliate_order_id]
1938
1944
  * @property {string} [return_affiliate_shipment_id]
1939
1945
  * @property {string} [return_awb_number]
@@ -2660,7 +2666,7 @@ type BagDetailsPlatformResponse = {
2660
2666
  display_name?: string;
2661
2667
  entity_type?: string;
2662
2668
  financial_breakup?: FinancialBreakup[];
2663
- gst_details?: BagGSTDetails;
2669
+ gst_details?: GSTDetailsData;
2664
2670
  id?: number;
2665
2671
  identifier?: string;
2666
2672
  item?: Item;
@@ -3814,8 +3820,9 @@ type OrderBags = {
3814
3820
  entity_type?: string;
3815
3821
  financial_breakup?: FinancialBreakup;
3816
3822
  group_id?: string;
3817
- gst_details?: BagGST;
3823
+ gst_details?: GSTDetailsData;
3818
3824
  identifier?: string;
3825
+ is_parent?: boolean;
3819
3826
  item?: PlatformItem;
3820
3827
  line_number?: number;
3821
3828
  meta?: BagMeta;
@@ -3936,6 +3943,7 @@ declare function OrderMeta(): OrderMeta;
3936
3943
  type OrderMeta = {
3937
3944
  billing_staff_details?: BillingStaffDetails;
3938
3945
  cart_id?: number;
3946
+ cart_object_id?: string;
3939
3947
  comment?: string;
3940
3948
  company_logo?: string;
3941
3949
  currency_symbol?: string;
@@ -4205,9 +4213,11 @@ type PlatformShipment = {
4205
4213
  invoice?: InvoiceInfo;
4206
4214
  invoice_id?: string;
4207
4215
  is_dp_assign_enabled?: boolean;
4216
+ is_self_ship?: boolean;
4208
4217
  journey_type?: string;
4209
4218
  lock_status?: boolean;
4210
4219
  meta?: ShipmentMeta;
4220
+ mode_of_payment?: string;
4211
4221
  operational_status?: string;
4212
4222
  order?: OrderDetailsData;
4213
4223
  ordering_store?: OrderingStoreDetails;
@@ -4604,6 +4614,7 @@ type ShipmentItem = {
4604
4614
  invoice_id?: string;
4605
4615
  lock_status?: boolean;
4606
4616
  meta?: ShipmentItemMeta;
4617
+ mode_of_payment?: string;
4607
4618
  order_date?: string;
4608
4619
  order_id: string;
4609
4620
  ordering_channnel?: string;
@@ -4713,6 +4724,7 @@ type ShipmentMeta = {
4713
4724
  packaging_name?: string;
4714
4725
  parent_dp_id?: string;
4715
4726
  po_number?: string;
4727
+ refund_to?: string;
4716
4728
  return_affiliate_order_id?: string;
4717
4729
  return_affiliate_shipment_id?: string;
4718
4730
  return_awb_number?: string;