@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
@@ -1,5 +1,27 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef TenureConfig
5
+ * @property {string} [display_name] - Display name for the tenure
6
+ * configuration(like "Monthly", "Half Yearly", "Yearly")
7
+ * @property {string} [description] - Description of the tenure configuration
8
+ * @property {boolean} [is_active] - Indicates whether the tenure configuration is active
9
+ * @property {string} [slug] - Slug identifier that uniquely identifies the
10
+ * tenure configuration
11
+ */
12
+
13
+ /**
14
+ * @typedef TenureConfigData
15
+ * @property {string} [country] - Country associated with the tenure configuration
16
+ * @property {TenureConfig[]} [tenure_config] - Array of tenure configurations
17
+ */
18
+
19
+ /**
20
+ * @typedef TenureConfigResponse
21
+ * @property {boolean} [success] - Indicates whether the request was successful
22
+ * @property {TenureConfigData} [data]
23
+ */
24
+
3
25
  /**
4
26
  * @typedef ResourceNotFound
5
27
  * @property {string} [message] - Resource not found with {id}
@@ -7,131 +29,151 @@ const Joi = require("joi");
7
29
 
8
30
  /**
9
31
  * @typedef PlanRecurring
10
- * @property {string} [interval]
11
- * @property {number} [interval_count]
12
- * @property {string} [aggregate_usage]
13
- * @property {string} [usage_type]
32
+ * @property {string} [interval] - Interval for the recurring plan
33
+ * @property {number} [interval_count] - Number of intervals for the recurring plan
34
+ * @property {string} [aggregate_usage] - Aggregate usage type for the recurring plan
35
+ * @property {string} [usage_type] - Usage type for the recurring plan (like metered etc)
36
+ */
37
+
38
+ /**
39
+ * @typedef PlanTypes
40
+ * @property {PlanDetails[]} [month] - Monthly plan details
41
+ * @property {PlanDetails[]} [quarter] - Quarterly plan details
42
+ * @property {PlanDetails[]} [half_year] - Half-yearly plan details
43
+ * @property {PlanDetails[]} [year] - Yearly plan details
14
44
  */
15
45
 
16
46
  /**
17
47
  * @typedef DetailList
18
- * @property {PlanDetails[]} [plans]
19
- * @property {string[]} [component_groups]
48
+ * @property {PlanTypes} [plans]
49
+ * @property {TrialPlanDetails} [trial_plan]
20
50
  */
21
51
 
22
52
  /**
23
53
  * @typedef PlanTaxation
24
- * @property {number} [gst]
54
+ * @property {number} [gst] - GST percentage applied to the plan
55
+ */
56
+
57
+ /**
58
+ * @typedef CountryRes
59
+ * @property {string} [name] - Name of the country
60
+ * @property {string} [code] - Country code
25
61
  */
26
62
 
27
63
  /**
28
64
  * @typedef OneTimeFees
29
- * @property {number} [developement]
30
- * @property {number} [marketing]
65
+ * @property {number} [developement] - One time Development fees
66
+ * @property {number} [marketing] - One time Marketing fees
31
67
  */
32
68
 
33
69
  /**
34
70
  * @typedef CreditLine
35
- * @property {boolean} [is_active]
71
+ * @property {boolean} [is_active] - Indicates whether the credit line is active
36
72
  */
37
73
 
38
74
  /**
39
75
  * @typedef PlanMeta
40
- * @property {string} [plan_platform_display_name]
76
+ * @property {string} [plan_platform_display_name] - Display name for the plan platform
41
77
  */
42
78
 
43
79
  /**
44
80
  * @typedef FeatureConfig
45
- * @property {boolean} [enabled]
46
- * @property {number} [limit]
47
- * @property {number} [hard_limit]
48
- * @property {number} [soft_limit]
81
+ * @property {boolean} [enabled] - Indicates whether the feature is enabled
82
+ * @property {number} [limit] - Limit for the feature
83
+ * @property {number} [hard_limit] - Hard limit for the feature
84
+ * @property {number} [soft_limit] - Soft limit for the feature
49
85
  */
50
86
 
