@gofynd/fdk-client-javascript 1.1.2 → 1.1.4

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 (120) hide show
  1. package/README.md +2 -2
  2. package/index.d.ts +7 -7
  3. package/index.js +12 -12
  4. package/package.json +1 -1
  5. package/sdk/application/ApplicationClient.d.ts +20 -20
  6. package/sdk/application/ApplicationClient.js +26 -26
  7. package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
  8. package/sdk/application/Cart/CartApplicationClient.js +105 -10
  9. package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
  10. package/sdk/application/Cart/CartApplicationModel.js +105 -1
  11. package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
  12. package/sdk/application/Cart/CartApplicationValidator.js +15 -1
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
  15. package/sdk/application/Common/CommonApplicationModel.js +4 -0
  16. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
  18. package/sdk/application/Configuration/ConfigurationApplicationModel.js +6 -5
  19. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  20. package/sdk/application/Content/ContentApplicationModel.js +3 -1
  21. package/sdk/application/Lead/LeadApplicationModel.js +4 -1
  22. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
  24. package/sdk/application/Order/OrderApplicationClient.js +2 -2
  25. package/sdk/application/Order/OrderApplicationModel.js +18 -8
  26. package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
  27. package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
  28. package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
  29. package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
  30. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
  31. package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
  32. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
  33. package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
  34. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
  35. package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
  36. package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
  37. package/sdk/application/index.d.ts +10 -10
  38. package/sdk/application/index.js +13 -13
  39. package/sdk/common/Constant.d.ts +5 -0
  40. package/sdk/common/Constant.js +5 -0
  41. package/sdk/partner/OAuthClient.js +1 -1
  42. package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
  43. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +491 -2
  44. package/sdk/platform/Cart/CartPlatformApplicationClient.js +2661 -337
  45. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +32 -0
  46. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +269 -0
  47. package/sdk/platform/Cart/CartPlatformModel.d.ts +58 -0
  48. package/sdk/platform/Cart/CartPlatformModel.js +652 -3
  49. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
  50. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
  51. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  52. package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
  53. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
  54. package/sdk/platform/Catalog/CatalogPlatformModel.js +43 -31
  55. package/sdk/platform/Common/CommonPlatformModel.js +4 -0
  56. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
  57. package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
  58. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
  59. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
  60. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
  61. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
  62. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
  63. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
  64. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
  65. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
  66. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +34 -7
  67. package/sdk/platform/Content/ContentPlatformModel.js +3 -1
  68. package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
  69. package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
  70. package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
  71. package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
  72. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
  73. package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
  74. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
  75. package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
  76. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
  77. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
  78. package/sdk/platform/Order/OrderPlatformClient.d.ts +161 -79
  79. package/sdk/platform/Order/OrderPlatformClient.js +546 -114
  80. package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
  81. package/sdk/platform/Order/OrderPlatformModel.js +569 -159
  82. package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
  83. package/sdk/platform/Order/OrderPlatformValidator.js +52 -9
  84. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
  85. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
  86. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
  87. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
  88. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
  89. package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
  90. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
  91. package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
  92. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
  93. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
  94. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
  95. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
  96. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
  97. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
  98. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +48 -0
  99. package/sdk/platform/Payment/PaymentPlatformModel.js +452 -7
  100. package/sdk/platform/PlatformApplicationClient.d.ts +1249 -937
  101. package/sdk/platform/PlatformApplicationClient.js +1366 -1033
  102. package/sdk/platform/PlatformClient.d.ts +10979 -8771
  103. package/sdk/platform/PlatformClient.js +11874 -9197
  104. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +134 -0
  105. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +852 -0
  106. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +16 -0
  107. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +81 -0
  108. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +223 -0
  109. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1296 -0
  110. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +97 -0
  111. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +778 -0
  112. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +21 -0
  113. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +130 -0
  114. package/sdk/platform/index.d.ts +16 -14
  115. package/sdk/platform/index.js +22 -18
  116. package/sdk/public/Configuration/ConfigurationPublicModel.js +5 -0
  117. package/sdk/public/PublicClient.d.ts +2 -2
  118. package/sdk/public/PublicClient.js +4 -4
  119. package/sdk/public/index.d.ts +1 -1
  120. package/sdk/public/index.js +2 -2
@@ -11,6 +11,70 @@ class Order {
11
11
  this.config = config;
12
12
  }
13
13
 
