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

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 (106) 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 +846 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +822 -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 +2155 -2150
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
  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/UserApplicationModel.d.ts +762 -762
  38. package/sdk/application/User/UserApplicationModel.js +738 -738
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  40. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  41. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  42. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  43. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  45. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  46. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  50. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  51. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  52. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  53. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  54. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
  57. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  58. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  63. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  64. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  65. package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
  66. package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
  67. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  68. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  69. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
  70. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
  71. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  72. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  73. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  74. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  75. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  76. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  77. package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
  78. package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
  79. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  80. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  81. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
  82. package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
  83. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  84. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  85. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
  86. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
  87. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  88. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  89. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  90. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  91. package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
  92. package/sdk/platform/User/UserPlatformModel.js +643 -643
  93. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  94. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  95. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  96. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  97. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  98. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  99. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  100. package/sdk/public/Content/ContentPublicModel.js +28 -28
  101. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  102. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  103. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  104. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  105. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  106. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,57 +1,57 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef BadRequestSchema
5
- * @property {string} [message] - Failure message.
6
- * @property {string} [status] - Response status.
4
+ * @typedef CommunicationConsentReq
5
+ * @property {string} [response]
6
+ * @property {string} [action]
7
+ * @property {string} [channel]
7
8
  */
8
9
 
9
10
  /**
10
- * @typedef CommunicationConsent
11
+ * @typedef CommunicationConsentRes
11
12
  * @property {string} [app_id]
12
- * @property {CommunicationConsentChannels} [channels]
13
13
  * @property {string} [user_id]
14
- */
15
-
16
- /**
17
- * @typedef CommunicationConsentChannels
18
- * @property {CommunicationConsentChannelsEmail} [email]
19
- * @property {CommunicationConsentChannelsSms} [sms]
20
- * @property {CommunicationConsentChannelsWhatsapp} [whatsapp]
14
+ * @property {CommunicationConsentChannels} [channels]
21
15
  */
22
16
 
23
17
  /**
24
18
  * @typedef CommunicationConsentChannelsEmail
25
- * @property {string} [display_name]
26
19
  * @property {string} [response]
20
+ * @property {string} [display_name]
27
21
  */
28
22
 
29
23
  /**
30
24
  * @typedef CommunicationConsentChannelsSms
31
- * @property {string} [display_name]
32
25
  * @property {string} [response]
26
+ * @property {string} [display_name]
33
27
  */
34
28
 
35
29
  /**
36
30
  * @typedef CommunicationConsentChannelsWhatsapp
37
- * @property {string} [country_code]
31
+ * @property {string} [response]
38
32
  * @property {string} [display_name]
33
+ * @property {string} [country_code]
39
34
  * @property {string} [phone_number]
40
- * @property {string} [response]
41
35
  */
42
36
 
43
37
  /**
44
- * @typedef CommunicationConsentReq
45
- * @property {string} [action]
46
- * @property {string} [channel]
47
- * @property {string} [response]
38
+ * @typedef CommunicationConsentChannels
39
+ * @property {CommunicationConsentChannelsEmail} [email]
40
+ * @property {CommunicationConsentChannelsSms} [sms]
41
+ * @property {CommunicationConsentChannelsWhatsapp} [whatsapp]
48
42
  */
49
43
 
50
44
  /**
51
- * @typedef CommunicationConsentRes
45
+ * @typedef CommunicationConsent
52
46
  * @property {string} [app_id]
53
- * @property {CommunicationConsentChannels} [channels]
54
47
  * @property {string} [user_id]
48
+ * @property {CommunicationConsentChannels} [channels]
49
+ */
50
+
51
+ /**
52
+ * @typedef BadRequestSchema
53
+ * @property {string} [status] - Response status.
54
+ * @property {string} [message] - Failure message.
55
55
  */
56
56
 
57
57
  /**
@@ -59,93 +59,93 @@ const Joi = require("joi");
59
59
  * @property {string} [action]
60
60
  * @property {string} [bundle_identifier]
61
61
  * @property {string} [push_token]
62
- * @property {string} [type]
63
62
  * @property {string} [unique_device_id]
63
+ * @property {string} [type]
64
64
  */
65
65
 
66
66
  /**
67
67
  * @typedef PushtokenRes
68
68
  * @property {string} [_id]
69
- * @property {string} [application_id]
70
69
  * @property {string} [bundle_identifier]
71
- * @property {string} [created_at]
72
- * @property {string} [expired_at]
73
- * @property {string} [platform]
74
70
  * @property {string} [push_token]
75
- * @property {string} [type]
76
71
  * @property {string} [unique_device_id]
77
- * @property {string} [updated_at]
72
+ * @property {string} [type]
73
+ * @property {string} [platform]
74
+ * @property {string} [application_id]
78
75
  * @property {string} [user_id]
76
+ * @property {string} [created_at]
77
+ * @property {string} [updated_at]
78
+ * @property {string} [expired_at]
79
79
  */
80
80
 
