@gofynd/fdk-client-javascript 3.16.3 → 3.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +40 -0
  6. package/sdk/application/Cart/CartApplicationClient.js +176 -0
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
  9. package/sdk/application/Content/ContentApplicationClient.d.ts +21 -1
  10. package/sdk/application/Content/ContentApplicationClient.js +93 -2
  11. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
  12. package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
  13. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
  14. package/sdk/application/Order/OrderApplicationClient.js +50 -0
  15. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  16. package/sdk/application/Payment/PaymentApplicationClient.js +5 -4
  17. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
  18. package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
  19. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
  20. package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
  21. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
  22. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
  23. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +74 -12
  24. package/sdk/platform/Cart/CartPlatformApplicationClient.js +637 -36
  25. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
  26. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
  27. package/sdk/platform/Cart/CartPlatformModel.d.ts +952 -5
  28. package/sdk/platform/Cart/CartPlatformModel.js +598 -2
  29. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +125 -5
  30. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +831 -41
  31. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
  32. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
  33. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -16
  34. package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -85
  35. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1025 -159
  36. package/sdk/platform/Catalog/CatalogPlatformModel.js +840 -165
  37. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +8 -10
  38. package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -12
  39. package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
  40. package/sdk/platform/Common/CommonPlatformModel.js +14 -0
  41. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
  42. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +4 -462
  43. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +7 -45
  44. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +4 -55
  45. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +10 -2
  46. package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -2
  47. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
  48. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
  49. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
  50. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
  51. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
  52. package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
  53. package/sdk/platform/Order/OrderPlatformClient.d.ts +27 -19
  54. package/sdk/platform/Order/OrderPlatformClient.js +176 -108
  55. package/sdk/platform/Order/OrderPlatformModel.d.ts +359 -45
  56. package/sdk/platform/Order/OrderPlatformModel.js +218 -44
  57. package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
  58. package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
  59. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
  60. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
  61. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
  62. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
  63. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +376 -11
  64. package/sdk/platform/Payment/PaymentPlatformModel.js +243 -10
  65. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  66. package/sdk/platform/PlatformApplicationClient.js +0 -4
  67. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
  68. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
  69. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
  70. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
  71. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
  72. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
  73. package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
  74. package/sdk/platform/User/UserPlatformModel.js +4 -4
  75. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
  76. package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
  77. package/sdk/platform/index.d.ts +0 -1
  78. package/sdk/platform/index.js +0 -2
  79. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
  80. package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
  81. package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
  82. package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
  83. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  84. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  85. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  86. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  87. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  88. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  89. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
  90. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
@@ -1,4 +1,16 @@
1
1
  export = LogisticsPartnerModel;
2
+ /**
3
+ * @typedef RateZoneConfigurationDetails
4
+ * @property {StandardRateZone[]} [standard_zone_mapping] - List of standard
5
+ * zones with name-slug pairs.
6
+ * @property {string[]} [custom_zones] - List of custom zone names.
7
+ */
8
+ /**
9
+ * @typedef RateCardSampleFile
10
+ * @property {string} [type] - Denotes the type of action performed.
11
+ * @property {string} [file_path] - CDN path of the file.
12
+ * @property {string} [status] - Current status of the request.
13
+ */
2
14
  /**
3
15
  * @typedef CourierPartnerSchemeModelSchema
4
16
  * @property {CreatedBy} [created_by]
@@ -76,6 +88,54 @@ export = LogisticsPartnerModel;
76
88
  * bulk region serviceability or TAT result items.
77
89
  * @property {Page} [page]
78
90
  */
