@gofynd/fdk-client-javascript 3.11.0 → 3.13.0

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 (32) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -6
  4. package/sdk/application/Catalog/CatalogApplicationClient.js +71 -12
  5. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +80 -80
  6. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -48
  7. package/sdk/platform/Cart/CartPlatformModel.d.ts +6 -18
  8. package/sdk/platform/Cart/CartPlatformModel.js +2 -36
  9. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +14 -48
  10. package/sdk/platform/Catalog/CatalogPlatformClient.js +85 -338
  11. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +207 -763
  12. package/sdk/platform/Catalog/CatalogPlatformModel.js +107 -392
  13. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -71
  14. package/sdk/platform/Catalog/CatalogPlatformValidator.js +14 -60
  15. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +36 -0
  16. package/sdk/platform/Order/OrderPlatformApplicationClient.js +252 -0
  17. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +34 -1
  18. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +42 -0
  19. package/sdk/platform/Order/OrderPlatformClient.d.ts +69 -7
  20. package/sdk/platform/Order/OrderPlatformClient.js +453 -7
  21. package/sdk/platform/Order/OrderPlatformModel.d.ts +1938 -493
  22. package/sdk/platform/Order/OrderPlatformModel.js +1238 -506
  23. package/sdk/platform/Order/OrderPlatformValidator.d.ts +162 -16
  24. package/sdk/platform/Order/OrderPlatformValidator.js +111 -9
  25. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +14 -0
  26. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +85 -0
  27. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -1
  28. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +16 -0
  29. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +861 -178
  30. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +534 -84
  31. package/sdk/public/Webhook/WebhookPublicModel.d.ts +5 -0
  32. package/sdk/public/Webhook/WebhookPublicModel.js +2 -0
@@ -52,10 +52,6 @@ export = CatalogPlatformValidator;
52
52
  * @typedef CreateProductAssetsInBulkParam
53
53
  * @property {CatalogPlatformModel.ProductBulkAssets} body
54
54
  */
55
- /**
56
- * @typedef CreateProductBundleParam
57
- * @property {CatalogPlatformModel.ProductBundleRequestSchema} body
58
- */
59
55
  /**
60
56
  * @typedef CreateProductExportJobParam
61
57
  * @property {CatalogPlatformModel.ProductTemplateDownloadsExport} body
@@ -288,20 +284,6 @@ export = CatalogPlatformValidator;
288
284
  * @property {number} [pageSize] - Number of items to retrieve in each page.
289
285
  * Default is 12.
290
286
  */
291
- /**
292
- * @typedef GetProductBundleParam
293
- * @property {string} [q] - A search string that is searched with product bundle name.
294
- * @property {string[]} [slug] - Slugs of bundles to be retrieved.
295
- * @property {number} [pageNo] - The page number to navigate through the given
296
- * set of results
297
- * @property {number} [pageSize] - Number of items to retrieve in each page.
298
- * Default is 12.
299
- */
300
- /**
301
- * @typedef GetProductBundleDetailParam
302
- * @property {string} id - A `id` is a unique identifier for a particular
303
- * detail. Pass the `id` of the keywords which you want to retrieve.
304
- */
305
287
  /**
306
288
  * @typedef GetProductExportJobsParam
307
289
  * @property {string} [status] - This is a parameter used to find all the jobs
@@ -465,6 +447,11 @@ export = CatalogPlatformValidator;
465
447
  * @property {string} [itemType] - A `item_type` is the identifier of the type
466
448
  * of template required.
467
449
  */
450
+ /**
451
+ * @typedef PartialUpdateProductParam
452
+ * @property {number} itemId - Item ID of the product to be patched.
453
+ * @property {CatalogPlatformModel.ProductPatchSchemaV3} body
454
+ */
468
455
  /**
469
456
  * @typedef UpdateHsnCodeParam
470
457
  * @property {string} id - Unique id
@@ -494,12 +481,6 @@ export = CatalogPlatformValidator;
494
481
  * @property {string} marketplaceSlug - Slug of the marketplace .
495
482
  * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequestSchema} body
496
483
  */