81
81
  class CommunicationApplicationModel {
82
- /** @returns {BadRequestSchema} */
83
- static BadRequestSchema() {
82
+ /** @returns {CommunicationConsentReq} */
83
+ static CommunicationConsentReq() {
84
84
  return Joi.object({
85
- message: Joi.string().allow(""),
86
- status: Joi.string().allow(""),
85
+ response: Joi.string().allow(""),
86
+ action: Joi.string().allow(""),
87
+ channel: Joi.string().allow(""),
87
88
  });
88
89
  }
89
90
 
90
- /** @returns {CommunicationConsent} */
91
- static CommunicationConsent() {
91
+ /** @returns {CommunicationConsentRes} */
92
+ static CommunicationConsentRes() {
92
93
  return Joi.object({
93
94
  app_id: Joi.string().allow(""),
94
- channels: CommunicationApplicationModel.CommunicationConsentChannels(),
95
95
  user_id: Joi.string().allow(""),
96
- });
97
- }
98
-
99
- /** @returns {CommunicationConsentChannels} */
100
- static CommunicationConsentChannels() {
101
- return Joi.object({
102
- email: CommunicationApplicationModel.CommunicationConsentChannelsEmail(),
103
- sms: CommunicationApplicationModel.CommunicationConsentChannelsSms(),
104
- whatsapp: CommunicationApplicationModel.CommunicationConsentChannelsWhatsapp(),
96
+ channels: CommunicationApplicationModel.CommunicationConsentChannels(),
105
97
  });
106
98
  }
107
99
 
108
100
  /** @returns {CommunicationConsentChannelsEmail} */
109
101
  static CommunicationConsentChannelsEmail() {
110
102
  return Joi.object({
111
- display_name: Joi.string().allow(""),
112
103
  response: Joi.string().allow(""),
104
+ display_name: Joi.string().allow(""),
113
105
  });
114
106
  }
115
107
 
116
108
  /** @returns {CommunicationConsentChannelsSms} */
117
109
  static CommunicationConsentChannelsSms() {
118
110
  return Joi.object({
119
- display_name: Joi.string().allow(""),
120
111
  response: Joi.string().allow(""),
112
+ display_name: Joi.string().allow(""),
121
113
  });
122
114
  }
123
115
 
124
116
  /** @returns {CommunicationConsentChannelsWhatsapp} */
125
117
  static CommunicationConsentChannelsWhatsapp() {
126
118
  return Joi.object({
127
- country_code: Joi.string().allow(""),
119
+ response: Joi.string().allow(""),
128
120
  display_name: Joi.string().allow(""),
121
+ country_code: Joi.string().allow(""),
129
122
  phone_number: Joi.string().allow(""),
130
- response: Joi.string().allow(""),
131
123
  });
132
124
  }
133
125
 
134
- /** @returns {CommunicationConsentReq} */
135
- static CommunicationConsentReq() {
126
+ /** @returns {CommunicationConsentChannels} */
127
+ static CommunicationConsentChannels() {
136
128
  return Joi.object({
137
- action: Joi.string().allow(""),
138
- channel: Joi.string().allow(""),
139
- response: Joi.string().allow(""),
129
+ email: CommunicationApplicationModel.CommunicationConsentChannelsEmail(),
130
+ sms: CommunicationApplicationModel.CommunicationConsentChannelsSms(),
131
+ whatsapp: CommunicationApplicationModel.CommunicationConsentChannelsWhatsapp(),
140
132
  });
141
133
  }
142
134
 
143
- /** @returns {CommunicationConsentRes} */
144
- static CommunicationConsentRes() {
135
+ /** @returns {CommunicationConsent} */
136
+ static CommunicationConsent() {
145
137
  return Joi.object({
146
138
  app_id: Joi.string().allow(""),
147
- channels: CommunicationApplicationModel.CommunicationConsentChannels(),
148
139
  user_id: Joi.string().allow(""),
140
+ channels: CommunicationApplicationModel.CommunicationConsentChannels(),
141
+ });
142
+ }
143
+
144
+ /** @returns {BadRequestSchema} */
145
+ static BadRequestSchema() {
146
+ return Joi.object({
147
+ status: Joi.string().allow(""),
148
+ message: Joi.string().allow(""),
149
149
  });
150
150
  }
151
151
 
@@ -155,8 +155,8 @@ class CommunicationApplicationModel {
155
155
  action: Joi.string().allow(""),
156
156
  bundle_identifier: Joi.string().allow(""),
157
157
  push_token: Joi.string().allow(""),
158
- type: Joi.string().allow(""),
159
158
  unique_device_id: Joi.string().allow(""),
159
+ type: Joi.string().allow(""),
160
160
  });
161
161
  }
162
162
 
@@ -164,16 +164,16 @@ class CommunicationApplicationModel {
164
164
  static PushtokenRes() {
165
165
  return Joi.object({
166
166
  _id: Joi.string().allow(""),
167
- application_id: Joi.string().allow(""),
168
167
  bundle_identifier: Joi.string().allow(""),
169
- created_at: Joi.string().allow(""),
170
- expired_at: Joi.string().allow(""),
171
- platform: Joi.string().allow(""),
172
168
  push_token: Joi.string().allow(""),
173
- type: Joi.string().allow(""),
174
169
  unique_device_id: Joi.string().allow(""),
175
- updated_at: Joi.string().allow(""),
170
+ type: Joi.string().allow(""),
171
+ platform: Joi.string().allow(""),
172
+ application_id: Joi.string().allow(""),
176
173
  user_id: Joi.string().allow(""),
174
+ created_at: Joi.string().allow(""),
175
+ updated_at: Joi.string().allow(""),
176
+ expired_at: Joi.string().allow(""),
177
177
  });
178
178
  }
179
179
  }