91
+ /**
92
+ * @typedef BulkRateCardJob
93
+ * @property {string} type - Denotes the type of data.
94
+ * @property {number} total - Total number of items in the batch.
95
+ * @property {number} failed - Number of failed items in the batch.
96
+ * @property {number} success - Number of successful items in the batch.
97
+ * @property {string} [action] - Action type for the bulk operation, either
98
+ * import or export.
99
+ * @property {string} batch_id - A unique identifier for the performed batch operation.
100
+ * @property {string} status - Current status of the request.
101
+ * @property {Object[]} [failed_records] - Array of objects containing
102
+ * validation error details for records that failed during bulk import or
103
+ * export operations. Each object includes error messages describing missing
104
+ * required fields or validation failures for individual records.
105
+ * @property {string} [file_path] - CDN path of the file.
106
+ * @property {string} [created_on] - The timestamp when the record was created.
107
+ * @property {string} [modified_on] - The timestamp when the record was last modified.
108
+ */
109
+ /**
110
+ * @typedef BulkRateCardJobDetails
111
+ * @property {string} [file_path] - Path to the file used in the bulk operation.
112
+ * @property {string} rate_card_type - Rate card type for which bulk operation
113
+ * will be performed.
114
+ * @property {string} action - Action type for the bulk operation, either import
115
+ * or export.
116
+ * @property {number[]} [company_ids] - List of company IDs for which rate card
117
+ * needs to be applied.
118
+ */
119
+ /**
120
+ * @typedef SampleFileRateZoneRequestSchema
121
+ * @property {string} [zone_type] - Rate zone for which the sample file to be downloaded.
122
+ * @property {string} [country] - Name of the country.
123
+ * @property {string} [region] - Region for which the sample file to be downloaded.
124
+ */
125
+ /**
126
+ * @typedef RateZoneBulkJobDetails
127
+ * @property {string} [action] - Action type for the bulk operation, either
128
+ * import or export.
129
+ * @property {string} [file_path] - CDN path of the file.
130
+ * @property {string} [zone_type] - Rate zone for the bulk action.
131
+ * @property {string} [country] - Name of the country.
132
+ * @property {string} [region] - Region for the import and export.
133
+ */
134
+ /**
135
+ * @typedef RateZoneBulkJobList
136
+ * @property {BulkRateCardJob[]} [items] - Array of bulk rate zone result items.
137
+ * @property {Page} [page]
138
+ */
79
139
  /**
80
140
  * @typedef RegionTatItemResult
81
141
  * @property {RegionTatResult[]} items - An array that contains items of region tat.
@@ -490,6 +550,11 @@ export = LogisticsPartnerModel;
490
550
  * @typedef ValidationErrors
491
551
  * @property {ValidationError[]} errors - A list of validation errors in the request.
492
552
  */