14
+ /**
15
+ * @param {Object} arg - Arg object.
16
+ * @param {AttachOrderUser} arg.body
17
+ * @returns {Promise<AttachOrderUserResponse>} - Success response
18
+ * @summary:
19
+ * @description:
20
+ */
21
+ async attachOrderUser({ body } = {}) {
22
+ const { error } = OrderValidator.attachOrderUser().validate(
23
+ {
24
+ body,
25
+ },
26
+ { abortEarly: false, allowUnknown: true }
27
+ );
28
+ if (error) {
29
+ return Promise.reject(new FDKClientValidationError(error));
30
+ }
31
+
32
+ // Showing warrnings if extra unknown parameters are found
33
+ const { error: warrning } = OrderValidator.attachOrderUser().validate(
34
+ {
35
+ body,
36
+ },
37
+ { abortEarly: false, allowUnknown: false }
38
+ );
39
+ if (warrning) {
40
+ Logger({
41
+ level: "WARN",
42
+ message: "Parameter Validation warrnings for attachOrderUser",
43
+ });
44
+ Logger({ level: "WARN", message: warrning });
45
+ }
46
+
47
+ const query_params = {};
48
+
49
+ const xHeaders = {};
50
+
51
+ const response = await PlatformAPIClient.execute(
52
+ this.config,
53
+ "post",
54
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/attach`,
55
+ query_params,
56
+ body,
57
+ xHeaders
58
+ );
59
+
60
+ const {
61
+ error: res_error,
62
+ } = OrderModel.AttachOrderUserResponse().validate(response, {
63
+ abortEarly: false,
64
+ allowUnknown: false,
65
+ });
66
+
67
+ if (res_error) {
68
+ Logger({
69
+ level: "WARN",
70
+ message: "Response Validation Warnnings for attachOrderUser",
71
+ });
72
+ Logger({ level: "WARN", message: res_error });
73
+ }
74
+
75
+ return response;
76
+ }
77
+
14
78
  /**
15
79
  * @param {Object} arg - Arg object.
16
80
  * @param {OrderStatus} arg.body
@@ -399,7 +463,7 @@ class Order {
399
463
  const response = await PlatformAPIClient.execute(
400
464
  this.config,
401
465
  "get",
402
- `/service/platform/orders/v1.0/company/${this.config.companyId}/bulk-action/download-seller-templates`,
466
+ `/service/platform/order/v1.0/company/${this.config.companyId}/bulk-action/download-seller-templates`,
403
467
  query_params,
404
468
  undefined,
405
469
  xHeaders
@@ -421,6 +485,216 @@ class Order {
421
485
  return response;
422
486
  }
423
487
 
488
+ /**
489
+ * @param {Object} arg - Arg object.
490
+ * @param {FetchCreditBalanceRequestPayload} arg.body
491
+ * @returns {Promise<FetchCreditBalanceResponsePayload>} - Success response
492
+ * @summary:
493
+ * @description:
494
+ */
495
+ async fetchCreditBalanceDetail({ body } = {}) {
496
+ const { error } = OrderValidator.fetchCreditBalanceDetail().validate(
497
+ {
498
+ body,
499
+ },
500
+ { abortEarly: false, allowUnknown: true }
501
+ );
502
+ if (error) {
503
+ return Promise.reject(new FDKClientValidationError(error));
504
+ }
505
+
506
+ // Showing warrnings if extra unknown parameters are found
507
+ const {
508
+ error: warrning,
509
+ } = OrderValidator.fetchCreditBalanceDetail().validate(
510
+ {
511
+ body,
512
+ },
513
+ { abortEarly: false, allowUnknown: false }
514
+ );
515
+ if (warrning) {
516
+ Logger({
517
+ level: "WARN",
518
+ message: "Parameter Validation warrnings for fetchCreditBalanceDetail",
519
+ });
520
+ Logger({ level: "WARN", message: warrning });
521
+ }
522
+
523
+ const query_params = {};
524
+
525
+ const xHeaders = {};
526
+
527
+ const response = await PlatformAPIClient.execute(
528
+ this.config,
529
+ "post",
530
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`,
531
+ query_params,
532
+ body,
533
+ xHeaders
534
+ );
535
+
536
+ const {
537
+ error: res_error,
538
+ } = OrderModel.FetchCreditBalanceResponsePayload().validate(response, {
539
+ abortEarly: false,
540
+ allowUnknown: false,
541
+ });
542
+
543
+ if (res_error) {
544
+ Logger({
545
+ level: "WARN",
546
+ message: "Response Validation Warnnings for fetchCreditBalanceDetail",
547
+ });
548
+ Logger({ level: "WARN", message: res_error });
549
+ }
550
+
551
+ return response;
552
+ }
553
+
554
+ /**
555
+ * @param {Object} arg - Arg object.
556
+ * @param {RefundModeConfigRequestPayload} arg.body
557
+ * @returns {Promise<RefundModeConfigResponsePayload>} - Success response
558
+ * @summary:
559
+ * @description:
560
+ */
561
+ async fetchRefundModeConfig({ body } = {}) {
562
+ const { error } = OrderValidator.fetchRefundModeConfig().validate(
563
+ {
564
+ body,
565
+ },
566
+ { abortEarly: false, allowUnknown: true }
567
+ );
568
+ if (error) {
569
+ return Promise.reject(new FDKClientValidationError(error));
570
+ }
571
+
572
+ // Showing warrnings if extra unknown parameters are found
573
+ const { error: warrning } = OrderValidator.fetchRefundModeConfig().validate(
574
+ {
575
+ body,
576
+ },
577
+ { abortEarly: false, allowUnknown: false }
578
+ );
579
+ if (warrning) {
580
+ Logger({
581
+ level: "WARN",
582
+ message: "Parameter Validation warrnings for fetchRefundModeConfig",
583
+ });
584
+ Logger({ level: "WARN", message: warrning });
585
+ }
586
+
587
+ const query_params = {};
588
+
589
+ const xHeaders = {};
590
+
591
+ const response = await PlatformAPIClient.execute(
592
+ this.config,
593
+ "post",
594
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund-mode-config`,
595
+ query_params,
596
+ body,
597
+ xHeaders
598
+ );
599
+
600
+ const {
601
+ error: res_error,
602
+ } = OrderModel.RefundModeConfigResponsePayload().validate(response, {
603
+ abortEarly: false,
604
+ allowUnknown: false,
605
+ });
606
+
607
+ if (res_error) {
608
+ Logger({
609
+ level: "WARN",
610
+ message: "Response Validation Warnnings for fetchRefundModeConfig",
611
+ });
612
+ Logger({ level: "WARN", message: res_error });
613
+ }
614
+
615
+ return response;
616
+ }
617
+
618
+ /**
619
+ * @param {Object} arg - Arg object.
620
+ * @param {string} arg.orderId -
621
+ * @param {string} [arg.shipmentId] -
622
+ * @param {string} [arg.documentType] -
623
+ * @returns {Promise<GeneratePosOrderReceiptResponse>} - Success response
624
+ * @summary:
625
+ * @description:
626
+ */
627
+ async generatePOSReceiptByOrderId({
628
+ orderId,
629
+ shipmentId,
630
+ documentType,
631
+ } = {}) {
632
+ const { error } = OrderValidator.generatePOSReceiptByOrderId().validate(
633
+ {
634
+ orderId,
635
+ shipmentId,
636
+ documentType,
637
+ },
638
+ { abortEarly: false, allowUnknown: true }
639
+ );
640
+ if (error) {
641
+ return Promise.reject(new FDKClientValidationError(error));
642
+ }
643
+
644
+ // Showing warrnings if extra unknown parameters are found
645
+ const {
646
+ error: warrning,
647
+ } = OrderValidator.generatePOSReceiptByOrderId().validate(
648
+ {
649
+ orderId,
650
+ shipmentId,
651
+ documentType,
652
+ },
653
+ { abortEarly: false, allowUnknown: false }
654
+ );
655
+ if (warrning) {
656
+ Logger({
657
+ level: "WARN",
658
+ message:
659
+ "Parameter Validation warrnings for generatePOSReceiptByOrderId",
660
+ });
661
+ Logger({ level: "WARN", message: warrning });
662
+ }
663
+
664
+ const query_params = {};
665
+ query_params["shipment_id"] = shipmentId;
666
+ query_params["document_type"] = documentType;
667
+
668
+ const xHeaders = {};
669
+
670
+ const response = await PlatformAPIClient.execute(
671
+ this.config,
672
+ "get",
673
+ `/service/platform/order/v1.0/company/${this.config.companyId}/orders/${orderId}/generate/pos-receipt`,
674
+ query_params,
675
+ undefined,
676
+ xHeaders
677
+ );
678
+
679
+ const {
680
+ error: res_error,
681
+ } = OrderModel.GeneratePosOrderReceiptResponse().validate(response, {
682
+ abortEarly: false,
683
+ allowUnknown: false,
684
+ });
685
+
686
+ if (res_error) {
687
+ Logger({
688
+ level: "WARN",
689
+ message:
690
+ "Response Validation Warnnings for generatePOSReceiptByOrderId",
691
+ });
692
+ Logger({ level: "WARN", message: res_error });
693
+ }
694
+
695
+ return response;
696
+ }
697
+
424
698
  /**
425
699
  * @param {Object} arg - Arg object.
426
700
  * @param {string} [arg.date] - Date On which the announcement is Active
@@ -489,9 +763,9 @@ class Order {
489
763
 
490
764
  /**
491
765
  * @param {Object} arg - Arg object.
492
- * @param {string} [arg.bagId] -
493
- * @param {string} [arg.channelBagId] -
494
- * @param {string} [arg.channelId] -
766
+ * @param {string} [arg.bagId] - Id of bag
767
+ * @param {string} [arg.channelBagId] - Id of application bag
768
+ * @param {string} [arg.channelId] - Id of application
495
769
  * @returns {Promise<BagDetailsPlatformResponse>} - Success response
496
770
  * @summary:
497
771
  * @description:
@@ -536,7 +810,7 @@ class Order {
536
810
  const response = await PlatformAPIClient.execute(
537
811
  this.config,
538
812
  "get",
539
- `/service/platform/orders/v1.0/company/${this.config.companyId}/bag-details/`,
813
+ `/service/platform/order/v1.0/company/${this.config.companyId}/bag-details/`,
540
814
  query_params,
541
815
  undefined,
542
816
  xHeaders
@@ -562,15 +836,16 @@ class Order {
562
836
 
563
837
  /**
564
838
  * @param {Object} arg - Arg object.
565
- * @param {string} [arg.bagIds] -
566
- * @param {string} [arg.shipmentIds] -
567
- * @param {string} [arg.orderIds] -
568
- * @param {string} [arg.channelBagIds] -
569
- * @param {string} [arg.channelShipmentIds] -
570
- * @param {string} [arg.channelOrderIds] -
571
- * @param {string} [arg.channelId] -
572
- * @param {number} [arg.pageNo] -
573
- * @param {number} [arg.pageSize] -
839
+ * @param {string} [arg.bagIds] - Comma separated values of bag ids
840
+ * @param {string} [arg.shipmentIds] - Comma separated values of shipment ids
841
+ * @param {string} [arg.orderIds] - Comma separated values of order ids
842
+ * @param {string} [arg.channelBagIds] - Comma separated values of app bag ids
843
+ * @param {string} [arg.channelShipmentIds] - Comma separated values of app
844
+ * shipment ids
845
+ * @param {string} [arg.channelOrderIds] - Comma separated values of app order ids
846
+ * @param {string} [arg.channelId] - Comma separated values of app ids
847
+ * @param {number} [arg.pageNo] - Page number for paginated data
848
+ * @param {number} [arg.pageSize] - Page size of data received per page
574
849
  * @returns {Promise<GetBagsPlatformResponse>} - Success response
575
850
  * @summary:
576
851
  * @description:
@@ -643,7 +918,7 @@ class Order {
643
918
  const response = await PlatformAPIClient.execute(
644
919
  this.config,
645
920
  "get",
646
- `/service/platform/orders/v1.0/company/${this.config.companyId}/bags`,
921
+ `/service/platform/order/v1.0/company/${this.config.companyId}/bags`,
647
922
  query_params,
648
923
  undefined,
649
924
  xHeaders
@@ -702,7 +977,7 @@ class Order {
702
977
  const response = await PlatformAPIClient.execute(
703
978
  this.config,
704
979
  "get",
705
- `/service/platform/orders/v1.0/company/${this.config.companyId}/bulk-action/get-seller-templates`,
980
+ `/service/platform/order/v1.0/company/${this.config.companyId}/bulk-action/get-seller-templates`,
706
981
  query_params,
707
982
  undefined,
708
983
  xHeaders
@@ -728,14 +1003,14 @@ class Order {
728
1003
 
729
1004
  /**
730
1005
  * @param {Object} arg - Arg object.
731
- * @param {string} [arg.salesChannels] - Comma seperated values of sales channel ids
732
- * @param {string} [arg.dpIds] - Comma seperated values of delivery partner ids
1006
+ * @param {string} [arg.salesChannels] - Comma separated values of sales channel ids
1007
+ * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
733
1008
  * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
734
1009
  * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
735
- * @param {string} [arg.stores] - Comma seperated values of store ids
736
- * @param {string} [arg.tags] - Comma seperated values of tags
737
- * @param {string} [arg.bagStatus] - Comma seperated values of bag statuses
738
- * @param {string} [arg.paymentMethods] - Comma seperated values of payment methods
1010
+ * @param {string} [arg.stores] - Comma separated values of store ids
1011
+ * @param {string} [arg.tags] - Comma separated values of tags
1012
+ * @param {string} [arg.bagStatus] - Comma separated values of bag statuses
1013
+ * @param {string} [arg.paymentMethods] - Comma separated values of payment methods
739
1014
  * @param {string} [arg.fileType] - File type to be downloaded
740
1015
  * @param {number} [arg.timeToDispatch] - Sla breached or not breached
741
1016
  * @param {number} [arg.pageNo] -
@@ -826,7 +1101,7 @@ class Order {
826
1101
  const response = await PlatformAPIClient.execute(
827
1102
  this.config,
828
1103
  "get",
829
- `/service/platform/orders/v1.0/company/${this.config.companyId}/generate/file`,
1104
+ `/service/platform/order/v1.0/company/${this.config.companyId}/generate/file`,
830
1105
  query_params,
831
1106
  undefined,
832
1107
  xHeaders
@@ -909,15 +1184,21 @@ class Order {
909
1184
 
910
1185
  /**
911
1186
  * @param {Object} arg - Arg object.
912
- * @param {string} [arg.superLane] -
913
- * @param {string} [arg.groupEntity] -
914
- * @param {string} [arg.fromDate] -
915
- * @param {string} [arg.toDate] -
916
- * @param {string} [arg.dpIds] -
917
- * @param {string} [arg.stores] -
918
- * @param {string} [arg.salesChannel] -
919
- * @param {string} [arg.paymentMode] -
920
- * @param {string} [arg.bagStatus] -
1187
+ * @param {string} [arg.superLane] - Name of lane for which data is to be fetched
1188
+ * @param {string} [arg.groupEntity] - Name of group entity
1189
+ * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
1190
+ * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
1191
+ * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
1192
+ * @param {string} [arg.stores] - Comma separated values of store ids
1193
+ * @param {string} [arg.salesChannels] -
1194
+ * @param {string} [arg.paymentMode] - Comma separated values of payment modes
1195
+ * @param {string} [arg.bagStatus] - Comma separated values of bag statuses
1196
+ * @param {string} [arg.searchType] -
1197
+ * @param {string} [arg.searchValue] -
1198
+ * @param {string} [arg.tags] -
1199
+ * @param {string} [arg.timeToDispatch] -
1200
+ * @param {string} [arg.paymentMethods] -
1201
+ * @param {boolean} [arg.myOrders] -
921
1202
  * @returns {Promise<LaneConfigResponse>} - Success response
922
1203
  * @summary:
923
1204
  * @description:
@@ -929,9 +1210,15 @@ class Order {
929
1210
  toDate,
930
1211
  dpIds,
931
1212
  stores,
932
- salesChannel,
1213
+ salesChannels,
933
1214
  paymentMode,
934
1215
  bagStatus,
1216
+ searchType,
1217
+ searchValue,
1218
+ tags,
1219
+ timeToDispatch,
1220
+ paymentMethods,
1221
+ myOrders,
935
1222
  } = {}) {
936
1223
  const { error } = OrderValidator.getLaneConfig().validate(
937
1224
  {
@@ -941,9 +1228,15 @@ class Order {
941
1228
  toDate,
942
1229
  dpIds,
943
1230
  stores,
944
- salesChannel,
1231
+ salesChannels,
945
1232
  paymentMode,
946
1233
  bagStatus,
1234
+ searchType,
1235
+ searchValue,
1236
+ tags,
1237
+ timeToDispatch,
1238
+ paymentMethods,
1239
+ myOrders,
947
1240
  },
948
1241
  { abortEarly: false, allowUnknown: true }
949
1242
  );
@@ -960,9 +1253,15 @@ class Order {
960
1253
  toDate,
961
1254
  dpIds,
962
1255
  stores,
963
- salesChannel,
1256
+ salesChannels,
964
1257
  paymentMode,
965
1258
  bagStatus,
1259
+ searchType,
1260
+ searchValue,
1261
+ tags,
1262
+ timeToDispatch,
1263
+ paymentMethods,
1264
+ myOrders,
966
1265
  },
967
1266
  { abortEarly: false, allowUnknown: false }
968
1267
  );
@@ -981,16 +1280,22 @@ class Order {
981
1280
  query_params["to_date"] = toDate;
982
1281
  query_params["dp_ids"] = dpIds;
983
1282
  query_params["stores"] = stores;
984
- query_params["sales_channel"] = salesChannel;
1283
+ query_params["sales_channels"] = salesChannels;
985
1284
  query_params["payment_mode"] = paymentMode;
986
1285
  query_params["bag_status"] = bagStatus;
1286
+ query_params["search_type"] = searchType;
1287
+ query_params["search_value"] = searchValue;
1288
+ query_params["tags"] = tags;
1289
+ query_params["time_to_dispatch"] = timeToDispatch;
1290
+ query_params["payment_methods"] = paymentMethods;
1291
+ query_params["my_orders"] = myOrders;
987
1292
 
988
1293
  const xHeaders = {};
989
1294
 
990
1295
  const response = await PlatformAPIClient.execute(
991
1296
  this.config,
992
1297
  "get",
993
- `/service/platform/orders/v1.0/company/${this.config.companyId}/lane-config/`,
1298
+ `/service/platform/order/v1.0/company/${this.config.companyId}/lane-config/`,
994
1299
  query_params,
995
1300
  undefined,
996
1301
  xHeaders
@@ -1017,7 +1322,7 @@ class Order {
1017
1322
  /**
1018
1323
  * @param {Object} arg - Arg object.
1019
1324
  * @param {string} arg.orderId -
1020
- * @returns {Promise<ShipmentDetailsResponse>} - Success response
1325
+ * @returns {Promise<OrderDetailsResponse>} - Success response
1021
1326
  * @summary:
1022
1327
  * @description:
1023
1328
  */
@@ -1055,7 +1360,7 @@ class Order {
1055
1360
  const response = await PlatformAPIClient.execute(
1056
1361
  this.config,
1057
1362
  "get",
1058
- `/service/platform/orders/v1.0/company/${this.config.companyId}/order-details`,
1363
+ `/service/platform/order/v1.0/company/${this.config.companyId}/order-details`,
1059
1364
  query_params,
1060
1365
  undefined,
1061
1366
  xHeaders
@@ -1063,7 +1368,7 @@ class Order {
1063
1368
 
1064
1369
  const {
1065
1370
  error: res_error,
1066
- } = OrderModel.ShipmentDetailsResponse().validate(response, {
1371
+ } = OrderModel.OrderDetailsResponse().validate(response, {
1067
1372
  abortEarly: false,
1068
1373
  allowUnknown: false,
1069
1374
  });
@@ -1081,22 +1386,29 @@ class Order {
1081
1386
 
1082
1387
  /**
1083
1388
  * @param {Object} arg - Arg object.
1084
- * @param {string} [arg.lane] -
1085
- * @param {string} [arg.searchType] -
1086
- * @param {string} [arg.bagStatus] -
1087
- * @param {string} [arg.timeToDispatch] -
1389
+ * @param {string} [arg.lane] - Lane refers to a section where orders are
1390
+ * assigned, indicating its grouping
1391
+ * @param {string} [arg.searchType] - Search_type refers to the field that
1392
+ * will be used as the target for the search operation
1393
+ * @param {string} [arg.bagStatus] - Bag_status refers to status of the
1394
+ * entity. Filters orders based on the status.
1395
+ * @param {string} [arg.timeToDispatch] - Time_to_dispatch refers to
1396
+ * estimated SLA time.
1088
1397
  * @param {string} [arg.paymentMethods] -
1089
- * @param {string} [arg.tags] -
1090
- * @param {string} [arg.searchValue] -
1398
+ * @param {string} [arg.tags] - Tags refers to additional descriptive labels
1399
+ * associated with the order
1400
+ * @param {string} [arg.searchValue] - Search_value is matched against the
1401
+ * field specified by the search_type
1091
1402
  * @param {string} [arg.fromDate] -
1092
1403
  * @param {string} [arg.toDate] -
1093
- * @param {string} [arg.dpIds] -
1404
+ * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
1094
1405
  * @param {string} [arg.stores] -
1095
1406
  * @param {string} [arg.salesChannels] -
1096
1407
  * @param {number} [arg.pageNo] -
1097
1408
  * @param {number} [arg.pageSize] -
1098
1409
  * @param {boolean} [arg.isPrioritySort] -
1099
1410
  * @param {string} [arg.customMeta] -
1411
+ * @param {boolean} [arg.myOrders] -
1100
1412
  * @returns {Promise<OrderListingResponse>} - Success response
1101
1413
  * @summary:
1102
1414
  * @description:
@@ -1118,6 +1430,7 @@ class Order {
1118
1430
  pageSize,
1119
1431
  isPrioritySort,
1120
1432
  customMeta,
1433
+ myOrders,
1121
1434
  } = {}) {
1122
1435
  const { error } = OrderValidator.getOrders().validate(
1123
1436
  {
@@ -1137,6 +1450,7 @@ class Order {
1137
1450
  pageSize,
1138
1451
  isPrioritySort,
1139
1452
  customMeta,
1453
+ myOrders,
1140
1454
  },
1141
1455
  { abortEarly: false, allowUnknown: true }
1142
1456
  );
@@ -1163,6 +1477,7 @@ class Order {
1163
1477
  pageSize,
1164
1478
  isPrioritySort,
1165
1479
  customMeta,
1480
+ myOrders,
1166
1481
  },
1167
1482
  { abortEarly: false, allowUnknown: false }
1168
1483
  );
@@ -1191,13 +1506,14 @@ class Order {
1191
1506
  query_params["page_size"] = pageSize;
1192
1507
  query_params["is_priority_sort"] = isPrioritySort;
1193
1508
  query_params["custom_meta"] = customMeta;
1509
+ query_params["my_orders"] = myOrders;
1194
1510
 
1195
1511
  const xHeaders = {};
1196
1512
 
1197
1513
  const response = await PlatformAPIClient.execute(
1198
1514
  this.config,
1199
1515
  "get",
1200
- `/service/platform/orders/v1.0/company/${this.config.companyId}/orders-listing`,
1516
+ `/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`,
1201
1517
  query_params,
1202
1518
  undefined,
1203
1519
  xHeaders
@@ -1282,26 +1598,17 @@ class Order {
1282
1598
 
1283
1599
  /**
1284
1600
  * @param {Object} arg - Arg object.
1285
- * @param {string} [arg.channelShipmentId] -
1286
- * @param {string} [arg.shipmentId] -
1287
- * @param {string} [arg.orderingCompanyId] -
1288
- * @param {string} [arg.requestByExt] -
1601
+ * @param {string} [arg.channelShipmentId] - App Shipment Id
1602
+ * @param {string} [arg.shipmentId] - Shipment Id
1289
1603
  * @returns {Promise<ShipmentInfoResponse>} - Success response
1290
1604
  * @summary:
1291
1605
  * @description:
1292
1606
  */
1293
- async getShipmentById({
1294
- channelShipmentId,
1295
- shipmentId,
1296
- orderingCompanyId,
1297
- requestByExt,
1298
- } = {}) {
1607
+ async getShipmentById({ channelShipmentId, shipmentId } = {}) {
1299
1608
  const { error } = OrderValidator.getShipmentById().validate(
1300
1609
  {
1301
1610
  channelShipmentId,
1302
1611
  shipmentId,
1303
- orderingCompanyId,
1304
- requestByExt,
1305
1612
  },
1306
1613
  { abortEarly: false, allowUnknown: true }
1307
1614
  );
@@ -1314,8 +1621,6 @@ class Order {
1314
1621
  {
1315
1622
  channelShipmentId,
1316
1623
  shipmentId,
1317
- orderingCompanyId,
1318
- requestByExt,
1319
1624
  },
1320
1625
  { abortEarly: false, allowUnknown: false }
1321
1626
  );
@@ -1330,15 +1635,13 @@ class Order {
1330
1635
  const query_params = {};
1331
1636
  query_params["channel_shipment_id"] = channelShipmentId;
1332
1637
  query_params["shipment_id"] = shipmentId;
1333
- query_params["ordering_company_id"] = orderingCompanyId;
1334
- query_params["request_by_ext"] = requestByExt;
1335
1638
 
1336
1639
  const xHeaders = {};
1337
1640
 
1338
1641
  const response = await PlatformAPIClient.execute(
1339
1642
  this.config,
1340
1643
  "get",
1341
- `/service/platform/orders/v1.0/company/${this.config.companyId}/shipment-details`,
1644
+ `/service/platform/order/v1.0/company/${this.config.companyId}/shipment-details`,
1342
1645
  query_params,
1343
1646
  undefined,
1344
1647
  xHeaders
@@ -1480,7 +1783,7 @@ class Order {
1480
1783
  const response = await PlatformAPIClient.execute(
1481
1784
  this.config,
1482
1785
  "get",
1483
- `/service/platform/orders/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`,
1786
+ `/service/platform/order/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`,
1484
1787
  query_params,
1485
1788
  undefined,
1486
1789
  xHeaders
@@ -1506,30 +1809,31 @@ class Order {
1506
1809
 
1507
1810
  /**
1508
1811
  * @param {Object} arg - Arg object.
1509
- * @param {string} [arg.lane] -
1510
- * @param {string} [arg.bagStatus] -
1511
- * @param {boolean} [arg.statusOverrideLane] -
1512
- * @param {string} [arg.searchType] -
1513
- * @param {string} [arg.searchValue] -
1514
- * @param {string} [arg.searchId] -
1515
- * @param {string} [arg.fromDate] -
1516
- * @param {string} [arg.toDate] -
1517
- * @param {string} [arg.dpIds] -
1518
- * @param {string} [arg.orderingCompanyId] -
1519
- * @param {string} [arg.stores] -
1520
- * @param {string} [arg.salesChannel] -
1521
- * @param {string} [arg.requestByExt] -
1522
- * @param {number} [arg.pageNo] -
1523
- * @param {number} [arg.pageSize] -
1524
- * @param {boolean} [arg.isPrioritySort] -
1525
- * @param {boolean} [arg.fetchActiveShipment] -
1526
- * @param {boolean} [arg.excludeLockedShipments] -
1527
- * @param {string} [arg.paymentMethods] -
1528
- * @param {string} [arg.channelShipmentId] -
1529
- * @param {string} [arg.channelOrderId] -
1812
+ * @param {string} [arg.lane] - Name of lane for which data is to be fetched
1813
+ * @param {string} [arg.bagStatus] - Comma separated values of bag statuses
1814
+ * @param {boolean} [arg.statusOverrideLane] - Use this flag to fetch by
1815
+ * bag_status and override lane
1816
+ * @param {string} [arg.timeToDispatch] -
1817
+ * @param {string} [arg.searchType] - Search type key
1818
+ * @param {string} [arg.searchValue] - Search type value
1819
+ * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
1820
+ * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
1821
+ * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
1822
+ * @param {string} [arg.stores] - Comma separated values of store ids
1823
+ * @param {string} [arg.salesChannels] - Comma separated values of sales channel ids
1824
+ * @param {number} [arg.pageNo] - Page number for paginated data
1825
+ * @param {number} [arg.pageSize] - Page size of data received per page
1826
+ * @param {boolean} [arg.fetchActiveShipment] - Flag to fetch active shipments
1827
+ * @param {boolean} [arg.excludeLockedShipments] - Flag to fetch locked shipments
1828
+ * @param {string} [arg.paymentMethods] - Comma separated values of payment methods
1829
+ * @param {string} [arg.channelShipmentId] - App Shipment Id
1830
+ * @param {string} [arg.channelOrderId] - App Order Id
1530
1831
  * @param {string} [arg.customMeta] -
1531
1832
  * @param {string} [arg.orderingChannel] -
1532
1833
  * @param {string} [arg.companyAffiliateTag] -
1834
+ * @param {boolean} [arg.myOrders] -
1835
+ * @param {string} [arg.platformUserId] -
1836
+ * @param {string} [arg.tags] - Comma separated values of tags
1533
1837
  * @returns {Promise<ShipmentInternalPlatformViewResponse>} - Success response
1534
1838
  * @summary:
1535
1839
  * @description:
@@ -1538,19 +1842,16 @@ class Order {
1538
1842
  lane,
1539
1843
  bagStatus,
1540
1844
  statusOverrideLane,
1845
+ timeToDispatch,
1541
1846
  searchType,
1542
1847
  searchValue,
1543
- searchId,
1544
1848
  fromDate,
1545
1849
  toDate,
1546
1850
  dpIds,
1547
- orderingCompanyId,
1548
1851
  stores,
1549
- salesChannel,
1550
- requestByExt,
1852
+ salesChannels,
1551
1853
  pageNo,
1552
1854
  pageSize,
1553
- isPrioritySort,
1554
1855
  fetchActiveShipment,
1555
1856
  excludeLockedShipments,
1556
1857
  paymentMethods,
@@ -1559,25 +1860,25 @@ class Order {
1559
1860
  customMeta,
1560
1861
  orderingChannel,
1561
1862
  companyAffiliateTag,
1863
+ myOrders,
1864
+ platformUserId,
1865
+ tags,
1562
1866
  } = {}) {
1563
1867
  const { error } = OrderValidator.getShipments().validate(
1564
1868
  {
1565
1869
  lane,
1566
1870
  bagStatus,
1567
1871
  statusOverrideLane,
1872
+ timeToDispatch,
1568
1873
  searchType,
1569
1874
  searchValue,
1570
- searchId,
1571
1875
  fromDate,
1572
1876
  toDate,
1573
1877
  dpIds,
1574
- orderingCompanyId,
1575
1878
  stores,
1576
- salesChannel,
1577
- requestByExt,
1879
+ salesChannels,
1578
1880
  pageNo,
1579
1881
  pageSize,
1580
- isPrioritySort,
1581
1882
  fetchActiveShipment,
1582
1883
  excludeLockedShipments,
1583
1884
  paymentMethods,
@@ -1586,6 +1887,9 @@ class Order {
1586
1887
  customMeta,
1587
1888
  orderingChannel,
1588
1889
  companyAffiliateTag,
1890
+ myOrders,
1891
+ platformUserId,
1892
+ tags,
1589
1893
  },
1590
1894
  { abortEarly: false, allowUnknown: true }
1591
1895
  );
@@ -1599,19 +1903,16 @@ class Order {
1599
1903
  lane,
1600
1904
  bagStatus,
1601
1905
  statusOverrideLane,
1906
+ timeToDispatch,
1602
1907
  searchType,
1603
1908
  searchValue,
1604
- searchId,
1605
1909
  fromDate,
1606
1910
  toDate,
1607
1911
  dpIds,
1608
- orderingCompanyId,
1609
1912
  stores,
1610
- salesChannel,
1611
- requestByExt,
1913
+ salesChannels,
1612
1914
  pageNo,
1613
1915
  pageSize,
1614
- isPrioritySort,
1615
1916
  fetchActiveShipment,
1616
1917
  excludeLockedShipments,
1617
1918
  paymentMethods,
@@ -1620,6 +1921,9 @@ class Order {
1620
1921
  customMeta,
1621
1922
  orderingChannel,
1622
1923
  companyAffiliateTag,
1924
+ myOrders,
1925
+ platformUserId,
1926
+ tags,
1623
1927
  },
1624
1928
  { abortEarly: false, allowUnknown: false }
1625
1929
  );
@@ -1635,19 +1939,16 @@ class Order {
1635
1939
  query_params["lane"] = lane;
1636
1940
  query_params["bag_status"] = bagStatus;
1637
1941
  query_params["status_override_lane"] = statusOverrideLane;
1942
+ query_params["time_to_dispatch"] = timeToDispatch;
1638
1943
  query_params["search_type"] = searchType;
1639
1944
  query_params["search_value"] = searchValue;
1640
- query_params["search_id"] = searchId;
1641
1945
  query_params["from_date"] = fromDate;
1642
1946
  query_params["to_date"] = toDate;
1643
1947
  query_params["dp_ids"] = dpIds;
1644
- query_params["ordering_company_id"] = orderingCompanyId;
1645
1948
  query_params["stores"] = stores;
1646
- query_params["sales_channel"] = salesChannel;
1647
- query_params["request_by_ext"] = requestByExt;
1949
+ query_params["sales_channels"] = salesChannels;
1648
1950
  query_params["page_no"] = pageNo;
1649
1951
  query_params["page_size"] = pageSize;
1650
- query_params["is_priority_sort"] = isPrioritySort;
1651
1952
  query_params["fetch_active_shipment"] = fetchActiveShipment;
1652
1953
  query_params["exclude_locked_shipments"] = excludeLockedShipments;
1653
1954
  query_params["payment_methods"] = paymentMethods;
@@ -1656,13 +1957,16 @@ class Order {
1656
1957
  query_params["custom_meta"] = customMeta;
1657
1958
  query_params["ordering_channel"] = orderingChannel;
1658
1959
  query_params["company_affiliate_tag"] = companyAffiliateTag;
1960
+ query_params["my_orders"] = myOrders;
1961
+ query_params["platform_user_id"] = platformUserId;
1962
+ query_params["tags"] = tags;
1659
1963
 
1660
1964
  const xHeaders = {};
1661
1965
 
1662
1966
  const response = await PlatformAPIClient.execute(
1663
1967
  this.config,
1664
1968
  "get",
1665
- `/service/platform/orders/v1.0/company/${this.config.companyId}/shipments-listing`,
1969
+ `/service/platform/order/v1.0/company/${this.config.companyId}/shipments-listing`,
1666
1970
  query_params,
1667
1971
  undefined,
1668
1972
  xHeaders
@@ -1747,8 +2051,8 @@ class Order {
1747
2051
 
1748
2052
  /**
1749
2053
  * @param {Object} arg - Arg object.
1750
- * @param {string} arg.view -
1751
- * @param {string} [arg.groupEntity] -
2054
+ * @param {string} arg.view - Name of view
2055
+ * @param {string} [arg.groupEntity] - Name of group entity
1752
2056
  * @returns {Promise<FiltersResponse>} - Success response
1753
2057
  * @summary:
1754
2058
  * @description:
@@ -1790,7 +2094,7 @@ class Order {
1790
2094
  const response = await PlatformAPIClient.execute(
1791
2095
  this.config,
1792
2096
  "get",
1793
- `/service/platform/orders/v1.0/company/${this.config.companyId}/filter-listing`,
2097
+ `/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
1794
2098
  query_params,
1795
2099
  undefined,
1796
2100
  xHeaders
@@ -2196,6 +2500,70 @@ class Order {
2196
2500
  return response;
2197
2501
  }
2198
2502
 
2503
+ /**
2504
+ * @param {Object} arg - Arg object.
2505
+ * @param {SendUserMobileOTP} arg.body
2506
+ * @returns {Promise<SendUserMobileOtpResponse>} - Success response
2507
+ * @summary:
2508
+ * @description:
2509
+ */
2510
+ async sendUserMobileOTP({ body } = {}) {
2511
+ const { error } = OrderValidator.sendUserMobileOTP().validate(
2512
+ {
2513
+ body,
2514
+ },
2515
+ { abortEarly: false, allowUnknown: true }
2516
+ );
2517
+ if (error) {
2518
+ return Promise.reject(new FDKClientValidationError(error));
2519
+ }
2520
+
2521
+ // Showing warrnings if extra unknown parameters are found
2522
+ const { error: warrning } = OrderValidator.sendUserMobileOTP().validate(
2523
+ {
2524
+ body,
2525
+ },
2526
+ { abortEarly: false, allowUnknown: false }
2527
+ );
2528
+ if (warrning) {
2529
+ Logger({
2530
+ level: "WARN",
2531
+ message: "Parameter Validation warrnings for sendUserMobileOTP",
2532
+ });
2533
+ Logger({ level: "WARN", message: warrning });
2534
+ }
2535
+
2536
+ const query_params = {};
2537
+
2538
+ const xHeaders = {};
2539
+
2540
+ const response = await PlatformAPIClient.execute(
2541
+ this.config,
2542
+ "post",
2543
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/send/otp/mobile`,
2544
+ query_params,
2545
+ body,
2546
+ xHeaders
2547
+ );
2548
+
2549
+ const {
2550
+ error: res_error,
2551
+ } = OrderModel.SendUserMobileOtpResponse().validate(response, {
2552
+ abortEarly: false,
2553
+ allowUnknown: false,
2554
+ });
2555
+
2556
+ if (res_error) {
2557
+ Logger({
2558
+ level: "WARN",
2559
+ message: "Response Validation Warnnings for sendUserMobileOTP",
2560
+ });
2561
+ Logger({ level: "WARN", message: res_error });
2562
+ }
2563
+
2564
+ return response;
2565
+ }
2566
+
2199
2567
  /**
2200
2568
  * @param {Object} arg - Arg object.
2201
2569
  * @param {string} arg.shipmentId -
@@ -2321,8 +2689,8 @@ class Order {
2321
2689
 
2322
2690
  /**
2323
2691
  * @param {Object} arg - Arg object.
2324
- * @param {CreateOrderPayload} arg.body
2325
- * @returns {Promise<CreateOrderResponse>} - Success response
2692
+ * @param {UpdatePackagingDimensionsPayload} arg.body
2693
+ * @returns {Promise<UpdatePackagingDimensionsResponse>} - Success response
2326
2694
  * @summary:
2327
2695
  * @description:
2328
2696
  */
@@ -2369,7 +2737,7 @@ class Order {
2369
2737
 
2370
2738
  const {
2371
2739
  error: res_error,
2372
- } = OrderModel.CreateOrderResponse().validate(response, {
2740
+ } = OrderModel.UpdatePackagingDimensionsResponse().validate(response, {
2373
2741
  abortEarly: false,
2374
2742
  allowUnknown: false,
2375
2743
  });
@@ -2574,6 +2942,70 @@ class Order {
2574
2942
 
2575
2943
  return response;
2576
2944
  }
2945
+
2946
+ /**
2947
+ * @param {Object} arg - Arg object.
2948
+ * @param {VerifyMobileOTP} arg.body
2949
+ * @returns {Promise<VerifyOtpResponse>} - Success response
2950
+ * @summary:
2951
+ * @description:
2952
+ */
2953
+ async verifyMobileOTP({ body } = {}) {
2954
+ const { error } = OrderValidator.verifyMobileOTP().validate(
2955
+ {
2956
+ body,
2957
+ },
2958
+ { abortEarly: false, allowUnknown: true }
2959
+ );
2960
+ if (error) {
2961
+ return Promise.reject(new FDKClientValidationError(error));
2962
+ }
2963
+
2964
+ // Showing warrnings if extra unknown parameters are found
2965
+ const { error: warrning } = OrderValidator.verifyMobileOTP().validate(
2966
+ {
2967
+ body,
2968
+ },
2969
+ { abortEarly: false, allowUnknown: false }
2970
+ );
2971
+ if (warrning) {
2972
+ Logger({
2973
+ level: "WARN",
2974
+ message: "Parameter Validation warrnings for verifyMobileOTP",
2975
+ });
2976
+ Logger({ level: "WARN", message: warrning });
2977
+ }
2978
+
2979
+ const query_params = {};
2980
+
2981
+ const xHeaders = {};
2982
+
2983
+ const response = await PlatformAPIClient.execute(
2984
+ this.config,
2985
+ "post",
2986
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/verify/otp`,
2987
+ query_params,
2988
+ body,
2989
+ xHeaders
2990
+ );
2991
+
2992
+ const {
2993
+ error: res_error,
2994
+ } = OrderModel.VerifyOtpResponse().validate(response, {
2995
+ abortEarly: false,
2996
+ allowUnknown: false,
2997
+ });
2998
+
2999
+ if (res_error) {
3000
+ Logger({
3001
+ level: "WARN",
3002
+ message: "Response Validation Warnnings for verifyMobileOTP",
3003
+ });
3004
+ Logger({ level: "WARN", message: res_error });
3005
+ }
3006
+
3007
+ return response;
3008
+ }
2577
3009
  }
2578
3010
 
2579
3011
  module.exports = Order;