@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4

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 (126) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
  4. package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
  7. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  8. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  9. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  10. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  11. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
  12. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
  14. package/sdk/application/Content/ContentApplicationModel.js +757 -757
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  16. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  17. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  18. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  19. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
  21. package/sdk/application/Order/OrderApplicationModel.d.ts +852 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +828 -822
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  24. package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
  25. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2176 -2145
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1474 -1453
  27. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  28. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  29. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
  30. package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
  31. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  32. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  33. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  34. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  35. package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
  36. package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
  37. package/sdk/application/User/UserApplicationClient.d.ts +2 -2
  38. package/sdk/application/User/UserApplicationClient.js +4 -7
  39. package/sdk/application/User/UserApplicationModel.d.ts +769 -764
  40. package/sdk/application/User/UserApplicationModel.js +731 -741
  41. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  43. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  44. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  45. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  46. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  47. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  48. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  49. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  50. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  51. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  52. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  53. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  54. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  55. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  56. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  57. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +26 -0
  58. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +182 -0
  59. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +70 -1
  60. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +44 -0
  61. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -980
  62. package/sdk/platform/Catalog/CatalogPlatformModel.js +977 -933
  63. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  64. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  65. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  66. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  67. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  68. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  69. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  70. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  71. package/sdk/platform/Content/ContentPlatformModel.d.ts +1842 -1825
  72. package/sdk/platform/Content/ContentPlatformModel.js +1868 -1848
  73. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  74. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  75. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -1
  76. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
  77. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +2 -0
  78. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -0
  79. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
  80. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +7 -4
  81. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +882 -869
  82. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +894 -878
  83. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  84. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  85. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  86. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  87. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  88. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  89. package/sdk/platform/Order/OrderPlatformModel.d.ts +5192 -5176
  90. package/sdk/platform/Order/OrderPlatformModel.js +4752 -4736
  91. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  92. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  93. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2693 -2657
  94. package/sdk/platform/Payment/PaymentPlatformModel.js +1842 -1819
  95. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  96. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  97. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +7 -6
  98. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +11 -10
  99. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1674 -1539
  100. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1663 -1534
  101. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
  102. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
  103. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
  104. package/sdk/platform/Share/SharePlatformApplicationClient.js +19 -6
  105. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +13 -3
  106. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -2
  107. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  108. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  109. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  110. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  111. package/sdk/platform/User/UserPlatformModel.d.ts +823 -753
  112. package/sdk/platform/User/UserPlatformModel.js +731 -661
  113. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  114. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  115. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  116. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  117. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  118. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  119. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  120. package/sdk/public/Content/ContentPublicModel.js +28 -28
  121. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  122. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  123. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  124. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  125. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  126. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,261 +1,226 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef BadRequestData
5
- * @property {string} [message]
6
- */
7
-
8
- /**
9
- * @typedef BadRequestObject
10
- * @property {string} message
11
- */
12
-
13
- /**
14
- * @typedef BadRequestObjectGet
15
- * @property {BadRequestData} [data]
16
- * @property {string} [error]
17
- * @property {string} [message]
18
- */
19
-
20
- /**
21
- * @typedef BulkDiscount
22
- * @property {number} company_id
23
- * @property {DiscountItems[]} items
24
- */
25
-
26
- /**
27
- * @typedef CancelJobResponse
28
- * @property {boolean} success
4
+ * @typedef ValidityObject
5
+ * @property {string} start
6
+ * @property {string} end
29
7
  */
30
8
 
31
9
  /**
32
10
  * @typedef CreateUpdateDiscount
33
- * @property {string[]} app_ids
34
- * @property {number[]} [brand_ids]
11
+ * @property {string} name
35
12
  * @property {number} company_id
36
- * @property {string} discount_level
37
- * @property {DiscountMeta} [discount_meta]
38
- * @property {string} discount_type
39
- * @property {string[]} [extension_ids]
40
- * @property {string} [file_path]
41
13
  * @property {boolean} is_active
14
+ * @property {string[]} app_ids
15
+ * @property {string[]} [extension_ids]
42
16
  * @property {string} job_type
43
- * @property {string} name
44
- * @property {number[]} [store_ids]
45
- * @property {ValidityObject} validity
17
+ * @property {string} discount_type
18
+ * @property {string} discount_level
46
19
  * @property {number} [value]
20
+ * @property {string} [file_path]
21
+ * @property {number[]} [brand_ids]
22
+ * @property {number[]} [store_ids]
47
23
  * @property {string[]} [zone_ids]
24
+ * @property {ValidityObject} validity
25
+ * @property {DiscountMeta} [discount_meta]
48
26
  */
