@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.1.0-beta.1
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/CartApplicationClient.d.ts +14 -14
- package/sdk/application/Cart/CartApplicationClient.js +14 -14
- package/sdk/application/Content/ContentApplicationClient.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationClient.js +53 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +136 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +46 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +41 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +6 -397
- package/sdk/platform/Billing/BillingPlatformClient.js +77 -3215
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +417 -3811
- package/sdk/platform/Billing/BillingPlatformModel.js +292 -2544
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +12 -451
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -483
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -34
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +34 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +363 -29
- package/sdk/platform/Cart/CartPlatformModel.js +203 -31
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +220 -200
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +121 -91
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +58 -46
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +10 -51
- package/sdk/platform/Catalog/CatalogPlatformClient.js +79 -400
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +22 -228
- package/sdk/platform/Catalog/CatalogPlatformModel.js +12 -163
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -61
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -65
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +4 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +10 -14
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +94 -30
- package/sdk/platform/Communication/CommunicationPlatformModel.js +110 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +33 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +62 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +11 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +5 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +12 -2
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +12 -10
- package/sdk/platform/Content/ContentPlatformModel.d.ts +42 -12
- package/sdk/platform/Content/ContentPlatformModel.js +43 -13
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
- package/sdk/platform/Order/OrderPlatformClient.d.ts +21 -21
- package/sdk/platform/Order/OrderPlatformClient.js +21 -21
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1010 -80
- package/sdk/platform/Order/OrderPlatformModel.js +665 -70
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +31 -4
- package/sdk/platform/Payment/PaymentPlatformModel.js +11 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +8 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +24 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +194 -23
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +116 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +23 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +16 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +10 -12
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +45 -49
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +12 -12
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -26,7 +26,7 @@ declare class FileStorage {
|
|
|
26
26
|
* @param {FileStoragePartnerValidator.CompleteUploadParam} arg - Arg object.
|
|
27
27
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
28
28
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
29
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
29
|
+
* @returns {Promise<FileStoragePartnerModel.FileUploadComplete>} - Success response
|
|
30
30
|
* @name completeUpload
|
|
31
31
|
* @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
|
|
32
32
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
@@ -49,12 +49,12 @@ declare class FileStorage {
|
|
|
49
49
|
* This operation will return the url for the uploaded file.
|
|
50
50
|
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/completeUpload/).
|
|
51
51
|
*/
|
|
52
|
-
completeUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.CompleteUploadParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.
|
|
52
|
+
completeUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.CompleteUploadParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.FileUploadComplete>;
|
|
53
53
|
/**
|
|
54
54
|
* @param {FileStoragePartnerValidator.StartUploadParam} arg - Arg object.
|
|
55
55
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
56
56
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
57
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
57
|
+
* @returns {Promise<FileStoragePartnerModel.FileUpload>} - Success response
|
|
58
58
|
* @name startUpload
|
|
59
59
|
* @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
|
|
60
60
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
@@ -77,7 +77,7 @@ declare class FileStorage {
|
|
|
77
77
|
* This operation will return the url for the uploaded file.
|
|
78
78
|
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/startUpload/).
|
|
79
79
|
*/
|
|
80
|
-
startUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.StartUploadParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.
|
|
80
|
+
startUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.StartUploadParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.FileUpload>;
|
|
81
81
|
/**
|
|
82
82
|
* @param {FileStoragePartnerValidator.BrowseParam} arg - Arg object.
|
|
83
83
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -104,43 +104,43 @@ declare class FileStorage {
|
|
|
104
104
|
*
|
|
105
105
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
106
106
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
107
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
107
|
+
* @returns {Promise<FileStoragePartnerModel.FetchProxyDetails>} - Success response
|
|
108
108
|
* @name organizationLevelFetchProxy
|
|
109
109
|
* @summary: Proxy
|
|
110
110
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/organizationLevelFetchProxy/).
|
|
111
111
|
*/
|
|
112
|
-
organizationLevelFetchProxy({ applicationId, companyId, url, requestHeaders }?: FileStoragePartnerValidator.OrganizationLevelFetchProxyParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.
|
|
112
|
+
organizationLevelFetchProxy({ applicationId, companyId, url, requestHeaders }?: FileStoragePartnerValidator.OrganizationLevelFetchProxyParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.FetchProxyDetails>;
|
|
113
113
|
/**
|
|
114
114
|
* @param {FileStoragePartnerValidator.SaveOrganizationLevelProxyParam} arg
|
|
115
115
|
* - Arg object.
|
|
116
116
|
*
|
|
117
117
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
118
118
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
119
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
119
|
+
* @returns {Promise<FileStoragePartnerModel.SaveProxy>} - Success response
|
|
120
120
|
* @name saveOrganizationLevelProxy
|
|
121
121
|
* @summary: Proxy
|
|
122
122
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveOrganizationLevelProxy/).
|
|
123
123
|
*/
|
|
124
|
-
saveOrganizationLevelProxy({ applicationId, companyId, body, requestHeaders }?: FileStoragePartnerValidator.SaveOrganizationLevelProxyParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.
|
|
124
|
+
saveOrganizationLevelProxy({ applicationId, companyId, body, requestHeaders }?: FileStoragePartnerValidator.SaveOrganizationLevelProxyParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.SaveProxy>;
|
|
125
125
|
/**
|
|
126
126
|
* @param {FileStoragePartnerValidator.FetchProxyParam} arg - Arg object.
|
|
127
127
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
128
128
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
129
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
129
|
+
* @returns {Promise<FileStoragePartnerModel.FetchProxyDetails>} - Success response
|
|
130
130
|
* @name fetchProxy
|
|
131
131
|
* @summary: Proxy
|
|
132
132
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/fetchProxy/).
|
|
133
133
|
*/
|
|
134
|
-
fetchProxy({ url, requestHeaders }?: FileStoragePartnerValidator.FetchProxyParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.
|
|
134
|
+
fetchProxy({ url, requestHeaders }?: FileStoragePartnerValidator.FetchProxyParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.FetchProxyDetails>;
|
|
135
135
|
/**
|
|
136
136
|
* @param {FileStoragePartnerValidator.SaveProxyDetailsParam} arg - Arg object.
|
|
137
137
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
138
138
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
139
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
139
|
+
* @returns {Promise<FileStoragePartnerModel.SaveProxy>} - Success response
|
|
140
140
|
* @name saveProxyDetails
|
|
141
141
|
* @summary: Proxy
|
|
142
142
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveProxyDetails/).
|
|
143
143
|
*/
|
|
144
|
-
saveProxyDetails({ body, requestHeaders }?: FileStoragePartnerValidator.SaveProxyDetailsParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.
|
|
144
|
+
saveProxyDetails({ body, requestHeaders }?: FileStoragePartnerValidator.SaveProxyDetailsParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.SaveProxy>;
|
|
145
145
|
}
|
|
146
146
|
import FileStoragePartnerModel = require("./FileStoragePartnerModel");
|
|
@@ -168,7 +168,7 @@ class FileStorage {
|
|
|
168
168
|
* @param {FileStoragePartnerValidator.CompleteUploadParam} arg - Arg object.
|
|
169
169
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
170
170
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
171
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
171
|
+
* @returns {Promise<FileStoragePartnerModel.FileUploadComplete>} - Success response
|
|
172
172
|
* @name completeUpload
|
|
173
173
|
* @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
|
|
174
174
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
@@ -243,7 +243,7 @@ class FileStorage {
|
|
|
243
243
|
|
|
244
244
|
const {
|
|
245
245
|
error: res_error,
|
|
246
|
-
} = FileStoragePartnerModel.
|
|
246
|
+
} = FileStoragePartnerModel.FileUploadComplete().validate(responseData, {
|
|
247
247
|
abortEarly: false,
|
|
248
248
|
allowUnknown: true,
|
|
249
249
|
});
|
|
@@ -266,7 +266,7 @@ class FileStorage {
|
|
|
266
266
|
* @param {FileStoragePartnerValidator.StartUploadParam} arg - Arg object.
|
|
267
267
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
268
268
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
269
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
269
|
+
* @returns {Promise<FileStoragePartnerModel.FileUpload>} - Success response
|
|
270
270
|
* @name startUpload
|
|
271
271
|
* @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
|
|
272
272
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
@@ -341,7 +341,7 @@ class FileStorage {
|
|
|
341
341
|
|
|
342
342
|
const {
|
|
343
343
|
error: res_error,
|
|
344
|
-
} = FileStoragePartnerModel.
|
|
344
|
+
} = FileStoragePartnerModel.FileUpload().validate(responseData, {
|
|
345
345
|
abortEarly: false,
|
|
346
346
|
allowUnknown: true,
|
|
347
347
|
});
|
|
@@ -534,7 +534,7 @@ class FileStorage {
|
|
|
534
534
|
*
|
|
535
535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
536
536
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
537
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
537
|
+
* @returns {Promise<FileStoragePartnerModel.FetchProxyDetails>} - Success response
|
|
538
538
|
* @name organizationLevelFetchProxy
|
|
539
539
|
* @summary: Proxy
|
|
540
540
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/organizationLevelFetchProxy/).
|
|
@@ -595,7 +595,7 @@ class FileStorage {
|
|
|
595
595
|
|
|
596
596
|
const {
|
|
597
597
|
error: res_error,
|
|
598
|
-
} = FileStoragePartnerModel.
|
|
598
|
+
} = FileStoragePartnerModel.FetchProxyDetails().validate(responseData, {
|
|
599
599
|
abortEarly: false,
|
|
600
600
|
allowUnknown: true,
|
|
601
601
|
});
|
|
@@ -620,7 +620,7 @@ class FileStorage {
|
|
|
620
620
|
*
|
|
621
621
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
622
622
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
623
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
623
|
+
* @returns {Promise<FileStoragePartnerModel.SaveProxy>} - Success response
|
|
624
624
|
* @name saveOrganizationLevelProxy
|
|
625
625
|
* @summary: Proxy
|
|
626
626
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveOrganizationLevelProxy/).
|
|
@@ -680,7 +680,7 @@ class FileStorage {
|
|
|
680
680
|
|
|
681
681
|
const {
|
|
682
682
|
error: res_error,
|
|
683
|
-
} = FileStoragePartnerModel.
|
|
683
|
+
} = FileStoragePartnerModel.SaveProxy().validate(responseData, {
|
|
684
684
|
abortEarly: false,
|
|
685
685
|
allowUnknown: true,
|
|
686
686
|
});
|
|
@@ -703,7 +703,7 @@ class FileStorage {
|
|
|
703
703
|
* @param {FileStoragePartnerValidator.FetchProxyParam} arg - Arg object.
|
|
704
704
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
705
705
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
706
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
706
|
+
* @returns {Promise<FileStoragePartnerModel.FetchProxyDetails>} - Success response
|
|
707
707
|
* @name fetchProxy
|
|
708
708
|
* @summary: Proxy
|
|
709
709
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/fetchProxy/).
|
|
@@ -758,7 +758,7 @@ class FileStorage {
|
|
|
758
758
|
|
|
759
759
|
const {
|
|
760
760
|
error: res_error,
|
|
761
|
-
} = FileStoragePartnerModel.
|
|
761
|
+
} = FileStoragePartnerModel.FetchProxyDetails().validate(responseData, {
|
|
762
762
|
abortEarly: false,
|
|
763
763
|
allowUnknown: true,
|
|
764
764
|
});
|
|
@@ -781,7 +781,7 @@ class FileStorage {
|
|
|
781
781
|
* @param {FileStoragePartnerValidator.SaveProxyDetailsParam} arg - Arg object.
|
|
782
782
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
783
783
|
* @param {import("../PartnerAPIClient").Options} - Options
|
|
784
|
-
* @returns {Promise<FileStoragePartnerModel.
|
|
784
|
+
* @returns {Promise<FileStoragePartnerModel.SaveProxy>} - Success response
|
|
785
785
|
* @name saveProxyDetails
|
|
786
786
|
* @summary: Proxy
|
|
787
787
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveProxyDetails/).
|
|
@@ -835,7 +835,7 @@ class FileStorage {
|
|
|
835
835
|
|
|
836
836
|
const {
|
|
837
837
|
error: res_error,
|
|
838
|
-
} = FileStoragePartnerModel.
|
|
838
|
+
} = FileStoragePartnerModel.SaveProxy().validate(responseData, {
|
|
839
839
|
abortEarly: false,
|
|
840
840
|
allowUnknown: true,
|
|
841
841
|
});
|
|
@@ -4,20 +4,26 @@ export = FileStoragePartnerModel;
|
|
|
4
4
|
* @property {number} [max] - Maximum allowed size (in bytes) for files in the namespace
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* @typedef
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {string} [
|
|
7
|
+
* @typedef SaveProxy
|
|
8
|
+
* @property {number} [id]
|
|
9
|
+
* @property {string} [token]
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @typedef ProxyFileData
|
|
13
|
+
* @property {string} [email]
|
|
14
|
+
* @property {string} [password]
|
|
10
15
|
*/
|
|
11
16
|
/**
|
|
12
|
-
* @typedef
|
|
17
|
+
* @typedef ProxyFile
|
|
13
18
|
* @property {number} [id]
|
|
14
19
|
* @property {string} [customer]
|
|
15
20
|
* @property {number} [quantity]
|
|
16
21
|
* @property {number} [price]
|
|
22
|
+
* @property {ProxyFileData} [data]
|
|
17
23
|
* @property {string} [url]
|
|
18
24
|
*/
|
|
19
25
|
/**
|
|
20
|
-
* @typedef
|
|
26
|
+
* @typedef FetchProxyDetails
|
|
21
27
|
* @property {Object} [data]
|
|
22
28
|
* @property {Object} [support]
|
|
23
29
|
*/
|
|
@@ -45,7 +51,7 @@ export = FileStoragePartnerModel;
|
|
|
45
51
|
* @property {string} url
|
|
46
52
|
*/
|
|
47
53
|
/**
|
|
48
|
-
* @typedef
|
|
54
|
+
* @typedef FileUpload
|
|
49
55
|
* @property {string} file_name
|
|
50
56
|
* @property {string} file_path
|
|
51
57
|
* @property {string} content_type
|
|
@@ -57,7 +63,7 @@ export = FileStoragePartnerModel;
|
|
|
57
63
|
* @property {string[]} [tags]
|
|
58
64
|
*/
|
|
59
65
|
/**
|
|
60
|
-
* @typedef
|
|
66
|
+
* @typedef FileUploadStart
|
|
61
67
|
* @property {string} file_name
|
|
62
68
|
* @property {string} content_type
|
|
63
69
|
* @property {number} size
|
|
@@ -69,7 +75,7 @@ export = FileStoragePartnerModel;
|
|
|
69
75
|
* @property {string} [username]
|
|
70
76
|
*/
|
|
71
77
|
/**
|
|
72
|
-
* @typedef
|
|
78
|
+
* @typedef FileUploadComplete
|
|
73
79
|
* @property {string} _id
|
|
74
80
|
* @property {string} file_name
|
|
75
81
|
* @property {string} file_path
|
|
@@ -86,13 +92,13 @@ export = FileStoragePartnerModel;
|
|
|
86
92
|
* @property {CreatedBy} [created_by]
|
|
87
93
|
*/
|
|
88
94
|
/**
|
|
89
|
-
* @typedef
|
|
95
|
+
* @typedef FailedBrowseFilesResult
|
|
90
96
|
* @property {string} message
|
|
91
97
|
*/
|
|
92
98
|
declare class FileStoragePartnerModel {
|
|
93
99
|
}
|
|
94
100
|
declare namespace FileStoragePartnerModel {
|
|
95
|
-
export { SizeConstraints,
|
|
101
|
+
export { SizeConstraints, SaveProxy, ProxyFileData, ProxyFile, FetchProxyDetails, NamespaceDetails, AllNamespaceDetails, CDN, Upload, FileUpload, FileUploadStart, CreatedBy, FileUploadComplete, FailedBrowseFilesResult };
|
|
96
102
|
}
|
|
97
103
|
/** @returns {SizeConstraints} */
|
|
98
104
|
declare function SizeConstraints(): SizeConstraints;
|
|
@@ -102,24 +108,31 @@ type SizeConstraints = {
|
|
|
102
108
|
*/
|
|
103
109
|
max?: number;
|
|
104
110
|
};
|
|
105
|
-
/** @returns {
|
|
106
|
-
declare function
|
|
107
|
-
type
|
|
108
|
-
id?:
|
|
109
|
-
|
|
111
|
+
/** @returns {SaveProxy} */
|
|
112
|
+
declare function SaveProxy(): SaveProxy;
|
|
113
|
+
type SaveProxy = {
|
|
114
|
+
id?: number;
|
|
115
|
+
token?: string;
|
|
116
|
+
};
|
|
117
|
+
/** @returns {ProxyFileData} */
|
|
118
|
+
declare function ProxyFileData(): ProxyFileData;
|
|
119
|
+
type ProxyFileData = {
|
|
120
|
+
email?: string;
|
|
121
|
+
password?: string;
|
|
110
122
|
};
|
|
111
|
-
/** @returns {
|
|
112
|
-
declare function
|
|
113
|
-
type
|
|
123
|
+
/** @returns {ProxyFile} */
|
|
124
|
+
declare function ProxyFile(): ProxyFile;
|
|
125
|
+
type ProxyFile = {
|
|
114
126
|
id?: number;
|
|
115
127
|
customer?: string;
|
|
116
128
|
quantity?: number;
|
|
117
129
|
price?: number;
|
|
130
|
+
data?: ProxyFileData;
|
|
118
131
|
url?: string;
|
|
119
132
|
};
|
|
120
|
-
/** @returns {
|
|
121
|
-
declare function
|
|
122
|
-
type
|
|
133
|
+
/** @returns {FetchProxyDetails} */
|
|
134
|
+
declare function FetchProxyDetails(): FetchProxyDetails;
|
|
135
|
+
type FetchProxyDetails = {
|
|
123
136
|
data?: any;
|
|
124
137
|
support?: any;
|
|
125
138
|
};
|
|
@@ -159,9 +172,9 @@ type Upload = {
|
|
|
159
172
|
expiry: number;
|
|
160
173
|
url: string;
|
|
161
174
|
};
|
|
162
|
-
/** @returns {
|
|
163
|
-
declare function
|
|
164
|
-
type
|
|
175
|
+
/** @returns {FileUpload} */
|
|
176
|
+
declare function FileUpload(): FileUpload;
|
|
177
|
+
type FileUpload = {
|
|
165
178
|
file_name: string;
|
|
166
179
|
file_path: string;
|
|
167
180
|
content_type: string;
|
|
@@ -172,9 +185,9 @@ type StartResponse = {
|
|
|
172
185
|
upload: Upload;
|
|
173
186
|
tags?: string[];
|
|
174
187
|
};
|
|
175
|
-
/** @returns {
|
|
176
|
-
declare function
|
|
177
|
-
type
|
|
188
|
+
/** @returns {FileUploadStart} */
|
|
189
|
+
declare function FileUploadStart(): FileUploadStart;
|
|
190
|
+
type FileUploadStart = {
|
|
178
191
|
file_name: string;
|
|
179
192
|
content_type: string;
|
|
180
193
|
size: number;
|
|
@@ -186,9 +199,9 @@ declare function CreatedBy(): CreatedBy;
|
|
|
186
199
|
type CreatedBy = {
|
|
187
200
|
username?: string;
|
|
188
201
|
};
|
|
189
|
-
/** @returns {
|
|
190
|
-
declare function
|
|
191
|
-
type
|
|
202
|
+
/** @returns {FileUploadComplete} */
|
|
203
|
+
declare function FileUploadComplete(): FileUploadComplete;
|
|
204
|
+
type FileUploadComplete = {
|
|
192
205
|
_id: string;
|
|
193
206
|
file_name: string;
|
|
194
207
|
file_path: string;
|
|
@@ -204,8 +217,8 @@ type CompleteResponse = {
|
|
|
204
217
|
modified_on: string;
|
|
205
218
|
created_by?: CreatedBy;
|
|
206
219
|
};
|
|
207
|
-
/** @returns {
|
|
208
|
-
declare function
|
|
209
|
-
type
|
|
220
|
+
/** @returns {FailedBrowseFilesResult} */
|
|
221
|
+
declare function FailedBrowseFilesResult(): FailedBrowseFilesResult;
|
|
222
|
+
type FailedBrowseFilesResult = {
|
|
210
223
|
message: string;
|
|
211
224
|
};
|
|
@@ -6,22 +6,29 @@ const Joi = require("joi");
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @typedef
|
|
10
|
-
* @property {
|
|
11
|
-
* @property {string} [
|
|
9
|
+
* @typedef SaveProxy
|
|
10
|
+
* @property {number} [id]
|
|
11
|
+
* @property {string} [token]
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @typedef
|
|
15
|
+
* @typedef ProxyFileData
|
|
16
|
+
* @property {string} [email]
|
|
17
|
+
* @property {string} [password]
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @typedef ProxyFile
|
|
16
22
|
* @property {number} [id]
|
|
17
23
|
* @property {string} [customer]
|
|
18
24
|
* @property {number} [quantity]
|
|
19
25
|
* @property {number} [price]
|
|
26
|
+
* @property {ProxyFileData} [data]
|
|
20
27
|
* @property {string} [url]
|
|
21
28
|
*/
|
|
22
29
|
|
|
23
30
|
/**
|
|
24
|
-
* @typedef
|
|
31
|
+
* @typedef FetchProxyDetails
|
|
25
32
|
* @property {Object} [data]
|
|
26
33
|
* @property {Object} [support]
|
|
27
34
|
*/
|
|
@@ -54,7 +61,7 @@ const Joi = require("joi");
|
|
|
54
61
|
*/
|
|
55
62
|
|
|
56
63
|
/**
|
|
57
|
-
* @typedef
|
|
64
|
+
* @typedef FileUpload
|
|
58
65
|
* @property {string} file_name
|
|
59
66
|
* @property {string} file_path
|
|
60
67
|
* @property {string} content_type
|
|
@@ -67,7 +74,7 @@ const Joi = require("joi");
|
|
|
67
74
|
*/
|
|
68
75
|
|
|
69
76
|
/**
|
|
70
|
-
* @typedef
|
|
77
|
+
* @typedef FileUploadStart
|
|
71
78
|
* @property {string} file_name
|
|
72
79
|
* @property {string} content_type
|
|
73
80
|
* @property {number} size
|
|
@@ -81,7 +88,7 @@ const Joi = require("joi");
|
|
|
81
88
|
*/
|
|
82
89
|
|
|
83
90
|
/**
|
|
84
|
-
* @typedef
|
|
91
|
+
* @typedef FileUploadComplete
|
|
85
92
|
* @property {string} _id
|
|
86
93
|
* @property {string} file_name
|
|
87
94
|
* @property {string} file_path
|
|
@@ -99,7 +106,7 @@ const Joi = require("joi");
|
|
|
99
106
|
*/
|
|
100
107
|
|
|
101
108
|
/**
|
|
102
|
-
* @typedef
|
|
109
|
+
* @typedef FailedBrowseFilesResult
|
|
103
110
|
* @property {string} message
|
|
104
111
|
*/
|
|
105
112
|
|
|
@@ -111,27 +118,36 @@ class FileStoragePartnerModel {
|
|
|
111
118
|
});
|
|
112
119
|
}
|
|
113
120
|
|
|
114
|
-
/** @returns {
|
|
115
|
-
static
|
|
121
|
+
/** @returns {SaveProxy} */
|
|
122
|
+
static SaveProxy() {
|
|
123
|
+
return Joi.object({
|
|
124
|
+
id: Joi.number(),
|
|
125
|
+
token: Joi.string().allow(""),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** @returns {ProxyFileData} */
|
|
130
|
+
static ProxyFileData() {
|
|
116
131
|
return Joi.object({
|
|
117
|
-
|
|
118
|
-
|
|
132
|
+
email: Joi.string().allow(""),
|
|
133
|
+
password: Joi.string().allow(""),
|
|
119
134
|
});
|
|
120
135
|
}
|
|
121
136
|
|
|
122
|
-
/** @returns {
|
|
123
|
-
static
|
|
137
|
+
/** @returns {ProxyFile} */
|
|
138
|
+
static ProxyFile() {
|
|
124
139
|
return Joi.object({
|
|
125
140
|
id: Joi.number(),
|
|
126
141
|
customer: Joi.string().allow(""),
|
|
127
142
|
quantity: Joi.number(),
|
|
128
143
|
price: Joi.number(),
|
|
144
|
+
data: FileStoragePartnerModel.ProxyFileData(),
|
|
129
145
|
url: Joi.string().allow(""),
|
|
130
146
|
});
|
|
131
147
|
}
|
|
132
148
|
|
|
133
|
-
/** @returns {
|
|
134
|
-
static
|
|
149
|
+
/** @returns {FetchProxyDetails} */
|
|
150
|
+
static FetchProxyDetails() {
|
|
135
151
|
return Joi.object({
|
|
136
152
|
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
137
153
|
support: Joi.object().pattern(/\S/, Joi.any()),
|
|
@@ -174,8 +190,8 @@ class FileStoragePartnerModel {
|
|
|
174
190
|
});
|
|
175
191
|
}
|
|
176
192
|
|
|
177
|
-
/** @returns {
|
|
178
|
-
static
|
|
193
|
+
/** @returns {FileUpload} */
|
|
194
|
+
static FileUpload() {
|
|
179
195
|
return Joi.object({
|
|
180
196
|
file_name: Joi.string().allow("").required(),
|
|
181
197
|
file_path: Joi.string().allow("").required(),
|
|
@@ -189,8 +205,8 @@ class FileStoragePartnerModel {
|
|
|
189
205
|
});
|
|
190
206
|
}
|
|
191
207
|
|
|
192
|
-
/** @returns {
|
|
193
|
-
static
|
|
208
|
+
/** @returns {FileUploadStart} */
|
|
209
|
+
static FileUploadStart() {
|
|
194
210
|
return Joi.object({
|
|
195
211
|
file_name: Joi.string().allow("").required(),
|
|
196
212
|
content_type: Joi.string().allow("").required(),
|
|
@@ -207,8 +223,8 @@ class FileStoragePartnerModel {
|
|
|
207
223
|
});
|
|
208
224
|
}
|
|
209
225
|
|
|
210
|
-
/** @returns {
|
|
211
|
-
static
|
|
226
|
+
/** @returns {FileUploadComplete} */
|
|
227
|
+
static FileUploadComplete() {
|
|
212
228
|
return Joi.object({
|
|
213
229
|
_id: Joi.string().allow("").required(),
|
|
214
230
|
file_name: Joi.string().allow("").required(),
|
|
@@ -227,8 +243,8 @@ class FileStoragePartnerModel {
|
|
|
227
243
|
});
|
|
228
244
|
}
|
|
229
245
|
|
|
230
|
-
/** @returns {
|
|
231
|
-
static
|
|
246
|
+
/** @returns {FailedBrowseFilesResult} */
|
|
247
|
+
static FailedBrowseFilesResult() {
|
|
232
248
|
return Joi.object({
|
|
233
249
|
message: Joi.string().allow("").required(),
|
|
234
250
|
});
|
|
@@ -16,7 +16,7 @@ class FileStorageValidator {
|
|
|
16
16
|
return Joi.object({
|
|
17
17
|
namespace: Joi.string().allow("").required(),
|
|
18
18
|
|
|
19
|
-
body: FileStorageModel.
|
|
19
|
+
body: FileStorageModel.FileUpload().required(),
|
|
20
20
|
}).required();
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ class FileStorageValidator {
|
|
|
24
24
|
return Joi.object({
|
|
25
25
|
namespace: Joi.string().allow("").required(),
|
|
26
26
|
|
|
27
|
-
body: FileStorageModel.
|
|
27
|
+
body: FileStorageModel.FileUploadStart().required(),
|
|
28
28
|
}).required();
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -60,7 +60,7 @@ class FileStorageValidator {
|
|
|
60
60
|
return Joi.object({
|
|
61
61
|
applicationId: Joi.string().allow("").required(),
|
|
62
62
|
companyId: Joi.number().required(),
|
|
63
|
-
body: FileStorageModel.
|
|
63
|
+
body: FileStorageModel.ProxyFile().required(),
|
|
64
64
|
}).required();
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -72,7 +72,7 @@ class FileStorageValidator {
|
|
|
72
72
|
|
|
73
73
|
static saveProxyDetails() {
|
|
74
74
|
return Joi.object({
|
|
75
|
-
body: FileStorageModel.
|
|
75
|
+
body: FileStorageModel.ProxyFile().required(),
|
|
76
76
|
}).required();
|
|
77
77
|
}
|
|
78
78
|
}
|