@gofynd/fdk-client-javascript 1.3.6-beta.2 → 1.3.6

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 (76) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationConfig.d.ts +11 -3
  4. package/sdk/application/ApplicationConfig.js +21 -3
  5. package/sdk/application/Cart/CartApplicationClient.js +228 -113
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +244 -121
  7. package/sdk/application/Common/CommonApplicationClient.js +20 -9
  8. package/sdk/application/Communication/CommunicationApplicationClient.js +28 -13
  9. package/sdk/application/Configuration/ConfigurationApplicationClient.js +132 -65
  10. package/sdk/application/Content/ContentApplicationClient.js +156 -77
  11. package/sdk/application/FileStorage/FileStorageApplicationClient.js +28 -13
  12. package/sdk/application/Lead/LeadApplicationClient.js +60 -29
  13. package/sdk/application/Logistic/LogisticApplicationClient.js +44 -21
  14. package/sdk/application/Order/OrderApplicationClient.js +100 -49
  15. package/sdk/application/Payment/PaymentApplicationClient.js +340 -169
  16. package/sdk/application/PosCart/PosCartApplicationClient.js +220 -109
  17. package/sdk/application/Rewards/RewardsApplicationClient.js +60 -29
  18. package/sdk/application/Share/ShareApplicationClient.js +60 -29
  19. package/sdk/application/Theme/ThemeApplicationClient.js +36 -17
  20. package/sdk/application/User/UserApplicationClient.js +324 -161
  21. package/sdk/common/FDKError.d.ts +4 -0
  22. package/sdk/common/FDKError.js +9 -0
  23. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +16 -40
  24. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +160 -38
  25. package/sdk/partner/PartnerConfig.d.ts +10 -0
  26. package/sdk/partner/PartnerConfig.js +10 -1
  27. package/sdk/partner/Theme/ThemePartnerClient.d.ts +96 -199
  28. package/sdk/partner/Theme/ThemePartnerClient.js +935 -170
  29. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +36 -17
  30. package/sdk/platform/Billing/BillingPlatformClient.js +140 -69
  31. package/sdk/platform/Cart/CartPlatformApplicationClient.js +456 -228
  32. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +512 -256
  33. package/sdk/platform/Catalog/CatalogPlatformClient.js +620 -309
  34. package/sdk/platform/Common/CommonPlatformClient.js +20 -9
  35. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +472 -236
  36. package/sdk/platform/Communication/CommunicationPlatformClient.js +12 -5
  37. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +14 -1
  38. package/sdk/platform/Communication/CommunicationPlatformModel.js +16 -0
  39. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +116 -57
  40. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +256 -128
  41. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +148 -73
  42. package/sdk/platform/Content/ContentPlatformApplicationClient.js +552 -276
  43. package/sdk/platform/Discount/DiscountPlatformClient.js +92 -45
  44. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +88 -44
  45. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +52 -25
  46. package/sdk/platform/Finance/FinancePlatformClient.js +196 -97
  47. package/sdk/platform/Inventory/InventoryPlatformClient.js +100 -49
  48. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +104 -52
  49. package/sdk/platform/Lead/LeadPlatformClient.js +92 -45
  50. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +26 -0
  51. package/sdk/platform/Order/OrderPlatformApplicationClient.js +239 -5
  52. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +57 -1
  53. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +55 -0
  54. package/sdk/platform/Order/OrderPlatformClient.d.ts +0 -10
  55. package/sdk/platform/Order/OrderPlatformClient.js +356 -254
  56. package/sdk/platform/Order/OrderPlatformValidator.d.ts +1 -20
  57. package/sdk/platform/Order/OrderPlatformValidator.js +0 -15
  58. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +16 -8
  59. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +336 -168
  60. package/sdk/platform/Payment/PaymentPlatformClient.js +84 -41
  61. package/sdk/platform/PlatformConfig.d.ts +10 -0
  62. package/sdk/platform/PlatformConfig.js +10 -1
  63. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +96 -48
  64. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +112 -56
  65. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +148 -73
  66. package/sdk/platform/Share/SharePlatformApplicationClient.js +40 -20
  67. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +224 -112
  68. package/sdk/platform/Theme/ThemePlatformClient.js +28 -13
  69. package/sdk/platform/User/UserPlatformApplicationClient.js +144 -72
  70. package/sdk/platform/Webhook/WebhookPlatformClient.js +132 -65
  71. package/sdk/public/Configuration/ConfigurationPublicClient.js +20 -9
  72. package/sdk/public/Inventory/InventoryPublicClient.js +52 -25
  73. package/sdk/public/Partner/PartnerPublicClient.js +12 -5
  74. package/sdk/public/PublicConfig.d.ts +11 -1
  75. package/sdk/public/PublicConfig.js +10 -1
  76. package/sdk/public/Webhook/WebhookPublicClient.js +20 -9
@@ -154,12 +154,6 @@ export = OrderPlatformValidator;
154
154
  * @property {string} [orderType]
155
155
  */
