@gofynd/fdk-client-javascript 3.23.0 → 3.25.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 (38) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +12 -12
  4. package/sdk/application/Cart/CartApplicationClient.js +119 -33
  5. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +1 -1
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +1 -1
  7. package/sdk/application/Common/CommonApplicationClient.js +1 -1
  8. package/sdk/application/Logistic/LogisticApplicationClient.js +4 -2
  9. package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
  10. package/sdk/application/Order/OrderApplicationClient.js +4 -0
  11. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +17 -17
  12. package/sdk/platform/Cart/CartPlatformApplicationClient.js +84 -13
  13. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +121 -0
  14. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +52 -0
  15. package/sdk/platform/Cart/CartPlatformModel.d.ts +19 -27
  16. package/sdk/platform/Cart/CartPlatformModel.js +8 -18
  17. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +7 -2
  18. package/sdk/platform/Catalog/CatalogPlatformModel.js +5 -2
  19. package/sdk/platform/Common/CommonPlatformClient.js +1 -1
  20. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +96 -1
  21. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +61 -0
  22. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +48 -12
  23. package/sdk/platform/Content/ContentPlatformApplicationClient.js +316 -81
  24. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +27 -10
  25. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +38 -12
  26. package/sdk/platform/Content/ContentPlatformModel.d.ts +102 -1
  27. package/sdk/platform/Content/ContentPlatformModel.js +88 -0
  28. package/sdk/platform/Order/OrderPlatformClient.d.ts +28 -0
  29. package/sdk/platform/Order/OrderPlatformClient.js +179 -3
  30. package/sdk/platform/Order/OrderPlatformModel.d.ts +155 -6
  31. package/sdk/platform/Order/OrderPlatformModel.js +105 -3
  32. package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
  33. package/sdk/platform/Order/OrderPlatformValidator.js +30 -0
  34. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +63 -1
  35. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +43 -0
  36. package/sdk/platform/User/UserPlatformModel.d.ts +14 -1
  37. package/sdk/platform/User/UserPlatformModel.js +16 -0
  38. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -1
@@ -1,4 +1,37 @@
1
1
  export = ContentPlatformModel;
