@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,47 +1,42 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef Application
5
- * @property {number} [__v] - Version key for tracking revisions. Default value is zero.
4
+ * @typedef ApplicationResponse
5
+ * @property {Application} [application]
6
6
  * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
7
- * of the sales channel
8
- * @property {string} [app_type] - It shows whether application is live or in
9
- * development mode
10
- * @property {ApplicationAuth} [auth]
11
- * @property {SecureUrl} [banner]
12
- * @property {number} [cache_ttl] - An integer value that specifies the number
13
- * of seconds until the key expires
14
- * @property {string} [channel_type] - It indicates different channel types like
15
- * store, website-and-mobile-apps. Default value is store.
16
- * @property {number} [company_id] - Numeric ID allotted to a business account
17
- * where the sales channel exists
18
- * @property {ApplicationCors} [cors]
19
- * @property {string} [created_at] - ISO 8601 timestamp of sales channel creation
20
- * @property {string} [description] - It contains detailed information about the
7
+ * of the current sales channel supported currency
8
+ * @property {boolean} [is_active] - Shows currency is enabled or not in current
21
9
  * sales channel
22
- * @property {Domain} [domain]
23
- * @property {Domain[]} [domains]
24
- * @property {SecureUrl} [favicon]
25
- * @property {boolean} [is_active] - Indicates whether a sales channel is active
26
- * or not active
27
- * @property {boolean} [is_internal] - Indicates whether a sales channel is
28
- * internal or not
29
- * @property {SecureUrl} [logo]
30
- * @property {ApplicationMeta[]} [meta]
31
- * @property {SecureUrl} [mobile_logo]
32
- * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion
33
- * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID)
34
- * of owner who owns the application
35
- * @property {ApplicationRedirections[]} [redirections]
36
- * @property {string} [token] - Randomly generated fixed-length string for sales
37
- * channel. It is required and auto-generated.
38
- * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation
39
- * @property {ApplicationWebsite} [website]
10
+ * @property {string} [name] - Name of the currency, e.g. Indian Rupee
11
+ * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR.
12
+ * @property {string} [created_at] - ISO 8601 timestamp of sales channel support
13
+ * currency creation
14
+ * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support
15
+ * currency updation
16
+ * @property {number} [decimal_digits] - Acceptable decimal limits for a given
17
+ * currency, e.g. 1.05$ means upto 2 decimal digits can be accepted as a valid
18
+ * value of a currency.
19
+ * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹
40
20
  */
41
21
 
42
22
  /**
43
- * @typedef ApplicationAuth
44
- * @property {boolean} [enabled] - Shows sales channel auth is enabled or not enabled.
23
+ * @typedef Domain
24
+ * @property {boolean} [verified] - Indicates domain is verified or not. TXT and
25
+ * A records should propagate correctly.
26
+ * @property {boolean} [is_primary] - Indicates domain is primary or not.
27
+ * Primary domain is the default/main domain.
28
+ * @property {boolean} [is_shortlink] - Shortlink is present or not for the domain
29
+ * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
30
+ * of the domain
31
+ * @property {string} [name]
32
+ * @property {boolean} [is_predefined] - Domain is hosting domain or not
33
+ */
34
+
35
+ /**
36
+ * @typedef ApplicationWebsite
37
+ * @property {boolean} [enabled] - Shows whether sales channel website URL is
38
+ * enabled or not
39
+ * @property {string} [basepath] - Base path for the current sales channel website
45
40
  */
46
41
 
47
42
  /**
@@ -50,9 +45,8 @@ const Joi = require("joi");
50
45
  */
51
46
 
52
47
  /**
53
- * @typedef ApplicationMeta
54
- * @property {string} [name] - Indicates the name of application meta
55
- * @property {string} [value] - Value related to application meta name
48
+ * @typedef ApplicationAuth
49
+ * @property {boolean} [enabled] - Shows sales channel auth is enabled or not enabled.
56
50
  */
57
51
 
58
52
  /**
@@ -66,29 +60,58 @@ const Joi = require("joi");
66
60
  */
