@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.
Files changed (117) hide show
  1. package/README.md +1 -2
  2. package/index.d.ts +4 -7
  3. package/index.js +5 -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/Configuration/ConfigurationApplicationClient.d.ts +14 -10
  16. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
  17. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
  18. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  19. package/sdk/application/Content/ContentApplicationModel.js +3 -1
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
  21. package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
  22. package/sdk/application/Order/OrderApplicationClient.js +2 -2
  23. package/sdk/application/Order/OrderApplicationModel.js +18 -8
  24. package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
  25. package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
  26. package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
  27. package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
  28. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
  29. package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
  30. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
  31. package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
  32. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
  33. package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
  34. package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
  35. package/sdk/application/index.d.ts +10 -10
  36. package/sdk/application/index.js +13 -13
  37. package/sdk/common/Constant.d.ts +5 -0
  38. package/sdk/common/Constant.js +5 -0
  39. package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
  40. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +459 -2
  41. package/sdk/platform/Cart/CartPlatformApplicationClient.js +2480 -340
  42. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +29 -0
  43. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +250 -0
  44. package/sdk/platform/Cart/CartPlatformModel.d.ts +52 -0
  45. package/sdk/platform/Cart/CartPlatformModel.js +580 -2
  46. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
  47. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
  48. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  49. package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
  50. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
  51. package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
  52. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
  53. package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
  54. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
  55. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
  56. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
  57. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
  58. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
  59. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
  60. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
  61. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
  62. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
  63. package/sdk/platform/Content/ContentPlatformModel.js +3 -1
  64. package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
  65. package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
  66. package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
  67. package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
  68. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
  69. package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
  70. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
  71. package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
  72. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
  73. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
  74. package/sdk/platform/Order/OrderPlatformClient.d.ts +159 -79
  75. package/sdk/platform/Order/OrderPlatformClient.js +541 -114
  76. package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
  77. package/sdk/platform/Order/OrderPlatformModel.js +569 -159
  78. package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
  79. package/sdk/platform/Order/OrderPlatformValidator.js +51 -9
  80. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
  81. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
  82. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
  83. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
  84. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
  85. package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
  86. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
  87. package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
  88. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
  89. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
  90. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
  91. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
  92. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
  93. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
  94. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  95. package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
  96. package/sdk/platform/PlatformApplicationClient.d.ts +1149 -938
  97. package/sdk/platform/PlatformApplicationClient.js +1259 -1035
  98. package/sdk/platform/PlatformClient.d.ts +9888 -8286
  99. package/sdk/platform/PlatformClient.js +10960 -9038
  100. package/sdk/platform/index.d.ts +15 -14
  101. package/sdk/platform/index.js +20 -18
  102. package/sdk/public/PublicClient.d.ts +2 -2
  103. package/sdk/public/PublicClient.js +4 -4
  104. package/sdk/public/index.d.ts +1 -1
  105. package/sdk/public/index.js +2 -2
  106. package/partner.d.ts +0 -4
  107. package/partner.js +0 -7
  108. package/sdk/partner/OAuthClient.d.ts +0 -14
  109. package/sdk/partner/OAuthClient.js +0 -112
  110. package/sdk/partner/PartnerAPIClient.d.ts +0 -12
  111. package/sdk/partner/PartnerAPIClient.js +0 -42
  112. package/sdk/partner/PartnerClient.d.ts +0 -6
  113. package/sdk/partner/PartnerClient.js +0 -17
  114. package/sdk/partner/PartnerConfig.d.ts +0 -30
  115. package/sdk/partner/PartnerConfig.js +0 -39
  116. package/sdk/partner/index.d.ts +0 -3
  117. package/sdk/partner/index.js +0 -5
@@ -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,30 @@ 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] -
1533
1836
  * @returns {Promise<ShipmentInternalPlatformViewResponse>} - Success response
1534
1837
  * @summary:
1535
1838
  * @description:
