@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,127 +1,127 @@
|
|
|
1
1
|
export = FileStoragePartnerModel;
|
|
2
2
|
/**
|
|
3
3
|
* @typedef CDN
|
|
4
|
+
* @property {string} url
|
|
4
5
|
* @property {string} absolute_url
|
|
5
6
|
* @property {string} relative_url
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef Upload
|
|
10
|
+
* @property {number} expiry
|
|
6
11
|
* @property {string} url
|
|
7
12
|
*/
|
|
8
13
|
/**
|
|
9
|
-
* @typedef
|
|
10
|
-
* @property {string} _id
|
|
11
|
-
* @property {CDN} cdn
|
|
12
|
-
* @property {string} content_type
|
|
13
|
-
* @property {CreatedBy} [created_by]
|
|
14
|
-
* @property {string} created_on
|
|
14
|
+
* @typedef StartResponse
|
|
15
15
|
* @property {string} file_name
|
|
16
16
|
* @property {string} file_path
|
|
17
|
-
* @property {string}
|
|
17
|
+
* @property {string} content_type
|
|
18
|
+
* @property {string} [method]
|
|
18
19
|
* @property {string} namespace
|
|
19
20
|
* @property {string} operation
|
|
20
21
|
* @property {number} size
|
|
21
|
-
* @property {boolean} success
|
|
22
|
-
* @property {string[]} [tags]
|
|
23
22
|
* @property {Upload} upload
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* @typedef CreatedBy
|
|
27
|
-
* @property {string} [username]
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* @typedef FailedResponse
|
|
31
|
-
* @property {string} message
|
|
23
|
+
* @property {CDN} cdn
|
|
24
|
+
* @property {string[]} [tags]
|
|
32
25
|
*/
|
|
33
26
|
/**
|
|
34
27
|
* @typedef StartRequest
|
|
35
|
-
* @property {string} content_type
|
|
36
28
|
* @property {string} file_name
|
|
37
|
-
* @property {
|
|
29
|
+
* @property {string} content_type
|
|
38
30
|
* @property {number} size
|
|
39
31
|
* @property {string[]} [tags]
|
|
32
|
+
* @property {Object} [params]
|
|
40
33
|
*/
|
|
41
34
|
/**
|
|
42
|
-
* @typedef
|
|
43
|
-
* @property {
|
|
44
|
-
|
|
35
|
+
* @typedef CreatedBy
|
|
36
|
+
* @property {string} [username]
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* @typedef CompleteResponse
|
|
40
|
+
* @property {string} _id
|
|
45
41
|
* @property {string} file_name
|
|
46
42
|
* @property {string} file_path
|
|
47
|
-
* @property {string}
|
|
43
|
+
* @property {string} content_type
|
|
48
44
|
* @property {string} namespace
|
|
49
45
|
* @property {string} operation
|
|
50
46
|
* @property {number} size
|
|
51
|
-
* @property {string[]} [tags]
|
|
52
47
|
* @property {Upload} upload
|
|
48
|
+
* @property {CDN} cdn
|
|
49
|
+
* @property {boolean} success
|
|
50
|
+
* @property {string[]} [tags]
|
|
51
|
+
* @property {string} created_on
|
|
52
|
+
* @property {string} modified_on
|
|
53
|
+
* @property {CreatedBy} [created_by]
|
|
53
54
|
*/
|
|
54
55
|
/**
|
|
55
|
-
* @typedef
|
|
56
|
-
* @property {
|
|
57
|
-
* @property {string} url
|
|
56
|
+
* @typedef FailedResponse
|
|
57
|
+
* @property {string} message
|
|
58
58
|
*/
|
|
59
59
|
declare class FileStoragePartnerModel {
|
|
60
60
|
}
|
|
61
61
|
declare namespace FileStoragePartnerModel {
|
|
62
|
-
export { CDN,
|
|
62
|
+
export { CDN, Upload, StartResponse, StartRequest, CreatedBy, CompleteResponse, FailedResponse };
|
|
63
63
|
}
|
|
64
64
|
/** @returns {CDN} */
|
|
65
65
|
declare function CDN(): CDN;
|
|
66
66
|
type CDN = {
|
|
67
|
+
url: string;
|
|
67
68
|
absolute_url: string;
|
|
68
69
|
relative_url: string;
|
|
70
|
+
};
|
|
71
|
+
/** @returns {Upload} */
|
|
72
|
+
declare function Upload(): Upload;
|
|
73
|
+
type Upload = {
|
|
74
|
+
expiry: number;
|
|
69
75
|
url: string;
|
|
70
76
|
};
|
|
71
|
-
/** @returns {
|
|
72
|
-
declare function
|
|
73
|
-
type
|
|
74
|
-
_id: string;
|
|
75
|
-
cdn: CDN;
|
|
76
|
-
content_type: string;
|
|
77
|
-
created_by?: CreatedBy;
|
|
78
|
-
created_on: string;
|
|
77
|
+
/** @returns {StartResponse} */
|
|
78
|
+
declare function StartResponse(): StartResponse;
|
|
79
|
+
type StartResponse = {
|
|
79
80
|
file_name: string;
|
|
80
81
|
file_path: string;
|
|
81
|
-
|
|
82
|
+
content_type: string;
|
|
83
|
+
method?: string;
|
|
82
84
|
namespace: string;
|
|
83
85
|
operation: string;
|
|
84
86
|
size: number;
|
|
85
|
-
success: boolean;
|
|
86
|
-
tags?: string[];
|
|
87
87
|
upload: Upload;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
declare function CreatedBy(): CreatedBy;
|
|
91
|
-
type CreatedBy = {
|
|
92
|
-
username?: string;
|
|
93
|
-
};
|
|
94
|
-
/** @returns {FailedResponse} */
|
|
95
|
-
declare function FailedResponse(): FailedResponse;
|
|
96
|
-
type FailedResponse = {
|
|
97
|
-
message: string;
|
|
88
|
+
cdn: CDN;
|
|
89
|
+
tags?: string[];
|
|
98
90
|
};
|
|
99
91
|
/** @returns {StartRequest} */
|
|
100
92
|
declare function StartRequest(): StartRequest;
|
|
101
93
|
type StartRequest = {
|
|
102
|
-
content_type: string;
|
|
103
94
|
file_name: string;
|
|
104
|
-
|
|
95
|
+
content_type: string;
|
|
105
96
|
size: number;
|
|
106
97
|
tags?: string[];
|
|
98
|
+
params?: any;
|
|
107
99
|
};
|
|
108
|
-
/** @returns {
|
|
109
|
-
declare function
|
|
110
|
-
type
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
/** @returns {CreatedBy} */
|
|
101
|
+
declare function CreatedBy(): CreatedBy;
|
|
102
|
+
type CreatedBy = {
|
|
103
|
+
username?: string;
|
|
104
|
+
};
|
|
105
|
+
/** @returns {CompleteResponse} */
|
|
106
|
+
declare function CompleteResponse(): CompleteResponse;
|
|
107
|
+
type CompleteResponse = {
|
|
108
|
+
_id: string;
|
|
113
109
|
file_name: string;
|
|
114
110
|
file_path: string;
|
|
115
|
-
|
|
111
|
+
content_type: string;
|
|
116
112
|
namespace: string;
|
|
117
113
|
operation: string;
|
|
118
114
|
size: number;
|
|
119
|
-
tags?: string[];
|
|
120
115
|
upload: Upload;
|
|
116
|
+
cdn: CDN;
|
|
117
|
+
success: boolean;
|
|
118
|
+
tags?: string[];
|
|
119
|
+
created_on: string;
|
|
120
|
+
modified_on: string;
|
|
121
|
+
created_by?: CreatedBy;
|
|
121
122
|
};
|
|
122
|
-
/** @returns {
|
|
123
|
-
declare function
|
|
124
|
-
type
|
|
125
|
-
|
|
126
|
-
url: string;
|
|
123
|
+
/** @returns {FailedResponse} */
|
|
124
|
+
declare function FailedResponse(): FailedResponse;
|
|
125
|
+
type FailedResponse = {
|
|
126
|
+
message: string;
|
|
127
127
|
};
|
|
@@ -2,144 +2,144 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef CDN
|
|
5
|
+
* @property {string} url
|
|
5
6
|
* @property {string} absolute_url
|
|
6
7
|
* @property {string} relative_url
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef Upload
|
|
12
|
+
* @property {number} expiry
|
|
7
13
|
* @property {string} url
|
|
8
14
|
*/
|
|
9
15
|
|
|
10
16
|
/**
|
|
11
|
-
* @typedef
|
|
12
|
-
* @property {string} _id
|
|
13
|
-
* @property {CDN} cdn
|
|
14
|
-
* @property {string} content_type
|
|
15
|
-
* @property {CreatedBy} [created_by]
|
|
16
|
-
* @property {string} created_on
|
|
17
|
+
* @typedef StartResponse
|
|
17
18
|
* @property {string} file_name
|
|
18
19
|
* @property {string} file_path
|
|
19
|
-
* @property {string}
|
|
20
|
+
* @property {string} content_type
|
|
21
|
+
* @property {string} [method]
|
|
20
22
|
* @property {string} namespace
|
|
21
23
|
* @property {string} operation
|
|
22
24
|
* @property {number} size
|
|
23
|
-
* @property {boolean} success
|
|
24
|
-
* @property {string[]} [tags]
|
|
25
25
|
* @property {Upload} upload
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @typedef CreatedBy
|
|
30
|
-
* @property {string} [username]
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @typedef FailedResponse
|
|
35
|
-
* @property {string} message
|
|
26
|
+
* @property {CDN} cdn
|
|
27
|
+
* @property {string[]} [tags]
|
|
36
28
|
*/
|
|
37
29
|
|
|
38
30
|
/**
|
|
39
31
|
* @typedef StartRequest
|
|
40
|
-
* @property {string} content_type
|
|
41
32
|
* @property {string} file_name
|
|
42
|
-
* @property {
|
|
33
|
+
* @property {string} content_type
|
|
43
34
|
* @property {number} size
|
|
44
35
|
* @property {string[]} [tags]
|
|
36
|
+
* @property {Object} [params]
|
|
45
37
|
*/
|
|
46
38
|
|
|
47
39
|
/**
|
|
48
|
-
* @typedef
|
|
49
|
-
* @property {
|
|
50
|
-
|
|
40
|
+
* @typedef CreatedBy
|
|
41
|
+
* @property {string} [username]
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @typedef CompleteResponse
|
|
46
|
+
* @property {string} _id
|
|
51
47
|
* @property {string} file_name
|
|
52
48
|
* @property {string} file_path
|
|
53
|
-
* @property {string}
|
|
49
|
+
* @property {string} content_type
|
|
54
50
|
* @property {string} namespace
|
|
55
51
|
* @property {string} operation
|
|
56
52
|
* @property {number} size
|
|
57
|
-
* @property {string[]} [tags]
|
|
58
53
|
* @property {Upload} upload
|
|
54
|
+
* @property {CDN} cdn
|
|
55
|
+
* @property {boolean} success
|
|
56
|
+
* @property {string[]} [tags]
|
|
57
|
+
* @property {string} created_on
|
|
58
|
+
* @property {string} modified_on
|
|
59
|
+
* @property {CreatedBy} [created_by]
|
|
59
60
|
*/
|
|
60
61
|
|
|
61
62
|
/**
|
|
62
|
-
* @typedef
|
|
63
|
-
* @property {
|
|
64
|
-
* @property {string} url
|
|
63
|
+
* @typedef FailedResponse
|
|
64
|
+
* @property {string} message
|
|
65
65
|
*/
|
|
66
66
|
|
|
67
67
|
class FileStoragePartnerModel {
|
|
68
68
|
/** @returns {CDN} */
|
|
69
69
|
static CDN() {
|
|
70
70
|
return Joi.object({
|
|
71
|
+
url: Joi.string().allow("").required(),
|
|
71
72
|
absolute_url: Joi.string().allow("").required(),
|
|
72
73
|
relative_url: Joi.string().allow("").required(),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** @returns {Upload} */
|
|
78
|
+
static Upload() {
|
|
79
|
+
return Joi.object({
|
|
80
|
+
expiry: Joi.number().required(),
|
|
73
81
|
url: Joi.string().allow("").required(),
|
|
74
82
|
});
|
|
75
83
|
}
|
|
76
84
|
|
|
77
|
-
/** @returns {
|
|
78
|
-
static
|
|
85
|
+
/** @returns {StartResponse} */
|
|
86
|
+
static StartResponse() {
|
|
79
87
|
return Joi.object({
|
|
80
|
-
_id: Joi.string().allow("").required(),
|
|
81
|
-
cdn: FileStoragePartnerModel.CDN().required(),
|
|
82
|
-
content_type: Joi.string().allow("").required(),
|
|
83
|
-
created_by: FileStoragePartnerModel.CreatedBy(),
|
|
84
|
-
created_on: Joi.string().allow("").required(),
|
|
85
88
|
file_name: Joi.string().allow("").required(),
|
|
86
89
|
file_path: Joi.string().allow("").required(),
|
|
87
|
-
|
|
90
|
+
content_type: Joi.string().allow("").required(),
|
|
91
|
+
method: Joi.string().allow(""),
|
|
88
92
|
namespace: Joi.string().allow("").required(),
|
|
89
93
|
operation: Joi.string().allow("").required(),
|
|
90
94
|
size: Joi.number().required(),
|
|
91
|
-
success: Joi.boolean().required(),
|
|
92
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
93
95
|
upload: FileStoragePartnerModel.Upload().required(),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/** @returns {CreatedBy} */
|
|
98
|
-
static CreatedBy() {
|
|
99
|
-
return Joi.object({
|
|
100
|
-
username: Joi.string().allow(""),
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/** @returns {FailedResponse} */
|
|
105
|
-
static FailedResponse() {
|
|
106
|
-
return Joi.object({
|
|
107
|
-
message: Joi.string().allow("").required(),
|
|
96
|
+
cdn: FileStoragePartnerModel.CDN().required(),
|
|
97
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
108
98
|
});
|
|
109
99
|
}
|
|
110
100
|
|
|
111
101
|
/** @returns {StartRequest} */
|
|
112
102
|
static StartRequest() {
|
|
113
103
|
return Joi.object({
|
|
114
|
-
content_type: Joi.string().allow("").required(),
|
|
115
104
|
file_name: Joi.string().allow("").required(),
|
|
116
|
-
|
|
105
|
+
content_type: Joi.string().allow("").required(),
|
|
117
106
|
size: Joi.number().required(),
|
|
118
107
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
108
|
+
params: Joi.object().pattern(/\S/, Joi.any()),
|
|
119
109
|
});
|
|
120
110
|
}
|
|
121
111
|
|
|
122
|
-
/** @returns {
|
|
123
|
-
static
|
|
112
|
+
/** @returns {CreatedBy} */
|
|
113
|
+
static CreatedBy() {
|
|
124
114
|
return Joi.object({
|
|
125
|
-
|
|
126
|
-
|
|
115
|
+
username: Joi.string().allow(""),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** @returns {CompleteResponse} */
|
|
120
|
+
static CompleteResponse() {
|
|
121
|
+
return Joi.object({
|
|
122
|
+
_id: Joi.string().allow("").required(),
|
|
127
123
|
file_name: Joi.string().allow("").required(),
|
|
128
124
|
file_path: Joi.string().allow("").required(),
|
|
129
|
-
|
|
125
|
+
content_type: Joi.string().allow("").required(),
|
|
130
126
|
namespace: Joi.string().allow("").required(),
|
|
131
127
|
operation: Joi.string().allow("").required(),
|
|
132
128
|
size: Joi.number().required(),
|
|
133
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
134
129
|
upload: FileStoragePartnerModel.Upload().required(),
|
|
130
|
+
cdn: FileStoragePartnerModel.CDN().required(),
|
|
131
|
+
success: Joi.boolean().required(),
|
|
132
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
133
|
+
created_on: Joi.string().allow("").required(),
|
|
134
|
+
modified_on: Joi.string().allow("").required(),
|
|
135
|
+
created_by: FileStoragePartnerModel.CreatedBy(),
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
138
|
|
|
138
|
-
/** @returns {
|
|
139
|
-
static
|
|
139
|
+
/** @returns {FailedResponse} */
|
|
140
|
+
static FailedResponse() {
|
|
140
141
|
return Joi.object({
|
|
141
|
-
|
|
142
|
-
url: Joi.string().allow("").required(),
|
|
142
|
+
message: Joi.string().allow("").required(),
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
}
|