67
61
 
68
62
  /**
69
- * @typedef ApplicationResponse
70
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
71
- * of the current sales channel supported currency
72
- * @property {Application} [application]
73
- * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR.
74
- * @property {string} [created_at] - ISO 8601 timestamp of sales channel support
75
- * currency creation
76
- * @property {number} [decimal_digits] - Acceptable decimal limits for a given
77
- * currency, e.g. 1.05$ means upto 2 decimal digits can be accepted as a valid
78
- * value of a currency.
79
- * @property {boolean} [is_active] - Shows currency is enabled or not in current
63
+ * @typedef ApplicationMeta
64
+ * @property {string} [name] - Indicates the name of application meta
65
+ * @property {string} [value] - Value related to application meta name
66
+ */
67
+
68
+ /**
69
+ * @typedef SecureUrl
70
+ * @property {string} [secure_url] - Hosted URL of the image
71
+ */
72
+
73
+ /**
74
+ * @typedef Application
75
+ * @property {ApplicationWebsite} [website]
76
+ * @property {ApplicationCors} [cors]
77
+ * @property {ApplicationAuth} [auth]
78
+ * @property {string} [description] - It contains detailed information about the
80
79
  * sales channel
81
- * @property {string} [name] - Name of the currency, e.g. Indian Rupee
82
- * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹
83
- * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support
84
- * currency updation
80
+ * @property {string} [channel_type] - It indicates different channel types like
81
+ * store, website-and-mobile-apps. Default value is store.
82
+ * @property {number} [cache_ttl] - An integer value that specifies the number
83
+ * of seconds until the key expires
84
+ * @property {boolean} [is_internal] - Indicates whether a sales channel is
85
+ * internal or not
86
+ * @property {boolean} [is_active] - Indicates whether a sales channel is active
87
+ * or not active
88
+ * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
89
+ * of the sales channel
90
+ * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion
91
+ * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID)
92
+ * of owner who owns the application
93
+ * @property {number} [company_id] - Numeric ID allotted to a business account
94
+ * where the sales channel exists
95
+ * @property {string} [token] - Randomly generated fixed-length string for sales
96
+ * channel. It is required and auto-generated.
97
+ * @property {ApplicationRedirections[]} [redirections]
98
+ * @property {ApplicationMeta[]} [meta]
99
+ * @property {string} [created_at] - ISO 8601 timestamp of sales channel creation
100
+ * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation
101
+ * @property {number} [__v] - Version key for tracking revisions. Default value is zero.
102
+ * @property {SecureUrl} [banner]
103
+ * @property {SecureUrl} [logo]
104
+ * @property {SecureUrl} [favicon]
105
+ * @property {Domain[]} [domains]
106
+ * @property {string} [app_type] - It shows whether application is live or in
107
+ * development mode
108
+ * @property {SecureUrl} [mobile_logo]
109
+ * @property {Domain} [domain]
85
110
  */
86
111
 
87
112
  /**
88
- * @typedef ApplicationWebsite
89
- * @property {string} [basepath] - Base path for the current sales channel website
90
- * @property {boolean} [enabled] - Shows whether sales channel website URL is
91
- * enabled or not
113
+ * @typedef NotFound
114
+ * @property {string} [message] - Response message for not found
92
115
  */
93
116
 
94
117
  /**
@@ -97,50 +120,37 @@ const Joi = require("joi");
97
120
  */
98
121
 
99
122
  /**
100
- * @typedef Domain
101
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
102
- * of the domain
103
- * @property {boolean} [is_predefined] - Domain is hosting domain or not
104
- * @property {boolean} [is_primary] - Indicates domain is primary or not.
105
- * Primary domain is the default/main domain.
106
- * @property {boolean} [is_shortlink] - Shortlink is present or not for the domain
123
+ * @typedef LocationDefaultLanguage
107
124
  * @property {string} [name]
108
- * @property {boolean} [verified] - Indicates domain is verified or not. TXT and
109
- * A records should propagate correctly.
125
+ * @property {string} [code]
126
+ */
127
+
128
+ /**
129
+ * @typedef LocationDefaultCurrency
130
+ * @property {string} [name]
131
+ * @property {string} [symbol]
132
+ * @property {string} [code]
110
133
  */