@@ -1538,19 +1841,16 @@ class Order {
1538
1841
  lane,
1539
1842
  bagStatus,
1540
1843
  statusOverrideLane,
1844
+ timeToDispatch,
1541
1845
  searchType,
1542
1846
  searchValue,
1543
- searchId,
1544
1847
  fromDate,
1545
1848
  toDate,
1546
1849
  dpIds,
1547
- orderingCompanyId,
1548
1850
  stores,
1549
- salesChannel,
1550
- requestByExt,
1851
+ salesChannels,
1551
1852
  pageNo,
1552
1853
  pageSize,
1553
- isPrioritySort,
1554
1854
  fetchActiveShipment,
1555
1855
  excludeLockedShipments,
1556
1856
  paymentMethods,
@@ -1559,25 +1859,24 @@ class Order {
1559
1859
  customMeta,
1560
1860
  orderingChannel,
1561
1861
  companyAffiliateTag,
1862
+ myOrders,
1863
+ platformUserId,
1562
1864
  } = {}) {
1563
1865
  const { error } = OrderValidator.getShipments().validate(
1564
1866
  {
1565
1867
  lane,
1566
1868
  bagStatus,
1567
1869
  statusOverrideLane,
1870
+ timeToDispatch,
1568
1871
  searchType,
1569
1872
  searchValue,
1570
- searchId,
1571
1873
  fromDate,
1572
1874
  toDate,
1573
1875
  dpIds,
1574
- orderingCompanyId,
1575
1876
  stores,
1576
- salesChannel,
1577
- requestByExt,
1877
+ salesChannels,
1578
1878
  pageNo,
1579
1879
  pageSize,
1580
- isPrioritySort,
1581
1880
  fetchActiveShipment,
1582
1881
  excludeLockedShipments,
1583
1882
  paymentMethods,
@@ -1586,6 +1885,8 @@ class Order {
1586
1885
  customMeta,
1587
1886
  orderingChannel,
1588
1887
  companyAffiliateTag,
1888
+ myOrders,
1889
+ platformUserId,
1589
1890
  },
1590
1891
  { abortEarly: false, allowUnknown: true }
1591
1892
  );
@@ -1599,19 +1900,16 @@ class Order {
1599
1900
  lane,
1600
1901
  bagStatus,
1601
1902
  statusOverrideLane,
1903
+ timeToDispatch,
1602
1904
  searchType,
1603
1905
  searchValue,
1604
- searchId,
1605
1906
  fromDate,
1606
1907
  toDate,
1607
1908
  dpIds,
1608
- orderingCompanyId,
1609
1909
  stores,
1610
- salesChannel,
1611
- requestByExt,
1910
+ salesChannels,
1612
1911
  pageNo,
1613
1912
  pageSize,
1614
- isPrioritySort,
1615
1913
  fetchActiveShipment,
1616
1914
  excludeLockedShipments,
1617
1915
  paymentMethods,
@@ -1620,6 +1918,8 @@ class Order {
1620
1918
  customMeta,
1621
1919
  orderingChannel,
1622
1920
  companyAffiliateTag,
1921
+ myOrders,
1922
+ platformUserId,
1623
1923
  },
1624
1924
  { abortEarly: false, allowUnknown: false }
1625
1925
  );
@@ -1635,19 +1935,16 @@ class Order {
1635
1935
  query_params["lane"] = lane;
1636
1936
  query_params["bag_status"] = bagStatus;
1637
1937
  query_params["status_override_lane"] = statusOverrideLane;
1938
+ query_params["time_to_dispatch"] = timeToDispatch;
1638
1939
  query_params["search_type"] = searchType;
1639
1940
  query_params["search_value"] = searchValue;
1640
- query_params["search_id"] = searchId;
1641
1941
  query_params["from_date"] = fromDate;
1642
1942
  query_params["to_date"] = toDate;
1643
1943
  query_params["dp_ids"] = dpIds;
1644
- query_params["ordering_company_id"] = orderingCompanyId;
1645
1944
  query_params["stores"] = stores;
1646
- query_params["sales_channel"] = salesChannel;
1647
- query_params["request_by_ext"] = requestByExt;
1945
+ query_params["sales_channels"] = salesChannels;
1648
1946
  query_params["page_no"] = pageNo;
1649
1947
  query_params["page_size"] = pageSize;
1650
- query_params["is_priority_sort"] = isPrioritySort;
1651
1948
  query_params["fetch_active_shipment"] = fetchActiveShipment;
1652
1949
  query_params["exclude_locked_shipments"] = excludeLockedShipments;
1653
1950
  query_params["payment_methods"] = paymentMethods;
@@ -1656,13 +1953,15 @@ class Order {
1656
1953
  query_params["custom_meta"] = customMeta;
1657
1954
  query_params["ordering_channel"] = orderingChannel;
1658
1955
  query_params["company_affiliate_tag"] = companyAffiliateTag;
1956
+ query_params["my_orders"] = myOrders;
1957
+ query_params["platform_user_id"] = platformUserId;
1659
1958
 
1660
1959
  const xHeaders = {};
1661
1960
 
1662
1961
  const response = await PlatformAPIClient.execute(
1663
1962
  this.config,
1664
1963
  "get",
1665
- `/service/platform/orders/v1.0/company/${this.config.companyId}/shipments-listing`,
1964
+ `/service/platform/order/v1.0/company/${this.config.companyId}/shipments-listing`,
1666
1965
  query_params,
1667
1966
  undefined,
1668
1967
  xHeaders
@@ -1747,8 +2046,8 @@ class Order {
1747
2046
 
1748
2047
  /**
1749
2048
  * @param {Object} arg - Arg object.
1750
- * @param {string} arg.view -
1751
- * @param {string} [arg.groupEntity] -
2049
+ * @param {string} arg.view - Name of view
2050
+ * @param {string} [arg.groupEntity] - Name of group entity
1752
2051
  * @returns {Promise<FiltersResponse>} - Success response
1753
2052
  * @summary:
1754
2053
  * @description:
@@ -1790,7 +2089,7 @@ class Order {
1790
2089
  const response = await PlatformAPIClient.execute(
1791
2090
  this.config,
1792
2091
  "get",
1793
- `/service/platform/orders/v1.0/company/${this.config.companyId}/filter-listing`,
2092
+ `/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
1794
2093
  query_params,
1795
2094
  undefined,
1796
2095
  xHeaders
@@ -2196,6 +2495,70 @@ class Order {
2196
2495
  return response;
2197
2496
  }
2198
2497
 
2498
+ /**
2499
+ * @param {Object} arg - Arg object.
2500
+ * @param {SendUserMobileOTP} arg.body
2501
+ * @returns {Promise<SendUserMobileOtpResponse>} - Success response
2502
+ * @summary:
2503
+ * @description:
2504
+ */
2505
+ async sendUserMobileOTP({ body } = {}) {
2506
+ const { error } = OrderValidator.sendUserMobileOTP().validate(
2507
+ {
2508
+ body,
2509
+ },
2510
+ { abortEarly: false, allowUnknown: true }
2511
+ );
2512
+ if (error) {
2513
+ return Promise.reject(new FDKClientValidationError(error));
2514
+ }
2515
+
2516
+ // Showing warrnings if extra unknown parameters are found
2517
+ const { error: warrning } = OrderValidator.sendUserMobileOTP().validate(
2518
+ {
2519
+ body,
2520
+ },
2521
+ { abortEarly: false, allowUnknown: false }
2522
+ );
2523
+ if (warrning) {
2524
+ Logger({
2525
+ level: "WARN",
2526
+ message: "Parameter Validation warrnings for sendUserMobileOTP",
2527
+ });
2528
+ Logger({ level: "WARN", message: warrning });
2529
+ }
2530
+
2531
+ const query_params = {};
2532
+
2533
+ const xHeaders = {};
2534
+
2535
+ const response = await PlatformAPIClient.execute(
2536
+ this.config,
2537
+ "post",
2538
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/send/otp/mobile`,
2539
+ query_params,
2540
+ body,
2541
+ xHeaders
2542
+ );
2543
+
2544
+ const {
2545
+ error: res_error,
2546
+ } = OrderModel.SendUserMobileOtpResponse().validate(response, {
2547
+ abortEarly: false,
2548
+ allowUnknown: false,
2549
+ });
2550
+
2551
+ if (res_error) {
2552
+ Logger({
2553
+ level: "WARN",
2554
+ message: "Response Validation Warnnings for sendUserMobileOTP",
2555
+ });
2556
+ Logger({ level: "WARN", message: res_error });
2557
+ }
2558
+
2559
+ return response;
2560
+ }
2561
+
2199
2562
  /**
2200
2563
  * @param {Object} arg - Arg object.
2201
2564
  * @param {string} arg.shipmentId -
@@ -2321,8 +2684,8 @@ class Order {
2321
2684
 
2322
2685
  /**
2323
2686
  * @param {Object} arg - Arg object.
2324
- * @param {CreateOrderPayload} arg.body
2325
- * @returns {Promise<CreateOrderResponse>} - Success response
2687
+ * @param {UpdatePackagingDimensionsPayload} arg.body
2688
+ * @returns {Promise<UpdatePackagingDimensionsResponse>} - Success response
2326
2689
  * @summary:
2327
2690
  * @description:
2328
2691
  */
@@ -2369,7 +2732,7 @@ class Order {
2369
2732
 
2370
2733
  const {
2371
2734
  error: res_error,
2372
- } = OrderModel.CreateOrderResponse().validate(response, {
2735
+ } = OrderModel.UpdatePackagingDimensionsResponse().validate(response, {
2373
2736
  abortEarly: false,
2374
2737
  allowUnknown: false,
2375
2738
  });
@@ -2574,6 +2937,70 @@ class Order {
2574
2937
 
2575
2938
  return response;
2576
2939
  }
2940
+
2941
+ /**
2942
+ * @param {Object} arg - Arg object.
2943
+ * @param {VerifyMobileOTP} arg.body
2944
+ * @returns {Promise<VerifyOtpResponse>} - Success response
2945
+ * @summary:
2946
+ * @description:
2947
+ */
2948
+ async verifyMobileOTP({ body } = {}) {
2949
+ const { error } = OrderValidator.verifyMobileOTP().validate(
2950
+ {
2951
+ body,
2952
+ },
2953
+ { abortEarly: false, allowUnknown: true }
2954
+ );
2955
+ if (error) {
2956
+ return Promise.reject(new FDKClientValidationError(error));
2957
+ }
2958
+
2959
+ // Showing warrnings if extra unknown parameters are found
2960
+ const { error: warrning } = OrderValidator.verifyMobileOTP().validate(
2961
+ {
2962
+ body,
2963
+ },
2964
+ { abortEarly: false, allowUnknown: false }
2965
+ );
2966
+ if (warrning) {
2967
+ Logger({
2968
+ level: "WARN",
2969
+ message: "Parameter Validation warrnings for verifyMobileOTP",
2970
+ });
2971
+ Logger({ level: "WARN", message: warrning });
2972
+ }
2973
+
2974
+ const query_params = {};
2975
+
2976
+ const xHeaders = {};
2977
+
2978
+ const response = await PlatformAPIClient.execute(
2979
+ this.config,
2980
+ "post",
2981
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/verify/otp`,
2982
+ query_params,
2983
+ body,
2984
+ xHeaders
2985
+ );
2986
+
2987
+ const {
2988
+ error: res_error,
2989
+ } = OrderModel.VerifyOtpResponse().validate(response, {
2990
+ abortEarly: false,
2991
+ allowUnknown: false,
2992
+ });
2993
+
2994
+ if (res_error) {
2995
+ Logger({
2996
+ level: "WARN",
2997
+ message: "Response Validation Warnnings for verifyMobileOTP",
2998
+ });
2999
+ Logger({ level: "WARN", message: res_error });
3000
+ }
3001
+
3002
+ return response;
3003
+ }
2577
3004
  }
2578
3005
 
2579
3006
  module.exports = Order;