@gofynd/fdk-client-javascript 1.3.3-beta.3 → 1.3.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.
Files changed (24) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +4 -0
  4. package/sdk/application/Cart/CartApplicationModel.js +4 -0
  5. package/sdk/application/Theme/ThemeApplicationModel.d.ts +6 -8
  6. package/sdk/application/Theme/ThemeApplicationModel.js +6 -8
  7. package/sdk/platform/Cart/CartPlatformModel.d.ts +4 -0
  8. package/sdk/platform/Cart/CartPlatformModel.js +4 -0
  9. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +56 -0
  10. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +308 -0
  11. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -1
  12. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +38 -0
  13. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
  14. package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
  15. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +344 -66
  16. package/sdk/platform/Catalog/CatalogPlatformModel.js +247 -65
  17. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +26 -0
  18. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +152 -0
  19. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +14 -1
  20. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -0
  21. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +22 -1
  22. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +24 -0
  23. package/sdk/platform/Order/OrderPlatformModel.d.ts +4 -4
  24. package/sdk/platform/Order/OrderPlatformModel.js +4 -4
package/README.md CHANGED
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
214
214
  The above code will log the curl command in the console
215
215
 
216
216
  ```bash
217
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.3-beta.3' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
217
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.3' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
218
218
  Active Theme: Emerge
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.3.3-beta.3",
3
+ "version": "1.3.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -156,6 +156,7 @@ export = CartApplicationModel;
156
156
  * @property {string} [order_type]
157
157
  * @property {number} [ordering_store]
158
158
  * @property {boolean} [payment_auto_confirm]
159
+ * @property {Object} [payment_extra_identifiers]
159
160
  * @property {string} [payment_identifier]
160
161
  * @property {string} payment_mode
161
162
  * @property {Object} [payment_params]
@@ -588,6 +589,7 @@ export = CartApplicationModel;
588
589
  * @property {string} mode
589
590
  * @property {string} [name]
590
591
  * @property {string} [payment]
592
+ * @property {Object} [payment_extra_identifiers]
591
593
  * @property {PaymentMeta} payment_meta
592
594
  */
593
595
  /**
@@ -1084,6 +1086,7 @@ type CartCheckoutDetailRequest = {
1084
1086
  order_type?: string;
1085
1087
  ordering_store?: number;
1086
1088
  payment_auto_confirm?: boolean;
1089
+ payment_extra_identifiers?: any;
1087
1090
  payment_identifier?: string;
1088
1091
  payment_mode: string;
1089
1092
  payment_params?: any;
@@ -1742,6 +1745,7 @@ type PaymentMethod = {
1742
1745
  mode: string;
1743
1746
  name?: string;
1744
1747
  payment?: string;
1748
+ payment_extra_identifiers?: any;
1745
1749
  payment_meta: PaymentMeta;
1746
1750
  };
1747
1751
  /** @returns {PaymentSelectionLock} */
@@ -174,6 +174,7 @@ const Joi = require("joi");
174
174
  * @property {string} [order_type]
175
175
  * @property {number} [ordering_store]
176
176
  * @property {boolean} [payment_auto_confirm]
177
+ * @property {Object} [payment_extra_identifiers]
177
178
  * @property {string} [payment_identifier]
178
179
  * @property {string} payment_mode
179
180
  * @property {Object} [payment_params]
@@ -652,6 +653,7 @@ const Joi = require("joi");
652
653
  * @property {string} mode
653
654
  * @property {string} [name]
654
655
  * @property {string} [payment]
656
+ * @property {Object} [payment_extra_identifiers]
655
657
  * @property {PaymentMeta} payment_meta
656
658
  */
657
659
 
@@ -1140,6 +1142,7 @@ class CartApplicationModel {
1140
1142
  order_type: Joi.string().allow(""),
1141
1143
  ordering_store: Joi.number().allow(null),
1142
1144
  payment_auto_confirm: Joi.boolean(),
1145
+ payment_extra_identifiers: Joi.any(),
1143
1146
  payment_identifier: Joi.string().allow("").allow(null),
1144
1147
  payment_mode: Joi.string().allow("").required(),
1145
1148
  payment_params: Joi.any().allow(null),
@@ -1708,6 +1711,7 @@ class CartApplicationModel {
1708
1711
  mode: Joi.string().allow("").required(),
1709
1712
  name: Joi.string().allow(""),
1710
1713
  payment: Joi.string().allow(""),
1714
+ payment_extra_identifiers: Joi.any(),
1711
1715
  payment_meta: CartApplicationModel.PaymentMeta().required(),
1712
1716
  });
1713
1717
  }
@@ -213,8 +213,7 @@ export = ThemeApplicationModel;
213
213
  */
214
214
  /**
215
215
  * @typedef GlobalConfig
216
- * @property {AuthConfig} [auth]
217
- * @property {PaletteConfig} [palette]
216
+ * @property {CustomConfig} [custom]
218
217
  * @property {StaticConfig} [statics]
219
218
  */
220
219
  /**
@@ -347,6 +346,7 @@ export = ThemeApplicationModel;
347
346
  * @typedef StaticProps
348
347
  * @property {AuthConfig} [auth]
349
348
  * @property {Colors} [colors]
349
+ * @property {PaletteConfig} [palette]
350
350
  */
351
351
  /**
352
352
  * @typedef TextProp
@@ -362,8 +362,7 @@ export = ThemeApplicationModel;
362
362
  */
363
363
  /**
364
364
  * @typedef ThemeConfiguration
365
- * @property {CustomConfig} [custom]
366
- * @property {GlobalConfig} [global_config]
365
+ * @property {Object} [global_config]
367
366
  * @property {string} [name] - The name of the configuration
368
367
  * @property {string[]} [page] - An array of pages
369
368
  */
@@ -841,8 +840,7 @@ type GeneralSetting = {
841
840
  /** @returns {GlobalConfig} */
842
841
  declare function GlobalConfig(): GlobalConfig;
843
842
  type GlobalConfig = {
844
- auth?: AuthConfig;
845
- palette?: PaletteConfig;
843
+ custom?: CustomConfig;
846
844
  statics?: StaticConfig;
847
845
  };
848
846
  /** @returns {GlobalSchema} */
@@ -1102,6 +1100,7 @@ declare function StaticProps(): StaticProps;
1102
1100
  type StaticProps = {
1103
1101
  auth?: AuthConfig;
1104
1102
  colors?: Colors;
1103
+ palette?: PaletteConfig;
1105
1104
  };
1106
1105
  /** @returns {TextProp} */
1107
1106
  declare function TextProp(): TextProp;
@@ -1138,8 +1137,7 @@ type TextSetting = {
1138
1137
  /** @returns {ThemeConfiguration} */
1139
1138
  declare function ThemeConfiguration(): ThemeConfiguration;
1140
1139
  type ThemeConfiguration = {
1141
- custom?: CustomConfig;
1142
- global_config?: GlobalConfig;
1140
+ global_config?: any;
1143
1141
  /**
1144
1142
  * - The name of the configuration
1145
1143
  */
@@ -244,8 +244,7 @@ const Joi = require("joi");
244
244
 
245
245
  /**
246
246
  * @typedef GlobalConfig
247
- * @property {AuthConfig} [auth]
248
- * @property {PaletteConfig} [palette]
247
+ * @property {CustomConfig} [custom]
249
248
  * @property {StaticConfig} [statics]
250
249
  */
251
250
 
@@ -400,6 +399,7 @@ const Joi = require("joi");
400
399
  * @typedef StaticProps
401
400
  * @property {AuthConfig} [auth]
402
401
  * @property {Colors} [colors]
402
+ * @property {PaletteConfig} [palette]
403
403
  */
404
404
 
405
405
  /**
@@ -418,8 +418,7 @@ const Joi = require("joi");
418
418
 
419
419
  /**
420
420
  * @typedef ThemeConfiguration
421
- * @property {CustomConfig} [custom]
422
- * @property {GlobalConfig} [global_config]
421
+ * @property {Object} [global_config]
423
422
  * @property {string} [name] - The name of the configuration
424
423
  * @property {string[]} [page] - An array of pages
425
424
  */
@@ -791,8 +790,7 @@ class ThemeApplicationModel {
791
790
  /** @returns {GlobalConfig} */
792
791
  static GlobalConfig() {
793
792
  return Joi.object({
794
- auth: ThemeApplicationModel.AuthConfig(),
795
- palette: ThemeApplicationModel.PaletteConfig(),
793
+ custom: ThemeApplicationModel.CustomConfig(),
796
794
  statics: ThemeApplicationModel.StaticConfig(),
797
795
  });
798
796
  }
@@ -991,6 +989,7 @@ class ThemeApplicationModel {
991
989
  return Joi.object({
992
990
  auth: ThemeApplicationModel.AuthConfig(),
993
991
  colors: ThemeApplicationModel.Colors(),
992
+ palette: ThemeApplicationModel.PaletteConfig(),
994
993
  });
995
994
  }
996
995
 
@@ -1015,8 +1014,7 @@ class ThemeApplicationModel {
1015
1014
  /** @returns {ThemeConfiguration} */
1016
1015
  static ThemeConfiguration() {
1017
1016
  return Joi.object({
1018
- custom: ThemeApplicationModel.CustomConfig(),
1019
- global_config: ThemeApplicationModel.GlobalConfig(),
1017
+ global_config: Joi.any(),
1020
1018
  name: Joi.string().allow(""),
1021
1019
  page: Joi.array().items(Joi.string().allow("")),
1022
1020
  });
@@ -865,6 +865,7 @@ export = CartPlatformModel;
865
865
  * @property {string} mode
866
866
  * @property {string} [name]
867
867
  * @property {string} [payment]
868
+ * @property {Object} [payment_extra_identifiers]
868
869
  * @property {PaymentMeta} payment_meta
869
870
  */
870
871
  /**
@@ -954,6 +955,7 @@ export = CartPlatformModel;
954
955
  * @property {string} order_type
955
956
  * @property {number} [ordering_store]
956
957
  * @property {boolean} [payment_auto_confirm]
958
+ * @property {Object} [payment_extra_identifiers]
957
959
  * @property {string} [payment_identifier]
958
960
  * @property {string} payment_mode
959
961
  * @property {Object} [payment_params]
@@ -2818,6 +2820,7 @@ type PaymentMethod = {
2818
2820
  mode: string;
2819
2821
  name?: string;
2820
2822
  payment?: string;
2823
+ payment_extra_identifiers?: any;
2821
2824
  payment_meta: PaymentMeta;
2822
2825
  };
2823
2826
  /** @returns {PaymentModes} */
@@ -2919,6 +2922,7 @@ type PlatformCartCheckoutDetailRequest = {
2919
2922
  order_type: string;
2920
2923
  ordering_store?: number;
2921
2924
  payment_auto_confirm?: boolean;
2925
+ payment_extra_identifiers?: any;
2922
2926
  payment_identifier?: string;
2923
2927
  payment_mode: string;
2924
2928
  payment_params?: any;
@@ -963,6 +963,7 @@ const Joi = require("joi");
963
963
  * @property {string} mode
964
964
  * @property {string} [name]
965
965
  * @property {string} [payment]
966
+ * @property {Object} [payment_extra_identifiers]
966
967
  * @property {PaymentMeta} payment_meta
967
968
  */
968
969
 
@@ -1058,6 +1059,7 @@ const Joi = require("joi");
1058
1059
  * @property {string} order_type
1059
1060
  * @property {number} [ordering_store]
1060
1061
  * @property {boolean} [payment_auto_confirm]
1062
+ * @property {Object} [payment_extra_identifiers]
1061
1063
  * @property {string} [payment_identifier]
1062
1064
  * @property {string} payment_mode
1063
1065
  * @property {Object} [payment_params]
@@ -2979,6 +2981,7 @@ class CartPlatformModel {
2979
2981
  mode: Joi.string().allow("").required(),
2980
2982
  name: Joi.string().allow(""),
2981
2983
  payment: Joi.string().allow(""),
2984
+ payment_extra_identifiers: Joi.any(),
2982
2985
  payment_meta: CartPlatformModel.PaymentMeta().required(),
2983
2986
  });
2984
2987
  }
@@ -3088,6 +3091,7 @@ class CartPlatformModel {
3088
3091
  order_type: Joi.string().allow("").required(),
3089
3092
  ordering_store: Joi.number().allow(null),
3090
3093
  payment_auto_confirm: Joi.boolean(),
3094
+ payment_extra_identifiers: Joi.any(),
3091
3095
  payment_identifier: Joi.string().allow("").allow(null),
3092
3096
  payment_mode: Joi.string().allow("").required(),
3093
3097
  payment_params: Joi.any().allow(null),
@@ -102,6 +102,20 @@ declare class Catalog {
102
102
  * @description: Add configuration for listing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createListingConfiguration/).
103
103
  */
104
104
  createListingConfiguration({ configType, body, requestHeaders }?: CatalogPlatformApplicationValidator.CreateListingConfigurationParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.AppConfigurationsSort>;
105
+ /**
106
+ * @param {CatalogPlatformApplicationValidator.CreateSearchConfigurationParam} arg
107
+ * - Arg object
108
+ *
109
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
110
+ * @param {import("../PlatformAPIClient").Options} - Options
111
+ * @returns {Promise<CatalogPlatformModel.CreateSearchConfigurationResponse>}
112
+ * - Success response
113
+ *
114
+ * @name createSearchConfiguration
115
+ * @summary: Update search configuration for an application
116
+ * @description: This view allows you to modify searchable attributes for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createSearchConfiguration/).
117
+ */
118
+ createSearchConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.CreateSearchConfigurationParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.CreateSearchConfigurationResponse>;
105
119
  /**
106
120
  * @param {CatalogPlatformApplicationValidator.DeleteAutocompleteKeywordParam} arg
107
121
  * - Arg object
@@ -148,6 +162,20 @@ declare class Catalog {
148
162
  * @description: Delete configuration for listing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteListingConfiguration/).
149
163
  */
150
164
  deleteListingConfiguration({ configType, configId, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteListingConfigurationParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.ConfigSuccessResponse>;
165
+ /**
166
+ * @param {CatalogPlatformApplicationValidator.DeleteSearchConfigurationParam} arg
167
+ * - Arg object
168
+ *
169
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
170
+ * @param {import("../PlatformAPIClient").Options} - Options
171
+ * @returns {Promise<CatalogPlatformModel.DeleteSearchConfigurationResponse>}
172
+ * - Success response
173
+ *
174
+ * @name deleteSearchConfiguration
175
+ * @summary: Delete search configuration for an application
176
+ * @description: This view allows you to reset search config for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSearchConfiguration/).
177
+ */
178
+ deleteSearchConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise<CatalogPlatformModel.DeleteSearchConfigurationResponse>;
151
179
  /**
152
180
  * @param {CatalogPlatformApplicationValidator.DeleteSearchKeywordsParam} arg
153
181
  * - Arg object
@@ -650,6 +678,20 @@ declare class Catalog {
650
678
  * @description: Get query filters to configure a collection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getQueryFilters/).
651
679
  */
652
680
  getQueryFilters({ requestHeaders }?: any, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetCollectionQueryOptionResponse>;
681
+ /**
682
+ * @param {CatalogPlatformApplicationValidator.GetSearchConfigurationParam} arg
683
+ * - Arg object
684
+ *
685
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
686
+ * @param {import("../PlatformAPIClient").Options} - Options
687
+ * @returns {Promise<CatalogPlatformModel.GetSearchConfigurationResponse>}
688
+ * - Success response
689
+ *
690
+ * @name getSearchConfiguration
691
+ * @summary: List search configuration for an application
692
+ * @description: This view allows you to add/modify searchable attributes for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSearchConfiguration/).
693
+ */
694
+ getSearchConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetSearchConfigurationResponse>;
653
695
  /**
654
696
  * @param {CatalogPlatformApplicationValidator.GetSearchKeywordsParam} arg
655
697
  * - Arg object
@@ -790,6 +832,20 @@ declare class Catalog {
790
832
  * @description: Update configuration for listing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateListingConfiguration/).
791
833
  */
792
834
  updateListingConfiguration({ configType, configId, body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateListingConfigurationParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.AppConfigurationsSort>;
835
+ /**
836
+ * @param {CatalogPlatformApplicationValidator.UpdateSearchConfigurationParam} arg
837
+ * - Arg object
838
+ *
839
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
840
+ * @param {import("../PlatformAPIClient").Options} - Options
841
+ * @returns {Promise<CatalogPlatformModel.UpdateSearchConfigurationResponse>}
842
+ * - Success response
843
+ *
844
+ * @name updateSearchConfiguration
845
+ * @summary: Update search configuration for an application
846
+ * @description: This view allows you to modify searchable attributes for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSearchConfiguration/).
847
+ */
848
+ updateSearchConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateSearchConfigurationParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.UpdateSearchConfigurationResponse>;
793
849
  /**
794
850
  * @param {CatalogPlatformApplicationValidator.UpdateSearchKeywordsParam} arg
795
851
  * - Arg object
@@ -639,6 +639,85 @@ class Catalog {
639
639
  return response;
640
640
  }
641
641
 
642
+ /**
643
+ * @param {CatalogPlatformApplicationValidator.CreateSearchConfigurationParam} arg
644
+ * - Arg object
645
+ *
646
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
647
+ * @param {import("../PlatformAPIClient").Options} - Options
648
+ * @returns {Promise<CatalogPlatformModel.CreateSearchConfigurationResponse>}
649
+ * - Success response
650
+ *
651
+ * @name createSearchConfiguration
652
+ * @summary: Update search configuration for an application
653
+ * @description: This view allows you to modify searchable attributes for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createSearchConfiguration/).
654
+ */
655
+ async createSearchConfiguration(
656
+ { body, requestHeaders } = { requestHeaders: {} },
657
+ { responseHeaders } = { responseHeaders: false }
658
+ ) {
659
+ const {
660
+ error,
661
+ } = CatalogPlatformApplicationValidator.createSearchConfiguration().validate(
662
+ {
663
+ body,
664
+ },
665
+ { abortEarly: false, allowUnknown: true }
666
+ );
667
+ if (error) {
668
+ return Promise.reject(new FDKClientValidationError(error));
669
+ }
670
+
671
+ // Showing warrnings if extra unknown parameters are found
672
+ const {
673
+ error: warrning,
674
+ } = CatalogPlatformApplicationValidator.createSearchConfiguration().validate(
675
+ {
676
+ body,
677
+ },
678
+ { abortEarly: false, allowUnknown: false }
679
+ );
680
+ if (warrning) {
681
+ Logger({
682
+ level: "WARN",
683
+ message: `Parameter Validation warrnings for platform > Catalog > createSearchConfiguration \n ${warrning}`,
684
+ });
685
+ }
686
+
687
+ const query_params = {};
688
+
689
+ const response = await PlatformAPIClient.execute(
690
+ this.config,
691
+ "post",
692
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/configuration/`,
693
+ query_params,
694
+ body,
695
+ requestHeaders,
696
+ { responseHeaders }
697
+ );
698
+
699
+ let responseData = response;
700
+ if (responseHeaders) {
701
+ responseData = response[0];
702
+ }
703
+
704
+ const {
705
+ error: res_error,
706
+ } = CatalogPlatformModel.CreateSearchConfigurationResponse().validate(
707
+ responseData,
708
+ { abortEarly: false, allowUnknown: false }
709
+ );
710
+
711
+ if (res_error) {
712
+ Logger({
713
+ level: "WARN",
714
+ message: `Response Validation Warnnings for platform > Catalog > createSearchConfiguration \n ${res_error}`,
715
+ });
716
+ }
717
+
718
+ return response;
719
+ }
720
+
642
721
  /**
643
722
  * @param {CatalogPlatformApplicationValidator.DeleteAutocompleteKeywordParam} arg
644
723
  * - Arg object
@@ -949,6 +1028,81 @@ class Catalog {
949
1028
  return response;
950
1029
  }
951
1030
 
1031
+ /**
1032
+ * @param {CatalogPlatformApplicationValidator.DeleteSearchConfigurationParam} arg
1033
+ * - Arg object
1034
+ *
1035
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1036
+ * @param {import("../PlatformAPIClient").Options} - Options
1037
+ * @returns {Promise<CatalogPlatformModel.DeleteSearchConfigurationResponse>}
1038
+ * - Success response
1039
+ *
1040
+ * @name deleteSearchConfiguration
1041
+ * @summary: Delete search configuration for an application
1042
+ * @description: This view allows you to reset search config for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSearchConfiguration/).
1043
+ */
1044
+ async deleteSearchConfiguration(
1045
+ { requestHeaders } = { requestHeaders: {} },
1046
+ { responseHeaders } = { responseHeaders: false }
1047
+ ) {
1048
+ const {
1049
+ error,
1050
+ } = CatalogPlatformApplicationValidator.deleteSearchConfiguration().validate(
1051
+ {},
1052
+ { abortEarly: false, allowUnknown: true }
1053
+ );
1054
+ if (error) {
1055
+ return Promise.reject(new FDKClientValidationError(error));
1056
+ }
1057
+
1058
+ // Showing warrnings if extra unknown parameters are found
1059
+ const {
1060
+ error: warrning,
1061
+ } = CatalogPlatformApplicationValidator.deleteSearchConfiguration().validate(
1062
+ {},
1063
+ { abortEarly: false, allowUnknown: false }
1064
+ );
1065
+ if (warrning) {
1066
+ Logger({
1067
+ level: "WARN",
1068
+ message: `Parameter Validation warrnings for platform > Catalog > deleteSearchConfiguration \n ${warrning}`,
1069
+ });
1070
+ }
1071
+
1072
+ const query_params = {};
1073
+
1074
+ const response = await PlatformAPIClient.execute(
1075
+ this.config,
1076
+ "delete",
1077
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/configuration/`,
1078
+ query_params,
1079
+ undefined,
1080
+ requestHeaders,
1081
+ { responseHeaders }
1082
+ );
1083
+
1084
+ let responseData = response;
1085
+ if (responseHeaders) {
1086
+ responseData = response[0];
1087
+ }
1088
+
1089
+ const {
1090
+ error: res_error,
1091
+ } = CatalogPlatformModel.DeleteSearchConfigurationResponse().validate(
1092
+ responseData,
1093
+ { abortEarly: false, allowUnknown: false }
1094
+ );
1095
+
1096
+ if (res_error) {
1097
+ Logger({
1098
+ level: "WARN",
1099
+ message: `Response Validation Warnnings for platform > Catalog > deleteSearchConfiguration \n ${res_error}`,
1100
+ });
1101
+ }
1102
+
1103
+ return response;
1104
+ }
1105
+
952
1106
  /**
953
1107
  * @param {CatalogPlatformApplicationValidator.DeleteSearchKeywordsParam} arg
954
1108
  * - Arg object
@@ -3645,6 +3799,81 @@ class Catalog {
3645
3799
  return response;
3646
3800
  }
3647
3801
 
3802
+ /**
3803
+ * @param {CatalogPlatformApplicationValidator.GetSearchConfigurationParam} arg
3804
+ * - Arg object
3805
+ *
3806
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3807
+ * @param {import("../PlatformAPIClient").Options} - Options
3808
+ * @returns {Promise<CatalogPlatformModel.GetSearchConfigurationResponse>}
3809
+ * - Success response
3810
+ *
3811
+ * @name getSearchConfiguration
3812
+ * @summary: List search configuration for an application
3813
+ * @description: This view allows you to add/modify searchable attributes for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSearchConfiguration/).
3814
+ */
3815
+ async getSearchConfiguration(
3816
+ { requestHeaders } = { requestHeaders: {} },
3817
+ { responseHeaders } = { responseHeaders: false }
3818
+ ) {
3819
+ const {
3820
+ error,
3821
+ } = CatalogPlatformApplicationValidator.getSearchConfiguration().validate(
3822
+ {},
3823
+ { abortEarly: false, allowUnknown: true }
3824
+ );
3825
+ if (error) {
3826
+ return Promise.reject(new FDKClientValidationError(error));
3827
+ }
3828
+
3829
+ // Showing warrnings if extra unknown parameters are found
3830
+ const {
3831
+ error: warrning,
3832
+ } = CatalogPlatformApplicationValidator.getSearchConfiguration().validate(
3833
+ {},
3834
+ { abortEarly: false, allowUnknown: false }
3835
+ );
3836
+ if (warrning) {
3837
+ Logger({
3838
+ level: "WARN",
3839
+ message: `Parameter Validation warrnings for platform > Catalog > getSearchConfiguration \n ${warrning}`,
3840
+ });
3841
+ }
3842
+
3843
+ const query_params = {};
3844
+
3845
+ const response = await PlatformAPIClient.execute(
3846
+ this.config,
3847
+ "get",
3848
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/configuration/`,
3849
+ query_params,
3850
+ undefined,
3851
+ requestHeaders,
3852
+ { responseHeaders }
3853
+ );
3854
+
3855
+ let responseData = response;
3856
+ if (responseHeaders) {
3857
+ responseData = response[0];
3858
+ }
3859
+
3860
+ const {
3861
+ error: res_error,
3862
+ } = CatalogPlatformModel.GetSearchConfigurationResponse().validate(
3863
+ responseData,
3864
+ { abortEarly: false, allowUnknown: false }
3865
+ );
3866
+
3867
+ if (res_error) {
3868
+ Logger({
3869
+ level: "WARN",
3870
+ message: `Response Validation Warnnings for platform > Catalog > getSearchConfiguration \n ${res_error}`,
3871
+ });
3872
+ }
3873
+
3874
+ return response;
3875
+ }
3876
+
3648
3877
  /**
3649
3878
  * @param {CatalogPlatformApplicationValidator.GetSearchKeywordsParam} arg
3650
3879
  * - Arg object
@@ -4587,6 +4816,85 @@ class Catalog {
4587
4816
  return response;
4588
4817
  }
4589
4818
 
4819
+ /**
4820
+ * @param {CatalogPlatformApplicationValidator.UpdateSearchConfigurationParam} arg
4821
+ * - Arg object
4822
+ *
4823
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4824
+ * @param {import("../PlatformAPIClient").Options} - Options
4825
+ * @returns {Promise<CatalogPlatformModel.UpdateSearchConfigurationResponse>}
4826
+ * - Success response
4827
+ *
4828
+ * @name updateSearchConfiguration
4829
+ * @summary: Update search configuration for an application
4830
+ * @description: This view allows you to modify searchable attributes for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSearchConfiguration/).
4831
+ */
4832
+ async updateSearchConfiguration(
4833
+ { body, requestHeaders } = { requestHeaders: {} },
4834
+ { responseHeaders } = { responseHeaders: false }
4835
+ ) {
4836
+ const {
4837
+ error,
4838
+ } = CatalogPlatformApplicationValidator.updateSearchConfiguration().validate(
4839
+ {
4840
+ body,
4841
+ },
4842
+ { abortEarly: false, allowUnknown: true }
4843
+ );
4844
+ if (error) {
4845
+ return Promise.reject(new FDKClientValidationError(error));
4846
+ }
4847
+
4848
+ // Showing warrnings if extra unknown parameters are found
4849
+ const {
4850
+ error: warrning,
4851
+ } = CatalogPlatformApplicationValidator.updateSearchConfiguration().validate(
4852
+ {
4853
+ body,
4854
+ },
4855
+ { abortEarly: false, allowUnknown: false }
4856
+ );
4857
+ if (warrning) {
4858
+ Logger({
4859
+ level: "WARN",
4860
+ message: `Parameter Validation warrnings for platform > Catalog > updateSearchConfiguration \n ${warrning}`,
4861
+ });
4862
+ }
4863
+
4864
+ const query_params = {};
4865
+
4866
+ const response = await PlatformAPIClient.execute(
4867
+ this.config,
4868
+ "put",
4869
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/configuration/`,
4870
+ query_params,
4871
+ body,
4872
+ requestHeaders,
4873
+ { responseHeaders }
4874
+ );
4875
+
4876
+ let responseData = response;
4877
+ if (responseHeaders) {
4878
+ responseData = response[0];
4879
+ }
4880
+
4881
+ const {
4882
+ error: res_error,
4883
+ } = CatalogPlatformModel.UpdateSearchConfigurationResponse().validate(
4884
+ responseData,
4885
+ { abortEarly: false, allowUnknown: false }
4886
+ );
4887
+
4888
+ if (res_error) {
4889
+ Logger({
4890
+ level: "WARN",
4891
+ message: `Response Validation Warnnings for platform > Catalog > updateSearchConfiguration \n ${res_error}`,
4892
+ });
4893
+ }
4894
+
4895
+ return response;
4896
+ }
4897
+
4590
4898
  /**
4591
4899
  * @param {CatalogPlatformApplicationValidator.UpdateSearchKeywordsParam} arg
4592
4900
  * - Arg object