51
87
  /**
52
88
  * @typedef PlanConfig
53
- * @property {boolean} [is_active]
54
- * @property {string} [display_text]
55
- * @property {boolean} [is_default]
56
- * @property {string} [processing_type]
57
- * @property {string[]} [tags]
89
+ * @property {boolean} [is_active] - Indicates whether the plan configuration is active
90
+ * @property {string} [display_text] - Text to display plan configuration
91
+ * @property {boolean} [is_default] - Indicates whether the plan configuration is default
92
+ * @property {string} [processing_type] - Type of processing for the plan configuration
93
+ * @property {string[]} [tags] - Tags associated with the plan configuration
58
94
  * @property {FeatureConfig} [feature_config]
59
- * @property {string} [_id]
60
- * @property {string} [component_id]
61
- * @property {string} [created_at]
62
- * @property {string} [modified_at]
63
- * @property {number} [__v]
64
- * @property {string} [billing_scheme]
65
- * @property {string} [bill_type]
66
- * @property {string} [price_ui_type]
95
+ * @property {string} [_id] - Unique identifier for the plan configuration
96
+ * @property {string} [component_id] - Component identifier associated with the
97
+ * plan configuration
98
+ * @property {string} [created_at] - Creation date of the plan configuration
99
+ * @property {string} [modified_at] - Modification date of the plan configuration
100
+ * @property {number} [__v] - Version number of the plan configuration
101
+ * @property {string} [billing_scheme] - Billing scheme for the plan configuration
102
+ * @property {string} [bill_type] - Billing type for the plan configuration
103
+ * @property {string} [price_ui_type] - Price UI type for the plan configuration
67
104
  * @property {PlanRecurring} [recurring]
68
105
  * @property {TransformQuantity} [transform_quantity]
69
106
  * @property {FreeTier} [free_tier]
70
- * @property {string} [currency]
71
- * @property {number} [unit_amount]
72
- * @property {number} [quantity]
73
- * @property {string} [price_type]
74
- * @property {Object[]} [tiers]
107
+ * @property {string} [currency] - Currency used in the plan configuration
108
+ * @property {number} [unit_amount] - Unit amount for the plan configuration
109
+ * @property {number} [quantity] - Quantity for the plan configuration
110
+ * @property {string} [price_type] - Price type for the plan configuration
111
+ * @property {Object[]} [tiers] - An array of pricing tiers that apply based on
112
+ * quantity or usage. Each tier can define a maximum limit (`up_to`), an
113
+ * additional flat fee (`flat_amount`), and a price per unit (`unit_amount`)
75
114
  */
76
115
 
77
116
  /**
78
117
  * @typedef FreeTier
79
- * @property {string} [type]
80
- * @property {number} [value]
118
+ * @property {string} [type] - Type of the free tier
119
+ * @property {number} [value] - Value of the free tier type
81
120
  */
82
121
 
83
122
  /**
84
123
  * @typedef TransformQuantity
85
- * @property {number} [divide_by]
86
- * @property {string} [round]
124
+ * @property {number} [divide_by] - Divide by value for the quantity transformation
125
+ * @property {string} [round] - Rounding method for the quantity transformation
87
126
  */
88
127
 
89
128
  /**
90
129
  * @typedef ComponentsSchema
91
- * @property {string} [name]
92
- * @property {string} [slug]
93
- * @property {string} [description]
94
- * @property {string} [group]
95
- * @property {string} [icon]
96
- * @property {Object} [links]
130
+ * @property {string} [name] - Name of the component
131
+ * @property {string} [slug] - Slug identifier for the component
132
+ * @property {string} [description] - Description of the component
133
+ * @property {string} [group] - Group to which the component belongs
134
+ * @property {string} [icon] - Icon associated with the component
135
+ * @property {Object} [links] - Links associated with the component
97
136
  * @property {PlanConfig} [config]
98
- * @property {boolean} [is_active]
99
- * @property {string} [display_text]
137
+ * @property {boolean} [is_active] - Indicates whether the component is active
138
+ * @property {string} [display_text] - Display text for the component
100
139
  */
101
140
 
