@gofynd/fdk-client-javascript 1.4.8-beta.3 → 1.4.8

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 (189) hide show
  1. package/README.md +26 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +8 -0
  4. package/sdk/application/ApplicationClient.js +14 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +20 -20
  6. package/sdk/application/Cart/CartApplicationClient.js +20 -20
  7. package/sdk/application/Cart/CartApplicationModel.d.ts +2446 -664
  8. package/sdk/application/Cart/CartApplicationModel.js +783 -552
  9. package/sdk/application/Cart/CartApplicationValidator.d.ts +268 -194
  10. package/sdk/application/Cart/CartApplicationValidator.js +100 -114
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +53 -53
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +53 -53
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2012 -503
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +603 -453
  15. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +64 -64
  16. package/sdk/application/Catalog/CatalogApplicationValidator.js +32 -32
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  18. package/sdk/application/Common/CommonApplicationClient.js +2 -2
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +170 -90
  20. package/sdk/application/Common/CommonApplicationModel.js +59 -58
  21. package/sdk/application/Common/CommonApplicationValidator.d.ts +8 -5
  22. package/sdk/application/Common/CommonApplicationValidator.js +3 -3
  23. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +2 -2
  24. package/sdk/application/Communication/CommunicationApplicationClient.js +2 -2
  25. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +170 -35
  26. package/sdk/application/Communication/CommunicationApplicationModel.js +54 -33
  27. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +15 -15
  28. package/sdk/application/Configuration/ConfigurationApplicationClient.js +15 -15
  29. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +624 -443
  30. package/sdk/application/Configuration/ConfigurationApplicationModel.js +259 -248
  31. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +32 -24
  32. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +14 -13
  33. package/sdk/application/Content/ContentApplicationClient.d.ts +16 -16
  34. package/sdk/application/Content/ContentApplicationClient.js +16 -16
  35. package/sdk/application/Content/ContentApplicationModel.d.ts +1205 -282
  36. package/sdk/application/Content/ContentApplicationModel.js +341 -277
  37. package/sdk/application/Content/ContentApplicationValidator.d.ts +28 -17
  38. package/sdk/application/Content/ContentApplicationValidator.js +11 -10
  39. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +3 -3
  40. package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
  41. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +146 -37
  42. package/sdk/application/FileStorage/FileStorageApplicationModel.js +38 -36
  43. package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
  44. package/sdk/application/Lead/LeadApplicationClient.js +3 -3
  45. package/sdk/application/Lead/LeadApplicationModel.d.ts +195 -134
  46. package/sdk/application/Lead/LeadApplicationModel.js +110 -67
  47. package/sdk/application/Lead/LeadApplicationValidator.d.ts +8 -8
  48. package/sdk/application/Lead/LeadApplicationValidator.js +4 -4
  49. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -10
  50. package/sdk/application/Logistic/LogisticApplicationClient.js +10 -10
  51. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +1039 -221
  52. package/sdk/application/Logistic/LogisticApplicationModel.js +342 -199
  53. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +76 -82
  54. package/sdk/application/Logistic/LogisticApplicationValidator.js +38 -41
  55. package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
  56. package/sdk/application/Order/OrderApplicationClient.js +10 -10
  57. package/sdk/application/Order/OrderApplicationModel.d.ts +1400 -325
  58. package/sdk/application/Order/OrderApplicationModel.js +391 -317
  59. package/sdk/application/Order/OrderApplicationValidator.d.ts +32 -30
  60. package/sdk/application/Order/OrderApplicationValidator.js +15 -14
  61. package/sdk/application/Payment/PaymentApplicationClient.d.ts +43 -43
  62. package/sdk/application/Payment/PaymentApplicationClient.js +43 -43
  63. package/sdk/application/Payment/PaymentApplicationModel.d.ts +1111 -1022
  64. package/sdk/application/Payment/PaymentApplicationModel.js +537 -521
  65. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +82 -49
  66. package/sdk/application/Payment/PaymentApplicationValidator.js +30 -30
  67. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +28 -7
  68. package/sdk/application/Rewards/RewardsApplicationModel.js +7 -7
  69. package/sdk/application/Share/ShareApplicationModel.d.ts +178 -38
  70. package/sdk/application/Share/ShareApplicationModel.js +53 -37
  71. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -2
  72. package/sdk/application/Share/ShareApplicationValidator.js +2 -1
  73. package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
  74. package/sdk/application/Theme/ThemeApplicationClient.js +14 -8
  75. package/sdk/application/Theme/ThemeApplicationModel.d.ts +528 -287
  76. package/sdk/application/Theme/ThemeApplicationModel.js +208 -172
  77. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +17 -12
  78. package/sdk/application/Theme/ThemeApplicationValidator.js +8 -6
  79. package/sdk/application/User/UserApplicationClient.d.ts +36 -36
  80. package/sdk/application/User/UserApplicationClient.js +36 -36
  81. package/sdk/application/User/UserApplicationModel.d.ts +1062 -255
  82. package/sdk/application/User/UserApplicationModel.js +298 -244
  83. package/sdk/application/User/UserApplicationValidator.d.ts +80 -80
  84. package/sdk/application/User/UserApplicationValidator.js +40 -40
  85. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +1 -1
  86. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -1
  87. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +20 -5
  88. package/sdk/application/Webhook/WebhookApplicationModel.js +5 -5
  89. package/sdk/common/Clickstream.js +95 -15
  90. package/sdk/common/Constant.d.ts +9 -0
  91. package/sdk/common/Constant.js +11 -0
  92. package/sdk/common/Utility.js +19 -0
  93. package/sdk/common/utils.js +8 -1
  94. package/sdk/partner/Lead/LeadPartnerModel.d.ts +28 -7
  95. package/sdk/partner/Lead/LeadPartnerModel.js +7 -7
  96. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +28 -7
  97. package/sdk/partner/Logistics/LogisticsPartnerModel.js +7 -7
  98. package/sdk/partner/PartnerClient.d.ts +8 -0
  99. package/sdk/partner/PartnerClient.js +14 -0
  100. package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -0
  101. package/sdk/partner/Theme/ThemePartnerClient.js +158 -0
  102. package/sdk/partner/Theme/ThemePartnerModel.d.ts +45 -6
  103. package/sdk/partner/Theme/ThemePartnerModel.js +33 -4
  104. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
  105. package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
  106. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +28 -7
  107. package/sdk/partner/Webhook/WebhookPartnerModel.js +7 -7
  108. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +28 -7
  109. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +7 -7
  110. package/sdk/platform/Billing/BillingPlatformClient.d.ts +21 -10
  111. package/sdk/platform/Billing/BillingPlatformClient.js +167 -83
  112. package/sdk/platform/Billing/BillingPlatformModel.d.ts +2849 -565
  113. package/sdk/platform/Billing/BillingPlatformModel.js +935 -556
  114. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +30 -14
  115. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -16
  116. package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -7
  117. package/sdk/platform/Cart/CartPlatformModel.js +8 -8
  118. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +12 -2
  119. package/sdk/platform/Catalog/CatalogPlatformClient.js +41 -1
  120. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +46 -12
  121. package/sdk/platform/Catalog/CatalogPlatformModel.js +14 -11
  122. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -0
  123. package/sdk/platform/Catalog/CatalogPlatformValidator.js +17 -0
  124. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +28 -7
  125. package/sdk/platform/Communication/CommunicationPlatformModel.js +7 -7
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -7
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +7 -7
  128. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -97
  129. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +77 -782
  130. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +24 -701
  131. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +7 -539
  132. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -183
  133. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +0 -134
  134. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
  135. package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -79
  136. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -15
  137. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -13
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +58 -17
  139. package/sdk/platform/Content/ContentPlatformModel.js +28 -15
  140. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +28 -7
  141. package/sdk/platform/Discount/DiscountPlatformModel.js +7 -7
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +127 -25
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +37 -25
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
  145. package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1583 -347
  147. package/sdk/platform/Finance/FinancePlatformModel.js +463 -351
  148. package/sdk/platform/Lead/LeadPlatformModel.d.ts +28 -7
  149. package/sdk/platform/Lead/LeadPlatformModel.js +7 -7
  150. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -0
  151. package/sdk/platform/Order/OrderPlatformClient.js +165 -0
  152. package/sdk/platform/Order/OrderPlatformModel.d.ts +613 -39
  153. package/sdk/platform/Order/OrderPlatformModel.js +359 -41
  154. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -1
  155. package/sdk/platform/Order/OrderPlatformValidator.js +28 -0
  156. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +30 -9
  157. package/sdk/platform/Payment/PaymentPlatformModel.js +9 -9
  158. package/sdk/platform/PlatformClient.d.ts +8 -0
  159. package/sdk/platform/PlatformClient.js +14 -0
  160. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +28 -7
  161. package/sdk/platform/Rewards/RewardsPlatformModel.js +7 -7
  162. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +12 -9
  163. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +12 -9
  164. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +120 -22
  165. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +76 -21
  166. package/sdk/platform/Share/SharePlatformModel.d.ts +28 -7
  167. package/sdk/platform/Share/SharePlatformModel.js +7 -7
  168. package/sdk/platform/Theme/ThemePlatformModel.d.ts +18 -5
  169. package/sdk/platform/Theme/ThemePlatformModel.js +7 -4
  170. package/sdk/platform/User/UserPlatformModel.d.ts +18 -18
  171. package/sdk/platform/User/UserPlatformModel.js +9 -9
  172. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +28 -7
  173. package/sdk/platform/Webhook/WebhookPlatformModel.js +7 -7
  174. package/sdk/public/Billing/BillingPublicClient.d.ts +11 -0
  175. package/sdk/public/Billing/BillingPublicClient.js +80 -0
  176. package/sdk/public/Billing/BillingPublicModel.d.ts +584 -99
  177. package/sdk/public/Billing/BillingPublicModel.js +252 -87
  178. package/sdk/public/Billing/BillingPublicValidator.d.ts +10 -1
  179. package/sdk/public/Billing/BillingPublicValidator.js +12 -0
  180. package/sdk/public/PublicClient.d.ts +0 -2
  181. package/sdk/public/PublicClient.js +0 -4
  182. package/sdk/public/index.d.ts +0 -1
  183. package/sdk/public/index.js +0 -2
  184. package/sdk/public/Inventory/InventoryPublicClient.d.ts +0 -87
  185. package/sdk/public/Inventory/InventoryPublicClient.js +0 -529
  186. package/sdk/public/Inventory/InventoryPublicModel.d.ts +0 -393
  187. package/sdk/public/Inventory/InventoryPublicModel.js +0 -448
  188. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +0 -91
  189. package/sdk/public/Inventory/InventoryPublicValidator.js +0 -85
