@gofynd/fdk-client-javascript 1.4.2-beta.1 → 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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
- package/sdk/application/Order/OrderApplicationModel.js +822 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
- package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationModel.d.ts +762 -762
- package/sdk/application/User/UserApplicationModel.js +738 -738
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
- package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
- package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
- package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
- package/sdk/platform/User/UserPlatformModel.js +643 -643
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,47 +1,42 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
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 {
|
|
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 {
|
|
23
|
-
* @property {
|
|
24
|
-
* @property {
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @property {
|
|
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
|
|
44
|
-
* @property {boolean} [
|
|
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
|
|
54
|
-
* @property {
|
|
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
|
|
70
|
-
* @property {string} [
|
|
71
|
-
*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
*
|
|
76
|
-
* @property {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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} [
|
|
82
|
-
*
|
|
83
|
-
* @property {
|
|
84
|
-
*
|
|
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
|
|
89
|
-
* @property {string} [
|
|
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
|
|
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 {
|
|
109
|
-
|
|
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
|
-
* @
|
|
135
|
-
* @property {string} [
|
|
136
|
-
* @property {string} [
|
|
137
|
-
* @property {string} [
|
|
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 {
|
|
163
|
-
static
|
|
162
|
+
/** @returns {ApplicationResponse} */
|
|
163
|
+
static ApplicationResponse() {
|
|
164
164
|
return Joi.object({
|
|
165
|
-
|
|
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
|
-
|
|
186
|
-
|
|
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
|
-
|
|
172
|
+
decimal_digits: Joi.number(),
|
|
173
|
+
symbol: Joi.string().allow(""),
|
|
192
174
|
});
|
|
193
175
|
}
|
|
194
176
|
|
|
195
|
-
/** @returns {
|
|
196
|
-
static
|
|
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 {
|
|
210
|
-
static
|
|
204
|
+
/** @returns {ApplicationAuth} */
|
|
205
|
+
static ApplicationAuth() {
|
|
211
206
|
return Joi.object({
|
|
212
|
-
|
|
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 {
|
|
227
|
-
static
|
|
220
|
+
/** @returns {ApplicationMeta} */
|
|
221
|
+
static ApplicationMeta() {
|
|
228
222
|
return Joi.object({
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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
|
-
|
|
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 {
|
|
242
|
-
static
|
|
268
|
+
/** @returns {NotFound} */
|
|
269
|
+
static NotFound() {
|
|
243
270
|
return Joi.object({
|
|
244
|
-
|
|
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 {
|
|
257
|
-
static
|
|
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
|
-
|
|
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
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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;
|