102
141
  /**
103
142
  * @typedef PlanDetails
104
- * @property {string} [approved_by]
105
- * @property {string} [updated_by]
143
+ * @property {string} [activated_by] - ID of the user who activated the plan
144
+ * @property {string} [updated_by] - ID of the user who updated the plan
106
145
  * @property {PlanRecurring} [recurring]
107
- * @property {boolean} [is_trial_plan]
108
- * @property {string[]} [company_ids]
109
- * @property {string} [created_by]
110
- * @property {string} [channel_type]
111
- * @property {string} [platform]
112
- * @property {string} [plan_group]
113
- * @property {string[]} [tag_lines]
114
- * @property {string} [currency]
115
- * @property {boolean} [is_active]
116
- * @property {boolean} [is_visible]
117
- * @property {number} [trial_period]
118
- * @property {string[]} [addons]
119
- * @property {string[]} [tags]
120
- * @property {string} [type]
121
- * @property {string} [country]
122
- * @property {string} [_id]
123
- * @property {string} [name]
124
- * @property {string} [description]
125
- * @property {number} [amount]
126
- * @property {string} [product_suite_id]
127
- * @property {string} [created_at]
128
- * @property {string} [modified_at]
146
+ * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
147
+ * @property {string[]} [company_ids] - Company IDs associated with the plan
148
+ * @property {string} [created_by] - ID of the user who created the plan
149
+ * @property {string} [channel_type] - Ordering channel associated with the
150
+ * plan(e.g, ecomm, fynd)
151
+ * @property {string} [platform] - Platform associated with the plan(e.g, web, mobile)
152
+ * @property {string} [plan_group] - Group to which the plan belongs
153
+ * @property {string[]} [tag_lines] - Tag lines associated with the plan
154
+ * @property {string} [currency] - Currency of the plan
155
+ * @property {boolean} [is_active] - Indicates whether the plan is active
156
+ * @property {boolean} [is_visible] - Indicates whether the plan is visible on ui
157
+ * @property {number} [trial_period] - Trial period of the plan
158
+ * @property {string[]} [addons] - Addons associated with the plan
159
+ * @property {string[]} [tags] - Tags associated with the plan
160
+ * @property {string} [type] - Type of the plan
161
+ * @property {CountryRes} [country]
162
+ * @property {string} [_id] - Unique identifier for the plan."
163
+ * @property {string} [name] - Name of the plan
164
+ * @property {string} [description] - Description of the plan
165
+ * @property {number} [amount] - Amount of the plan
166
+ * @property {string} [product_suite_id] - Identifier of the product suite
167
+ * associated with the plan
168
+ * @property {string} [created_at] - Creation date of the plan
169
+ * @property {string} [modified_at] - Modification date of the plan
129
170
  * @property {PlanTaxation} [taxation]
130
171
  * @property {OneTimeFees} [one_time_fees]
131
172
  * @property {CreditLine} [credit_line]
132
- * @property {string} [current_status]
173
+ * @property {string} [current_status] - Current status of the plan
174
+ * @property {string} [approved_by] - Id of the User who has approved the plan
133
175
  * @property {PlanMeta} [meta]
134
- * @property {ComponentsSchema[]} [components]
176
+ * @property {ComponentsSchema[]} [components] - Components associated with the plan
135
177
  */
136
178
 
137
179
  /**
@@ -142,13 +184,13 @@ const Joi = require("joi");
142
184
 
143
185
  /**
144
186
  * @typedef Taxation
145
- * @property {number} [gst] - GST percentage
187
+ * @property {number} [gst] - GST percentage applied to the plan
146
188
  */
147
189
 