@@ -23,10 +23,11 @@ const Joi = require("joi");
23
23
 
24
24
  /**
25
25
  * @typedef ErrorResponse
26
- * @property {number} [status]
27
- * @property {boolean} [success]
28
- * @property {string} message
29
- * @property {string} [error_trace]
26
+ * @property {number} [status] - The HTTP status code corresponding to the error.
27
+ * @property {boolean} [success] - Indicates whether the operation was
28
+ * successful. Always false in the case of an error.
29
+ * @property {string} message - A message describing the error that occurred.
30
+ * @property {string} [error_trace] - Error trace of the error that occurred.
30
31
  * @property {string} [error]
31
32
  */
32
33
 
@@ -1681,15 +1682,230 @@ const Joi = require("joi");
1681
1682
  * @property {string} [error] - Error String.
1682
1683
  */
1683
1684
 
1685
+ /**
1686
+ * @typedef ConfigData
1687
+ * @property {boolean} [acknowledged] - Indicates whether the update operation
1688
+ * was acknowledged by the database.
1689
+ * @property {boolean} [is_upserted] - Indicates whether the update operation
1690
+ * resulted in an upsert (an update or insert).
1691
+ * @property {boolean} [is_inserted] - Indicates whether the update operation
1692
+ * resulted in a new document being inserted.
1693
+ */
1694
+
1695
+ /**
1696
+ * @typedef ConfigUpdatedResponse
1697
+ * @property {ConfigData[]} data - The result of the config update operation,
1698
+ * including whether it was acknowledged, upserted, or inserted.
1699
+ * @property {boolean} success - Indicates whether the config update operation
1700
+ * was successful.
1701
+ */
1702
+
1703
+ /**
1704
+ * @typedef FlagData
1705
+ * @property {Object} [value]
1706
+ * @property {Object} [filter]
1707
+ */
1708
+
1709
+ /**
1710
+ * @typedef Flags
1711
+ * @property {FlagData[]} [allow_partial_transition] - Indicates whether a
1712
+ * partial transition of bags to the next state is permissible, allowing some
1713
+ * bags to progress while others remain in the current state.
1714
+ * @property {FlagData[]} [can_break_entity] - Specifies whether bags within a
1715
+ * shipment, set,cdf or entity can be broken individually or as a group. If
1716
+ * set to false, all bags within the entity must remain together and
1717
+ * transition together to the same state.
1718
+ * @property {FlagData[]} [allowed_bag_updates] - Specifies which fields are
1719
+ * permitted to be updated at the bag level. Allowed fields are:
1720
+ *
1721
+ * - Meta
1722
+ * - Pdf_links
1723
+ * - Affiliate_meta
1724
+ * - Delivery_awb_number
1725
+ * - Store_invoice_id
1726
+ * - Store_id
1727
+ * - Return_store_id
1728
+ * - Eway_bill_id
1729
+ *
1730
+ * @property {FlagData[]} [allowed_bag_status_updates] - Specifies which fields
1731
+ * are permitted to be updated at the bag status level. Allowed fields are:
1732
+ *
1733
+ * - Json
1734
+ *
1735
+ * @property {FlagData[]} [allowed_entity_updates] - Specifies which fields are
1736
+ * permitted to be updated at shipment level. Allowed fields are:
1737
+ *
1738
+ * - Meta
1739
+ * - Pdf_links
1740
+ * - Affiliate_meta
1741
+ * - Delivery_awb_number
1742
+ * - Store_invoice_id
1743
+ * - Store_id
1744
+ * - Return_store_id
1745
+ * - Eway_bill_id
1746
+ * - Logistics_meta
1747
+ *
1748
+ * @property {FlagData[]} [allowed_entity_status_updates] - Specifies which
1749
+ * fields are permitted to be updated at the Entity status level. Allowed fields are:
1750
+ *
1751
+ * - Json
1752
+ *
1753
+ * @property {FlagData[]} [status_update_type] - Describes the type of journey
1754
+ * associated with the particular status of the shipment. Possible values are:
1755
+ *
1756
+ * - Positive
1757
+ * - Negative
1758
+ *
1759
+ * @property {FlagData[]} [is_bag_status_reason_allowed] - Indicates whether a
1760
+ * reason at the product level should be allowed for a particular status.
1761
+ * @property {FlagData[]} [is_entity_status_reason_allowed] - Indicates whether
1762
+ * a reason at the shipment level should be allowed for a particular status.
1763
+ * @property {FlagData[]} [transition_strategy] - This flag is used to define
1764
+ * the shipment breaking strategy. Possible values are:
1765
+ *
1766
+ * - Break_shipment_based_on_location_reassignment
1767
+ * - Break_shipment_based_on_groups
1768
+ * - Break_shipment_based_on_stormbreaker
1769
+ */
1770
+
1771
+ /**
1772
+ * @typedef Filter
1773
+ * @property {string} [order_type] - Indicates the type or category of the order.
1774
+ *
1775
+ * - PickAtStore: Pick from store
1776
+ * - HomeDelivery: Home delivery
1777
+ * - Digital: Digital
1778
+ *
1779
+ * @property {boolean} [is_partial_transition] - Specifies whether a partial
1780
+ * transition of the order is allowed, allowing some components to progress
1781
+ * while others remain in the current state.
1782
+ * @property {boolean} [auto_trigger_dp_assignment_acf] - Indicates whether the
1783
+ * assignment of a designated person is automatically triggered in the context of ACF.
1784
+ * @property {string} [lock_status] - Indicates the current locking status of
1785
+ * the shipment.
1786
+ *
1787
+ * - `complete`: Complete shipment lock
1788
+ * - `operational`: Operational shipment lock
1789
+ * - `None`: No lock on shipment
1790
+ *
1791
+ * @property {boolean} [lock_after_transition] - Specifies whether locking is
1792
+ * required after transitioning to the next status. lock_after_transition :
1793
+ * true - Lock Transition enabled lock_after_transition : false - Lock
1794
+ * Transition set false
1795
+ * @property {boolean} [resume_tasks_after_unlock] - Indicates whether tasks
1796
+ * should resume automatically after unlocking, such as DP assignment task and
1797
+ * invoicing task.
1798
+ * @property {boolean} [is_invoice_id_present] - Indicates whether an invoice ID
1799
+ * is present for the order.
1800
+ * @property {boolean} [is_credit_note_generated] - Indicates whether a credit
1801
+ * note has been generated for the order.
1802
+ * @property {boolean} [fulfill_virtual_invoice] - Specifies whether an
1803
+ * automated virtual invoice ID is associated with the order.
1804
+ * @property {string} [next_status] - Indicates the next status to which the
1805
+ * order will transition.
1806
+ * @property {boolean} [is_hook_enabled] - Indicates whether a task is enabled
1807
+ * for the order.
1808
+ * @property {boolean} [pos_credit_note_check] - Specifies whether a credit note
1809
+ * check is performed in a point of sale (POS) scenario.
1810
+ * @property {string} [order_platform] - Specifies the platform on which the
1811
+ * order was placed.
1812
+ *
1813
+ * - `platform-pos`: POS
1814
+ * - `platform-site`: WEB
1815
+ * - `openapi`: OPENAPI
1816
+ * - `marketplace`: MARKETPLACE
1817
+ *
1818
+ * @property {string} [refund_type] - Indicates the type of refund associated
1819
+ * with the order.
1820
+ *
1821
+ * - `credit_note`: CREDIT_NOTE
1822
+ * - `source`: SOURCE
1823
+ * - `bank_transfer`: BANK
1824
+ * - `manual_refund`: MANUAL_REFUND
1825
+ *
1826
+ * @property {boolean} [is_non_pos_platform] - Specifies whether the platform is
1827
+ * non-point of sale (POS) in nature.
1828
+ * @property {boolean} [is_self_ship] - Indicates whether the order is
1829
+ * self-shipped by the seller.
1830
+ * @property {string} [seller_country_code] - Specifies the country code of the seller.
1831
+ *
1832
+ * - `seller_country_code`: US
1833
+ * - `seller_country_code`: UK
1834
+ * - `seller_country_code`: IN
1835
+ *
1836
+ * @property {string} [customer_country_code] - Specifies the country code of the seller.
1837
+ *
1838
+ * - `customer_country_code`: US
1839
+ * - `customer_country_code`: UK
1840
+ * - `customer_country_code`: IN
1841
+ *
1842
+ * @property {boolean} [is_test_order] - Indicates whether the order is a test
1843
+ * order used for testing purposes - `is_test_order` : True - indicates test order
1844
+ * @property {string[]} [task_trigger_condition] - Specifies trigger conditions:
1845
+ *
1846
+ * - `status_update`: Status Update
1847
+ * - `data_update`: Data Update
1848
+ */
1849
+
1850
+ /**
1851
+ * @typedef PostHook
1852
+ * @property {string} task - Name of the hook that has to be added
1853
+ * @property {Object} [kwargs] - Additional parameters for the hook
1854
+ * @property {Filter} [filters] - Filters for scope selection.
1855
+ */
1856
+
1857
+ /**
1858
+ * @typedef PreHook
1859
+ * @property {string} task - Name of the hook that has to be added
1860
+ * @property {Object} [kwargs] - Additional parameters for the hook
1861
+ * @property {Filter} [filters] - Filter
1862
+ */
1863
+
1864
+ /**
1865
+ * @typedef Config
1866
+ * @property {string} [from_state] - Source state from which state transition
1867
+ * will take place
1868
+ * @property {string} [to_state] - Target state to which state transition will take place
1869
+ * @property {PreHook[]} [pre_hooks] - Tasks to be run before state transition
1870
+ * @property {PostHook[]} [post_hooks] - Tasks to be run after state transition
1871
+ * @property {Flags} [flags] - Various flags related to the transition. These
1872
+ * include options and settings that influence the behavior of the state
1873
+ * transition, such as whether partial transitions are allowed or whether the
1874
+ * transition can break the entity.
1875
+ */
1876
+
1877
+ /**
1878
+ * @typedef TransitionConfigCondition
1879
+ * @property {string} app_id - The unique identifier of the application to which
1880
+ * the configuration applies.
1881
+ * @property {string} ordering_channel - The channel through which the order was
1882
+ * placed, such as ECOMM or another specified channel.
1883
+ * @property {string} entity - The type of entity that the configuration pertains to.
1884
+ */
1885
+
1886
+ /**
1887
+ * @typedef TransitionConfigData
1888
+ * @property {TransitionConfigCondition} [conditions] - Conditions that must be
1889
+ * met for the ESM config to be applied.
1890
+ * @property {Config[]} [configs] - The configuration settings for the entity
1891
+ * transition. This includes pre_hooks, post_hooks, and flags for each
1892
+ * transition state.
1893
+ */
1894
+
1895
+ /**
1896
+ * @typedef TransitionConfigPayload
1897
+ * @property {TransitionConfigData} [data]
1898
+ */
1899
+
1684
1900
  /**
1685
1901
  * @typedef Page
1686
- * @property {number} [item_total]
1687
- * @property {string} [next_id]
1688
- * @property {boolean} [has_previous]
1689
- * @property {boolean} [has_next]
1690
- * @property {number} [current]
1691
- * @property {string} type
1692
- * @property {number} [size]
1902
+ * @property {number} [item_total] - The total number of items on the page.
1903
+ * @property {string} [next_id] - The identifier for the next page.
1904
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
1905
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
1906
+ * @property {number} [current] - The current page number.
1907
+ * @property {string} type - The type of the page, such as 'PageType'.
1908
+ * @property {number} [size] - The number of items per page.
1693
1909
  */