553
+ /**
554
+ * @typedef StandardRateZone
555
+ * @property {string} [zone_name] - User defined name of the zone for a particular slug.
556
+ * @property {string} [zone_slug] - Pre-defined slug for the standard zones.
557
+ */
493
558
  /**
494
559
  * @typedef CreatedBy
495
560
  * @property {string} [id] - Identifier of the user or system that created the object.
@@ -517,6 +582,7 @@ export = LogisticsPartnerModel;
517
582
  * code-based operations.
518
583
  * @property {boolean} [mps] - Denotes if the courier partner supports
519
584
  * multi-part shipment services.
585
+ * @property {boolean} [b2b] - Denotes if courier partner is business-to-business or not.
520
586
  * @property {boolean} [ndr] - Indicates if the Non-Delivery Report (NDR)
521
587
  * feature is supported by the courier partner.
522
588
  * @property {number} [ndr_attempts] - Number of attempts allowed for resolving
@@ -652,8 +718,37 @@ export = LogisticsPartnerModel;
652
718
  declare class LogisticsPartnerModel {
653
719
  }
654
720
  declare namespace LogisticsPartnerModel {
655
- export { CourierPartnerSchemeModelSchema, BulkRegionServiceabilityTatDetails, BulkRegionServiceabilityTatResultItemData, CommonErrorResult, BulkFailureResult, FailureResult, BulkRegionServiceabilityTatResult, RegionTatItemResult, RegionServiceabilityItemResult, ServiceabilityDetailsResult, ServiceabilityDetails, RegionServiceabilityResult, RegionServiceabilityDetails, RegionTatDetails, RegionTatResult, BulkRegionJobDetails, BulkRegionResultItemData, BulkRegionResult, CourierAccountDetailsBody, CompanyCourierPartnerAccountListResult, CourierAccountResult, CourierPartnerSchemeDetailsModel, CourierPartnerPutSchema, CourierPartnerSchemeList, CourierPartnerSchemeUpdateDetails, GetCountries, TATUpdateDetails, StandardError, ValidationErrors, CreatedBy, ModifiedBy, ArithmeticOperations, CourierPartnerSchemeFeatures, CourierPartnerSchemeDefaultTat, CourierPartnerSchemeTat, Error, Page, TATDetails, CourierPartnerSchemeModel, GetCountriesItems, HierarchyItems, CurrencyObject, ValidationError };
721
+ export { RateZoneConfigurationDetails, RateCardSampleFile, CourierPartnerSchemeModelSchema, BulkRegionServiceabilityTatDetails, BulkRegionServiceabilityTatResultItemData, CommonErrorResult, BulkFailureResult, FailureResult, BulkRegionServiceabilityTatResult, BulkRateCardJob, BulkRateCardJobDetails, SampleFileRateZoneRequestSchema, RateZoneBulkJobDetails, RateZoneBulkJobList, RegionTatItemResult, RegionServiceabilityItemResult, ServiceabilityDetailsResult, ServiceabilityDetails, RegionServiceabilityResult, RegionServiceabilityDetails, RegionTatDetails, RegionTatResult, BulkRegionJobDetails, BulkRegionResultItemData, BulkRegionResult, CourierAccountDetailsBody, CompanyCourierPartnerAccountListResult, CourierAccountResult, CourierPartnerSchemeDetailsModel, CourierPartnerPutSchema, CourierPartnerSchemeList, CourierPartnerSchemeUpdateDetails, GetCountries, TATUpdateDetails, StandardError, ValidationErrors, StandardRateZone, CreatedBy, ModifiedBy, ArithmeticOperations, CourierPartnerSchemeFeatures, CourierPartnerSchemeDefaultTat, CourierPartnerSchemeTat, Error, Page, TATDetails, CourierPartnerSchemeModel, GetCountriesItems, HierarchyItems, CurrencyObject, ValidationError };
656
722
  }
723
+ /** @returns {RateZoneConfigurationDetails} */
724
+ declare function RateZoneConfigurationDetails(): RateZoneConfigurationDetails;
725
+ type RateZoneConfigurationDetails = {
726
+ /**
727
+ * - List of standard
728
+ * zones with name-slug pairs.
729
+ */
730
+ standard_zone_mapping?: StandardRateZone[];
731
+ /**
732
+ * - List of custom zone names.
733
+ */
734
+ custom_zones?: string[];
735
+ };
736
+ /** @returns {RateCardSampleFile} */
737
+ declare function RateCardSampleFile(): RateCardSampleFile;
738
+ type RateCardSampleFile = {
739
+ /**
740
+ * - Denotes the type of action performed.
741
+ */
742
+ type?: string;
743
+ /**
744
+ * - CDN path of the file.
745
+ */
746
+ file_path?: string;
747
+ /**
748
+ * - Current status of the request.
749
+ */
750
+ status?: string;
751
+ };
657
752
  /** @returns {CourierPartnerSchemeModelSchema} */
658
753
  declare function CourierPartnerSchemeModelSchema(): CourierPartnerSchemeModelSchema;