148
190
  /**
149
191
  * @typedef PlanList
150
- * @property {string} [approved_by]
151
- * @property {string} [updated_by]
192
+ * @property {string} [approved_by] - ID of the user who approved the plan
193
+ * @property {string} [updated_by] - ID of the user who updated the plan
152
194
  * @property {Recurring} [recurring]
153
195
  * @property {Taxation} [taxation]
154
196
  * @property {OneTimeFees} [one_time_fees]
@@ -159,28 +201,94 @@ const Joi = require("joi");
159
201
  * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
160
202
  * @property {string} [name] - Name of the plan
161
203
  * @property {string} [description] - Description of the plan
162
- * @property {string} [plan_group] - Group to which the plan belongs
204
+ * @property {string} [plan_group] - Group to which plan belongs
205
+ * @property {string} [plan_group_id] - Group id to which plan belongs
163
206
  * @property {string[]} [tag_lines] - Tag lines associated with the plan
164
207
  * @property {string} [currency] - Currency of the plan
165
208
  * @property {number} [amount] - Amount of the plan
166
209
  * @property {boolean} [is_active] - Indicates whether the plan is active
167
- * @property {boolean} [is_visible] - Indicates whether the plan is visible
168
- * @property {number} [trial_period] - Trial period of the plan
210
+ * @property {boolean} [is_visible] - Indicates whether the plan is visible on ui
211
+ * @property {number} [trial_period] - Trial period of the plan in days
169
212
  * @property {Object[]} [addons] - Addons associated with the plan
170
213
  * @property {string[]} [tags] - Tags associated with the plan
171
- * @property {string} [type] - Type of the plan
214
+ * @property {string} [type] - Type of the plan (enterprise or standard)
172
215
  * @property {Object} [meta] - Additional metadata associated with the plan
173
- * @property {string} [country] - Country associated with the plan
216
+ * @property {CountryRes} [country]
174
217
  * @property {string[]} [company_ids] - Company IDs associated with the plan
175
218
  * @property {string} [created_by] - ID of the user who created the plan
176
- * @property {string} [current_status] - Current status of the plan
177
- * @property {string} [channel_type] - Type of channel associated with the plan
178
- * @property {string} [platform] - Platform associated with the plan
219
+ * @property {string} [current_status] - Current status of the plan (active, inactive)
220
+ * @property {string} [channel_type] - Ordering channel for which plan is
221
+ * created(fynd, ecomm, uniket etc)
222
+ * @property {string} [platform] - Platform associated with the plan (web, mobile, all)
179
223
  * @property {string} [created_at] - Date and time when the plan was created
180
224
  * @property {string} [modified_at] - Date and time when the plan was last modified
181
225
  */
182
226
 