111
134
 
112
135
  /**
113
136
  * @typedef LocationCountry
114
- * @property {number} [__v]
115
- * @property {string} [_id]
116
137
  * @property {string} [capital]
117
- * @property {string} [country_code]
118
138
  * @property {string} [currency]
119
- * @property {LocationDefaultCurrency} [default_currency]
120
- * @property {LocationDefaultLanguage} [default_language]
121
139
  * @property {string} [iso2]
122
140
  * @property {string} [iso3]
123
- * @property {string} [latitude]
124
- * @property {string} [longitude]
125
141
  * @property {string} [name]
126
142
  * @property {string} [parent]
127
143
  * @property {string} [phone_code]
128
- * @property {string} [state_code]
129
144
  * @property {string} [type]
130
145
  * @property {number} [uid]
131
- */
132
-
133
- /**
134
- * @typedef LocationDefaultCurrency
135
- * @property {string} [code]
136
- * @property {string} [name]
137
- * @property {string} [symbol]
138
- */
139
-
140
- /**
141
- * @typedef LocationDefaultLanguage
142
- * @property {string} [code]
143
- * @property {string} [name]
146
+ * @property {number} [__v]
147
+ * @property {string} [_id]
148
+ * @property {LocationDefaultCurrency} [default_currency]
149
+ * @property {LocationDefaultLanguage} [default_language]
150
+ * @property {string} [state_code]
151
+ * @property {string} [country_code]
152
+ * @property {string} [latitude]
153
+ * @property {string} [longitude]
144
154
  */
145
155
 
146
156
  /**
@@ -148,54 +158,39 @@ const Joi = require("joi");
148
158
  * @property {LocationCountry[]} [items] - Object Containing Country Locations Details
149
159
  */
150
160
 
151
- /**
152
- * @typedef NotFound
153
- * @property {string} [message] - Response message for not found
154
- */
155
-
156
- /**
157
- * @typedef SecureUrl
158
- * @property {string} [secure_url] - Hosted URL of the image
159
- */
160
-
161
161
  class CommonPlatformModel {
162
- /** @returns {Application} */
163
- static Application() {
162
+ /** @returns {ApplicationResponse} */
163
+ static ApplicationResponse() {
164
164
  return Joi.object({
165
- __v: Joi.number(),
165
+ application: CommonPlatformModel.Application(),
166
166
  _id: Joi.string().allow(""),
167
- app_type: Joi.string().allow(""),
168
- auth: CommonPlatformModel.ApplicationAuth(),
169
- banner: CommonPlatformModel.SecureUrl(),
170
- cache_ttl: Joi.number(),
171
- channel_type: Joi.string().allow(""),
172
- company_id: Joi.number(),
173
- cors: CommonPlatformModel.ApplicationCors(),
174
- created_at: Joi.string().allow(""),
175
- description: Joi.string().allow(""),
176
- domain: CommonPlatformModel.Domain(),
177
- domains: Joi.array().items(CommonPlatformModel.Domain()),
178
- favicon: CommonPlatformModel.SecureUrl(),
179
167
  is_active: Joi.boolean(),
180
- is_internal: Joi.boolean(),
181
- logo: CommonPlatformModel.SecureUrl(),
182
- meta: Joi.array().items(CommonPlatformModel.ApplicationMeta()),
183
- mobile_logo: CommonPlatformModel.SecureUrl(),
184
168
  name: Joi.string().allow(""),
185
- owner: Joi.string().allow(""),
186
- redirections: Joi.array().items(
187
- CommonPlatformModel.ApplicationRedirections()
188
- ),
189
- token: Joi.string().allow(""),
169
+ code: Joi.string().allow(""),
170
+ created_at: Joi.string().allow(""),
190
171
  updated_at: Joi.string().allow(""),
191
- website: CommonPlatformModel.ApplicationWebsite(),
172
+ decimal_digits: Joi.number(),
173
+ symbol: Joi.string().allow(""),
192
174
  });
193
175
  }
194
176
 
195
- /** @returns {ApplicationAuth} */
196
- static ApplicationAuth() {
177
+ /** @returns {Domain} */
178
+ static Domain() {
179
+ return Joi.object({
180
+ verified: Joi.boolean(),
181
+ is_primary: Joi.boolean(),
182
+ is_shortlink: Joi.boolean(),
183
+ _id: Joi.string().allow(""),
184
+ name: Joi.string().allow(""),
185
+ is_predefined: Joi.boolean(),
186
+ });
187
+ }
188
+
189
+ /** @returns {ApplicationWebsite} */
190
+ static ApplicationWebsite() {
197
191
  return Joi.object({
198
192
  enabled: Joi.boolean(),
193
+ basepath: Joi.string().allow(""),
199
194
  });
200
195
  }
201
196
 
@@ -206,11 +201,10 @@ class CommonPlatformModel {
206
201
  });
207
202
  }
208
203
 
209
- /** @returns {ApplicationMeta} */
210
- static ApplicationMeta() {
204
+ /** @returns {ApplicationAuth} */
205
+ static ApplicationAuth() {
211
206
  return Joi.object({
212
- name: Joi.string().allow(""),
213
- value: Joi.string().allow(""),
207
+ enabled: Joi.boolean(),
214
208
  });
215
209
  }
216
210
 
@@ -223,26 +217,58 @@ class CommonPlatformModel {
223
217
  });
224
218
  }