156
156
  /** @typedef GetRoleBasedActionsParam */
157
- /**
158
- * @typedef GetShipmentBagReasonsParam
159
- * @property {string} shipmentId - ID of the bag. An order may contain multiple
160
- * items and may get divided into one or more shipment, each having its own ID.
161
- * @property {number} lineNumber - Line number of bag.
162
- */
163
157
  /**
164
158
  * @typedef GetShipmentByIdParam
165
159
  * @property {string} [channelShipmentId] - App Shipment Id
@@ -339,8 +333,6 @@ declare class OrderPlatformValidator {
339
333
  static getOrders(): GetOrdersParam;
340
334
  /** @returns {GetRoleBasedActionsParam} */
341
335
  static getRoleBasedActions(): any;
342
- /** @returns {GetShipmentBagReasonsParam} */
343
- static getShipmentBagReasons(): GetShipmentBagReasonsParam;
344
336
  /** @returns {GetShipmentByIdParam} */
345
337
  static getShipmentById(): GetShipmentByIdParam;
346
338
  /** @returns {GetShipmentHistoryParam} */
@@ -385,7 +377,7 @@ declare class OrderPlatformValidator {
385
377
  static verifyMobileOTP(): VerifyMobileOTPParam;
386
378
  }
387
379
  declare namespace OrderPlatformValidator {
388
- export { AttachOrderUserParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetLaneConfigParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentBagReasonsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetfiltersParam, InvalidateShipmentCacheParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentParam, VerifyMobileOTPParam };
380
+ export { AttachOrderUserParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetLaneConfigParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetfiltersParam, InvalidateShipmentCacheParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentParam, VerifyMobileOTPParam };
389
381
  }
390
382
  type AttachOrderUserParam = {
391
383
  body: OrderPlatformModel.AttachOrderUser;
@@ -663,17 +655,6 @@ type GetOrdersParam = {
663
655
  customerId?: string;
664
656
  orderType?: string;
665
657
  };
666
- type GetShipmentBagReasonsParam = {
667
- /**
668
- * - ID of the bag. An order may contain multiple
669
- * items and may get divided into one or more shipment, each having its own ID.
670
- */
671
- shipmentId: string;
672
- /**
673
- * - Line number of bag.
674
- */
675
- lineNumber: number;
676
- };
677
658
  type GetShipmentByIdParam = {
678
659
  /**
679
660
  * - App Shipment Id
@@ -180,13 +180,6 @@ const OrderPlatformModel = require("./OrderPlatformModel");
180
180
 
181
181
  /** @typedef GetRoleBasedActionsParam */
182
182
 
183
- /**
184
- * @typedef GetShipmentBagReasonsParam
185
- * @property {string} shipmentId - ID of the bag. An order may contain multiple
186
- * items and may get divided into one or more shipment, each having its own ID.
187
- * @property {number} lineNumber - Line number of bag.
188
- */
189
-
190
183
  /**
191
184
  * @typedef GetShipmentByIdParam
192
185
  * @property {string} [channelShipmentId] - App Shipment Id
@@ -560,14 +553,6 @@ class OrderPlatformValidator {
560
553
  return Joi.object({}).required();
561
554
  }
562
555
 
563
- /** @returns {GetShipmentBagReasonsParam} */
564
- static getShipmentBagReasons() {
565
- return Joi.object({
566
- shipmentId: Joi.string().allow("").required(),
567
- lineNumber: Joi.number().required(),
568
- }).required();
569
- }
570
-
571
556
  /** @returns {GetShipmentByIdParam} */
572
557
  static getShipmentById() {
573
558
  return Joi.object({
@@ -80,10 +80,14 @@ class Partner {
80
80
  });
81
81
 
82
82
  if (res_error) {
83
- Logger({
84
- level: "WARN",
85
- message: `Response Validation Warnnings for platform > Partner > addProxyPath \n ${res_error}`,
86
- });
83
+ if (this.config.options.strictResponseCheck === true) {
84
+ return Promise.reject(new FDKResponseValidationError(res_error));
85
+ } else {
86
+ Logger({
87
+ level: "WARN",
88
+ message: `Response Validation Warnings for platform > Partner > addProxyPath \n ${res_error}`,
89
+ });
90
+ }
87
91
  }
88
92
 
89
93
  return response;
@@ -157,10 +161,14 @@ class Partner {
157
161
  });
158
162
 
159
163
  if (res_error) {
160
- Logger({
161
- level: "WARN",
162
- message: `Response Validation Warnnings for platform > Partner > removeProxyPath \n ${res_error}`,
163
- });
164
+ if (this.config.options.strictResponseCheck === true) {
165
+ return Promise.reject(new FDKResponseValidationError(res_error));
166
+ } else {
167
+ Logger({
168
+ level: "WARN",
169
+ message: `Response Validation Warnings for platform > Partner > removeProxyPath \n ${res_error}`,
170
+ });
171
+ }
164
172
  }
165
173
 
166
174
  return response;