227
+ /**
228
+ * @typedef TrialPlanDetails
229
+ * @property {string} [activated_by] - ID of the user who activated the trial plan
230
+ * @property {string} [updated_by] - ID of the user who updated the trial plan
231
+ * @property {PlanRecurring} [recurring]
232
+ * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
233
+ * @property {string[]} [company_ids] - Company IDs associated with the trial plan
234
+ * @property {string} [created_by] - ID of the user who created the trial plan
235
+ * @property {string} [channel_type] - Ordering channel for which plan is
236
+ * created(ecomm, fynd etc)
237
+ * @property {string} [platform] - Platform associated with the trial plan(web ,
238
+ * mobile, all)
239
+ * @property {string} [plan_group] - Group to which the trial plan belongs
240
+ * @property {string[]} [tag_lines] - Tag lines associated with the trial plan
241
+ * @property {string} [currency] - Currency of the trial plan
242
+ * @property {boolean} [is_active] - Indicates whether the trial plan is active
243
+ * @property {boolean} [is_visible] - Indicates whether the trial plan is visible on ui
244
+ * @property {number} [trial_period] - Trial period of the trial plan in days
245
+ * @property {string[]} [addons] - Addons associated with the trial plan
246
+ * @property {string[]} [tags] - Tags associated with the trial plan
247
+ * @property {string} [type] - Type of the trial plan(public, company_specific)
248
+ * @property {CountryRes} [country]
249
+ * @property {string} [_id] - Unique identifier for the trial plan
250
+ * @property {string} [name] - Name of the trial plan
251
+ * @property {string} [description] - Description of the trial plan
252
+ * @property {number} [amount] - Amount of the trial plan
253
+ * @property {string} [product_suite_id] - Identifier of the product suite
254
+ * associated with the trial plan
255
+ * @property {string} [created_at] - Creation date of the trial plan
256
+ * @property {string} [modified_at] - Modification date of the trial plan
257
+ * @property {PlanTaxation} [taxation]
258
+ * @property {OneTimeFees} [one_time_fees]
259
+ * @property {CreditLine} [credit_line]
260
+ * @property {string} [current_status] - Current status of the trial plan
261
+ * @property {PlanMeta} [meta]
262
+ * @property {ComponentsSchema[]} [components] - Components associated with the trial plan
263
+ */
264
+
183
265
  class BillingPublicModel {
266
+ /** @returns {TenureConfig} */
267
+ static TenureConfig() {
268
+ return Joi.object({
269
+ display_name: Joi.string().allow(""),
270
+ description: Joi.string().allow(""),
271
+ is_active: Joi.boolean(),
272
+ slug: Joi.string().allow(""),
273
+ });
274
+ }
275
+
276
+ /** @returns {TenureConfigData} */
277
+ static TenureConfigData() {
278
+ return Joi.object({
279
+ country: Joi.string().allow(""),
280
+ tenure_config: Joi.array().items(BillingPublicModel.TenureConfig()),
281
+ });
282
+ }
283
+
284
+ /** @returns {TenureConfigResponse} */
285
+ static TenureConfigResponse() {
286
+ return Joi.object({
287
+ success: Joi.boolean(),
288
+ data: BillingPublicModel.TenureConfigData(),
289
+ });
290
+ }
291
+
184
292
  /** @returns {ResourceNotFound} */
185
293
  static ResourceNotFound() {
186
294
  return Joi.object({
@@ -198,11 +306,21 @@ class BillingPublicModel {
198
306
  });
199
307
  }
200
308
 
309
+ /** @returns {PlanTypes} */
310
+ static PlanTypes() {
311
+ return Joi.object({
312
+ month: Joi.array().items(BillingPublicModel.PlanDetails()),
313
+ quarter: Joi.array().items(BillingPublicModel.PlanDetails()),
314
+ half_year: Joi.array().items(BillingPublicModel.PlanDetails()),
315
+ year: Joi.array().items(BillingPublicModel.PlanDetails()),
316
+ });
317
+ }
318
+
201
319
  /** @returns {DetailList} */
202
320
  static DetailList() {
203
321
  return Joi.object({
204
- plans: Joi.array().items(BillingPublicModel.PlanDetails()),
205
- component_groups: Joi.array().items(Joi.string().allow("")),
322
+ plans: BillingPublicModel.PlanTypes(),
323
+ trial_plan: BillingPublicModel.TrialPlanDetails(),
206
324
  });
207
325
  }
208
326
 
@@ -213,6 +331,14 @@ class BillingPublicModel {
213
331
  });
214
332
  }
215
333
 
334
+ /** @returns {CountryRes} */
335
+ static CountryRes() {
336
+ return Joi.object({
337
+ name: Joi.string().allow(""),
338
+ code: Joi.string().allow(""),
339
+ });
340
+ }
341
+
216
342
  /** @returns {OneTimeFees} */