49
27
 
50
28
  /**
51
- * @typedef DiscountItems
52
- * @property {string} [brand_name]
53
- * @property {DiscountMeta} [discount_meta]
54
- * @property {string} discount_type
55
- * @property {string} [item_code]
56
- * @property {string} [seller_identifier]
57
- * @property {number} value
29
+ * @typedef DiscountMeta
30
+ * @property {boolean} timer - Determines whether the discount countdown is
31
+ * visible or not.
32
+ * @property {number} [hours] - The time in hours before the discount ends when
33
+ * the countdown timer should start.
34
+ * @property {number} [minutes] - The time in minutes before the discount ends
35
+ * when the countdown timer should start.
58
36
  */
59
37
 
60
38
  /**
61
39
  * @typedef DiscountJob
62
40
  * @property {string} _id
63
- * @property {string[]} [app_ids]
64
- * @property {number[]} [brand_ids]
41
+ * @property {string} name
65
42
  * @property {number} company_id
66
- * @property {UserDetails} created_by
67
- * @property {string} created_on
68
- * @property {string} [discount_level]
69
- * @property {DiscountMeta} [discount_meta]
70
- * @property {string} [discount_type]
71
- * @property {string} [file_path]
72
43
  * @property {boolean} is_active
44
+ * @property {string[]} [app_ids]
73
45
  * @property {string} [job_type]
74
- * @property {Object} [meta]
75
- * @property {UserDetails} modified_by
76
- * @property {string} modified_on
77
- * @property {string} name
46
+ * @property {string} [discount_type]
47
+ * @property {string} [discount_level]
48
+ * @property {number} [value]
49
+ * @property {string} [file_path]
50
+ * @property {number[]} [brand_ids]
78
51
  * @property {number[]} [store_ids]
52
+ * @property {string[]} [zone_ids]
53
+ * @property {DiscountMeta} [discount_meta]
79
54
  * @property {ValidityObject} validity
55
+ * @property {string} created_on
56
+ * @property {string} modified_on
57
+ * @property {UserDetails} created_by
58
+ * @property {UserDetails} modified_by
59
+ * @property {Object} [meta]
60
+ */
61
+
62
+ /**
63
+ * @typedef FileJobBody
64
+ * @property {string} [name]
65
+ * @property {number} [company_id]
66
+ * @property {boolean} [is_active]
67
+ * @property {string[]} [app_ids]
68
+ * @property {string} [job_type]
69
+ * @property {string} [discount_type]
70
+ * @property {string} [discount_level]
80
71
  * @property {number} [value]
72
+ * @property {string} [file_path]
73
+ * @property {number[]} [brand_ids]
74
+ * @property {number[]} [store_ids]
75
+ * @property {string[]} [extension_ids]
81
76
  * @property {string[]} [zone_ids]
77
+ * @property {DiscountMeta} [discount_meta]
78
+ * @property {ValidityObject} [validity]
79
+ * @property {string} [created_on]
80
+ * @property {string} [modified_on]
81
+ * @property {UserDetails} [created_by]
82
+ * @property {UserDetails} [modified_by]
83
+ * @property {Object} [meta]
82
84
  */
83
85
 
84
86
  /**
85
- * @typedef DiscountMeta
86
- * @property {number} [hours] - The time in hours before the discount ends when
87
- * the countdown timer should start.
88
- * @property {number} [minutes] - The time in minutes before the discount ends
89
- * when the countdown timer should start.
90
- * @property {boolean} timer - Determines whether the discount countdown is
91
- * visible or not.
87
+ * @typedef ListOrCalender
88
+ * @property {DiscountJob[]} items
89
+ * @property {Page} page
92
90
  */
93
91
 