659
754
  type CourierPartnerSchemeModelSchema = {
@@ -840,6 +935,131 @@ type BulkRegionServiceabilityTatResult = {
840
935
  items?: BulkRegionServiceabilityTatResultItemData[];
841
936
  page?: Page;
842
937
  };
938
+ /** @returns {BulkRateCardJob} */
939
+ declare function BulkRateCardJob(): BulkRateCardJob;
940
+ type BulkRateCardJob = {
941
+ /**
942
+ * - Denotes the type of data.
943
+ */
944
+ type: string;
945
+ /**
946
+ * - Total number of items in the batch.
947
+ */
948
+ total: number;
949
+ /**
950
+ * - Number of failed items in the batch.
951
+ */
952
+ failed: number;
953
+ /**
954
+ * - Number of successful items in the batch.
955
+ */
956
+ success: number;
957
+ /**
958
+ * - Action type for the bulk operation, either
959
+ * import or export.
960
+ */
961
+ action?: string;
962
+ /**
963
+ * - A unique identifier for the performed batch operation.
964
+ */
965
+ batch_id: string;
966
+ /**
967
+ * - Current status of the request.
968
+ */
969
+ status: string;
970
+ /**
971
+ * - Array of objects containing
972
+ * validation error details for records that failed during bulk import or
973
+ * export operations. Each object includes error messages describing missing
974
+ * required fields or validation failures for individual records.
975
+ */
976
+ failed_records?: any[];
977
+ /**
978
+ * - CDN path of the file.
979
+ */
980
+ file_path?: string;
981
+ /**
982
+ * - The timestamp when the record was created.
983
+ */
984
+ created_on?: string;
985
+ /**
986
+ * - The timestamp when the record was last modified.
987
+ */
988
+ modified_on?: string;
989
+ };
990
+ /** @returns {BulkRateCardJobDetails} */
991
+ declare function BulkRateCardJobDetails(): BulkRateCardJobDetails;
992
+ type BulkRateCardJobDetails = {
993
+ /**
994
+ * - Path to the file used in the bulk operation.
995
+ */
996
+ file_path?: string;
997
+ /**
998
+ * - Rate card type for which bulk operation
999
+ * will be performed.
1000
+ */
1001
+ rate_card_type: string;
1002
+ /**
1003
+ * - Action type for the bulk operation, either import
1004
+ * or export.
1005
+ */
1006
+ action: string;
1007
+ /**
1008
+ * - List of company IDs for which rate card
1009
+ * needs to be applied.
1010
+ */
1011
+ company_ids?: number[];
1012
+ };
1013
+ /** @returns {SampleFileRateZoneRequestSchema} */
1014
+ declare function SampleFileRateZoneRequestSchema(): SampleFileRateZoneRequestSchema;
1015
+ type SampleFileRateZoneRequestSchema = {
1016
+ /**
1017
+ * - Rate zone for which the sample file to be downloaded.
1018
+ */
1019
+ zone_type?: string;
1020
+ /**
1021
+ * - Name of the country.
1022
+ */
1023
+ country?: string;
1024
+ /**
1025
+ * - Region for which the sample file to be downloaded.
1026
+ */
1027
+ region?: string;
1028
+ };
1029
+ /** @returns {RateZoneBulkJobDetails} */
1030
+ declare function RateZoneBulkJobDetails(): RateZoneBulkJobDetails;
1031
+ type RateZoneBulkJobDetails = {
1032
+ /**
1033
+ * - Action type for the bulk operation, either
1034
+ * import or export.
1035
+ */
1036
+ action?: string;
1037
+ /**
1038
+ * - CDN path of the file.
1039
+ */
1040
+ file_path?: string;
1041
+ /**
1042
+ * - Rate zone for the bulk action.
1043
+ */
1044
+ zone_type?: string;
1045
+ /**
1046
+ * - Name of the country.
1047
+ */
1048
+ country?: string;
1049
+ /**
1050
+ * - Region for the import and export.
1051
+ */
1052
+ region?: string;
1053
+ };
1054
+ /** @returns {RateZoneBulkJobList} */
1055
+ declare function RateZoneBulkJobList(): RateZoneBulkJobList;
1056
+ type RateZoneBulkJobList = {
1057
+ /**
1058
+ * - Array of bulk rate zone result items.
1059
+ */
1060
+ items?: BulkRateCardJob[];
1061
+ page?: Page;
1062
+ };
843
1063
  /** @returns {RegionTatItemResult} */
844
1064
  declare function RegionTatItemResult(): RegionTatItemResult;
845
1065
  type RegionTatItemResult = {
@@ -1807,6 +2027,18 @@ type ValidationErrors = {
1807
2027
  */
1808
2028
  errors: ValidationError[];
1809
2029
  };
2030
+ /** @returns {StandardRateZone} */
2031
+ declare function StandardRateZone(): StandardRateZone;
2032
+ type StandardRateZone = {
2033
+ /**
2034
+ * - User defined name of the zone for a particular slug.
2035
+ */
2036
+ zone_name?: string;
2037
+ /**
2038
+ * - Pre-defined slug for the standard zones.
2039
+ */
2040
+ zone_slug?: string;
2041
+ };
1810
2042
  /** @returns {CreatedBy} */
1811
2043
  declare function CreatedBy(): CreatedBy;
1812
2044
  type CreatedBy = {
@@ -1865,6 +2097,10 @@ type CourierPartnerSchemeFeatures = {
1865
2097
  * multi-part shipment services.
1866
2098
  */
1867
2099
  mps?: boolean;
2100
+ /**
2101
+ * - Denotes if courier partner is business-to-business or not.
2102
+ */
2103
+ b2b?: boolean;
1868
2104
  /**
1869
2105
  * - Indicates if the Non-Delivery Report (NDR)
1870
2106
  * feature is supported by the courier partner.
@@ -1,5 +1,19 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef RateZoneConfigurationDetails
5
+ * @property {StandardRateZone[]} [standard_zone_mapping] - List of standard
6
+ * zones with name-slug pairs.
7
+ * @property {string[]} [custom_zones] - List of custom zone names.
8
+ */
9
+
10
+ /**
11
+ * @typedef RateCardSampleFile
12
+ * @property {string} [type] - Denotes the type of action performed.
13
+ * @property {string} [file_path] - CDN path of the file.
14
+ * @property {string} [status] - Current status of the request.
15
+ */
16
+
3
17
  /**
4
18
  * @typedef CourierPartnerSchemeModelSchema
5
19
  * @property {CreatedBy} [created_by]
@@ -84,6 +98,59 @@ const Joi = require("joi");
84
98
  * @property {Page} [page]
85
99
  */
86
100
 
101
+ /**
102
+ * @typedef BulkRateCardJob
103
+ * @property {string} type - Denotes the type of data.
104
+ * @property {number} total - Total number of items in the batch.
105
+ * @property {number} failed - Number of failed items in the batch.
106
+ * @property {number} success - Number of successful items in the batch.
107
+ * @property {string} [action] - Action type for the bulk operation, either
108
+ * import or export.
109
+ * @property {string} batch_id - A unique identifier for the performed batch operation.
110
+ * @property {string} status - Current status of the request.
111
+ * @property {Object[]} [failed_records] - Array of objects containing
112
+ * validation error details for records that failed during bulk import or
113
+ * export operations. Each object includes error messages describing missing
114
+ * required fields or validation failures for individual records.
115
+ * @property {string} [file_path] - CDN path of the file.
116
+ * @property {string} [created_on] - The timestamp when the record was created.
117
+ * @property {string} [modified_on] - The timestamp when the record was last modified.
118
+ */
119
+
120
+ /**
121
+ * @typedef BulkRateCardJobDetails
122
+ * @property {string} [file_path] - Path to the file used in the bulk operation.
123
+ * @property {string} rate_card_type - Rate card type for which bulk operation
124
+ * will be performed.
125
+ * @property {string} action - Action type for the bulk operation, either import
126
+ * or export.
127
+ * @property {number[]} [company_ids] - List of company IDs for which rate card
128
+ * needs to be applied.
129
+ */
130
+
131
+ /**
132
+ * @typedef SampleFileRateZoneRequestSchema
133
+ * @property {string} [zone_type] - Rate zone for which the sample file to be downloaded.
134
+ * @property {string} [country] - Name of the country.
135
+ * @property {string} [region] - Region for which the sample file to be downloaded.
136
+ */
137
+
138
+ /**
139
+ * @typedef RateZoneBulkJobDetails
140
+ * @property {string} [action] - Action type for the bulk operation, either
141
+ * import or export.
142
+ * @property {string} [file_path] - CDN path of the file.
143
+ * @property {string} [zone_type] - Rate zone for the bulk action.
144
+ * @property {string} [country] - Name of the country.
145
+ * @property {string} [region] - Region for the import and export.
146
+ */
147
+
148
+ /**
149
+ * @typedef RateZoneBulkJobList
150
+ * @property {BulkRateCardJob[]} [items] - Array of bulk rate zone result items.
151
+ * @property {Page} [page]
152
+ */
153
+
87
154
  /**
88
155
  * @typedef RegionTatItemResult
89
156
  * @property {RegionTatResult[]} items - An array that contains items of region tat.
@@ -520,6 +587,12 @@ const Joi = require("joi");
520
587
  * @property {ValidationError[]} errors - A list of validation errors in the request.
521
588
  */
522
589
 
590
+ /**
591
+ * @typedef StandardRateZone
592
+ * @property {string} [zone_name] - User defined name of the zone for a particular slug.
593
+ * @property {string} [zone_slug] - Pre-defined slug for the standard zones.
594
+ */
595
+
523
596
  /**
524
597
  * @typedef CreatedBy
525
598
  * @property {string} [id] - Identifier of the user or system that created the object.
@@ -550,6 +623,7 @@ const Joi = require("joi");
550
623
  * code-based operations.
551
624
  * @property {boolean} [mps] - Denotes if the courier partner supports
552
625
  * multi-part shipment services.
626
+ * @property {boolean} [b2b] - Denotes if courier partner is business-to-business or not.
553
627
  * @property {boolean} [ndr] - Indicates if the Non-Delivery Report (NDR)
554
628
  * feature is supported by the courier partner.
555
629
  * @property {number} [ndr_attempts] - Number of attempts allowed for resolving
@@ -694,6 +768,25 @@ const Joi = require("joi");
694
768
  */
695
769
 
696
770
  class LogisticsPartnerModel {
771
+ /** @returns {RateZoneConfigurationDetails} */
772
+ static RateZoneConfigurationDetails() {
773
+ return Joi.object({
774
+ standard_zone_mapping: Joi.array().items(
775
+ LogisticsPartnerModel.StandardRateZone()
776
+ ),
777
+ custom_zones: Joi.array().items(Joi.string().allow("")),
778
+ });
779
+ }
780
+
781
+ /** @returns {RateCardSampleFile} */
782
+ static RateCardSampleFile() {
783
+ return Joi.object({
784
+ type: Joi.string().allow(""),
785
+ file_path: Joi.string().allow("").allow(null),
786
+ status: Joi.string().allow(""),
787
+ });
788
+ }
789
+
697
790
  /** @returns {CourierPartnerSchemeModelSchema} */
698
791
  static CourierPartnerSchemeModelSchema() {
699
792
  return Joi.object({
@@ -779,6 +872,61 @@ class LogisticsPartnerModel {
779
872
  });
780
873
  }
781
874
 
875
+ /** @returns {BulkRateCardJob} */
876
+ static BulkRateCardJob() {
877
+ return Joi.object({
878
+ type: Joi.string().allow("").required(),
879
+ total: Joi.number().required(),
880
+ failed: Joi.number().required(),
881
+ success: Joi.number().required(),
882
+ action: Joi.string().allow(""),
883
+ batch_id: Joi.string().allow("").required(),
884
+ status: Joi.string().allow("").required(),
885
+ failed_records: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
886
+ file_path: Joi.string().allow("").allow(null),
887
+ created_on: Joi.string().allow(""),
888
+ modified_on: Joi.string().allow(""),
889
+ });
890
+ }
891
+
892
+ /** @returns {BulkRateCardJobDetails} */
893
+ static BulkRateCardJobDetails() {
894
+ return Joi.object({
895
+ file_path: Joi.string().allow(""),
896
+ rate_card_type: Joi.string().allow("").required(),
897
+ action: Joi.string().allow("").required(),
898
+ company_ids: Joi.array().items(Joi.number()),
899
+ });
900
+ }
901
+
902
+ /** @returns {SampleFileRateZoneRequestSchema} */
903
+ static SampleFileRateZoneRequestSchema() {
904
+ return Joi.object({
905
+ zone_type: Joi.string().allow(""),
906
+ country: Joi.string().allow(""),
907
+ region: Joi.string().allow(""),
908
+ });
909
+ }
910
+
911
+ /** @returns {RateZoneBulkJobDetails} */
912
+ static RateZoneBulkJobDetails() {
913
+ return Joi.object({
914
+ action: Joi.string().allow(""),
915
+ file_path: Joi.string().allow("").allow(null),
916
+ zone_type: Joi.string().allow(""),
917
+ country: Joi.string().allow(""),
918
+ region: Joi.string().allow(""),
919
+ });
920
+ }
921
+
922
+ /** @returns {RateZoneBulkJobList} */
923
+ static RateZoneBulkJobList() {
924
+ return Joi.object({
925
+ items: Joi.array().items(LogisticsPartnerModel.BulkRateCardJob()),
926
+ page: LogisticsPartnerModel.Page(),
927
+ });
928
+ }
929
+
782
930
  /** @returns {RegionTatItemResult} */
783
931
  static RegionTatItemResult() {
784
932
  return Joi.object({
@@ -1129,6 +1277,14 @@ class LogisticsPartnerModel {
1129
1277
  });
1130
1278
  }
1131
1279
 
1280
+ /** @returns {StandardRateZone} */
1281
+ static StandardRateZone() {
1282
+ return Joi.object({
1283
+ zone_name: Joi.string().allow(""),
1284
+ zone_slug: Joi.string().allow(""),
1285
+ });
1286
+ }
1287
+
1132
1288
  /** @returns {CreatedBy} */
1133
1289
  static CreatedBy() {
1134
1290
  return Joi.object({
@@ -1159,6 +1315,7 @@ class LogisticsPartnerModel {
1159
1315
  doorstep_qc: Joi.boolean(),
1160
1316
  qr: Joi.boolean(),
1161
1317
  mps: Joi.boolean(),
1318
+ b2b: Joi.boolean(),
1162
1319
  ndr: Joi.boolean(),
1163
1320
  ndr_attempts: Joi.number(),
1164
1321
  dangerous_goods: Joi.boolean(),
@@ -25,4 +25,12 @@ declare class LogisticsValidator {
25
25
  static getCourierPartnerSchemes(): any;
26
26
  static updateCourierPartnerScheme(): any;
27
27
  static getCourierPartnerScheme(): any;
28
+ static getSampleFileRateCard(): any;
29
+ static bulkRateCard(): any;
30
+ static getBulkRateCard(): any;
31
+ static getSampleFileRateZone(): any;
32
+ static createRateZoneBulkJob(): any;
33
+ static getBulkRateZoneJobHistory(): any;
34
+ static getRateZoneConfig(): any;
35
+ static updateRateZoneConfiguration(): any;
28
36
  }
@@ -252,6 +252,76 @@ class LogisticsValidator {
252
252
  schemeId: Joi.string().allow("").required(),
253
253
  }).required();
254
254
  }
255
+
256
+ static getSampleFileRateCard() {
257
+ return Joi.object({}).required();
258
+ }
259
+
260
+ static bulkRateCard() {
261
+ return Joi.object({
262
+ extensionId: Joi.string().allow("").required(),
263
+ schemeId: Joi.string().allow("").required(),
264
+ body: LogisticsModel.BulkRateCardJobDetails().required(),
265
+ }).required();
266
+ }
267
+
268
+ static getBulkRateCard() {
269
+ return Joi.object({
270
+ extensionId: Joi.string().allow("").required(),
271
+ schemeId: Joi.string().allow("").required(),
272
+ pageNo: Joi.number(),
273
+ pageSize: Joi.number(),
274
+ batchId: Joi.string().allow(""),
275
+ action: Joi.string().allow(""),
276
+ status: Joi.string().allow("").allow(null),
277
+ startDate: Joi.string().allow(""),
278
+ endDate: Joi.string().allow(""),
279
+ }).required();
280
+ }
281
+
282
+ static getSampleFileRateZone() {
283
+ return Joi.object({
284
+ body: LogisticsModel.SampleFileRateZoneRequestSchema().required(),
285
+ }).required();
286
+ }
287
+
288
+ static createRateZoneBulkJob() {
289
+ return Joi.object({
290
+ extensionId: Joi.string().allow("").required(),
291
+ schemeId: Joi.string().allow("").required(),
292
+ body: LogisticsModel.RateZoneBulkJobDetails().required(),
293
+ }).required();
294
+ }
295
+
296
+ static getBulkRateZoneJobHistory() {
297
+ return Joi.object({
298
+ extensionId: Joi.string().allow("").required(),
299
+ schemeId: Joi.string().allow("").required(),
300
+ pageNo: Joi.number(),
301
+ pageSize: Joi.number(),
302
+ batchId: Joi.string().allow(""),
303
+ action: Joi.string().allow(""),
304
+ status: Joi.string().allow(""),
305
+ zoneType: Joi.string().allow(""),
306
+ startDate: Joi.string().allow(""),
307
+ endDate: Joi.string().allow(""),
308
+ }).required();
309
+ }
310
+
311
+ static getRateZoneConfig() {
312
+ return Joi.object({
313
+ extensionId: Joi.string().allow("").required(),
314
+ schemeId: Joi.string().allow("").required(),
315
+ }).required();
316
+ }
317
+
318
+ static updateRateZoneConfiguration() {
319
+ return Joi.object({
320
+ extensionId: Joi.string().allow("").required(),
321
+ schemeId: Joi.string().allow("").required(),
322
+ body: LogisticsModel.RateZoneConfigurationDetails().required(),
323
+ }).required();
324
+ }
255
325
  }
256
326
 
257
327
  module.exports = LogisticsValidator;