225
219
 
226
- /** @returns {ApplicationResponse} */
227
- static ApplicationResponse() {
220
+ /** @returns {ApplicationMeta} */
221
+ static ApplicationMeta() {
228
222
  return Joi.object({
229
- _id: Joi.string().allow(""),
230
- application: CommonPlatformModel.Application(),
231
- code: Joi.string().allow(""),
232
- created_at: Joi.string().allow(""),
233
- decimal_digits: Joi.number(),
223
+ name: Joi.string().allow(""),
224
+ value: Joi.string().allow(""),
225
+ });
226
+ }
227
+
228
+ /** @returns {SecureUrl} */
229
+ static SecureUrl() {
230
+ return Joi.object({
231
+ secure_url: Joi.string().allow(""),
232
+ });
233
+ }
234
+
235
+ /** @returns {Application} */
236
+ static Application() {
237
+ return Joi.object({
238
+ website: CommonPlatformModel.ApplicationWebsite(),
239
+ cors: CommonPlatformModel.ApplicationCors(),
240
+ auth: CommonPlatformModel.ApplicationAuth(),
241
+ description: Joi.string().allow(""),
242
+ channel_type: Joi.string().allow(""),
243
+ cache_ttl: Joi.number(),
244
+ is_internal: Joi.boolean(),
234
245
  is_active: Joi.boolean(),
246
+ _id: Joi.string().allow(""),
235
247
  name: Joi.string().allow(""),
236
- symbol: Joi.string().allow(""),
248
+ owner: Joi.string().allow(""),
249
+ company_id: Joi.number(),
250
+ token: Joi.string().allow(""),
251
+ redirections: Joi.array().items(
252
+ CommonPlatformModel.ApplicationRedirections()
253
+ ),
254
+ meta: Joi.array().items(CommonPlatformModel.ApplicationMeta()),
255
+ created_at: Joi.string().allow(""),
237
256
  updated_at: Joi.string().allow(""),
257
+ __v: Joi.number(),
258
+ banner: CommonPlatformModel.SecureUrl(),
259
+ logo: CommonPlatformModel.SecureUrl(),
260
+ favicon: CommonPlatformModel.SecureUrl(),
261
+ domains: Joi.array().items(CommonPlatformModel.Domain()),
262
+ app_type: Joi.string().allow(""),
263
+ mobile_logo: CommonPlatformModel.SecureUrl(),
264
+ domain: CommonPlatformModel.Domain(),
238
265
  });
239
266
  }
240
267
 
241
- /** @returns {ApplicationWebsite} */
242
- static ApplicationWebsite() {
268
+ /** @returns {NotFound} */
269
+ static NotFound() {
243
270
  return Joi.object({
244
- basepath: Joi.string().allow(""),
245
- enabled: Joi.boolean(),
271
+ message: Joi.string().allow(""),
246
272
  });
247
273
  }
248
274
 
@@ -253,55 +279,43 @@ class CommonPlatformModel {
253
279
  });
254
280
  }
