@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,50 +1,34 @@
|
|
|
1
1
|
export = PartnerPublicModel;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef Benefits
|
|
4
|
-
* @property {string} [description]
|
|
5
|
-
* @property {string} [title]
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @typedef CategoryCommon
|
|
9
|
-
* @property {CategoryL1[]} [category_l1]
|
|
10
|
-
* @property {CategoryL2[]} [category_l2]
|
|
11
|
-
*/
|
|
12
2
|
/**
|
|
13
3
|
* @typedef CategoryL1
|
|
14
|
-
* @property {string} [_id]
|
|
15
4
|
* @property {string} [description]
|
|
16
5
|
* @property {string} [display]
|
|
17
6
|
* @property {number} [level]
|
|
18
7
|
* @property {string} [logo]
|
|
19
8
|
* @property {string} [slug]
|
|
20
9
|
* @property {string} [value]
|
|
10
|
+
* @property {string} [_id]
|
|
21
11
|
*/
|
|
22
12
|
/**
|
|
23
13
|
* @typedef CategoryL2
|
|
24
|
-
* @property {string} [
|
|
14
|
+
* @property {string} [parent]
|
|
25
15
|
* @property {string} [display]
|
|
26
16
|
* @property {number} [level]
|
|
27
|
-
* @property {string} [parent]
|
|
28
17
|
* @property {string} [slug]
|
|
29
18
|
* @property {string} [value]
|
|
19
|
+
* @property {string} [_id]
|
|
30
20
|
*/
|
|
31
21
|
/**
|
|
32
|
-
* @typedef
|
|
33
|
-
* @property {
|
|
22
|
+
* @typedef CategoryCommon
|
|
23
|
+
* @property {CategoryL1[]} [category_l1]
|
|
24
|
+
* @property {CategoryL2[]} [category_l2]
|
|
34
25
|
*/
|
|
35
26
|
/**
|
|
36
|
-
* @typedef
|
|
37
|
-
* @property {
|
|
38
|
-
* @property {string} [demo_url]
|
|
39
|
-
* @property {string} [description]
|
|
40
|
-
* @property {string[]} [integration]
|
|
41
|
-
* @property {Screenshots} [screenshots]
|
|
42
|
-
* @property {Object[]} [video_url]
|
|
43
|
-
* @property {string[]} [youtube]
|
|
27
|
+
* @typedef ContactInfo
|
|
28
|
+
* @property {Support} [support]
|
|
44
29
|
*/
|
|
45
30
|
/**
|
|
46
31
|
* @typedef ExtensionUsingSlug
|
|
47
|
-
* @property {string} [_id]
|
|
48
32
|
* @property {CategoryCommon} [category]
|
|
49
33
|
* @property {ContactInfo} [contact_info]
|
|
50
34
|
* @property {string} [created_at]
|
|
@@ -62,13 +46,7 @@ export = PartnerPublicModel;
|
|
|
62
46
|
* @property {string} [review_instructions]
|
|
63
47
|
* @property {string[]} [scope]
|
|
64
48
|
* @property {string} [slug]
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @typedef ListingInfo
|
|
68
|
-
* @property {string} [icon]
|
|
69
|
-
* @property {string[]} [keywords]
|
|
70
|
-
* @property {string} [name]
|
|
71
|
-
* @property {string} [tagline]
|
|
49
|
+
* @property {string} [_id]
|
|
72
50
|
*/
|
|
73
51
|
/**
|
|
74
52
|
* @typedef Organization
|
|
@@ -76,31 +54,32 @@ export = PartnerPublicModel;
|
|
|
76
54
|
* @property {string} [slug]
|
|
77
55
|
*/
|
|
78
56
|
/**
|
|
79
|
-
* @typedef
|
|
80
|
-
* @property {string} [
|
|
81
|
-
* @property {string} [
|
|
57
|
+
* @typedef ListingInfo
|
|
58
|
+
* @property {string} [icon]
|
|
59
|
+
* @property {string[]} [keywords]
|
|
82
60
|
* @property {string} [name]
|
|
83
|
-
* @property {
|
|
84
|
-
* @property {Recurring} [recurring]
|
|
85
|
-
* @property {number} [trial_days]
|
|
86
|
-
* @property {string} [type]
|
|
87
|
-
*/
|
|
88
|
-
/**
|
|
89
|
-
* @typedef Price
|
|
90
|
-
* @property {number} [amount]
|
|
91
|
-
* @property {string} [currency]
|
|
61
|
+
* @property {string} [tagline]
|
|
92
62
|
*/
|
|
93
63
|
/**
|
|
94
|
-
* @typedef
|
|
95
|
-
* @property {
|
|
96
|
-
* @property {string} [
|
|
97
|
-
* @property {number} [yearly_amount]
|
|
64
|
+
* @typedef Benefits
|
|
65
|
+
* @property {string} [title]
|
|
66
|
+
* @property {string} [description]
|
|
98
67
|
*/
|
|
99
68
|
/**
|
|
100
69
|
* @typedef Screenshots
|
|
101
70
|
* @property {string[]} [desktop]
|
|
102
71
|
* @property {string[]} [mobile]
|
|
103
72
|
*/
|
|
73
|
+
/**
|
|
74
|
+
* @typedef Details
|
|
75
|
+
* @property {Benefits[]} [benefits]
|
|
76
|
+
* @property {string} [demo_url]
|
|
77
|
+
* @property {string} [description]
|
|
78
|
+
* @property {string[]} [integration]
|
|
79
|
+
* @property {Object[]} [video_url]
|
|
80
|
+
* @property {string[]} [youtube]
|
|
81
|
+
* @property {Screenshots} [screenshots]
|
|
82
|
+
*/
|
|
104
83
|
/**
|
|
105
84
|
* @typedef Support
|
|
106
85
|
* @property {string} [email]
|
|
@@ -109,64 +88,67 @@ export = PartnerPublicModel;
|
|
|
109
88
|
* @property {string} [privacy_policy_url]
|
|
110
89
|
* @property {string} [website_url]
|
|
111
90
|
*/
|
|
91
|
+
/**
|
|
92
|
+
* @typedef Price
|
|
93
|
+
* @property {number} [amount]
|
|
94
|
+
* @property {string} [currency]
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* @typedef Plans
|
|
98
|
+
* @property {string} [additional_charges]
|
|
99
|
+
* @property {string} [features]
|
|
100
|
+
* @property {string} [name]
|
|
101
|
+
* @property {number} [trial_days]
|
|
102
|
+
* @property {string} [type]
|
|
103
|
+
* @property {Price} [price]
|
|
104
|
+
* @property {Recurring} [recurring]
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
* @typedef Recurring
|
|
108
|
+
* @property {number} [recurring_time]
|
|
109
|
+
* @property {number} [yearly_amount]
|
|
110
|
+
* @property {string} [type]
|
|
111
|
+
*/
|
|
112
112
|
declare class PartnerPublicModel {
|
|
113
113
|
}
|
|
114
114
|
declare namespace PartnerPublicModel {
|
|
115
|
-
export {
|
|
115
|
+
export { CategoryL1, CategoryL2, CategoryCommon, ContactInfo, ExtensionUsingSlug, Organization, ListingInfo, Benefits, Screenshots, Details, Support, Price, Plans, Recurring };
|
|
116
116
|
}
|
|
117
|
-
/** @returns {Benefits} */
|
|
118
|
-
declare function Benefits(): Benefits;
|
|
119
|
-
type Benefits = {
|
|
120
|
-
description?: string;
|
|
121
|
-
title?: string;
|
|
122
|
-
};
|
|
123
|
-
/** @returns {CategoryCommon} */
|
|
124
|
-
declare function CategoryCommon(): CategoryCommon;
|
|
125
|
-
type CategoryCommon = {
|
|
126
|
-
category_l1?: CategoryL1[];
|
|
127
|
-
category_l2?: CategoryL2[];
|
|
128
|
-
};
|
|
129
117
|
/** @returns {CategoryL1} */
|
|
130
118
|
declare function CategoryL1(): CategoryL1;
|
|
131
119
|
type CategoryL1 = {
|
|
132
|
-
_id?: string;
|
|
133
120
|
description?: string;
|
|
134
121
|
display?: string;
|
|
135
122
|
level?: number;
|
|
136
123
|
logo?: string;
|
|
137
124
|
slug?: string;
|
|
138
125
|
value?: string;
|
|
126
|
+
_id?: string;
|
|
139
127
|
};
|
|
140
128
|
/** @returns {CategoryL2} */
|
|
141
129
|
declare function CategoryL2(): CategoryL2;
|
|
142
130
|
type CategoryL2 = {
|
|
143
|
-
|
|
131
|
+
parent?: string;
|
|
144
132
|
display?: string;
|
|
145
133
|
level?: number;
|
|
146
|
-
parent?: string;
|
|
147
134
|
slug?: string;
|
|
148
135
|
value?: string;
|
|
136
|
+
_id?: string;
|
|
137
|
+
};
|
|
138
|
+
/** @returns {CategoryCommon} */
|
|
139
|
+
declare function CategoryCommon(): CategoryCommon;
|
|
140
|
+
type CategoryCommon = {
|
|
141
|
+
category_l1?: CategoryL1[];
|
|
142
|
+
category_l2?: CategoryL2[];
|
|
149
143
|
};
|
|
150
144
|
/** @returns {ContactInfo} */
|
|
151
145
|
declare function ContactInfo(): ContactInfo;
|
|
152
146
|
type ContactInfo = {
|
|
153
147
|
support?: Support;
|
|
154
148
|
};
|
|
155
|
-
/** @returns {Details} */
|
|
156
|
-
declare function Details(): Details;
|
|
157
|
-
type Details = {
|
|
158
|
-
benefits?: Benefits[];
|
|
159
|
-
demo_url?: string;
|
|
160
|
-
description?: string;
|
|
161
|
-
integration?: string[];
|
|
162
|
-
screenshots?: Screenshots;
|
|
163
|
-
video_url?: any[];
|
|
164
|
-
youtube?: string[];
|
|
165
|
-
};
|
|
166
149
|
/** @returns {ExtensionUsingSlug} */
|
|
167
150
|
declare function ExtensionUsingSlug(): ExtensionUsingSlug;
|
|
168
151
|
type ExtensionUsingSlug = {
|
|
169
|
-
_id?: string;
|
|
170
152
|
category?: CategoryCommon;
|
|
171
153
|
contact_info?: ContactInfo;
|
|
172
154
|
created_at?: string;
|
|
@@ -184,14 +166,7 @@ type ExtensionUsingSlug = {
|
|
|
184
166
|
review_instructions?: string;
|
|
185
167
|
scope?: string[];
|
|
186
168
|
slug?: string;
|
|
187
|
-
|
|
188
|
-
/** @returns {ListingInfo} */
|
|
189
|
-
declare function ListingInfo(): ListingInfo;
|
|
190
|
-
type ListingInfo = {
|
|
191
|
-
icon?: string;
|
|
192
|
-
keywords?: string[];
|
|
193
|
-
name?: string;
|
|
194
|
-
tagline?: string;
|
|
169
|
+
_id?: string;
|
|
195
170
|
};
|
|
196
171
|
/** @returns {Organization} */
|
|
197
172
|
declare function Organization(): Organization;
|
|
@@ -199,29 +174,19 @@ type Organization = {
|
|
|
199
174
|
name?: string;
|
|
200
175
|
slug?: string;
|
|
201
176
|
};
|
|
202
|
-
/** @returns {
|
|
203
|
-
declare function
|
|
204
|
-
type
|
|
205
|
-
|
|
206
|
-
|
|
177
|
+
/** @returns {ListingInfo} */
|
|
178
|
+
declare function ListingInfo(): ListingInfo;
|
|
179
|
+
type ListingInfo = {
|
|
180
|
+
icon?: string;
|
|
181
|
+
keywords?: string[];
|
|
207
182
|
name?: string;
|
|
208
|
-
|
|
209
|
-
recurring?: Recurring;
|
|
210
|
-
trial_days?: number;
|
|
211
|
-
type?: string;
|
|
212
|
-
};
|
|
213
|
-
/** @returns {Price} */
|
|
214
|
-
declare function Price(): Price;
|
|
215
|
-
type Price = {
|
|
216
|
-
amount?: number;
|
|
217
|
-
currency?: string;
|
|
183
|
+
tagline?: string;
|
|
218
184
|
};
|
|
219
|
-
/** @returns {
|
|
220
|
-
declare function
|
|
221
|
-
type
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
yearly_amount?: number;
|
|
185
|
+
/** @returns {Benefits} */
|
|
186
|
+
declare function Benefits(): Benefits;
|
|
187
|
+
type Benefits = {
|
|
188
|
+
title?: string;
|
|
189
|
+
description?: string;
|
|
225
190
|
};
|
|
226
191
|
/** @returns {Screenshots} */
|
|
227
192
|
declare function Screenshots(): Screenshots;
|
|
@@ -229,6 +194,17 @@ type Screenshots = {
|
|
|
229
194
|
desktop?: string[];
|
|
230
195
|
mobile?: string[];
|
|
231
196
|
};
|
|
197
|
+
/** @returns {Details} */
|
|
198
|
+
declare function Details(): Details;
|
|
199
|
+
type Details = {
|
|
200
|
+
benefits?: Benefits[];
|
|
201
|
+
demo_url?: string;
|
|
202
|
+
description?: string;
|
|
203
|
+
integration?: string[];
|
|
204
|
+
video_url?: any[];
|
|
205
|
+
youtube?: string[];
|
|
206
|
+
screenshots?: Screenshots;
|
|
207
|
+
};
|
|
232
208
|
/** @returns {Support} */
|
|
233
209
|
declare function Support(): Support;
|
|
234
210
|
type Support = {
|
|
@@ -238,3 +214,27 @@ type Support = {
|
|
|
238
214
|
privacy_policy_url?: string;
|
|
239
215
|
website_url?: string;
|
|
240
216
|
};
|
|
217
|
+
/** @returns {Price} */
|
|
218
|
+
declare function Price(): Price;
|
|
219
|
+
type Price = {
|
|
220
|
+
amount?: number;
|
|
221
|
+
currency?: string;
|
|
222
|
+
};
|
|
223
|
+
/** @returns {Plans} */
|
|
224
|
+
declare function Plans(): Plans;
|
|
225
|
+
type Plans = {
|
|
226
|
+
additional_charges?: string;
|
|
227
|
+
features?: string;
|
|
228
|
+
name?: string;
|
|
229
|
+
trial_days?: number;
|
|
230
|
+
type?: string;
|
|
231
|
+
price?: Price;
|
|
232
|
+
recurring?: Recurring;
|
|
233
|
+
};
|
|
234
|
+
/** @returns {Recurring} */
|
|
235
|
+
declare function Recurring(): Recurring;
|
|
236
|
+
type Recurring = {
|
|
237
|
+
recurring_time?: number;
|
|
238
|
+
yearly_amount?: number;
|
|
239
|
+
type?: string;
|
|
240
|
+
};
|
|
@@ -1,57 +1,39 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @typedef Benefits
|
|
5
|
-
* @property {string} [description]
|
|
6
|
-
* @property {string} [title]
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @typedef CategoryCommon
|
|
11
|
-
* @property {CategoryL1[]} [category_l1]
|
|
12
|
-
* @property {CategoryL2[]} [category_l2]
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
3
|
/**
|
|
16
4
|
* @typedef CategoryL1
|
|
17
|
-
* @property {string} [_id]
|
|
18
5
|
* @property {string} [description]
|
|
19
6
|
* @property {string} [display]
|
|
20
7
|
* @property {number} [level]
|
|
21
8
|
* @property {string} [logo]
|
|
22
9
|
* @property {string} [slug]
|
|
23
10
|
* @property {string} [value]
|
|
11
|
+
* @property {string} [_id]
|
|
24
12
|
*/
|
|
25
13
|
|
|
26
14
|
/**
|
|
27
15
|
* @typedef CategoryL2
|
|
28
|
-
* @property {string} [
|
|
16
|
+
* @property {string} [parent]
|
|
29
17
|
* @property {string} [display]
|
|
30
18
|
* @property {number} [level]
|
|
31
|
-
* @property {string} [parent]
|
|
32
19
|
* @property {string} [slug]
|
|
33
20
|
* @property {string} [value]
|
|
21
|
+
* @property {string} [_id]
|
|
34
22
|
*/
|
|
35
23
|
|
|
36
24
|
/**
|
|
37
|
-
* @typedef
|
|
38
|
-
* @property {
|
|
25
|
+
* @typedef CategoryCommon
|
|
26
|
+
* @property {CategoryL1[]} [category_l1]
|
|
27
|
+
* @property {CategoryL2[]} [category_l2]
|
|
39
28
|
*/
|
|
40
29
|
|
|
41
30
|
/**
|
|
42
|
-
* @typedef
|
|
43
|
-
* @property {
|
|
44
|
-
* @property {string} [demo_url]
|
|
45
|
-
* @property {string} [description]
|
|
46
|
-
* @property {string[]} [integration]
|
|
47
|
-
* @property {Screenshots} [screenshots]
|
|
48
|
-
* @property {Object[]} [video_url]
|
|
49
|
-
* @property {string[]} [youtube]
|
|
31
|
+
* @typedef ContactInfo
|
|
32
|
+
* @property {Support} [support]
|
|
50
33
|
*/
|
|
51
34
|
|
|
52
35
|
/**
|
|
53
36
|
* @typedef ExtensionUsingSlug
|
|
54
|
-
* @property {string} [_id]
|
|
55
37
|
* @property {CategoryCommon} [category]
|
|
56
38
|
* @property {ContactInfo} [contact_info]
|
|
57
39
|
* @property {string} [created_at]
|
|
@@ -69,14 +51,7 @@ const Joi = require("joi");
|
|
|
69
51
|
* @property {string} [review_instructions]
|
|
70
52
|
* @property {string[]} [scope]
|
|
71
53
|
* @property {string} [slug]
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @typedef ListingInfo
|
|
76
|
-
* @property {string} [icon]
|
|
77
|
-
* @property {string[]} [keywords]
|
|
78
|
-
* @property {string} [name]
|
|
79
|
-
* @property {string} [tagline]
|
|
54
|
+
* @property {string} [_id]
|
|
80
55
|
*/
|
|
81
56
|
|
|
82
57
|
/**
|
|
@@ -86,27 +61,17 @@ const Joi = require("joi");
|
|
|
86
61
|
*/
|
|
87
62
|
|
|
88
63
|
/**
|
|
89
|
-
* @typedef
|
|
90
|
-
* @property {string} [
|
|
91
|
-
* @property {string} [
|
|
64
|
+
* @typedef ListingInfo
|
|
65
|
+
* @property {string} [icon]
|
|
66
|
+
* @property {string[]} [keywords]
|
|
92
67
|
* @property {string} [name]
|
|
93
|
-
* @property {
|
|
94
|
-
* @property {Recurring} [recurring]
|
|
95
|
-
* @property {number} [trial_days]
|
|
96
|
-
* @property {string} [type]
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @typedef Price
|
|
101
|
-
* @property {number} [amount]
|
|
102
|
-
* @property {string} [currency]
|
|
68
|
+
* @property {string} [tagline]
|
|
103
69
|
*/
|
|
104
70
|
|
|
105
71
|
/**
|
|
106
|
-
* @typedef
|
|
107
|
-
* @property {
|
|
108
|
-
* @property {string} [
|
|
109
|
-
* @property {number} [yearly_amount]
|
|
72
|
+
* @typedef Benefits
|
|
73
|
+
* @property {string} [title]
|
|
74
|
+
* @property {string} [description]
|
|
110
75
|
*/
|
|
111
76
|
|
|
112
77
|
/**
|
|
@@ -115,6 +80,17 @@ const Joi = require("joi");
|
|
|
115
80
|
* @property {string[]} [mobile]
|
|
116
81
|
*/
|
|
117
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @typedef Details
|
|
85
|
+
* @property {Benefits[]} [benefits]
|
|
86
|
+
* @property {string} [demo_url]
|
|
87
|
+
* @property {string} [description]
|
|
88
|
+
* @property {string[]} [integration]
|
|
89
|
+
* @property {Object[]} [video_url]
|
|
90
|
+
* @property {string[]} [youtube]
|
|
91
|
+
* @property {Screenshots} [screenshots]
|
|
92
|
+
*/
|
|
93
|
+
|
|
118
94
|
/**
|
|
119
95
|
* @typedef Support
|
|
120
96
|
* @property {string} [email]
|
|
@@ -124,72 +100,74 @@ const Joi = require("joi");
|
|
|
124
100
|
* @property {string} [website_url]
|
|
125
101
|
*/
|
|
126
102
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
title: Joi.string().allow(""),
|
|
133
|
-
});
|
|
134
|
-
}
|
|
103
|
+
/**
|
|
104
|
+
* @typedef Price
|
|
105
|
+
* @property {number} [amount]
|
|
106
|
+
* @property {string} [currency]
|
|
107
|
+
*/
|
|
135
108
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
109
|
+
/**
|
|
110
|
+
* @typedef Plans
|
|
111
|
+
* @property {string} [additional_charges]
|
|
112
|
+
* @property {string} [features]
|
|
113
|
+
* @property {string} [name]
|
|
114
|
+
* @property {number} [trial_days]
|
|
115
|
+
* @property {string} [type]
|
|
116
|
+
* @property {Price} [price]
|
|
117
|
+
* @property {Recurring} [recurring]
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @typedef Recurring
|
|
122
|
+
* @property {number} [recurring_time]
|
|
123
|
+
* @property {number} [yearly_amount]
|
|
124
|
+
* @property {string} [type]
|
|
125
|
+
*/
|
|
143
126
|
|
|
127
|
+
class PartnerPublicModel {
|
|
144
128
|
/** @returns {CategoryL1} */
|
|
145
129
|
static CategoryL1() {
|
|
146
130
|
return Joi.object({
|
|
147
|
-
_id: Joi.string().allow(""),
|
|
148
131
|
description: Joi.string().allow(""),
|
|
149
132
|
display: Joi.string().allow(""),
|
|
150
133
|
level: Joi.number(),
|
|
151
134
|
logo: Joi.string().allow(""),
|
|
152
135
|
slug: Joi.string().allow(""),
|
|
153
136
|
value: Joi.string().allow(""),
|
|
137
|
+
_id: Joi.string().allow(""),
|
|
154
138
|
});
|
|
155
139
|
}
|
|
156
140
|
|
|
157
141
|
/** @returns {CategoryL2} */
|
|
158
142
|
static CategoryL2() {
|
|
159
143
|
return Joi.object({
|
|
160
|
-
|
|
144
|
+
parent: Joi.string().allow(""),
|
|
161
145
|
display: Joi.string().allow(""),
|
|
162
146
|
level: Joi.number(),
|
|
163
|
-
parent: Joi.string().allow(""),
|
|
164
147
|
slug: Joi.string().allow(""),
|
|
165
148
|
value: Joi.string().allow(""),
|
|
149
|
+
_id: Joi.string().allow(""),
|
|
166
150
|
});
|
|
167
151
|
}
|
|
168
152
|
|
|
169
|
-
/** @returns {
|
|
170
|
-
static
|
|
153
|
+
/** @returns {CategoryCommon} */
|
|
154
|
+
static CategoryCommon() {
|
|
171
155
|
return Joi.object({
|
|
172
|
-
|
|
156
|
+
category_l1: Joi.array().items(PartnerPublicModel.CategoryL1()),
|
|
157
|
+
category_l2: Joi.array().items(PartnerPublicModel.CategoryL2()),
|
|
173
158
|
});
|
|
174
159
|
}
|
|
175
160
|
|
|
176
|
-
/** @returns {
|
|
177
|
-
static
|
|
161
|
+
/** @returns {ContactInfo} */
|
|
162
|
+
static ContactInfo() {
|
|
178
163
|
return Joi.object({
|
|
179
|
-
|
|
180
|
-
demo_url: Joi.string().allow(""),
|
|
181
|
-
description: Joi.string().allow(""),
|
|
182
|
-
integration: Joi.array().items(Joi.string().allow("")),
|
|
183
|
-
screenshots: PartnerPublicModel.Screenshots(),
|
|
184
|
-
video_url: Joi.array().items(Joi.any()),
|
|
185
|
-
youtube: Joi.array().items(Joi.string().allow("")),
|
|
164
|
+
support: PartnerPublicModel.Support(),
|
|
186
165
|
});
|
|
187
166
|
}
|
|
188
167
|
|
|
189
168
|
/** @returns {ExtensionUsingSlug} */
|
|
190
169
|
static ExtensionUsingSlug() {
|
|
191
170
|
return Joi.object({
|
|
192
|
-
_id: Joi.string().allow(""),
|
|
193
171
|
category: PartnerPublicModel.CategoryCommon(),
|
|
194
172
|
contact_info: PartnerPublicModel.ContactInfo(),
|
|
195
173
|
created_at: Joi.string().allow(""),
|
|
@@ -207,16 +185,7 @@ class PartnerPublicModel {
|
|
|
207
185
|
review_instructions: Joi.string().allow(""),
|
|
208
186
|
scope: Joi.array().items(Joi.string().allow("")),
|
|
209
187
|
slug: Joi.string().allow(""),
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/** @returns {ListingInfo} */
|
|
214
|
-
static ListingInfo() {
|
|
215
|
-
return Joi.object({
|
|
216
|
-
icon: Joi.string().allow(""),
|
|
217
|
-
keywords: Joi.array().items(Joi.string().allow("")),
|
|
218
|
-
name: Joi.string().allow(""),
|
|
219
|
-
tagline: Joi.string().allow(""),
|
|
188
|
+
_id: Joi.string().allow(""),
|
|
220
189
|
});
|
|
221
190
|
}
|
|
222
191
|
|
|
@@ -228,33 +197,21 @@ class PartnerPublicModel {
|
|
|
228
197
|
});
|
|
229
198
|
}
|
|
230
199
|
|
|
231
|
-
/** @returns {
|
|
232
|
-
static
|
|
200
|
+
/** @returns {ListingInfo} */
|
|
201
|
+
static ListingInfo() {
|
|
233
202
|
return Joi.object({
|
|
234
|
-
|
|
235
|
-
|
|
203
|
+
icon: Joi.string().allow(""),
|
|
204
|
+
keywords: Joi.array().items(Joi.string().allow("")),
|
|
236
205
|
name: Joi.string().allow(""),
|
|
237
|
-
|
|
238
|
-
recurring: PartnerPublicModel.Recurring(),
|
|
239
|
-
trial_days: Joi.number(),
|
|
240
|
-
type: Joi.string().allow(""),
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/** @returns {Price} */
|
|
245
|
-
static Price() {
|
|
246
|
-
return Joi.object({
|
|
247
|
-
amount: Joi.number(),
|
|
248
|
-
currency: Joi.string().allow(""),
|
|
206
|
+
tagline: Joi.string().allow(""),
|
|
249
207
|
});
|
|
250
208
|
}
|
|
251
209
|
|
|
252
|
-
/** @returns {
|
|
253
|
-
static
|
|
210
|
+
/** @returns {Benefits} */
|
|
211
|
+
static Benefits() {
|
|
254
212
|
return Joi.object({
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
yearly_amount: Joi.number(),
|
|
213
|
+
title: Joi.string().allow(""),
|
|
214
|
+
description: Joi.string().allow(""),
|
|
258
215
|
});
|
|
259
216
|
}
|
|
260
217
|
|
|
@@ -266,6 +223,19 @@ class PartnerPublicModel {
|
|
|
266
223
|
});
|
|
267
224
|
}
|
|
268
225
|
|
|
226
|
+
/** @returns {Details} */
|
|
227
|
+
static Details() {
|
|
228
|
+
return Joi.object({
|
|
229
|
+
benefits: Joi.array().items(PartnerPublicModel.Benefits()),
|
|
230
|
+
demo_url: Joi.string().allow(""),
|
|
231
|
+
description: Joi.string().allow(""),
|
|
232
|
+
integration: Joi.array().items(Joi.string().allow("")),
|
|
233
|
+
video_url: Joi.array().items(Joi.any()),
|
|
234
|
+
youtube: Joi.array().items(Joi.string().allow("")),
|
|
235
|
+
screenshots: PartnerPublicModel.Screenshots(),
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
269
239
|
/** @returns {Support} */
|
|
270
240
|
static Support() {
|
|
271
241
|
return Joi.object({
|
|
@@ -276,5 +246,35 @@ class PartnerPublicModel {
|
|
|
276
246
|
website_url: Joi.string().allow(""),
|
|
277
247
|
});
|
|
278
248
|
}
|
|
249
|
+
|
|
250
|
+
/** @returns {Price} */
|
|
251
|
+
static Price() {
|
|
252
|
+
return Joi.object({
|
|
253
|
+
amount: Joi.number(),
|
|
254
|
+
currency: Joi.string().allow(""),
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** @returns {Plans} */
|
|
259
|
+
static Plans() {
|
|
260
|
+
return Joi.object({
|
|
261
|
+
additional_charges: Joi.string().allow(""),
|
|
262
|
+
features: Joi.string().allow(""),
|
|
263
|
+
name: Joi.string().allow(""),
|
|
264
|
+
trial_days: Joi.number(),
|
|
265
|
+
type: Joi.string().allow(""),
|
|
266
|
+
price: PartnerPublicModel.Price(),
|
|
267
|
+
recurring: PartnerPublicModel.Recurring(),
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** @returns {Recurring} */
|
|
272
|
+
static Recurring() {
|
|
273
|
+
return Joi.object({
|
|
274
|
+
recurring_time: Joi.number(),
|
|
275
|
+
yearly_amount: Joi.number(),
|
|
276
|
+
type: Joi.string().allow(""),
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
279
|
}
|
|
280
280
|
module.exports = PartnerPublicModel;
|