2
+ /**
3
+ * @typedef AppAssociationDeleted
4
+ * @property {string} [message] - Operation status string (e.g. "deleted").
5
+ * @property {string} [application_id] - The application_id whose record was deleted.
6
+ */
7
+ /**
8
+ * @typedef AppAssociationIosPayload
9
+ * @property {Object} [applinks] - Universal Links configuration.
10
+ * @property {Object} [appclips] - App Clips configuration.
11
+ * @property {Object} [webcredentials] - Shared Web Credentials.
12
+ * @property {Object} [activitycontinuation] - Handoff. Deprecated in iOS 14+.
13
+ */
14
+ /**
15
+ * @typedef AppAssociationAndroidStatement
16
+ * @property {string[]} [relation] - Permission relations granted by this statement.
17
+ * @property {Object} [target] - Subject of the statement (android_app or web).
18
+ */
19
+ /**
20
+ * @typedef AppAssociationWriteBody
21
+ * @property {AppAssociationIosPayload} [ios_payload] - Apple App Site
22
+ * Association JSON. Null to clear.
23
+ * @property {AppAssociationAndroidStatement[]} [android_payload] - Digital
24
+ * Asset Links JSON (array of statements). Null to clear.
25
+ */
26
+ /**
27
+ * @typedef AppAssociationRecord
28
+ * @property {AppAssociationIosPayload} [ios_payload]
29
+ * @property {AppAssociationAndroidStatement[]} [android_payload]
30
+ * @property {string} [created_at]
31
+ * @property {string} [updated_at]
32
+ * @property {string} [created_by]
33
+ * @property {string} [modified_by]
34
+ */
2
35
  /**
3
36
  * @typedef ValidationError
4
37
  * @property {string} message - A brief description of the error encountered.
@@ -1629,8 +1662,76 @@ export = ContentPlatformModel;
1629
1662
  declare class ContentPlatformModel {
1630
1663
  }
1631
1664
  declare namespace ContentPlatformModel {
1632
- export { ValidationError, GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetDetails, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogPayload, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, TemplateSchema, TemplateField, CreateTagRequestSchema, DataLoaderSchema, TagsTemplateSchema, TagTemplateItem, TemplateLayout, FieldDefinition, FieldValidation, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessDetails, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetDetails, LandingPageSchema, DefaultNavigationDetails, NavigationGetDetails, Orientation, NavigationSchema, NavigationPayload, PageGetDetails, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PagePayload, CronSchedule, PagePublishPayload, PageMetaSchema, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, MetaFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsDeleteSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSlugSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadDetails, CustomObjectListItemDefinitionModel, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldDefinition, CustomObjectBySlugSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, JobSchema, CustomFieldBulkEntry, CustomObjectBulkEntry, MetafieldTypesSchema, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, Duration, HTML, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectEntryFieldSchemaWithoutID, CustomObjectRequestSchema, CustomObjectRequestSchemaWithoutId, CustomObjectBulkSchema, ActionPage, TranslateUiLabels, TranslateUiLabelsCreate, StaticResourceUpdate, TranslateUiLabelsPage, Error, Meta, CompanyLanguage, CompanyLanguageCreate, CompanyLanguageUpdate, ApplicationLanguage, unPublishApplicationLanguage, ApplicationLanguageCreate, ApplicationLanguageUpdate, TranslatableResource, ResourceDefinition, ResourceJsonSchema, ResourceJsonSchemaType, ResourceUISchema, ResourceBulkDetails, Title, FeatureImage, SeoTranslate, MetaTag, MetaTagItem, ResourceTranslation, TranslationSeo, ResourceTranslationList, ResourceTranslationCreate, ResourceTranslationUpdate, TranslatableSection, Metrics, ResourceTranslationUpsertItem, ResourceTranslationBulkUpsert, StandardError, OperationResponseSchema, GenerationEntityType, PageType };
1665
+ export { AppAssociationDeleted, AppAssociationIosPayload, AppAssociationAndroidStatement, AppAssociationWriteBody, AppAssociationRecord, ValidationError, GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetDetails, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogPayload, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, TemplateSchema, TemplateField, CreateTagRequestSchema, DataLoaderSchema, TagsTemplateSchema, TagTemplateItem, TemplateLayout, FieldDefinition, FieldValidation, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessDetails, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetDetails, LandingPageSchema, DefaultNavigationDetails, NavigationGetDetails, Orientation, NavigationSchema, NavigationPayload, PageGetDetails, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PagePayload, CronSchedule, PagePublishPayload, PageMetaSchema, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, MetaFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsDeleteSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSlugSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadDetails, CustomObjectListItemDefinitionModel, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldDefinition, CustomObjectBySlugSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, JobSchema, CustomFieldBulkEntry, CustomObjectBulkEntry, MetafieldTypesSchema, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, Duration, HTML, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectEntryFieldSchemaWithoutID, CustomObjectRequestSchema, CustomObjectRequestSchemaWithoutId, CustomObjectBulkSchema, ActionPage, TranslateUiLabels, TranslateUiLabelsCreate, StaticResourceUpdate, TranslateUiLabelsPage, Error, Meta, CompanyLanguage, CompanyLanguageCreate, CompanyLanguageUpdate, ApplicationLanguage, unPublishApplicationLanguage, ApplicationLanguageCreate, ApplicationLanguageUpdate, TranslatableResource, ResourceDefinition, ResourceJsonSchema, ResourceJsonSchemaType, ResourceUISchema, ResourceBulkDetails, Title, FeatureImage, SeoTranslate, MetaTag, MetaTagItem, ResourceTranslation, TranslationSeo, ResourceTranslationList, ResourceTranslationCreate, ResourceTranslationUpdate, TranslatableSection, Metrics, ResourceTranslationUpsertItem, ResourceTranslationBulkUpsert, StandardError, OperationResponseSchema, GenerationEntityType, PageType };
1633
1666
  }
1667
+ /** @returns {AppAssociationDeleted} */
1668
+ declare function AppAssociationDeleted(): AppAssociationDeleted;
1669
+ type AppAssociationDeleted = {
1670
+ /**
1671
+ * - Operation status string (e.g. "deleted").
1672
+ */
1673
+ message?: string;
1674
+ /**
1675
+ * - The application_id whose record was deleted.
1676
+ */
1677
+ application_id?: string;
1678
+ };
1679
+ /** @returns {AppAssociationIosPayload} */
1680
+ declare function AppAssociationIosPayload(): AppAssociationIosPayload;
1681
+ type AppAssociationIosPayload = {
1682
+ /**
1683
+ * - Universal Links configuration.
1684
+ */
1685
+ applinks?: any;
1686
+ /**
1687
+ * - App Clips configuration.
1688
+ */
1689
+ appclips?: any;
1690
+ /**
1691
+ * - Shared Web Credentials.
1692
+ */
1693
+ webcredentials?: any;
1694
+ /**
1695
+ * - Handoff. Deprecated in iOS 14+.
1696
+ */
1697
+ activitycontinuation?: any;
1698
+ };
1699
+ /** @returns {AppAssociationAndroidStatement} */
1700
+ declare function AppAssociationAndroidStatement(): AppAssociationAndroidStatement;
1701
+ type AppAssociationAndroidStatement = {
1702
+ /**
1703
+ * - Permission relations granted by this statement.
1704
+ */
1705
+ relation?: string[];
1706
+ /**
1707
+ * - Subject of the statement (android_app or web).
1708
+ */
1709
+ target?: any;
1710
+ };
1711
+ /** @returns {AppAssociationWriteBody} */
1712
+ declare function AppAssociationWriteBody(): AppAssociationWriteBody;
1713
+ type AppAssociationWriteBody = {
1714
+ /**
1715
+ * - Apple App Site
1716
+ * Association JSON. Null to clear.
1717
+ */
1718
+ ios_payload?: AppAssociationIosPayload;
1719
+ /**
1720
+ * - Digital
1721
+ * Asset Links JSON (array of statements). Null to clear.
1722
+ */
1723
+ android_payload?: AppAssociationAndroidStatement[];
1724
+ };
1725
+ /** @returns {AppAssociationRecord} */
1726
+ declare function AppAssociationRecord(): AppAssociationRecord;
1727
+ type AppAssociationRecord = {
1728
+ ios_payload?: AppAssociationIosPayload;
1729
+ android_payload?: AppAssociationAndroidStatement[];
1730
+ created_at?: string;
1731
+ updated_at?: string;
1732
+ created_by?: string;
1733
+ modified_by?: string;
1734
+ };
1634
1735
  /** @returns {ValidationError} */