255
281
 
256
- /** @returns {Domain} */
257
- static Domain() {
282
+ /** @returns {LocationDefaultLanguage} */
283
+ static LocationDefaultLanguage() {
258
284
  return Joi.object({
259
- _id: Joi.string().allow(""),
260
- is_predefined: Joi.boolean(),
261
- is_primary: Joi.boolean(),
262
- is_shortlink: Joi.boolean(),
263
285
  name: Joi.string().allow(""),
264
- verified: Joi.boolean(),
286
+ code: Joi.string().allow(""),
287
+ });
288
+ }
289
+
290
+ /** @returns {LocationDefaultCurrency} */
291
+ static LocationDefaultCurrency() {
292
+ return Joi.object({
293
+ name: Joi.string().allow(""),
294
+ symbol: Joi.string().allow(""),
295
+ code: Joi.string().allow(""),
265
296
  });
266
297
  }
267
298
 
268
299
  /** @returns {LocationCountry} */
269
300
  static LocationCountry() {
270
301
  return Joi.object({
271
- __v: Joi.number(),
272
- _id: Joi.string().allow(""),
273
302
  capital: Joi.string().allow(""),
274
- country_code: Joi.string().allow(""),
275
303
  currency: Joi.string().allow(""),
276
- default_currency: CommonPlatformModel.LocationDefaultCurrency(),
277
- default_language: CommonPlatformModel.LocationDefaultLanguage(),
278
304
  iso2: Joi.string().allow(""),
279
305
  iso3: Joi.string().allow(""),
280
- latitude: Joi.string().allow(""),
281
- longitude: Joi.string().allow(""),
282
306
  name: Joi.string().allow(""),
283
307
  parent: Joi.string().allow(""),
284
308
  phone_code: Joi.string().allow(""),
285
- state_code: Joi.string().allow(""),
286
309
  type: Joi.string().allow(""),
287
310
  uid: Joi.number(),
288
- });
289
- }
290
-
291
- /** @returns {LocationDefaultCurrency} */
292
- static LocationDefaultCurrency() {
293
- return Joi.object({
294
- code: Joi.string().allow(""),
295
- name: Joi.string().allow(""),
296
- symbol: Joi.string().allow(""),
297
- });
298
- }
299
-
300
- /** @returns {LocationDefaultLanguage} */
301
- static LocationDefaultLanguage() {
302
- return Joi.object({
303
- code: Joi.string().allow(""),
304
- name: Joi.string().allow(""),
311
+ __v: Joi.number(),
312
+ _id: Joi.string().allow(""),
313
+ default_currency: CommonPlatformModel.LocationDefaultCurrency(),
314
+ default_language: CommonPlatformModel.LocationDefaultLanguage(),
315
+ state_code: Joi.string().allow(""),
316
+ country_code: Joi.string().allow(""),
317
+ latitude: Joi.string().allow(""),
318
+ longitude: Joi.string().allow(""),
305
319
  });
306
320
  }
307
321
 
@@ -311,19 +325,5 @@ class CommonPlatformModel {
311
325
  items: Joi.array().items(CommonPlatformModel.LocationCountry()),
312
326
  });
313
327
  }
314
-
315
- /** @returns {NotFound} */
316
- static NotFound() {
317
- return Joi.object({
318
- message: Joi.string().allow(""),
319
- });
320
- }
321
-
322
- /** @returns {SecureUrl} */
323
- static SecureUrl() {
324
- return Joi.object({
325
- secure_url: Joi.string().allow(""),
326
- });
327
- }
328
328
  }
329
329
  module.exports = CommonPlatformModel;