1694
1910
 
1695
1911
  /**
@@ -2959,22 +3175,9 @@ const Joi = require("joi");
2959
3175
  * @property {number} [id]
2960
3176
  */
2961
3177
 
2962
- /**
2963
- * @typedef Attributes
2964
- * @property {string} [primary_material]
2965
- * @property {string} [essential]
2966
- * @property {string} [marketer_name]
2967
- * @property {string} [primary_color]
2968
- * @property {string} [marketer_address]
2969
- * @property {string} [primary_color_hex]
2970
- * @property {string} [brand_name]
2971
- * @property {string} [name]
2972
- * @property {string[]} [gender]
2973
- */
2974
-
2975
3178
  /**
2976
3179
  * @typedef Item
2977
- * @property {Attributes} attributes
3180
+ * @property {Object} attributes - A dictionary of product attributes
2978
3181
  * @property {number} brand_id
2979
3182
  * @property {string} slug_key
2980
3183
  * @property {string} [webstore_product_url]
@@ -5273,6 +5476,136 @@ class OrderPlatformModel {
5273
5476
  });
5274
5477
  }
5275
5478
 
5479
+ /** @returns {ConfigData} */
5480
+ static ConfigData() {
5481
+ return Joi.object({
5482
+ acknowledged: Joi.boolean(),
5483
+ is_upserted: Joi.boolean(),
5484
+ is_inserted: Joi.boolean(),
5485
+ });
5486
+ }
5487
+
5488
+ /** @returns {ConfigUpdatedResponse} */
5489
+ static ConfigUpdatedResponse() {
5490
+ return Joi.object({
5491
+ data: Joi.array().items(OrderPlatformModel.ConfigData()).required(),
5492
+ success: Joi.boolean().required(),
5493
+ });
5494
+ }
5495
+
5496
+ /** @returns {FlagData} */
5497
+ static FlagData() {
5498
+ return Joi.object({
5499
+ value: Joi.any(),
5500
+ filter: Joi.any(),
5501
+ });
5502
+ }
5503
+
5504
+ /** @returns {Flags} */
5505
+ static Flags() {
5506
+ return Joi.object({
5507
+ allow_partial_transition: Joi.array().items(
5508
+ OrderPlatformModel.FlagData()
5509
+ ),
5510
+ can_break_entity: Joi.array().items(OrderPlatformModel.FlagData()),
5511
+ allowed_bag_updates: Joi.array().items(OrderPlatformModel.FlagData()),
5512
+ allowed_bag_status_updates: Joi.array().items(
5513
+ OrderPlatformModel.FlagData()
5514
+ ),
5515
+ allowed_entity_updates: Joi.array().items(OrderPlatformModel.FlagData()),
5516
+ allowed_entity_status_updates: Joi.array().items(
5517
+ OrderPlatformModel.FlagData()
5518
+ ),
5519
+ status_update_type: Joi.array().items(OrderPlatformModel.FlagData()),
5520
+ is_bag_status_reason_allowed: Joi.array().items(
5521
+ OrderPlatformModel.FlagData()
5522
+ ),
5523
+ is_entity_status_reason_allowed: Joi.array().items(
5524
+ OrderPlatformModel.FlagData()
5525
+ ),
5526
+ transition_strategy: Joi.array().items(OrderPlatformModel.FlagData()),
5527
+ });
5528
+ }
5529
+
5530
+ /** @returns {Filter} */
5531
+ static Filter() {
5532
+ return Joi.object({
5533
+ order_type: Joi.string().allow(""),
5534
+ is_partial_transition: Joi.boolean(),
5535
+ auto_trigger_dp_assignment_acf: Joi.boolean(),
5536
+ lock_status: Joi.string().allow(""),
5537
+ lock_after_transition: Joi.boolean(),
5538
+ resume_tasks_after_unlock: Joi.boolean(),
5539
+ is_invoice_id_present: Joi.boolean(),
5540
+ is_credit_note_generated: Joi.boolean(),
5541
+ fulfill_virtual_invoice: Joi.boolean(),
5542
+ next_status: Joi.string().allow(""),
5543
+ is_hook_enabled: Joi.boolean(),
5544
+ pos_credit_note_check: Joi.boolean(),
5545
+ order_platform: Joi.string().allow(""),
5546
+ refund_type: Joi.string().allow(""),
5547
+ is_non_pos_platform: Joi.boolean(),
5548
+ is_self_ship: Joi.boolean(),
5549
+ seller_country_code: Joi.string().allow(""),
5550
+ customer_country_code: Joi.string().allow(""),
5551
+ is_test_order: Joi.boolean(),
5552
+ task_trigger_condition: Joi.array().items(Joi.string().allow("")),
5553
+ });
5554
+ }
5555
+
5556
+ /** @returns {PostHook} */
5557
+ static PostHook() {
5558
+ return Joi.object({
5559
+ task: Joi.string().allow("").required(),
5560
+ kwargs: Joi.object().pattern(/\S/, Joi.any()),
5561
+ filters: OrderPlatformModel.Filter(),
5562
+ });
5563
+ }
5564
+
5565
+ /** @returns {PreHook} */
5566
+ static PreHook() {
5567
+ return Joi.object({
5568
+ task: Joi.string().allow("").required(),
5569
+ kwargs: Joi.object().pattern(/\S/, Joi.any()),
5570
+ filters: OrderPlatformModel.Filter(),
5571
+ });
5572
+ }
5573
+
5574
+ /** @returns {Config} */
5575
+ static Config() {
5576
+ return Joi.object({
5577
+ from_state: Joi.string().allow(""),
5578
+ to_state: Joi.string().allow(""),
5579
+ pre_hooks: Joi.array().items(OrderPlatformModel.PreHook()),
5580
+ post_hooks: Joi.array().items(OrderPlatformModel.PostHook()),
5581
+ flags: OrderPlatformModel.Flags(),
5582
+ });
5583
+ }
5584
+
5585
+ /** @returns {TransitionConfigCondition} */
5586
+ static TransitionConfigCondition() {
5587
+ return Joi.object({
5588
+ app_id: Joi.string().allow("").required(),
5589
+ ordering_channel: Joi.string().allow("").required(),
5590
+ entity: Joi.string().allow("").required(),
5591
+ });
5592
+ }
5593
+
5594
+ /** @returns {TransitionConfigData} */
5595
+ static TransitionConfigData() {
5596
+ return Joi.object({
5597
+ conditions: OrderPlatformModel.TransitionConfigCondition(),
5598
+ configs: Joi.array().items(OrderPlatformModel.Config()),
5599
+ });
5600
+ }
5601
+
5602
+ /** @returns {TransitionConfigPayload} */
5603
+ static TransitionConfigPayload() {
5604
+ return Joi.object({
5605
+ data: OrderPlatformModel.TransitionConfigData(),
5606
+ });
5607
+ }
5608
+
5276
5609
  /** @returns {Page} */