497
- /**
498
- * @typedef UpdateProductBundleParam
499
- * @property {string} id - A `id` is a unique identifier for a particular
500
- * detail. Pass the `id` of the keywords which you want to delete.
501
- * @property {CatalogPlatformModel.ProductBundleUpdateRequestSchema} body
502
- */
503
484
  /**
504
485
  * @typedef UpdateRealtimeInventoryParam
505
486
  * @property {number} itemId - Item code of the product of which size is to be get.
@@ -573,8 +554,6 @@ declare class CatalogPlatformValidator {
573
554
  static createProduct(): CreateProductParam;
574
555
  /** @returns {CreateProductAssetsInBulkParam} */
575
556
  static createProductAssetsInBulk(): CreateProductAssetsInBulkParam;
576
- /** @returns {CreateProductBundleParam} */
577
- static createProductBundle(): CreateProductBundleParam;
578
557
  /** @returns {CreateProductExportJobParam} */
579
558
  static createProductExportJob(): CreateProductExportJobParam;
580
559
  /** @returns {CreateProductsInBulkParam} */
@@ -653,10 +632,6 @@ declare class CatalogPlatformValidator {
653
632
  static getProductAttributes(): GetProductAttributesParam;
654
633
  /** @returns {GetProductBulkUploadHistoryParam} */
655
634
  static getProductBulkUploadHistory(): GetProductBulkUploadHistoryParam;
656
- /** @returns {GetProductBundleParam} */
657
- static getProductBundle(): GetProductBundleParam;
658
- /** @returns {GetProductBundleDetailParam} */
659
- static getProductBundleDetail(): GetProductBundleDetailParam;
660
635
  /** @returns {GetProductExportJobsParam} */
661
636
  static getProductExportJobs(): GetProductExportJobsParam;
662
637
  /** @returns {GetProductSizeParam} */
@@ -699,6 +674,8 @@ declare class CatalogPlatformValidator {
699
674
  static listProductTemplateExportDetails(): any;
700
675
  /** @returns {ListTemplateBrandTypeValuesParam} */
701
676
  static listTemplateBrandTypeValues(): ListTemplateBrandTypeValuesParam;
677
+ /** @returns {PartialUpdateProductParam} */
678
+ static partialUpdateProduct(): PartialUpdateProductParam;
702
679
  /** @returns {UpdateHsnCodeParam} */
703
680
  static updateHsnCode(): UpdateHsnCodeParam;
704
681
  /** @returns {UpdateInventoriesParam} */
@@ -709,8 +686,6 @@ declare class CatalogPlatformValidator {
709
686
  static updateLocationQuantity(): UpdateLocationQuantityParam;
710
687
  /** @returns {UpdateMarketplaceOptinParam} */
711
688
  static updateMarketplaceOptin(): UpdateMarketplaceOptinParam;
712
- /** @returns {UpdateProductBundleParam} */
713
- static updateProductBundle(): UpdateProductBundleParam;
714
689
  /** @returns {UpdateRealtimeInventoryParam} */
715
690
  static updateRealtimeInventory(): UpdateRealtimeInventoryParam;
716
691
  /** @returns {UpdateSizeGuideParam} */
@@ -727,7 +702,7 @@ declare class CatalogPlatformValidator {
727
702
  static validateProductTemplateSchema(): ValidateProductTemplateSchemaParam;
728
703
  }
729
704
  declare namespace CatalogPlatformValidator {
730
- export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateHsCodeParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductBundleParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, CreateTaxParam, CreateTaxComponentNameParam, CreateTaxVersionParam, DeleteBulkInventoryJobParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DeleteTaxRuleParam, DeleteTaxVersionParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetAllTaxRulesParam, GetAttributeParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetHsCodesParam, GetHsnCodeParam, GetInventoriesParam, GetInventoryBulkUploadHistoryParam, GetInventoryBySizeParam, GetInventoryBySizeIdentifierParam, GetInventoryExportParam, GetMarketplaceOptinDetailParam, GetMarketplacesParam, GetOptimalLocationsParam, GetProductParam, GetProductAssetsInBulkParam, GetProductAttributesParam, GetProductBulkUploadHistoryParam, GetProductBundleParam, GetProductBundleDetailParam, GetProductExportJobsParam, GetProductSizeParam, GetProductTagsParam, GetProductValidationParam, GetProductsParam, GetSellerInsightsParam, GetSingleProductHSNCodeParam, GetSizeGuideParam, GetSizeGuidesParam, GetStoreDetailParam, GetTaxComponentNamesParam, GetTaxVersionDetailsParam, GetVariantsOfProductsParam, ListCategoriesParam, ListDepartmentsDataParam, ListHSNCodesParam, ListInventoryExportParam, ListProductTemplateParam, ListProductTemplateCategoriesParam, ListProductTemplateExportDetailsParam, ListTemplateBrandTypeValuesParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateLocationPriceParam, UpdateLocationQuantityParam, UpdateMarketplaceOptinParam, UpdateProductBundleParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UpdateTaxRuleParam, UpdateTaxVersionParam, ValidateProductGlobalTemplateParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam };
705
+ export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateHsCodeParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, CreateTaxParam, CreateTaxComponentNameParam, CreateTaxVersionParam, DeleteBulkInventoryJobParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DeleteTaxRuleParam, DeleteTaxVersionParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetAllTaxRulesParam, GetAttributeParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetHsCodesParam, GetHsnCodeParam, GetInventoriesParam, GetInventoryBulkUploadHistoryParam, GetInventoryBySizeParam, GetInventoryBySizeIdentifierParam, GetInventoryExportParam, GetMarketplaceOptinDetailParam, GetMarketplacesParam, GetOptimalLocationsParam, GetProductParam, GetProductAssetsInBulkParam, GetProductAttributesParam, GetProductBulkUploadHistoryParam, GetProductExportJobsParam, GetProductSizeParam, GetProductTagsParam, GetProductValidationParam, GetProductsParam, GetSellerInsightsParam, GetSingleProductHSNCodeParam, GetSizeGuideParam, GetSizeGuidesParam, GetStoreDetailParam, GetTaxComponentNamesParam, GetTaxVersionDetailsParam, GetVariantsOfProductsParam, ListCategoriesParam, ListDepartmentsDataParam, ListHSNCodesParam, ListInventoryExportParam, ListProductTemplateParam, ListProductTemplateCategoriesParam, ListProductTemplateExportDetailsParam, ListTemplateBrandTypeValuesParam, PartialUpdateProductParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateLocationPriceParam, UpdateLocationQuantityParam, UpdateMarketplaceOptinParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UpdateTaxRuleParam, UpdateTaxVersionParam, ValidateProductGlobalTemplateParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam };
731
706
  }
732
707
  type AddInventoryParam = {
733
708
  /**
@@ -785,9 +760,6 @@ type CreateProductParam = {
785
760
  type CreateProductAssetsInBulkParam = {
786
761
  body: CatalogPlatformModel.ProductBulkAssets;
787
762
  };
788
- type CreateProductBundleParam = {
789
- body: CatalogPlatformModel.ProductBundleRequestSchema;
790
- };
791
763
  type CreateProductExportJobParam = {
792
764
  body: CatalogPlatformModel.ProductTemplateDownloadsExport;
793
765
  };
@@ -1242,33 +1214,6 @@ type GetProductBulkUploadHistoryParam = {
1242
1214
  */
1243
1215
  pageSize?: number;
1244
1216
  };
1245
- type GetProductBundleParam = {
1246
- /**
1247
- * - A search string that is searched with product bundle name.
1248
- */
1249
- q?: string;
1250
- /**
1251
- * - Slugs of bundles to be retrieved.
1252
- */
1253
- slug?: string[];
1254
- /**
1255
- * - The page number to navigate through the given
1256
- * set of results
1257
- */
1258
- pageNo?: number;
1259
- /**
1260
- * - Number of items to retrieve in each page.
1261
- * Default is 12.
1262
- */
1263
- pageSize?: number;
1264
- };
1265
- type GetProductBundleDetailParam = {
1266
- /**
1267
- * - A `id` is a unique identifier for a particular
1268
- * detail. Pass the `id` of the keywords which you want to retrieve.
1269
- */
1270
- id: string;
1271
- };
1272
1217
  type GetProductExportJobsParam = {
1273
1218
  /**
1274
1219
  * - This is a parameter used to find all the jobs
@@ -1630,6 +1575,13 @@ type ListTemplateBrandTypeValuesParam = {
1630
1575
  */
1631
1576
  itemType?: string;
1632
1577
  };
1578
+ type PartialUpdateProductParam = {
1579
+ /**
1580
+ * - Item ID of the product to be patched.
1581
+ */
1582
+ itemId: number;
1583
+ body: CatalogPlatformModel.ProductPatchSchemaV3;
1584
+ };
1633
1585
  type UpdateHsnCodeParam = {
1634
1586
  /**
1635
1587
  * - Unique id
@@ -1672,14 +1624,6 @@ type UpdateMarketplaceOptinParam = {
1672
1624
  marketplaceSlug: string;
1673
1625
  body: CatalogPlatformModel.UpdateMarketplaceOptinRequestSchema;
1674
1626
  };
1675
- type UpdateProductBundleParam = {
1676
- /**
1677
- * - A `id` is a unique identifier for a particular
1678
- * detail. Pass the `id` of the keywords which you want to delete.
1679
- */
1680
- id: string;
1681
- body: CatalogPlatformModel.ProductBundleUpdateRequestSchema;
1682
- };
1683
1627
  type UpdateRealtimeInventoryParam = {
1684
1628
  /**
1685
1629
  * - Item code of the product of which size is to be get.
@@ -67,11 +67,6 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
67
67
  * @property {CatalogPlatformModel.ProductBulkAssets} body
68
68
  */
69
69
 
70
- /**
71
- * @typedef CreateProductBundleParam
72
- * @property {CatalogPlatformModel.ProductBundleRequestSchema} body
73
- */
74
-
75
70
  /**
76
71
  * @typedef CreateProductExportJobParam
77
72
  * @property {CatalogPlatformModel.ProductTemplateDownloadsExport} body
@@ -343,22 +338,6 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
343
338
  * Default is 12.
344
339
  */
345
340
 
346
- /**
347
- * @typedef GetProductBundleParam
348
- * @property {string} [q] - A search string that is searched with product bundle name.
349
- * @property {string[]} [slug] - Slugs of bundles to be retrieved.
350
- * @property {number} [pageNo] - The page number to navigate through the given
351
- * set of results
352
- * @property {number} [pageSize] - Number of items to retrieve in each page.
353
- * Default is 12.
354
- */
355
-
356
- /**
357
- * @typedef GetProductBundleDetailParam
358
- * @property {string} id - A `id` is a unique identifier for a particular
359
- * detail. Pass the `id` of the keywords which you want to retrieve.
360
- */
361
-
362
341
  /**
363
342
  * @typedef GetProductExportJobsParam
364
343
  * @property {string} [status] - This is a parameter used to find all the jobs
@@ -543,6 +522,12 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
543
522
  * of template required.
544
523
  */
545
524
 
525
+ /**
526
+ * @typedef PartialUpdateProductParam
527
+ * @property {number} itemId - Item ID of the product to be patched.
528
+ * @property {CatalogPlatformModel.ProductPatchSchemaV3} body
529
+ */
530
+
546
531
  /**
547
532
  * @typedef UpdateHsnCodeParam
548
533
  * @property {string} id - Unique id
@@ -577,13 +562,6 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
577
562
  * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequestSchema} body
578
563
  */
579
564
 
580
- /**
581
- * @typedef UpdateProductBundleParam
582
- * @property {string} id - A `id` is a unique identifier for a particular
583
- * detail. Pass the `id` of the keywords which you want to delete.
584
- * @property {CatalogPlatformModel.ProductBundleUpdateRequestSchema} body
585
- */
586
-
587
565
  /**
588
566
  * @typedef UpdateRealtimeInventoryParam
589
567
  * @property {number} itemId - Item code of the product of which size is to be get.
@@ -728,13 +706,6 @@ class CatalogPlatformValidator {
728
706
  }).required();
729
707
  }
730
708
 
731
- /** @returns {CreateProductBundleParam} */
732
- static createProductBundle() {
733
- return Joi.object({
734
- body: CatalogPlatformModel.ProductBundleRequestSchema().required(),
735
- }).required();
736
- }
737
-
738
709
  /** @returns {CreateProductExportJobParam} */
739
710
  static createProductExportJob() {
740
711
  return Joi.object({
@@ -1060,23 +1031,6 @@ class CatalogPlatformValidator {
1060
1031
  }).required();
1061
1032
  }
1062
1033
 
1063
- /** @returns {GetProductBundleParam} */
1064
- static getProductBundle() {
1065
- return Joi.object({
1066
- q: Joi.string().allow(""),
1067
- slug: Joi.array().items(Joi.string().allow("")),
1068
- pageNo: Joi.number(),
1069
- pageSize: Joi.number(),
1070
- }).required();
1071
- }
1072
-
1073
- /** @returns {GetProductBundleDetailParam} */
1074
- static getProductBundleDetail() {
1075
- return Joi.object({
1076
- id: Joi.string().allow("").required(),
1077
- }).required();
1078
- }
1079
-
1080
1034
  /** @returns {GetProductExportJobsParam} */
1081
1035
  static getProductExportJobs() {
1082
1036
  return Joi.object({
@@ -1271,6 +1225,14 @@ class CatalogPlatformValidator {
1271
1225
  }).required();
1272
1226
  }
1273
1227
 
1228
+ /** @returns {PartialUpdateProductParam} */
1229
+ static partialUpdateProduct() {
1230
+ return Joi.object({
1231
+ itemId: Joi.number().required(),
1232
+ body: CatalogPlatformModel.ProductPatchSchemaV3().required(),
1233
+ }).required();
1234
+ }
1235
+
1274
1236
  /** @returns {UpdateHsnCodeParam} */
1275
1237
  static updateHsnCode() {
1276
1238
  return Joi.object({
@@ -1312,14 +1274,6 @@ class CatalogPlatformValidator {
1312
1274
  }).required();
1313
1275
  }
1314
1276
 
1315
- /** @returns {UpdateProductBundleParam} */
1316
- static updateProductBundle() {
1317
- return Joi.object({
1318
- id: Joi.string().allow("").required(),
1319
- body: CatalogPlatformModel.ProductBundleUpdateRequestSchema().required(),
1320
- }).required();
1321
- }
1322
-
1323
1277
  /** @returns {UpdateRealtimeInventoryParam} */
1324
1278
  static updateRealtimeInventory() {
1325
1279
  return Joi.object({
@@ -17,6 +17,18 @@ declare class Order {
17
17
  * @description: Get shipments of a particular sales channel based on the filters provided - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getApplicationShipments/).
18
18
  */
19
19
  getApplicationShipments({ lane, searchType, searchId, fromDate, toDate, dpIds, orderingCompanyId, stores, salesChannel, requestByExt, pageNo, pageSize, customerId, isPrioritySort, excludeLockedShipments, requestHeaders, }?: OrderPlatformApplicationValidator.GetApplicationShipmentsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>;
20
+ /**
21
+ * @param {OrderPlatformApplicationValidator.GetOrderingSourceConfigBySlugParam} arg
22
+ * - Arg object
23
+ *
24
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
25
+ * @param {import("../PlatformAPIClient").Options} - Options
26
+ * @returns {Promise<OrderPlatformModel.OrderingSourceConfig>} - Success response
27
+ * @name getOrderingSourceConfigBySlug
28
+ * @summary: Get ordering source config for a given company and application.
29
+ * @description: Retrieves the ordering source config for a given company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getOrderingSourceConfigBySlug/).
30
+ */
31
+ getOrderingSourceConfigBySlug({ slug, requestHeaders }?: OrderPlatformApplicationValidator.GetOrderingSourceConfigBySlugParam, { responseHeaders }?: object): Promise<OrderPlatformModel.OrderingSourceConfig>;
20
32
  /**
21
33
  * @param {OrderPlatformApplicationValidator.GetPlatformShipmentReasonsParam} arg
22
34
  * - Arg object
@@ -52,6 +64,18 @@ declare class Order {
52
64
  * @description: Allows users to retrieve a comprehensive list of reasons for cancellation or returning a shipment. It provides both cancellation and return reasons, with an emphasis on Quality Control (QC) evaluations. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getShipmentBagReasons/).
53
65
  */
54
66
  getShipmentBagReasons({ shipmentId, lineNumber, requestHeaders }?: OrderPlatformApplicationValidator.GetShipmentBagReasonsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentBagReasons>;
67
+ /**
68
+ * @param {OrderPlatformApplicationValidator.ListOrderingSourcesParam} arg
69
+ * - Arg object
70
+ *
71
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
72
+ * @param {import("../PlatformAPIClient").Options} - Options
73
+ * @returns {Promise<OrderPlatformModel.ListOrderingSources>} - Success response
74
+ * @name listOrderingSources
75
+ * @summary: List ordering sources for a given company and application.
76
+ * @description: Retrieves the list of ordering sources for a given company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/listOrderingSources/).
77
+ */
78
+ listOrderingSources({ type, pageNo, pageSize, requestHeaders }?: OrderPlatformApplicationValidator.ListOrderingSourcesParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ListOrderingSources>;
55
79
  /**
56
80
  * @param {OrderPlatformApplicationValidator.TrackShipmentPlatformParam} arg
57
81
  * - Arg object
@@ -64,6 +88,18 @@ declare class Order {
64
88
  * @description: Track shipment by shipment Id for an application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/trackShipmentPlatform/).
65
89
  */
66
90
  trackShipmentPlatform({ shipmentId, requestHeaders }?: OrderPlatformApplicationValidator.TrackShipmentPlatformParam, { responseHeaders }?: object): Promise<OrderPlatformModel.PlatformShipmentTrack>;
91
+ /**
92
+ * @param {OrderPlatformApplicationValidator.UpdateOrderingSourceConfigBySlugParam} arg
93
+ * - Arg object
94
+ *
95
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
96
+ * @param {import("../PlatformAPIClient").Options} - Options
97
+ * @returns {Promise<OrderPlatformModel.OrderingSourceConfig>} - Success response
98
+ * @name updateOrderingSourceConfigBySlug
99
+ * @summary: Update ordering source config for a given company and application.
100
+ * @description: Updates the ordering source config for a given company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateOrderingSourceConfigBySlug/).
101
+ */
102
+ updateOrderingSourceConfigBySlug({ slug, body, requestHeaders }?: OrderPlatformApplicationValidator.UpdateOrderingSourceConfigBySlugParam, { responseHeaders }?: object): Promise<OrderPlatformModel.OrderingSourceConfig>;
67
103
  }
68
104
  import OrderPlatformApplicationValidator = require("./OrderPlatformApplicationValidator");
69
105
  import OrderPlatformModel = require("./OrderPlatformModel");
@@ -158,6 +158,87 @@ class Order {
158
158
  return response;
159
159
  }
160
160
 
161
+ /**
162
+ * @param {OrderPlatformApplicationValidator.GetOrderingSourceConfigBySlugParam} arg
163
+ * - Arg object
164
+ *
165
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
166
+ * @param {import("../PlatformAPIClient").Options} - Options
167
+ * @returns {Promise<OrderPlatformModel.OrderingSourceConfig>} - Success response
168
+ * @name getOrderingSourceConfigBySlug
169
+ * @summary: Get ordering source config for a given company and application.
170
+ * @description: Retrieves the ordering source config for a given company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getOrderingSourceConfigBySlug/).
171
+ */
172
+ async getOrderingSourceConfigBySlug(
173
+ { slug, requestHeaders } = { requestHeaders: {} },
174
+ { responseHeaders } = { responseHeaders: false }
175
+ ) {
176
+ const {
177
+ error,
178
+ } = OrderPlatformApplicationValidator.getOrderingSourceConfigBySlug().validate(
179
+ {
180
+ slug,
181
+ },
182
+ { abortEarly: false, allowUnknown: true }
183
+ );
184
+ if (error) {
185
+ return Promise.reject(new FDKClientValidationError(error));
186
+ }
187
+
188
+ // Showing warrnings if extra unknown parameters are found
189
+ const {
190
+ error: warrning,
191
+ } = OrderPlatformApplicationValidator.getOrderingSourceConfigBySlug().validate(
192
+ {
193
+ slug,
194
+ },
195
+ { abortEarly: false, allowUnknown: false }
196
+ );
197
+ if (warrning) {
198
+ Logger({
199
+ level: "WARN",
200
+ message: `Parameter Validation warrnings for platform > Order > getOrderingSourceConfigBySlug \n ${warrning}`,
201
+ });
202
+ }
203
+
204
+ const query_params = {};
205
+
206
+ const response = await PlatformAPIClient.execute(
207
+ this.config,
208
+ "get",
209
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-sources/${slug}`,
210
+ query_params,
211
+ undefined,
212
+ requestHeaders,
213
+ { responseHeaders }
214
+ );
215
+
216
+ let responseData = response;
217
+ if (responseHeaders) {
218
+ responseData = response[0];
219
+ }
220
+
221
+ const {
222
+ error: res_error,
223
+ } = OrderPlatformModel.OrderingSourceConfig().validate(responseData, {
224
+ abortEarly: false,
225
+ allowUnknown: true,
226
+ });
227
+
228
+ if (res_error) {
229
+ if (this.config.options.strictResponseCheck === true) {
230
+ return Promise.reject(new FDKResponseValidationError(res_error));
231
+ } else {
232
+ Logger({
233
+ level: "WARN",
234
+ message: `Response Validation Warnings for platform > Order > getOrderingSourceConfigBySlug \n ${res_error}`,
235
+ });
236
+ }
237
+ }
238
+
239
+ return response;
240
+ }
241
+
161
242
  /**
162
243
  * @param {OrderPlatformApplicationValidator.GetPlatformShipmentReasonsParam} arg
163
244
  * - Arg object
@@ -400,6 +481,94 @@ class Order {
400
481
  return response;
401
482
  }
402
483
 
484
+ /**
485
+ * @param {OrderPlatformApplicationValidator.ListOrderingSourcesParam} arg
486
+ * - Arg object
487
+ *
488
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
489
+ * @param {import("../PlatformAPIClient").Options} - Options
490
+ * @returns {Promise<OrderPlatformModel.ListOrderingSources>} - Success response
491
+ * @name listOrderingSources
492
+ * @summary: List ordering sources for a given company and application.
493
+ * @description: Retrieves the list of ordering sources for a given company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/listOrderingSources/).
494
+ */
495
+ async listOrderingSources(
496
+ { type, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
497
+ { responseHeaders } = { responseHeaders: false }
498
+ ) {
499
+ const {
500
+ error,
501
+ } = OrderPlatformApplicationValidator.listOrderingSources().validate(
502
+ {
503
+ type,
504
+ pageNo,
505
+ pageSize,
506
+ },
507
+ { abortEarly: false, allowUnknown: true }
508
+ );
509
+ if (error) {
510
+ return Promise.reject(new FDKClientValidationError(error));
511
+ }
512
+
513
+ // Showing warrnings if extra unknown parameters are found
514
+ const {
515
+ error: warrning,
516
+ } = OrderPlatformApplicationValidator.listOrderingSources().validate(
517
+ {
518
+ type,
519
+ pageNo,
520
+ pageSize,
521
+ },
522
+ { abortEarly: false, allowUnknown: false }
523
+ );
524
+ if (warrning) {
525
+ Logger({
526
+ level: "WARN",
527
+ message: `Parameter Validation warrnings for platform > Order > listOrderingSources \n ${warrning}`,
528
+ });
529
+ }
530
+
531
+ const query_params = {};
532
+ query_params["type"] = type;
533
+ query_params["page_no"] = pageNo;
534
+ query_params["page_size"] = pageSize;
535
+
536
+ const response = await PlatformAPIClient.execute(
537
+ this.config,
538
+ "get",
539
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-sources`,
540
+ query_params,
541
+ undefined,
542
+ requestHeaders,
543
+ { responseHeaders }
544
+ );
545
+
546
+ let responseData = response;
547
+ if (responseHeaders) {
548
+ responseData = response[0];
549
+ }
550
+
551
+ const {
552
+ error: res_error,
553
+ } = OrderPlatformModel.ListOrderingSources().validate(responseData, {
554
+ abortEarly: false,
555
+ allowUnknown: true,
556
+ });
557
+
558
+ if (res_error) {
559
+ if (this.config.options.strictResponseCheck === true) {
560
+ return Promise.reject(new FDKResponseValidationError(res_error));
561
+ } else {
562
+ Logger({
563
+ level: "WARN",
564
+ message: `Response Validation Warnings for platform > Order > listOrderingSources \n ${res_error}`,
565
+ });
566
+ }
567
+ }
568
+
569
+ return response;
570
+ }
571
+
403
572
  /**
404
573
  * @param {OrderPlatformApplicationValidator.TrackShipmentPlatformParam} arg
405
574
  * - Arg object
@@ -480,6 +649,89 @@ class Order {
480
649
 
481
650
  return response;
482
651
  }
652
+
653
+ /**
654
+ * @param {OrderPlatformApplicationValidator.UpdateOrderingSourceConfigBySlugParam} arg
655
+ * - Arg object
656
+ *
657
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
658
+ * @param {import("../PlatformAPIClient").Options} - Options
659
+ * @returns {Promise<OrderPlatformModel.OrderingSourceConfig>} - Success response
660
+ * @name updateOrderingSourceConfigBySlug
661
+ * @summary: Update ordering source config for a given company and application.
662
+ * @description: Updates the ordering source config for a given company and application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateOrderingSourceConfigBySlug/).
663
+ */
664
+ async updateOrderingSourceConfigBySlug(
665
+ { slug, body, requestHeaders } = { requestHeaders: {} },
666
+ { responseHeaders } = { responseHeaders: false }
667
+ ) {
668
+ const {
669
+ error,
670
+ } = OrderPlatformApplicationValidator.updateOrderingSourceConfigBySlug().validate(
671
+ {
672
+ slug,
673
+ body,
674
+ },
675
+ { abortEarly: false, allowUnknown: true }
676
+ );
677
+ if (error) {
678
+ return Promise.reject(new FDKClientValidationError(error));
679
+ }
680
+
681
+ // Showing warrnings if extra unknown parameters are found
682
+ const {
683
+ error: warrning,
684
+ } = OrderPlatformApplicationValidator.updateOrderingSourceConfigBySlug().validate(
685
+ {
686
+ slug,
687
+ body,
688
+ },
689
+ { abortEarly: false, allowUnknown: false }
690
+ );
691
+ if (warrning) {
692
+ Logger({
693
+ level: "WARN",
694
+ message: `Parameter Validation warrnings for platform > Order > updateOrderingSourceConfigBySlug \n ${warrning}`,
695
+ });
696
+ }
697
+
698
+ const query_params = {};
699
+
700
+ const response = await PlatformAPIClient.execute(
701
+ this.config,
702
+ "put",
703
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-sources/${slug}`,
704
+ query_params,
705
+ body,
706
+ requestHeaders,
707
+ { responseHeaders }
708
+ );
709
+
710
+ let responseData = response;
711
+ if (responseHeaders) {
712
+ responseData = response[0];
713
+ }
714
+
715
+ const {
716
+ error: res_error,
717
+ } = OrderPlatformModel.OrderingSourceConfig().validate(responseData, {
718
+ abortEarly: false,
719
+ allowUnknown: true,
720
+ });
721
+
722
+ if (res_error) {
723
+ if (this.config.options.strictResponseCheck === true) {
724
+ return Promise.reject(new FDKResponseValidationError(res_error));
725
+ } else {
726
+ Logger({
727
+ level: "WARN",
728
+ message: `Response Validation Warnings for platform > Order > updateOrderingSourceConfigBySlug \n ${res_error}`,
729
+ });
730
+ }
731
+ }
732
+
733
+ return response;
734
+ }
483
735
  }
484
736
 
485
737
  module.exports = Order;