94
92
  /**
95
- * @typedef DownloadFileJob
96
- * @property {number[]} [brand_ids]
97
- * @property {number[]} [store_ids]
93
+ * @typedef DiscountItems
94
+ * @property {string} [item_code]
95
+ * @property {string} [brand_name]
96
+ * @property {string} [seller_identifier]
97
+ * @property {string} discount_type
98
+ * @property {number} value
99
+ * @property {DiscountMeta} [discount_meta]
98
100
  */
99
101
 
100
102
  /**
101
- * @typedef FileJobBody
102
- * @property {string[]} [app_ids]
103
- * @property {number[]} [brand_ids]
104
- * @property {number} [company_id]
105
- * @property {UserDetails} [created_by]
106
- * @property {string} [created_on]
107
- * @property {string} [discount_level]
108
- * @property {DiscountMeta} [discount_meta]
109
- * @property {string} [discount_type]
110
- * @property {string[]} [extension_ids]
103
+ * @typedef BulkDiscount
104
+ * @property {number} company_id
105
+ * @property {DiscountItems[]} items
106
+ */
107
+
108
+ /**
109
+ * @typedef FileJobResponse
110
+ * @property {string} stage
111
+ * @property {number} total
112
+ * @property {number} failed
113
+ * @property {number} company_id
114
+ * @property {FileJobBody} [body]
115
+ * @property {string} type
116
+ * @property {string} [file_type]
117
+ * @property {string} _id - A unique identifier to distinguish and identify a job.
111
118
  * @property {string} [file_path]
112
- * @property {boolean} [is_active]
113
- * @property {string} [job_type]
114
- * @property {Object} [meta]
115
- * @property {UserDetails} [modified_by]
116
- * @property {string} [modified_on]
117
- * @property {string} [name]
118
- * @property {number[]} [store_ids]
119
- * @property {ValidityObject} [validity]
120
- * @property {number} [value]
119
+ * @property {number} [progress]
120
+ * @property {string[]} [extension_ids]
121
121
  * @property {string[]} [zone_ids]
122
+ * @property {string} [created_on]
123
+ * @property {string} [modified_on]
124
+ * @property {UserDetails} [created_by]
122
125
  */
123
126
 
124
127
  /**
125
128
  * @typedef FileJobRequest
126
- * @property {string[]} [app_ids]
127
- * @property {number[]} [brand_ids]
129
+ * @property {string} name
130
+ * @property {boolean} is_active
128
131
  * @property {number} company_id
129
- * @property {string} [discount_level]
132
+ * @property {string[]} [app_ids]
133
+ * @property {string} [job_type]
130
134
  * @property {string} [discount_type]
135
+ * @property {string} [discount_level]
131
136
  * @property {string} [file_path]
132
- * @property {boolean} is_active
133
- * @property {string} [job_type]
134
- * @property {Object} [meta]
135
- * @property {string} name
137
+ * @property {number[]} [brand_ids]
136
138
  * @property {number[]} [store_ids]
137
139
  * @property {ValidityObject} validity
140
+ * @property {Object} [meta]
138
141
  */
139
142
 
140
143
  /**
141
- * @typedef FileJobResponse
142
- * @property {string} _id - A unique identifier to distinguish and identify a job.
143
- * @property {FileJobBody} [body]
144
- * @property {number} company_id
145
- * @property {UserDetails} [created_by]
146
- * @property {string} [created_on]
147
- * @property {string[]} [extension_ids]
148
- * @property {number} failed
149
- * @property {string} [file_path]
150
- * @property {string} [file_type]
151
- * @property {string} [modified_on]
152
- * @property {number} [progress]
153
- * @property {string} stage
154
- * @property {number} total
155
- * @property {string} type
156
- * @property {string[]} [zone_ids]
144
+ * @typedef DownloadFileJob
145
+ * @property {number[]} [brand_ids]
146
+ * @property {number[]} [store_ids]
157
147
  */
158
148
 
159
149
  /**
160
- * @typedef ListOrCalender
161
- * @property {DiscountJob[]} items
162
- * @property {Page} page
150
+ * @typedef CancelJobResponse
151
+ * @property {boolean} success
163
152
  */
164
153
 
165
154
  /**
166
155
  * @typedef Page
167
- * @property {number} [current]
168
- * @property {boolean} [has_next]
169
- * @property {boolean} [has_previous]
170
156
  * @property {number} [item_total]
171
157
  * @property {string} [next_id]
172
- * @property {number} [size]
158
+ * @property {boolean} [has_previous]
159
+ * @property {boolean} [has_next]
160
+ * @property {number} [current]
173
161
  * @property {string} type
162
+ * @property {number} [size]
174
163
  */