5277
5610
  static Page() {
5278
5611
  return Joi.object({
@@ -6789,25 +7122,10 @@ class OrderPlatformModel {
6789
7122
  });
6790
7123
  }
6791
7124
 
6792
- /** @returns {Attributes} */
6793
- static Attributes() {
6794
- return Joi.object({
6795
- primary_material: Joi.string().allow("").allow(null),
6796
- essential: Joi.string().allow("").allow(null),
6797
- marketer_name: Joi.string().allow("").allow(null),
6798
- primary_color: Joi.string().allow("").allow(null),
6799
- marketer_address: Joi.string().allow("").allow(null),
6800
- primary_color_hex: Joi.string().allow("").allow(null),
6801
- brand_name: Joi.string().allow("").allow(null),
6802
- name: Joi.string().allow("").allow(null),
6803
- gender: Joi.array().items(Joi.string().allow("")).allow(null, ""),
6804
- });
6805
- }
6806
-
6807
7125
  /** @returns {Item} */
6808
7126
  static Item() {
6809
7127
  return Joi.object({
6810
- attributes: OrderPlatformModel.Attributes().required(),
7128
+ attributes: Joi.any().required(),
6811
7129
  brand_id: Joi.number().required(),
6812
7130
  slug_key: Joi.string().allow("").required(),
6813
7131
  webstore_product_url: Joi.string().allow("").allow(null),
@@ -1,4 +1,8 @@
1
1
  export = OrderPlatformValidator;
2
+ /**
3
+ * @typedef AddStateManagerConfigParam
4
+ * @property {OrderPlatformModel.TransitionConfigPayload} body
5
+ */
2
6
  /**
3
7
  * @typedef AttachOrderUserParam
4
8
  * @property {OrderPlatformModel.AttachOrderUser} body
@@ -283,6 +287,12 @@ export = OrderPlatformValidator;
283
287
  * @property {string} [customerId]
284
288
  * @property {string} [orderType]
285
289
  */
290
+ /**
291
+ * @typedef GetStateManagerConfigParam
292
+ * @property {string} [appId] - The unique identifier of the application.
293
+ * @property {string} [orderingChannel] - The channel through which orders are placed.
294
+ * @property {string} [entity] - The entity for which the configuration is applied.
295
+ */
286
296
  /** @typedef GetStateTransitionMapParam */
287
297
  /**
288
298
  * @typedef GetTemplateParam
@@ -373,6 +383,8 @@ export = OrderPlatformValidator;
373
383
  * @property {OrderPlatformModel.VerifyMobileOTP} body
374
384
  */
375
385
  declare class OrderPlatformValidator {
386
+ /** @returns {AddStateManagerConfigParam} */
387
+ static addStateManagerConfig(): AddStateManagerConfigParam;
376
388
  /** @returns {AttachOrderUserParam} */
377
389
  static attachOrderUser(): AttachOrderUserParam;
378
390
  /** @returns {BulkListingParam} */
@@ -447,6 +459,8 @@ declare class OrderPlatformValidator {
447
459
  static getShipmentReasons(): GetShipmentReasonsParam;
448
460
  /** @returns {GetShipmentsParam} */
449
461
  static getShipments(): GetShipmentsParam;
462
+ /** @returns {GetStateManagerConfigParam} */
463
+ static getStateManagerConfig(): GetStateManagerConfigParam;
450
464
  /** @returns {GetStateTransitionMapParam} */
451
465
  static getStateTransitionMap(): any;
452
466
  /** @returns {GetTemplateParam} */
@@ -487,8 +501,11 @@ declare class OrderPlatformValidator {
487
501
  static verifyMobileOTP(): VerifyMobileOTPParam;
488
502
  }
489
503
  declare namespace OrderPlatformValidator {
490
- export { AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestsParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
504
+ export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestsParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
491
505
  }
506
+ type AddStateManagerConfigParam = {
507
+ body: OrderPlatformModel.TransitionConfigPayload;
508
+ };
492
509
  type AttachOrderUserParam = {
493
510
  body: OrderPlatformModel.AttachOrderUser;
494
511
  };
@@ -1054,6 +1071,20 @@ type GetShipmentsParam = {
1054
1071
  customerId?: string;
1055
1072
  orderType?: string;
1056
1073
  };
1074
+ type GetStateManagerConfigParam = {
1075
+ /**
1076
+ * - The unique identifier of the application.
1077
+ */
1078
+ appId?: string;
1079
+ /**
1080
+ * - The channel through which orders are placed.
1081
+ */
1082
+ orderingChannel?: string;
1083
+ /**
1084
+ * - The entity for which the configuration is applied.
1085
+ */
1086
+ entity?: string;
1087
+ };
1057
1088
  type GetTemplateParam = {
1058
1089
  templateName: string;
1059
1090
  };
@@ -2,6 +2,11 @@ const Joi = require("joi");
2
2
 
3
3
  const OrderPlatformModel = require("./OrderPlatformModel");
4
4
 
5
+ /**
6
+ * @typedef AddStateManagerConfigParam
7
+ * @property {OrderPlatformModel.TransitionConfigPayload} body
8
+ */
9
+
5
10
  /**
6
11
  * @typedef AttachOrderUserParam
7
12
  * @property {OrderPlatformModel.AttachOrderUser} body
@@ -323,6 +328,13 @@ const OrderPlatformModel = require("./OrderPlatformModel");
323
328
  * @property {string} [orderType]
324
329
  */
325
330
 
331
+ /**
332
+ * @typedef GetStateManagerConfigParam
333
+ * @property {string} [appId] - The unique identifier of the application.
334
+ * @property {string} [orderingChannel] - The channel through which orders are placed.
335
+ * @property {string} [entity] - The entity for which the configuration is applied.
336
+ */
337
+
326
338
  /** @typedef GetStateTransitionMapParam */
327
339
 
328
340
  /**
@@ -432,6 +444,13 @@ const OrderPlatformModel = require("./OrderPlatformModel");
432
444
  */
433
445
 
434
446
  class OrderPlatformValidator {
447
+ /** @returns {AddStateManagerConfigParam} */
448
+ static addStateManagerConfig() {
449
+ return Joi.object({
450
+ body: OrderPlatformModel.TransitionConfigPayload().required(),
451
+ }).required();
452
+ }
453
+
435
454
  /** @returns {AttachOrderUserParam} */
436
455
  static attachOrderUser() {
437
456
  return Joi.object({
@@ -812,6 +831,15 @@ class OrderPlatformValidator {
812
831
  }).required();
813
832
  }
814
833
 
834
+ /** @returns {GetStateManagerConfigParam} */
835
+ static getStateManagerConfig() {
836
+ return Joi.object({
837
+ appId: Joi.string().allow(""),
838
+ orderingChannel: Joi.string().allow(""),
839
+ entity: Joi.string().allow(""),
840
+ }).required();
841
+ }
842
+
815
843
  /** @returns {GetStateTransitionMapParam} */
816
844
  static getStateTransitionMap() {
817
845
  return Joi.object({}).required();
@@ -507,13 +507,13 @@ export = PaymentPlatformModel;
507
507
  */
508
508
  /**
509
509
  * @typedef Page
510
- * @property {number} [item_total]
511
- * @property {string} [next_id]
512
- * @property {boolean} [has_previous]
513
- * @property {boolean} [has_next]
514
- * @property {number} [current]
515
- * @property {string} type
516
- * @property {number} [size]
510
+ * @property {number} [item_total] - The total number of items on the page.
511
+ * @property {string} [next_id] - The identifier for the next page.
512
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
513
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
514
+ * @property {number} [current] - The current page number.
515
+ * @property {string} type - The type of the page, such as 'PageType'.
516
+ * @property {number} [size] - The number of items per page.
517
517
  */
518
518
  /**
519
519
  * @typedef EdcDeviceListResponse
@@ -701,7 +701,7 @@ export = PaymentPlatformModel;
701
701
  /**
702
702
  * @typedef ValidateCustomerResponse
703
703
  * @property {string} message - Error or success message.
704
- * @property {Object} data - Payment gateway response data
704
+ * @property {Object} [data] - Payment gateway response data
705
705
  * @property {boolean} success - Response is successful or not
706
706
  */
707
707
  /**
@@ -2490,12 +2490,33 @@ type EdcDeviceUpdateResponse = {
2490
2490
  /** @returns {Page} */
2491
2491
  declare function Page(): Page;
2492
2492
  type Page = {
2493
+ /**
2494
+ * - The total number of items on the page.
2495
+ */
2493
2496
  item_total?: number;
2497
+ /**
2498
+ * - The identifier for the next page.
2499
+ */
2494
2500
  next_id?: string;
2501
+ /**
2502
+ * - Indicates whether there is a previous page.
2503
+ */
2495
2504
  has_previous?: boolean;
2505
+ /**
2506
+ * - Indicates whether there is a next page.
2507
+ */
2496
2508
  has_next?: boolean;
2509
+ /**
2510
+ * - The current page number.
2511
+ */
2497
2512
  current?: number;
2513
+ /**
2514
+ * - The type of the page, such as 'PageType'.
2515
+ */
2498
2516
  type: string;
2517
+ /**
2518
+ * - The number of items per page.
2519
+ */
2499
2520
  size?: number;
2500
2521
  };
2501
2522
  /** @returns {EdcDeviceListResponse} */
@@ -2984,7 +3005,7 @@ type ValidateCustomerResponse = {
2984
3005
  /**
2985
3006
  * - Payment gateway response data
2986
3007
  */
2987
- data: any;
3008
+ data?: any;
2988
3009
  /**
2989
3010
  * - Response is successful or not
2990
3011
  */
@@ -573,13 +573,13 @@ const Joi = require("joi");
573
573
 
574
574
  /**
575
575
  * @typedef Page
576
- * @property {number} [item_total]
577
- * @property {string} [next_id]
578
- * @property {boolean} [has_previous]
579
- * @property {boolean} [has_next]
580
- * @property {number} [current]
581
- * @property {string} type
582
- * @property {number} [size]
576
+ * @property {number} [item_total] - The total number of items on the page.
577
+ * @property {string} [next_id] - The identifier for the next page.
578
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
579
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
580
+ * @property {number} [current] - The current page number.
581
+ * @property {string} type - The type of the page, such as 'PageType'.
582
+ * @property {number} [size] - The number of items per page.
583
583
  */
584
584
 
585
585
  /**
@@ -788,7 +788,7 @@ const Joi = require("joi");
788
788
  /**
789
789
  * @typedef ValidateCustomerResponse
790
790
  * @property {string} message - Error or success message.
791
- * @property {Object} data - Payment gateway response data
791
+ * @property {Object} [data] - Payment gateway response data
792
792
  * @property {boolean} success - Response is successful or not
793
793
  */
794
794
 
@@ -2297,7 +2297,7 @@ class PaymentPlatformModel {
2297
2297
  static ValidateCustomerResponse() {
2298
2298
  return Joi.object({
2299
2299
  message: Joi.string().allow("").required(),
2300
- data: Joi.any().required(),
2300
+ data: Joi.any(),
2301
2301
  success: Joi.boolean().required(),
2302
2302
  });
2303
2303
  }