1635
1736
  declare function ValidationError(): ValidationError;
1636
1737
  type ValidationError = {
@@ -1,5 +1,43 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef AppAssociationDeleted
5
+ * @property {string} [message] - Operation status string (e.g. "deleted").
6
+ * @property {string} [application_id] - The application_id whose record was deleted.
7
+ */
8
+
9
+ /**
10
+ * @typedef AppAssociationIosPayload
11
+ * @property {Object} [applinks] - Universal Links configuration.
12
+ * @property {Object} [appclips] - App Clips configuration.
13
+ * @property {Object} [webcredentials] - Shared Web Credentials.
14
+ * @property {Object} [activitycontinuation] - Handoff. Deprecated in iOS 14+.
15
+ */
16
+
17
+ /**
18
+ * @typedef AppAssociationAndroidStatement
19
+ * @property {string[]} [relation] - Permission relations granted by this statement.
20
+ * @property {Object} [target] - Subject of the statement (android_app or web).
21
+ */
22
+
23
+ /**
24
+ * @typedef AppAssociationWriteBody
25
+ * @property {AppAssociationIosPayload} [ios_payload] - Apple App Site
26
+ * Association JSON. Null to clear.
27
+ * @property {AppAssociationAndroidStatement[]} [android_payload] - Digital
28
+ * Asset Links JSON (array of statements). Null to clear.
29
+ */
30
+
31
+ /**
32
+ * @typedef AppAssociationRecord
33
+ * @property {AppAssociationIosPayload} [ios_payload]
34
+ * @property {AppAssociationAndroidStatement[]} [android_payload]
35
+ * @property {string} [created_at]
36
+ * @property {string} [updated_at]
37
+ * @property {string} [created_by]
38
+ * @property {string} [modified_by]
39
+ */
40
+
3
41
  /**
4
42
  * @typedef ValidationError
5
43
  * @property {string} message - A brief description of the error encountered.
@@ -1830,6 +1868,56 @@ const Joi = require("joi");
1830
1868
  */
1831
1869
 
1832
1870
  class ContentPlatformModel {
1871
+ /** @returns {AppAssociationDeleted} */
1872
+ static AppAssociationDeleted() {
1873
+ return Joi.object({
1874
+ message: Joi.string().allow(""),
1875
+ application_id: Joi.string().allow(""),
1876
+ });
1877
+ }
1878
+
1879
+ /** @returns {AppAssociationIosPayload} */
1880
+ static AppAssociationIosPayload() {
1881
+ return Joi.object({
1882
+ applinks: Joi.object().pattern(/\S/, Joi.any()),
1883
+ appclips: Joi.object().pattern(/\S/, Joi.any()),
1884
+ webcredentials: Joi.object().pattern(/\S/, Joi.any()),
1885
+ activitycontinuation: Joi.object().pattern(/\S/, Joi.any()),
1886
+ });
1887
+ }
1888
+
1889
+ /** @returns {AppAssociationAndroidStatement} */
1890
+ static AppAssociationAndroidStatement() {
1891
+ return Joi.object({
1892
+ relation: Joi.array().items(Joi.string().allow("")),
1893
+ target: Joi.object().pattern(/\S/, Joi.any()),
1894
+ });
1895
+ }
1896
+
1897
+ /** @returns {AppAssociationWriteBody} */
1898
+ static AppAssociationWriteBody() {
1899
+ return Joi.object({
1900
+ ios_payload: ContentPlatformModel.AppAssociationIosPayload(),
1901
+ android_payload: Joi.array()
1902
+ .items(ContentPlatformModel.AppAssociationAndroidStatement())
1903
+ .allow(null, ""),
1904
+ });
1905
+ }
1906
+
1907
+ /** @returns {AppAssociationRecord} */
1908
+ static AppAssociationRecord() {
1909
+ return Joi.object({
1910
+ ios_payload: ContentPlatformModel.AppAssociationIosPayload(),
1911
+ android_payload: Joi.array()
1912
+ .items(ContentPlatformModel.AppAssociationAndroidStatement())
1913
+ .allow(null, ""),
1914
+ created_at: Joi.string().allow(""),
1915
+ updated_at: Joi.string().allow(""),
1916
+ created_by: Joi.string().allow(""),
1917
+ modified_by: Joi.string().allow(""),
1918
+ });
1919
+ }
1920
+
1833
1921
  /** @returns {ValidationError} */
1834
1922
  static ValidationError() {
1835
1923
  return Joi.object({
@@ -760,6 +760,34 @@ declare class Order {
760
760
  * @description: Reassign the shipment to a another location and update its status to 'Store Reassigned.' - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/reassignLocation/).
761
761
  */
762
762
  reassignLocation({ body, requestHeaders }?: OrderPlatformValidator.ReassignLocationParam, { responseHeaders }?: object): Promise<OrderPlatformModel.StoreReassignResponseSchema>;
763
+ /**
764
+ * @param {OrderPlatformValidator.RequestCourierPartnerForShipmentParam} arg
765
+ * - Arg object
766
+ *
767
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
768
+ * @param {import("../PlatformAPIClient").Options} - Options
769
+ * @returns {Promise<OrderPlatformModel.CourierPartnerResponseSchema>} -
770
+ * Success response
771
+ * @name requestCourierPartnerForShipment
772
+ * @summary: Manually request a courier partner for a shipment.
773
+ * @description: Use this API to manually assign a courier partner (delivery partner) to a shipment.
774
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/requestCourierPartnerForShipment/).
775
+ */
776
+ requestCourierPartnerForShipment({ shipmentId, body, requestHeaders }?: OrderPlatformValidator.RequestCourierPartnerForShipmentParam, { responseHeaders }?: object): Promise<OrderPlatformModel.CourierPartnerResponseSchema>;
777
+ /**
778
+ * @param {OrderPlatformValidator.SaveCourierPartnerPreferenceForShipmentParam} arg
779
+ * - Arg object
780
+ *
781
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
782
+ * @param {import("../PlatformAPIClient").Options} - Options
783
+ * @returns {Promise<OrderPlatformModel.CourierPartnerResponseSchema>} -
784
+ * Success response
785
+ * @name saveCourierPartnerPreferenceForShipment
786
+ * @summary: Save courier partner preference for a shipment.
787
+ * @description: Use this API to save the preferred courier partner for a shipment. The preferred courier partner will be triggered automatically when the shipment moves to a state where delivery partner assignment is performed (for example, ready for DP assignment).
788
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/saveCourierPartnerPreferenceForShipment/).
789
+ */
790
+ saveCourierPartnerPreferenceForShipment({ shipmentId, body, requestHeaders }?: OrderPlatformValidator.SaveCourierPartnerPreferenceForShipmentParam, { responseHeaders }?: object): Promise<OrderPlatformModel.CourierPartnerResponseSchema>;
763
791
  /**
764
792
  * @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
765
793
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -645,9 +645,11 @@ class Order {
645
645
  const query_params = {};
646
646
 
647
647
  const xHeaders = {};
648
- xHeaders["x-ordering-source"] = xOrderingSource;
649
- xHeaders["x-application-id"] = xApplicationId;
650
- xHeaders["x-extension-id"] = xExtensionId;
648
+ if (xOrderingSource !== undefined)
649
+ xHeaders["x-ordering-source"] = xOrderingSource;
650
+ if (xApplicationId !== undefined)
651
+ xHeaders["x-application-id"] = xApplicationId;
652
+ if (xExtensionId !== undefined) xHeaders["x-extension-id"] = xExtensionId;
651
653
 
652
654
  const response = await PlatformAPIClient.execute(
653
655
  this.config,
@@ -5028,6 +5030,180 @@ class Order {
5028
5030
  return response;
5029
5031
  }
5030
5032
 
5033
+ /**
5034
+ * @param {OrderPlatformValidator.RequestCourierPartnerForShipmentParam} arg
5035
+ * - Arg object
5036
+ *
5037
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5038
+ * @param {import("../PlatformAPIClient").Options} - Options
5039
+ * @returns {Promise<OrderPlatformModel.CourierPartnerResponseSchema>} -
5040
+ * Success response
5041
+ * @name requestCourierPartnerForShipment
5042
+ * @summary: Manually request a courier partner for a shipment.
5043
+ * @description: Use this API to manually assign a courier partner (delivery partner) to a shipment.
5044
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/requestCourierPartnerForShipment/).
5045
+ */
5046
+ async requestCourierPartnerForShipment(
5047
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
5048
+ { responseHeaders } = { responseHeaders: false }
5049
+ ) {
5050
+ const {
5051
+ error,
5052
+ } = OrderPlatformValidator.requestCourierPartnerForShipment().validate(
5053
+ {
5054
+ shipmentId,
5055
+ body,
5056
+ },
5057
+ { abortEarly: false, allowUnknown: true }
5058
+ );
5059
+ if (error) {
5060
+ return Promise.reject(new FDKClientValidationError(error));
5061
+ }
5062
+
5063
+ // Showing warrnings if extra unknown parameters are found
5064
+ const {
5065
+ error: warrning,
5066
+ } = OrderPlatformValidator.requestCourierPartnerForShipment().validate(
5067
+ {
5068
+ shipmentId,
5069
+ body,
5070
+ },
5071
+ { abortEarly: false, allowUnknown: false }
5072
+ );
5073
+ if (warrning) {
5074
+ Logger({
5075
+ level: "WARN",
5076
+ message: `Parameter Validation warrnings for platform > Order > requestCourierPartnerForShipment \n ${warrning}`,
5077
+ });
5078
+ }
5079
+
5080
+ const query_params = {};
5081
+
5082
+ const xHeaders = {};
5083
+
5084
+ const response = await PlatformAPIClient.execute(
5085
+ this.config,
5086
+ "post",
5087
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/courier-partner/request`,
5088
+ query_params,
5089
+ body,
5090
+ { ...xHeaders, ...requestHeaders },
5091
+ { responseHeaders }
5092
+ );
5093
+
5094
+ let responseData = response;
5095
+ if (responseHeaders) {
5096
+ responseData = response[0];
5097
+ }
5098
+
5099
+ const {
5100
+ error: res_error,
5101
+ } = OrderPlatformModel.CourierPartnerResponseSchema().validate(
5102
+ responseData,
5103
+ { abortEarly: false, allowUnknown: true }
5104
+ );
5105
+
5106
+ if (res_error) {
5107
+ if (this.config.options.strictResponseCheck === true) {
5108
+ return Promise.reject(new FDKResponseValidationError(res_error));
5109
+ } else {
5110
+ Logger({
5111
+ level: "WARN",
5112
+ message: `Response Validation Warnings for platform > Order > requestCourierPartnerForShipment \n ${res_error}`,
5113
+ });
5114
+ }
5115
+ }
5116
+
5117
+ return response;
5118
+ }
5119
+
5120
+ /**
5121
+ * @param {OrderPlatformValidator.SaveCourierPartnerPreferenceForShipmentParam} arg
5122
+ * - Arg object
5123
+ *
5124
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5125
+ * @param {import("../PlatformAPIClient").Options} - Options
5126
+ * @returns {Promise<OrderPlatformModel.CourierPartnerResponseSchema>} -
5127
+ * Success response
5128
+ * @name saveCourierPartnerPreferenceForShipment
5129
+ * @summary: Save courier partner preference for a shipment.
5130
+ * @description: Use this API to save the preferred courier partner for a shipment. The preferred courier partner will be triggered automatically when the shipment moves to a state where delivery partner assignment is performed (for example, ready for DP assignment).
5131
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/saveCourierPartnerPreferenceForShipment/).
5132
+ */
5133
+ async saveCourierPartnerPreferenceForShipment(
5134
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
5135
+ { responseHeaders } = { responseHeaders: false }
5136
+ ) {
5137
+ const {
5138
+ error,
5139
+ } = OrderPlatformValidator.saveCourierPartnerPreferenceForShipment().validate(
5140
+ {
5141
+ shipmentId,
5142
+ body,
5143
+ },
5144
+ { abortEarly: false, allowUnknown: true }
5145
+ );
5146
+ if (error) {
5147
+ return Promise.reject(new FDKClientValidationError(error));
5148
+ }
5149
+
5150
+ // Showing warrnings if extra unknown parameters are found
5151
+ const {
5152
+ error: warrning,
5153
+ } = OrderPlatformValidator.saveCourierPartnerPreferenceForShipment().validate(
5154
+ {
5155
+ shipmentId,
5156
+ body,
5157
+ },
5158
+ { abortEarly: false, allowUnknown: false }
5159
+ );
5160
+ if (warrning) {
5161
+ Logger({
5162
+ level: "WARN",
5163
+ message: `Parameter Validation warrnings for platform > Order > saveCourierPartnerPreferenceForShipment \n ${warrning}`,
5164
+ });
5165
+ }
5166
+
5167
+ const query_params = {};
5168
+
5169
+ const xHeaders = {};
5170
+
5171
+ const response = await PlatformAPIClient.execute(
5172
+ this.config,
5173
+ "post",
5174
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/courier-partner/preference`,
5175
+ query_params,
5176
+ body,
5177
+ { ...xHeaders, ...requestHeaders },
5178
+ { responseHeaders }
5179
+ );
5180
+
5181
+ let responseData = response;
5182
+ if (responseHeaders) {
5183
+ responseData = response[0];
5184
+ }
5185
+
5186
+ const {
5187
+ error: res_error,
5188
+ } = OrderPlatformModel.CourierPartnerResponseSchema().validate(
5189
+ responseData,
5190
+ { abortEarly: false, allowUnknown: true }
5191
+ );
5192
+
5193
+ if (res_error) {
5194
+ if (this.config.options.strictResponseCheck === true) {
5195
+ return Promise.reject(new FDKResponseValidationError(res_error));
5196
+ } else {
5197
+ Logger({
5198
+ level: "WARN",
5199
+ message: `Response Validation Warnings for platform > Order > saveCourierPartnerPreferenceForShipment \n ${res_error}`,
5200
+ });
5201
+ }
5202
+ }
5203
+
5204
+ return response;
5205
+ }
5206
+
5031
5207
  /**
5032
5208
  * @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
5033
5209
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`