175
164
 
176
165
  /**
177
166
  * @typedef UserDetails
178
- * @property {string} user_id
179
167
  * @property {string} username
168
+ * @property {string} user_id
180
169
  */
181
170
 
182
171
  /**
183
- * @typedef ValidityObject
184
- * @property {string} end
185
- * @property {string} start
172
+ * @typedef BadRequestObject
173
+ * @property {string} message
186
174
  */
187
175
 
188
- class DiscountPlatformModel {
189
- /** @returns {BadRequestData} */
190
- static BadRequestData() {
191
- return Joi.object({
192
- message: Joi.string().allow(""),
193
- });
194
- }
195
-
196
- /** @returns {BadRequestObject} */
197
- static BadRequestObject() {
198
- return Joi.object({
199
- message: Joi.string().allow("").required(),
200
- });
201
- }
202
-
203
- /** @returns {BadRequestObjectGet} */
204
- static BadRequestObjectGet() {
205
- return Joi.object({
206
- data: DiscountPlatformModel.BadRequestData(),
207
- error: Joi.string().allow(""),
208
- message: Joi.string().allow(""),
209
- });
210
- }
176
+ /**
177
+ * @typedef BadRequestData
178
+ * @property {string} [message]
179
+ */
211
180
 
212
- /** @returns {BulkDiscount} */
213
- static BulkDiscount() {
214
- return Joi.object({
215
- company_id: Joi.number().required(),
216
- items: Joi.array()
217
- .items(DiscountPlatformModel.DiscountItems())
218
- .required(),
219
- });
220
- }
181
+ /**
182
+ * @typedef BadRequestObjectGet
183
+ * @property {string} [message]
184
+ * @property {string} [error]
185
+ * @property {BadRequestData} [data]
186
+ */
221
187
 
222
- /** @returns {CancelJobResponse} */
223
- static CancelJobResponse() {
188
+ class DiscountPlatformModel {
189
+ /** @returns {ValidityObject} */
190
+ static ValidityObject() {
224
191
  return Joi.object({
225
- success: Joi.boolean().required(),
192
+ start: Joi.string().allow("").required(),
193
+ end: Joi.string().allow("").required(),
226
194
  });
227
195
  }
228
196
 
229
197
  /** @returns {CreateUpdateDiscount} */
230
198
  static CreateUpdateDiscount() {
231
199
  return Joi.object({
232
- app_ids: Joi.array().items(Joi.string().allow("")).required(),
233
- brand_ids: Joi.array().items(Joi.number()),
200
+ name: Joi.string().allow("").required(),
234
201
  company_id: Joi.number().required(),
235
- discount_level: Joi.string().allow("").required(),
236
- discount_meta: DiscountPlatformModel.DiscountMeta(),
237
- discount_type: Joi.string().allow("").required(),
238
- extension_ids: Joi.array().items(Joi.string().allow("")),
239
- file_path: Joi.string().allow(""),
240
202
  is_active: Joi.boolean().required(),
203
+ app_ids: Joi.array().items(Joi.string().allow("")).required(),
204
+ extension_ids: Joi.array().items(Joi.string().allow("")),
241
205
  job_type: Joi.string().allow("").required(),
242
- name: Joi.string().allow("").required(),
243
- store_ids: Joi.array().items(Joi.number()),
244
- validity: DiscountPlatformModel.ValidityObject().required(),
206
+ discount_type: Joi.string().allow("").required(),
207
+ discount_level: Joi.string().allow("").required(),
245
208
  value: Joi.number(),
209
+ file_path: Joi.string().allow(""),
210
+ brand_ids: Joi.array().items(Joi.number()),
211
+ store_ids: Joi.array().items(Joi.number()),
246
212
  zone_ids: Joi.array().items(Joi.string().allow("")),
213
+ validity: DiscountPlatformModel.ValidityObject().required(),
214
+ discount_meta: DiscountPlatformModel.DiscountMeta(),
247
215
  });
248
216
  }
249
217
 
250
- /** @returns {DiscountItems} */
251
- static DiscountItems() {
218
+ /** @returns {DiscountMeta} */
219
+ static DiscountMeta() {
252
220
  return Joi.object({
253
- brand_name: Joi.string().allow(""),
254
- discount_meta: DiscountPlatformModel.DiscountMeta(),
255
- discount_type: Joi.string().allow("").required(),
256
- item_code: Joi.string().allow(""),
257
- seller_identifier: Joi.string().allow(""),
258
- value: Joi.number().required(),
221
+ timer: Joi.boolean().required(),
222
+ hours: Joi.number(),
223
+ minutes: Joi.number(),
259
224
  });
260
225
  }
261
226
 
@@ -263,144 +228,179 @@ class DiscountPlatformModel {
263
228
  static DiscountJob() {
264
229
  return Joi.object({
265
230
  _id: Joi.string().allow("").required(),
266
- app_ids: Joi.array().items(Joi.string().allow("")),
267
- brand_ids: Joi.array().items(Joi.number()),
231
+ name: Joi.string().allow("").required(),
268
232
  company_id: Joi.number().required(),
269
- created_by: DiscountPlatformModel.UserDetails().required(),
270
- created_on: Joi.string().allow("").required(),
271
- discount_level: Joi.string().allow(""),
272
- discount_meta: DiscountPlatformModel.DiscountMeta(),
273
- discount_type: Joi.string().allow(""),
274
- file_path: Joi.string().allow(""),
275
233
  is_active: Joi.boolean().required(),
234
+ app_ids: Joi.array().items(Joi.string().allow("")),
276
235
  job_type: Joi.string().allow(""),
277
- meta: Joi.any(),
278
- modified_by: DiscountPlatformModel.UserDetails().required(),
279
- modified_on: Joi.string().allow("").required(),
280
- name: Joi.string().allow("").required(),
236
+ discount_type: Joi.string().allow(""),
237
+ discount_level: Joi.string().allow(""),
238
+ value: Joi.number(),
239
+ file_path: Joi.string().allow(""),
240
+ brand_ids: Joi.array().items(Joi.number()),
281
241
  store_ids: Joi.array().items(Joi.number()),
242
+ zone_ids: Joi.array().items(Joi.string().allow("")),
243
+ discount_meta: DiscountPlatformModel.DiscountMeta(),
282
244
  validity: DiscountPlatformModel.ValidityObject().required(),
245
+ created_on: Joi.string().allow("").required(),
246
+ modified_on: Joi.string().allow("").required(),
247
+ created_by: DiscountPlatformModel.UserDetails().required(),
248
+ modified_by: DiscountPlatformModel.UserDetails().required(),
249
+ meta: Joi.any(),
250
+ });
251
+ }
252
+
253
+ /** @returns {FileJobBody} */
254
+ static FileJobBody() {
255
+ return Joi.object({
256
+ name: Joi.string().allow(""),
257
+ company_id: Joi.number(),
258
+ is_active: Joi.boolean(),
259
+ app_ids: Joi.array().items(Joi.string().allow("")),
260
+ job_type: Joi.string().allow(""),
261
+ discount_type: Joi.string().allow(""),
262
+ discount_level: Joi.string().allow(""),
283
263
  value: Joi.number(),
264
+ file_path: Joi.string().allow(""),
265
+ brand_ids: Joi.array().items(Joi.number()),
266
+ store_ids: Joi.array().items(Joi.number()),
267
+ extension_ids: Joi.array().items(Joi.string().allow("")),
284
268
  zone_ids: Joi.array().items(Joi.string().allow("")),
269
+ discount_meta: DiscountPlatformModel.DiscountMeta(),
270
+ validity: DiscountPlatformModel.ValidityObject(),
271
+ created_on: Joi.string().allow(""),
272
+ modified_on: Joi.string().allow(""),
273
+ created_by: DiscountPlatformModel.UserDetails(),
274
+ modified_by: DiscountPlatformModel.UserDetails(),
275
+ meta: Joi.any(),
285
276
  });
286
277
  }
287
278
 
288
- /** @returns {DiscountMeta} */
289
- static DiscountMeta() {
279
+ /** @returns {ListOrCalender} */
280
+ static ListOrCalender() {
290
281
  return Joi.object({
291
- hours: Joi.number(),
292
- minutes: Joi.number(),
293
- timer: Joi.boolean().required(),
282
+ items: Joi.array().items(DiscountPlatformModel.DiscountJob()).required(),
283
+ page: DiscountPlatformModel.Page().required(),
294
284
  });
295
285
  }
296
286
 
297
- /** @returns {DownloadFileJob} */
298
- static DownloadFileJob() {
287
+ /** @returns {DiscountItems} */
288
+ static DiscountItems() {
299
289
  return Joi.object({
300
- brand_ids: Joi.array().items(Joi.number()),
301
- store_ids: Joi.array().items(Joi.number()),
290
+ item_code: Joi.string().allow(""),
291
+ brand_name: Joi.string().allow(""),
292
+ seller_identifier: Joi.string().allow(""),
293
+ discount_type: Joi.string().allow("").required(),
294
+ value: Joi.number().required(),
295
+ discount_meta: DiscountPlatformModel.DiscountMeta(),
302
296
  });
303
297
  }
304
298
 
305
- /** @returns {FileJobBody} */
306
- static FileJobBody() {
299
+ /** @returns {BulkDiscount} */
300
+ static BulkDiscount() {
307
301
  return Joi.object({
308
- app_ids: Joi.array().items(Joi.string().allow("")),
309
- brand_ids: Joi.array().items(Joi.number()),
310
- company_id: Joi.number(),
311
- created_by: DiscountPlatformModel.UserDetails(),
312
- created_on: Joi.string().allow(""),
313
- discount_level: Joi.string().allow(""),
314
- discount_meta: DiscountPlatformModel.DiscountMeta(),
315
- discount_type: Joi.string().allow(""),
316
- extension_ids: Joi.array().items(Joi.string().allow("")),
302
+ company_id: Joi.number().required(),
303
+ items: Joi.array()
304
+ .items(DiscountPlatformModel.DiscountItems())
305
+ .required(),
306
+ });
307
+ }
308
+
309
+ /** @returns {FileJobResponse} */
310
+ static FileJobResponse() {
311
+ return Joi.object({
312
+ stage: Joi.string().allow("").required(),
313
+ total: Joi.number().required(),
314
+ failed: Joi.number().required(),
315
+ company_id: Joi.number().required(),
316
+ body: DiscountPlatformModel.FileJobBody(),
317
+ type: Joi.string().allow("").required(),
318
+ file_type: Joi.string().allow(""),
319
+ _id: Joi.string().allow("").required(),
317
320
  file_path: Joi.string().allow(""),
318
- is_active: Joi.boolean(),
319
- job_type: Joi.string().allow(""),
320
- meta: Joi.any(),
321
- modified_by: DiscountPlatformModel.UserDetails(),
322
- modified_on: Joi.string().allow(""),
323
- name: Joi.string().allow(""),
324
- store_ids: Joi.array().items(Joi.number()),
325
- validity: DiscountPlatformModel.ValidityObject(),
326
- value: Joi.number(),
321
+ progress: Joi.number(),
322
+ extension_ids: Joi.array().items(Joi.string().allow("")),
327
323
  zone_ids: Joi.array().items(Joi.string().allow("")),
324
+ created_on: Joi.string().allow(""),
325
+ modified_on: Joi.string().allow(""),
326
+ created_by: DiscountPlatformModel.UserDetails(),
328
327
  });
329
328
  }
330
329
 
331
330
  /** @returns {FileJobRequest} */
332
331
  static FileJobRequest() {
333
332
  return Joi.object({
334
- app_ids: Joi.array().items(Joi.string().allow("")),
335
- brand_ids: Joi.array().items(Joi.number()),
333
+ name: Joi.string().allow("").required(),
334
+ is_active: Joi.boolean().required(),
336
335
  company_id: Joi.number().required(),
337
- discount_level: Joi.string().allow(""),
336
+ app_ids: Joi.array().items(Joi.string().allow("")),
337
+ job_type: Joi.string().allow(""),
338
338
  discount_type: Joi.string().allow(""),
339
+ discount_level: Joi.string().allow(""),
339
340
  file_path: Joi.string().allow(""),
340
- is_active: Joi.boolean().required(),
341
- job_type: Joi.string().allow(""),
342
- meta: Joi.any(),
343
- name: Joi.string().allow("").required(),
341
+ brand_ids: Joi.array().items(Joi.number()),
344
342
  store_ids: Joi.array().items(Joi.number()),
345
343
  validity: DiscountPlatformModel.ValidityObject().required(),
344
+ meta: Joi.any(),
346
345
  });
347
346
  }
348
347
 
349
- /** @returns {FileJobResponse} */
350
- static FileJobResponse() {
348
+ /** @returns {DownloadFileJob} */
349
+ static DownloadFileJob() {
351
350
  return Joi.object({
352
- _id: Joi.string().allow("").required(),
353
- body: DiscountPlatformModel.FileJobBody(),
354
- company_id: Joi.number().required(),
355
- created_by: DiscountPlatformModel.UserDetails(),
356
- created_on: Joi.string().allow(""),
357
- extension_ids: Joi.array().items(Joi.string().allow("")),
358
- failed: Joi.number().required(),
359
- file_path: Joi.string().allow(""),
360
- file_type: Joi.string().allow(""),
361
- modified_on: Joi.string().allow(""),
362
- progress: Joi.number(),
363
- stage: Joi.string().allow("").required(),
364
- total: Joi.number().required(),
365
- type: Joi.string().allow("").required(),
366
- zone_ids: Joi.array().items(Joi.string().allow("")),
351
+ brand_ids: Joi.array().items(Joi.number()),
352
+ store_ids: Joi.array().items(Joi.number()),
367
353
  });
368
354
  }
369
355
 
370
- /** @returns {ListOrCalender} */
371
- static ListOrCalender() {
356
+ /** @returns {CancelJobResponse} */
357
+ static CancelJobResponse() {
372
358
  return Joi.object({
373
- items: Joi.array().items(DiscountPlatformModel.DiscountJob()).required(),
374
- page: DiscountPlatformModel.Page().required(),
359
+ success: Joi.boolean().required(),
375
360
  });
376
361
  }
377
362
 
378
363
  /** @returns {Page} */
379
364
  static Page() {
380
365
  return Joi.object({
381
- current: Joi.number(),
382
- has_next: Joi.boolean(),
383
- has_previous: Joi.boolean(),
384
366
  item_total: Joi.number(),
385
367
  next_id: Joi.string().allow(""),
386
- size: Joi.number(),
368
+ has_previous: Joi.boolean(),
369
+ has_next: Joi.boolean(),
370
+ current: Joi.number(),
387
371
  type: Joi.string().allow("").required(),
372
+ size: Joi.number(),
388
373
  });
389
374
  }
390
375
 
391
376
  /** @returns {UserDetails} */
392
377
  static UserDetails() {
393
378
  return Joi.object({
394
- user_id: Joi.string().allow("").required(),
395
379
  username: Joi.string().allow("").required(),
380
+ user_id: Joi.string().allow("").required(),
396
381
  });
397
382
  }
398
383
 
399
- /** @returns {ValidityObject} */
400
- static ValidityObject() {
384
+ /** @returns {BadRequestObject} */
385
+ static BadRequestObject() {
401
386
  return Joi.object({
402
- end: Joi.string().allow("").required(),
403
- start: Joi.string().allow("").required(),
387
+ message: Joi.string().allow("").required(),
388
+ });
389
+ }
390
+
391
+ /** @returns {BadRequestData} */
392
+ static BadRequestData() {
393
+ return Joi.object({
394
+ message: Joi.string().allow(""),
395
+ });
396
+ }
397
+
398
+ /** @returns {BadRequestObjectGet} */
399
+ static BadRequestObjectGet() {
400
+ return Joi.object({
401
+ message: Joi.string().allow(""),
402
+ error: Joi.string().allow(""),
403
+ data: DiscountPlatformModel.BadRequestData(),
404
404
  });
405
405
  }
406
406
  }
@@ -153,7 +153,7 @@ declare class FileStorage {
153
153
  * @summary: Get all the supported invoice pdf types
154
154
  * @description: Get all the supported invoice pdf types such as Invoice, Label, Delivery challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
155
155
  */
156
- getPdfTypes({ countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfTypesParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.InvoiceTypesResponse>;
156
+ getPdfTypes({ storeOs, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfTypesParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.InvoiceTypesResponse>;
157
157
  /**
158
158
  * @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg
159
159
  * - Arg object