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