217
343
  static OneTimeFees() {
218
344
  return Joi.object({
@@ -307,7 +433,7 @@ class BillingPublicModel {
307
433
  /** @returns {PlanDetails} */
308
434
  static PlanDetails() {
309
435
  return Joi.object({
310
- approved_by: Joi.string().allow(""),
436
+ activated_by: Joi.string().allow(""),
311
437
  updated_by: Joi.string().allow(""),
312
438
  recurring: BillingPublicModel.PlanRecurring(),
313
439
  is_trial_plan: Joi.boolean(),
@@ -324,7 +450,7 @@ class BillingPublicModel {
324
450
  addons: Joi.array().items(Joi.string().allow("")),
325
451
  tags: Joi.array().items(Joi.string().allow("")),
326
452
  type: Joi.string().allow(""),
327
- country: Joi.string().allow(""),
453
+ country: BillingPublicModel.CountryRes(),
328
454
  _id: Joi.string().allow(""),
329
455
  name: Joi.string().allow(""),
330
456
  description: Joi.string().allow(""),
@@ -336,6 +462,7 @@ class BillingPublicModel {
336
462
  one_time_fees: BillingPublicModel.OneTimeFees(),
337
463
  credit_line: BillingPublicModel.CreditLine(),
338
464
  current_status: Joi.string().allow(""),
465
+ approved_by: Joi.string().allow(""),
339
466
  meta: BillingPublicModel.PlanMeta(),
340
467
  components: Joi.array().items(BillingPublicModel.ComponentsSchema()),
341
468
  });
@@ -371,6 +498,7 @@ class BillingPublicModel {
371
498
  name: Joi.string().allow(""),
372
499
  description: Joi.string().allow(""),
373
500
  plan_group: Joi.string().allow(""),
501
+ plan_group_id: Joi.string().allow(""),
374
502
  tag_lines: Joi.array().items(Joi.string().allow("")),
375
503
  currency: Joi.string().allow(""),
376
504
  amount: Joi.number(),
@@ -381,7 +509,7 @@ class BillingPublicModel {
381
509
  tags: Joi.array().items(Joi.string().allow("")),
382
510
  type: Joi.string().allow(""),
383
511
  meta: Joi.any(),
384
- country: Joi.string().allow(""),
512
+ country: BillingPublicModel.CountryRes(),
385
513
  company_ids: Joi.array().items(Joi.string().allow("")),
386
514
  created_by: Joi.string().allow(""),
387
515
  current_status: Joi.string().allow(""),
@@ -391,5 +519,42 @@ class BillingPublicModel {
391
519
  modified_at: Joi.string().allow(""),
392
520
  });
393
521
  }
522
+
523
+ /** @returns {TrialPlanDetails} */
524
+ static TrialPlanDetails() {
525
+ return Joi.object({
526
+ activated_by: Joi.string().allow(""),
527
+ updated_by: Joi.string().allow(""),
528
+ recurring: BillingPublicModel.PlanRecurring(),
529
+ is_trial_plan: Joi.boolean(),
530
+ company_ids: Joi.array().items(Joi.string().allow("")),
531
+ created_by: Joi.string().allow(""),
532
+ channel_type: Joi.string().allow(""),
533
+ platform: Joi.string().allow("").allow(null),
534
+ plan_group: Joi.string().allow(""),
535
+ tag_lines: Joi.array().items(Joi.string().allow("")),
536
+ currency: Joi.string().allow(""),
537
+ is_active: Joi.boolean(),
538
+ is_visible: Joi.boolean(),
539
+ trial_period: Joi.number(),
540
+ addons: Joi.array().items(Joi.string().allow("")),
541
+ tags: Joi.array().items(Joi.string().allow("")),
542
+ type: Joi.string().allow(""),
543
+ country: BillingPublicModel.CountryRes(),
544
+ _id: Joi.string().allow(""),
545
+ name: Joi.string().allow(""),
546
+ description: Joi.string().allow(""),
547
+ amount: Joi.number(),
548
+ product_suite_id: Joi.string().allow(""),
549
+ created_at: Joi.string().allow(""),
550
+ modified_at: Joi.string().allow(""),
551
+ taxation: BillingPublicModel.PlanTaxation(),
552
+ one_time_fees: BillingPublicModel.OneTimeFees(),
553
+ credit_line: BillingPublicModel.CreditLine(),
554
+ current_status: Joi.string().allow(""),
555
+ meta: BillingPublicModel.PlanMeta(),
556
+ components: Joi.array().items(BillingPublicModel.ComponentsSchema()),
557
+ });
558
+ }
394
559
  }
395
560
  module.exports = BillingPublicModel;
@@ -7,17 +7,23 @@ export = BillingPublicValidator;
7
7
  * @typedef GetStandardPlansParam
8
8
  * @property {string} [platform] - The type of platform for which plans are requested.
9
9
  */
10
+ /**
11
+ * @typedef GetTenureConfigParam
12
+ * @property {string} countryCode
13
+ */
10
14
  /** @typedef PlanListParam */
11
15
  declare class BillingPublicValidator {
12
16
  /** @returns {GetPlanDetailsParam} */
13
17
  static getPlanDetails(): GetPlanDetailsParam;
14
18
  /** @returns {GetStandardPlansParam} */
15
19
  static getStandardPlans(): GetStandardPlansParam;
20
+ /** @returns {GetTenureConfigParam} */
21
+ static getTenureConfig(): GetTenureConfigParam;
16
22
  /** @returns {PlanListParam} */
17
23
  static planList(): any;
18
24
  }
19
25
  declare namespace BillingPublicValidator {
20
- export { GetPlanDetailsParam, GetStandardPlansParam, PlanListParam };
26
+ export { GetPlanDetailsParam, GetStandardPlansParam, GetTenureConfigParam, PlanListParam };
21
27
  }
22
28
  type GetPlanDetailsParam = {
23
29
  /**
@@ -31,4 +37,7 @@ type GetStandardPlansParam = {
31
37
  */
32
38
  platform?: string;
33
39
  };
40
+ type GetTenureConfigParam = {
41
+ countryCode: string;
42
+ };
34
43
  type PlanListParam = any;
@@ -12,6 +12,11 @@ const BillingPublicModel = require("./BillingPublicModel");
12
12
  * @property {string} [platform] - The type of platform for which plans are requested.
13
13
  */
14
14
 
15
+ /**
16
+ * @typedef GetTenureConfigParam
17
+ * @property {string} countryCode
18
+ */
19
+
15
20
  /** @typedef PlanListParam */
16
21
 
17
22
  class BillingPublicValidator {
@@ -29,6 +34,13 @@ class BillingPublicValidator {
29
34
  });
30
35
  }
31
36
 
37
+ /** @returns {GetTenureConfigParam} */
38
+ static getTenureConfig() {
39
+ return Joi.object({
40
+ countryCode: Joi.string().allow("").required(),
41
+ }).required();
42
+ }
43
+
32
44
  /** @returns {PlanListParam} */
33
45
  static planList() {
34
46
  return Joi.object({});
@@ -15,7 +15,6 @@ declare class PublicClient {
15
15
  billing: Billing;
16
16
  configuration: Configuration;
17
17
  content: Content;
18
- inventory: Inventory;
19
18
  partner: Partner;
20
19
  webhook: Webhook;
21
20
  /**
@@ -29,6 +28,5 @@ declare class PublicClient {
29
28
  import Billing = require("./Billing/BillingPublicClient");
30
29
  import Configuration = require("./Configuration/ConfigurationPublicClient");
31
30
  import Content = require("./Content/ContentPublicClient");
32
- import Inventory = require("./Inventory/InventoryPublicClient");
33
31
  import Partner = require("./Partner/PartnerPublicClient");
34
32
  import Webhook = require("./Webhook/WebhookPublicClient");
@@ -4,8 +4,6 @@ const Configuration = require("./Configuration/ConfigurationPublicClient");
4
4
 
5
5
  const Content = require("./Content/ContentPublicClient");
6
6
 
7
- const Inventory = require("./Inventory/InventoryPublicClient");
8
-
9
7
  const Partner = require("./Partner/PartnerPublicClient");
10
8
 
11
9
  const Webhook = require("./Webhook/WebhookPublicClient");
@@ -32,8 +30,6 @@ class PublicClient {
32
30
 
33
31
  this.content = new Content(config);
34
32
 
35
- this.inventory = new Inventory(config);
36
-
37
33
  this.partner = new Partner(config);
38
34
 
39
35
  this.webhook = new Webhook(config);
@@ -4,7 +4,6 @@ export namespace PublicModel {
4
4
  const BillingPublicModel: typeof import("./Billing/BillingPublicModel");
5
5
  const ConfigurationPublicModel: typeof import("./Configuration/ConfigurationPublicModel");
6
6
  const ContentPublicModel: typeof import("./Content/ContentPublicModel");
7
- const InventoryPublicModel: typeof import("./Inventory/InventoryPublicModel");
8
7
  const PartnerPublicModel: typeof import("./Partner/PartnerPublicModel");
9
8
  const WebhookPublicModel: typeof import("./Webhook/WebhookPublicModel");
10
9
  }
@@ -8,8 +8,6 @@ module.exports = {
8
8
 
9
9
  ContentPublicModel: require("./Content/ContentPublicModel"),
10
10
 
11
- InventoryPublicModel: require("./Inventory/InventoryPublicModel"),
12
-
13
11
  PartnerPublicModel: require("./Partner/PartnerPublicModel"),
14
12
 
15
13
  WebhookPublicModel: require("./Webhook/WebhookPublicModel"),