@gofynd/fdk-client-javascript 1.3.5 → 1.3.6-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/CartApplicationModel.d.ts +33 -3
- package/sdk/application/Cart/CartApplicationModel.js +38 -2
- package/sdk/common/BaseOAuthClient.js +1 -1
- package/sdk/partner/OAuthClient.d.ts +5 -4
- package/sdk/partner/OAuthClient.js +78 -9
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +86 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +533 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +54 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +74 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +212 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +166 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8 -6
- package/sdk/platform/Order/OrderPlatformModel.js +8 -6
|
@@ -91,6 +91,160 @@ class Catalog {
|
|
|
91
91
|
return response;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @param {CatalogPlatformApplicationValidator.CreateAppCategoryReturnConfigurationParam} arg
|
|
96
|
+
* - Arg object
|
|
97
|
+
*
|
|
98
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
99
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
100
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
|
|
101
|
+
* @name createAppCategoryReturnConfiguration
|
|
102
|
+
* @summary: Create Category level Application Return Configuration setttings
|
|
103
|
+
* @description: Create Category level Application Return Configuration setttings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createAppCategoryReturnConfiguration/).
|
|
104
|
+
*/
|
|
105
|
+
async createAppCategoryReturnConfiguration(
|
|
106
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
107
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
108
|
+
) {
|
|
109
|
+
const {
|
|
110
|
+
error,
|
|
111
|
+
} = CatalogPlatformApplicationValidator.createAppCategoryReturnConfiguration().validate(
|
|
112
|
+
{
|
|
113
|
+
body,
|
|
114
|
+
},
|
|
115
|
+
{ abortEarly: false, allowUnknown: true }
|
|
116
|
+
);
|
|
117
|
+
if (error) {
|
|
118
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Showing warrnings if extra unknown parameters are found
|
|
122
|
+
const {
|
|
123
|
+
error: warrning,
|
|
124
|
+
} = CatalogPlatformApplicationValidator.createAppCategoryReturnConfiguration().validate(
|
|
125
|
+
{
|
|
126
|
+
body,
|
|
127
|
+
},
|
|
128
|
+
{ abortEarly: false, allowUnknown: false }
|
|
129
|
+
);
|
|
130
|
+
if (warrning) {
|
|
131
|
+
Logger({
|
|
132
|
+
level: "WARN",
|
|
133
|
+
message: `Parameter Validation warrnings for platform > Catalog > createAppCategoryReturnConfiguration \n ${warrning}`,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const query_params = {};
|
|
138
|
+
|
|
139
|
+
const response = await PlatformAPIClient.execute(
|
|
140
|
+
this.config,
|
|
141
|
+
"post",
|
|
142
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/return-config/categories`,
|
|
143
|
+
query_params,
|
|
144
|
+
body,
|
|
145
|
+
requestHeaders,
|
|
146
|
+
{ responseHeaders }
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
let responseData = response;
|
|
150
|
+
if (responseHeaders) {
|
|
151
|
+
responseData = response[0];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const {
|
|
155
|
+
error: res_error,
|
|
156
|
+
} = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
|
|
157
|
+
abortEarly: false,
|
|
158
|
+
allowUnknown: false,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
if (res_error) {
|
|
162
|
+
Logger({
|
|
163
|
+
level: "WARN",
|
|
164
|
+
message: `Response Validation Warnnings for platform > Catalog > createAppCategoryReturnConfiguration \n ${res_error}`,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return response;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @param {CatalogPlatformApplicationValidator.CreateAppReturnConfigurationParam} arg
|
|
173
|
+
* - Arg object
|
|
174
|
+
*
|
|
175
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
176
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
177
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
|
|
178
|
+
* @name createAppReturnConfiguration
|
|
179
|
+
* @summary: Create Return configuration level set for an application
|
|
180
|
+
* @description: Create Return configuration level set for an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createAppReturnConfiguration/).
|
|
181
|
+
*/
|
|
182
|
+
async createAppReturnConfiguration(
|
|
183
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
184
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
185
|
+
) {
|
|
186
|
+
const {
|
|
187
|
+
error,
|
|
188
|
+
} = CatalogPlatformApplicationValidator.createAppReturnConfiguration().validate(
|
|
189
|
+
{
|
|
190
|
+
body,
|
|
191
|
+
},
|
|
192
|
+
{ abortEarly: false, allowUnknown: true }
|
|
193
|
+
);
|
|
194
|
+
if (error) {
|
|
195
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Showing warrnings if extra unknown parameters are found
|
|
199
|
+
const {
|
|
200
|
+
error: warrning,
|
|
201
|
+
} = CatalogPlatformApplicationValidator.createAppReturnConfiguration().validate(
|
|
202
|
+
{
|
|
203
|
+
body,
|
|
204
|
+
},
|
|
205
|
+
{ abortEarly: false, allowUnknown: false }
|
|
206
|
+
);
|
|
207
|
+
if (warrning) {
|
|
208
|
+
Logger({
|
|
209
|
+
level: "WARN",
|
|
210
|
+
message: `Parameter Validation warrnings for platform > Catalog > createAppReturnConfiguration \n ${warrning}`,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const query_params = {};
|
|
215
|
+
|
|
216
|
+
const response = await PlatformAPIClient.execute(
|
|
217
|
+
this.config,
|
|
218
|
+
"post",
|
|
219
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/return-config`,
|
|
220
|
+
query_params,
|
|
221
|
+
body,
|
|
222
|
+
requestHeaders,
|
|
223
|
+
{ responseHeaders }
|
|
224
|
+
);
|
|
225
|
+
|
|
226
|
+
let responseData = response;
|
|
227
|
+
if (responseHeaders) {
|
|
228
|
+
responseData = response[0];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const {
|
|
232
|
+
error: res_error,
|
|
233
|
+
} = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
|
|
234
|
+
abortEarly: false,
|
|
235
|
+
allowUnknown: false,
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
if (res_error) {
|
|
239
|
+
Logger({
|
|
240
|
+
level: "WARN",
|
|
241
|
+
message: `Response Validation Warnnings for platform > Catalog > createAppReturnConfiguration \n ${res_error}`,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return response;
|
|
246
|
+
}
|
|
247
|
+
|
|
94
248
|
/**
|
|
95
249
|
* @param {CatalogPlatformApplicationValidator.CreateCollectionParam} arg - Arg object
|
|
96
250
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -718,6 +872,83 @@ class Catalog {
|
|
|
718
872
|
return response;
|
|
719
873
|
}
|
|
720
874
|
|
|
875
|
+
/**
|
|
876
|
+
* @param {CatalogPlatformApplicationValidator.DeleteAppCategoryReturnConfigurationParam} arg
|
|
877
|
+
* - Arg object
|
|
878
|
+
*
|
|
879
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
880
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
881
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
882
|
+
* @name deleteAppCategoryReturnConfiguration
|
|
883
|
+
* @summary: Delete Category level Application Return Configuration setttings
|
|
884
|
+
* @description: Delete Category level Application Return Configuration setttings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteAppCategoryReturnConfiguration/).
|
|
885
|
+
*/
|
|
886
|
+
async deleteAppCategoryReturnConfiguration(
|
|
887
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
888
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
889
|
+
) {
|
|
890
|
+
const {
|
|
891
|
+
error,
|
|
892
|
+
} = CatalogPlatformApplicationValidator.deleteAppCategoryReturnConfiguration().validate(
|
|
893
|
+
{
|
|
894
|
+
body,
|
|
895
|
+
},
|
|
896
|
+
{ abortEarly: false, allowUnknown: true }
|
|
897
|
+
);
|
|
898
|
+
if (error) {
|
|
899
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
// Showing warrnings if extra unknown parameters are found
|
|
903
|
+
const {
|
|
904
|
+
error: warrning,
|
|
905
|
+
} = CatalogPlatformApplicationValidator.deleteAppCategoryReturnConfiguration().validate(
|
|
906
|
+
{
|
|
907
|
+
body,
|
|
908
|
+
},
|
|
909
|
+
{ abortEarly: false, allowUnknown: false }
|
|
910
|
+
);
|
|
911
|
+
if (warrning) {
|
|
912
|
+
Logger({
|
|
913
|
+
level: "WARN",
|
|
914
|
+
message: `Parameter Validation warrnings for platform > Catalog > deleteAppCategoryReturnConfiguration \n ${warrning}`,
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
const query_params = {};
|
|
919
|
+
|
|
920
|
+
const response = await PlatformAPIClient.execute(
|
|
921
|
+
this.config,
|
|
922
|
+
"delete",
|
|
923
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/return-config/categories`,
|
|
924
|
+
query_params,
|
|
925
|
+
body,
|
|
926
|
+
requestHeaders,
|
|
927
|
+
{ responseHeaders }
|
|
928
|
+
);
|
|
929
|
+
|
|
930
|
+
let responseData = response;
|
|
931
|
+
if (responseHeaders) {
|
|
932
|
+
responseData = response[0];
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
const {
|
|
936
|
+
error: res_error,
|
|
937
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
938
|
+
abortEarly: false,
|
|
939
|
+
allowUnknown: false,
|
|
940
|
+
});
|
|
941
|
+
|
|
942
|
+
if (res_error) {
|
|
943
|
+
Logger({
|
|
944
|
+
level: "WARN",
|
|
945
|
+
message: `Response Validation Warnnings for platform > Catalog > deleteAppCategoryReturnConfiguration \n ${res_error}`,
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
return response;
|
|
950
|
+
}
|
|
951
|
+
|
|
721
952
|
/**
|
|
722
953
|
* @param {CatalogPlatformApplicationValidator.DeleteAutocompleteKeywordParam} arg
|
|
723
954
|
* - Arg object
|
|
@@ -1359,6 +1590,81 @@ class Catalog {
|
|
|
1359
1590
|
return response;
|
|
1360
1591
|
}
|
|
1361
1592
|
|
|
1593
|
+
/**
|
|
1594
|
+
* @param {CatalogPlatformApplicationValidator.GetAppCategoryReturnConfigParam} arg
|
|
1595
|
+
* - Arg object
|
|
1596
|
+
*
|
|
1597
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1598
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1599
|
+
* @returns {Promise<CatalogPlatformModel.BaseAppCategoryReturnConfigResponse>}
|
|
1600
|
+
* - Success response
|
|
1601
|
+
*
|
|
1602
|
+
* @name getAppCategoryReturnConfig
|
|
1603
|
+
* @summary: Get all category level configuration level set for an application
|
|
1604
|
+
* @description: Get all category level configuration level set for an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppCategoryReturnConfig/).
|
|
1605
|
+
*/
|
|
1606
|
+
async getAppCategoryReturnConfig(
|
|
1607
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1608
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1609
|
+
) {
|
|
1610
|
+
const {
|
|
1611
|
+
error,
|
|
1612
|
+
} = CatalogPlatformApplicationValidator.getAppCategoryReturnConfig().validate(
|
|
1613
|
+
{},
|
|
1614
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1615
|
+
);
|
|
1616
|
+
if (error) {
|
|
1617
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1621
|
+
const {
|
|
1622
|
+
error: warrning,
|
|
1623
|
+
} = CatalogPlatformApplicationValidator.getAppCategoryReturnConfig().validate(
|
|
1624
|
+
{},
|
|
1625
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1626
|
+
);
|
|
1627
|
+
if (warrning) {
|
|
1628
|
+
Logger({
|
|
1629
|
+
level: "WARN",
|
|
1630
|
+
message: `Parameter Validation warrnings for platform > Catalog > getAppCategoryReturnConfig \n ${warrning}`,
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
const query_params = {};
|
|
1635
|
+
|
|
1636
|
+
const response = await PlatformAPIClient.execute(
|
|
1637
|
+
this.config,
|
|
1638
|
+
"get",
|
|
1639
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/return-config/categories`,
|
|
1640
|
+
query_params,
|
|
1641
|
+
undefined,
|
|
1642
|
+
requestHeaders,
|
|
1643
|
+
{ responseHeaders }
|
|
1644
|
+
);
|
|
1645
|
+
|
|
1646
|
+
let responseData = response;
|
|
1647
|
+
if (responseHeaders) {
|
|
1648
|
+
responseData = response[0];
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
const {
|
|
1652
|
+
error: res_error,
|
|
1653
|
+
} = CatalogPlatformModel.BaseAppCategoryReturnConfigResponse().validate(
|
|
1654
|
+
responseData,
|
|
1655
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1656
|
+
);
|
|
1657
|
+
|
|
1658
|
+
if (res_error) {
|
|
1659
|
+
Logger({
|
|
1660
|
+
level: "WARN",
|
|
1661
|
+
message: `Response Validation Warnnings for platform > Catalog > getAppCategoryReturnConfig \n ${res_error}`,
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
return response;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1362
1668
|
/**
|
|
1363
1669
|
* @param {CatalogPlatformApplicationValidator.GetAppInventoryParam} arg - Arg object
|
|
1364
1670
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1790,6 +2096,79 @@ class Catalog {
|
|
|
1790
2096
|
return response;
|
|
1791
2097
|
}
|
|
1792
2098
|
|
|
2099
|
+
/**
|
|
2100
|
+
* @param {CatalogPlatformApplicationValidator.GetAppReturnConfigurationParam} arg
|
|
2101
|
+
* - Arg object
|
|
2102
|
+
*
|
|
2103
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2104
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2105
|
+
* @returns {Promise<CatalogPlatformModel.AppReturnConfigResponse>} - Success response
|
|
2106
|
+
* @name getAppReturnConfiguration
|
|
2107
|
+
* @summary: Get Return configuration level set for an application
|
|
2108
|
+
* @description: Get Product Return configuration set at an application level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppReturnConfiguration/).
|
|
2109
|
+
*/
|
|
2110
|
+
async getAppReturnConfiguration(
|
|
2111
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2112
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2113
|
+
) {
|
|
2114
|
+
const {
|
|
2115
|
+
error,
|
|
2116
|
+
} = CatalogPlatformApplicationValidator.getAppReturnConfiguration().validate(
|
|
2117
|
+
{},
|
|
2118
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2119
|
+
);
|
|
2120
|
+
if (error) {
|
|
2121
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2125
|
+
const {
|
|
2126
|
+
error: warrning,
|
|
2127
|
+
} = CatalogPlatformApplicationValidator.getAppReturnConfiguration().validate(
|
|
2128
|
+
{},
|
|
2129
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2130
|
+
);
|
|
2131
|
+
if (warrning) {
|
|
2132
|
+
Logger({
|
|
2133
|
+
level: "WARN",
|
|
2134
|
+
message: `Parameter Validation warrnings for platform > Catalog > getAppReturnConfiguration \n ${warrning}`,
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
const query_params = {};
|
|
2139
|
+
|
|
2140
|
+
const response = await PlatformAPIClient.execute(
|
|
2141
|
+
this.config,
|
|
2142
|
+
"get",
|
|
2143
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/return-config`,
|
|
2144
|
+
query_params,
|
|
2145
|
+
undefined,
|
|
2146
|
+
requestHeaders,
|
|
2147
|
+
{ responseHeaders }
|
|
2148
|
+
);
|
|
2149
|
+
|
|
2150
|
+
let responseData = response;
|
|
2151
|
+
if (responseHeaders) {
|
|
2152
|
+
responseData = response[0];
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
const {
|
|
2156
|
+
error: res_error,
|
|
2157
|
+
} = CatalogPlatformModel.AppReturnConfigResponse().validate(responseData, {
|
|
2158
|
+
abortEarly: false,
|
|
2159
|
+
allowUnknown: false,
|
|
2160
|
+
});
|
|
2161
|
+
|
|
2162
|
+
if (res_error) {
|
|
2163
|
+
Logger({
|
|
2164
|
+
level: "WARN",
|
|
2165
|
+
message: `Response Validation Warnnings for platform > Catalog > getAppReturnConfiguration \n ${res_error}`,
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
return response;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
1793
2172
|
/**
|
|
1794
2173
|
* @param {CatalogPlatformApplicationValidator.GetAppicationProductsParam} arg
|
|
1795
2174
|
* - Arg object
|
|
@@ -4185,6 +4564,83 @@ class Catalog {
|
|
|
4185
4564
|
return response;
|
|
4186
4565
|
}
|
|
4187
4566
|
|
|
4567
|
+
/**
|
|
4568
|
+
* @param {CatalogPlatformApplicationValidator.UpdateAppCategoryReturnConfigurationParam} arg
|
|
4569
|
+
* - Arg object
|
|
4570
|
+
*
|
|
4571
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4572
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4573
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
4574
|
+
* @name updateAppCategoryReturnConfiguration
|
|
4575
|
+
* @summary: Update Category level Application Return Configuration setttings
|
|
4576
|
+
* @description: Update Category level Application Return Configuration setttings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppCategoryReturnConfiguration/).
|
|
4577
|
+
*/
|
|
4578
|
+
async updateAppCategoryReturnConfiguration(
|
|
4579
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4580
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4581
|
+
) {
|
|
4582
|
+
const {
|
|
4583
|
+
error,
|
|
4584
|
+
} = CatalogPlatformApplicationValidator.updateAppCategoryReturnConfiguration().validate(
|
|
4585
|
+
{
|
|
4586
|
+
body,
|
|
4587
|
+
},
|
|
4588
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4589
|
+
);
|
|
4590
|
+
if (error) {
|
|
4591
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4592
|
+
}
|
|
4593
|
+
|
|
4594
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4595
|
+
const {
|
|
4596
|
+
error: warrning,
|
|
4597
|
+
} = CatalogPlatformApplicationValidator.updateAppCategoryReturnConfiguration().validate(
|
|
4598
|
+
{
|
|
4599
|
+
body,
|
|
4600
|
+
},
|
|
4601
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4602
|
+
);
|
|
4603
|
+
if (warrning) {
|
|
4604
|
+
Logger({
|
|
4605
|
+
level: "WARN",
|
|
4606
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateAppCategoryReturnConfiguration \n ${warrning}`,
|
|
4607
|
+
});
|
|
4608
|
+
}
|
|
4609
|
+
|
|
4610
|
+
const query_params = {};
|
|
4611
|
+
|
|
4612
|
+
const response = await PlatformAPIClient.execute(
|
|
4613
|
+
this.config,
|
|
4614
|
+
"put",
|
|
4615
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/return-config/categories`,
|
|
4616
|
+
query_params,
|
|
4617
|
+
body,
|
|
4618
|
+
requestHeaders,
|
|
4619
|
+
{ responseHeaders }
|
|
4620
|
+
);
|
|
4621
|
+
|
|
4622
|
+
let responseData = response;
|
|
4623
|
+
if (responseHeaders) {
|
|
4624
|
+
responseData = response[0];
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4627
|
+
const {
|
|
4628
|
+
error: res_error,
|
|
4629
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
4630
|
+
abortEarly: false,
|
|
4631
|
+
allowUnknown: false,
|
|
4632
|
+
});
|
|
4633
|
+
|
|
4634
|
+
if (res_error) {
|
|
4635
|
+
Logger({
|
|
4636
|
+
level: "WARN",
|
|
4637
|
+
message: `Response Validation Warnnings for platform > Catalog > updateAppCategoryReturnConfiguration \n ${res_error}`,
|
|
4638
|
+
});
|
|
4639
|
+
}
|
|
4640
|
+
|
|
4641
|
+
return response;
|
|
4642
|
+
}
|
|
4643
|
+
|
|
4188
4644
|
/**
|
|
4189
4645
|
* @param {CatalogPlatformApplicationValidator.UpdateAppDepartmentParam} arg
|
|
4190
4646
|
* - Arg object
|
|
@@ -4420,6 +4876,83 @@ class Catalog {
|
|
|
4420
4876
|
return response;
|
|
4421
4877
|
}
|
|
4422
4878
|
|
|
4879
|
+
/**
|
|
4880
|
+
* @param {CatalogPlatformApplicationValidator.UpdateAppReturnConfigurationParam} arg
|
|
4881
|
+
* - Arg object
|
|
4882
|
+
*
|
|
4883
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4884
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4885
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
|
|
4886
|
+
* @name updateAppReturnConfiguration
|
|
4887
|
+
* @summary: Update Return configuration level set for an application
|
|
4888
|
+
* @description: Update Return configuration level set for an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppReturnConfiguration/).
|
|
4889
|
+
*/
|
|
4890
|
+
async updateAppReturnConfiguration(
|
|
4891
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4892
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4893
|
+
) {
|
|
4894
|
+
const {
|
|
4895
|
+
error,
|
|
4896
|
+
} = CatalogPlatformApplicationValidator.updateAppReturnConfiguration().validate(
|
|
4897
|
+
{
|
|
4898
|
+
body,
|
|
4899
|
+
},
|
|
4900
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4901
|
+
);
|
|
4902
|
+
if (error) {
|
|
4903
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4904
|
+
}
|
|
4905
|
+
|
|
4906
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4907
|
+
const {
|
|
4908
|
+
error: warrning,
|
|
4909
|
+
} = CatalogPlatformApplicationValidator.updateAppReturnConfiguration().validate(
|
|
4910
|
+
{
|
|
4911
|
+
body,
|
|
4912
|
+
},
|
|
4913
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4914
|
+
);
|
|
4915
|
+
if (warrning) {
|
|
4916
|
+
Logger({
|
|
4917
|
+
level: "WARN",
|
|
4918
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateAppReturnConfiguration \n ${warrning}`,
|
|
4919
|
+
});
|
|
4920
|
+
}
|
|
4921
|
+
|
|
4922
|
+
const query_params = {};
|
|
4923
|
+
|
|
4924
|
+
const response = await PlatformAPIClient.execute(
|
|
4925
|
+
this.config,
|
|
4926
|
+
"put",
|
|
4927
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/return-config`,
|
|
4928
|
+
query_params,
|
|
4929
|
+
body,
|
|
4930
|
+
requestHeaders,
|
|
4931
|
+
{ responseHeaders }
|
|
4932
|
+
);
|
|
4933
|
+
|
|
4934
|
+
let responseData = response;
|
|
4935
|
+
if (responseHeaders) {
|
|
4936
|
+
responseData = response[0];
|
|
4937
|
+
}
|
|
4938
|
+
|
|
4939
|
+
const {
|
|
4940
|
+
error: res_error,
|
|
4941
|
+
} = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
|
|
4942
|
+
abortEarly: false,
|
|
4943
|
+
allowUnknown: false,
|
|
4944
|
+
});
|
|
4945
|
+
|
|
4946
|
+
if (res_error) {
|
|
4947
|
+
Logger({
|
|
4948
|
+
level: "WARN",
|
|
4949
|
+
message: `Response Validation Warnnings for platform > Catalog > updateAppReturnConfiguration \n ${res_error}`,
|
|
4950
|
+
});
|
|
4951
|
+
}
|
|
4952
|
+
|
|
4953
|
+
return response;
|
|
4954
|
+
}
|
|
4955
|
+
|
|
4423
4956
|
/**
|
|
4424
4957
|
* @param {CatalogPlatformApplicationValidator.UpdateAutocompleteKeywordParam} arg
|
|
4425
4958
|
* - Arg object
|