@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
@@ -58,6 +58,7 @@ const Joi = require("joi");
58
58
  * @property {boolean} [is_default] - Whether this is the default fulfillment option.
59
59
  * @property {string} [type] - Type of fulfillment option.
60
60
  * @property {string} [status] - Status of the fulfillment option.
61
+ * @property {FulfillmentOptionDefaultFor} [default_for]
61
62
  * @property {BusinessUnit[]} [business_unit] - Name of the ordering-channel or
62
63
  * business, e.g. storefront, storeos.
63
64
  * @property {FulfillmentStores} [fulfillment_stores]
@@ -198,6 +199,7 @@ const Joi = require("joi");
198
199
  * @property {ListViewItems[]} items - List of zone items, each representing a
199
200
  * zone's details.
200
201
  * @property {Page} page
202
+ * @property {FoDetails} [fo_details]
201
203
  */
202
204
 
203
205
  /**
@@ -1425,6 +1427,9 @@ const Joi = require("joi");
1425
1427
  * in the courier partner shipment.
1426
1428
  * @property {boolean} is_mto - A boolean indicating if the courier partner
1427
1429
  * supports Made to Order service.
1430
+ * @property {boolean} [is_mps] - Indicates if shipment configuration is
1431
+ * multi-part shipment or single shipment.
1432
+ * @property {boolean} [is_b2b] - Indicates if the shipment is business-to-business.
1428
1433
  * @property {string[]} ignore_scheme_ids - A list of scheme_id which we want to
1429
1434
  * ignore in courier_partner assignment.
1430
1435
  * @property {Object} [error] - Error Details
@@ -1841,6 +1846,14 @@ const Joi = require("joi");
1841
1846
  * under quality control (nullable).
1842
1847
  */
1843
1848
 
1849
+ /**
1850
+ * @typedef FulfillmentOptionDefaultFor
1851
+ * @property {boolean} [storefront] - If set to true, this fulfillment option
1852
+ * will be default for storefront.
1853
+ * @property {boolean} [storeos] - If set to true, this fulfillment option will
1854
+ * be default for storeos.
1855
+ */
1856
+
1844
1857
  /**
1845
1858
  * @typedef BusinessUnit
1846
1859
  * @property {string} [name] - Name of the business unit.
@@ -2159,6 +2172,16 @@ const Joi = require("joi");
2159
2172
  * @property {number} [count] - Count of items in the region.
2160
2173
  */
2161
2174
 
2175
+ /**
2176
+ * @typedef FoDetails
2177
+ * @property {string} serviceability_type - Serviceability strategy configured
2178
+ * for the fulfillment option. `zone_based` corresponds to the "Restrict to
2179
+ * Zones" strategy and `all` to "Ship to All".
2180
+ * @property {number} active_non_default_zone_count - Number of active,
2181
+ * non-default zones (excluding zones still in progress) mapped to this
2182
+ * fulfillment option.
2183
+ */
2184
+
2162
2185
  /**
2163
2186
  * @typedef ZoneStores
2164
2187
  * @property {Object} type - Type of zone store.
@@ -3241,6 +3264,7 @@ class ServiceabilityPlatformModel {
3241
3264
  is_default: Joi.boolean(),
3242
3265
  type: Joi.string().allow(""),
3243
3266
  status: Joi.string().allow(""),
3267
+ default_for: ServiceabilityPlatformModel.FulfillmentOptionDefaultFor(),
3244
3268
  business_unit: Joi.array().items(
3245
3269
  ServiceabilityPlatformModel.BusinessUnit()
3246
3270
  ),
@@ -3409,6 +3433,7 @@ class ServiceabilityPlatformModel {
3409
3433
  .items(ServiceabilityPlatformModel.ListViewItems())
3410
3434
  .required(),
3411
3435
  page: ServiceabilityPlatformModel.Page().required(),
3436
+ fo_details: ServiceabilityPlatformModel.FoDetails(),
3412
3437
  });
3413
3438
  }
3414
3439
 
@@ -4705,6 +4730,8 @@ class ServiceabilityPlatformModel {
4705
4730
  .items(ServiceabilityPlatformModel.CourierPartnerShipmentsArticles())
4706
4731
  .required(),
4707
4732
  is_mto: Joi.boolean().required(),
4733
+ is_mps: Joi.boolean(),
4734
+ is_b2b: Joi.boolean(),
4708
4735
  ignore_scheme_ids: Joi.array().items(Joi.string().allow("")).required(),
4709
4736
  error: Joi.object().pattern(/\S/, Joi.any()),
4710
4737
  });
@@ -5156,6 +5183,14 @@ class ServiceabilityPlatformModel {
5156
5183
  });
5157
5184
  }
5158
5185
 
5186
+ /** @returns {FulfillmentOptionDefaultFor} */
5187
+ static FulfillmentOptionDefaultFor() {
5188
+ return Joi.object({
5189
+ storefront: Joi.boolean(),
5190
+ storeos: Joi.boolean(),
5191
+ });
5192
+ }
5193
+
5159
5194
  /** @returns {BusinessUnit} */
5160
5195
  static BusinessUnit() {
5161
5196
  return Joi.object({
@@ -5521,6 +5556,14 @@ class ServiceabilityPlatformModel {
5521
5556
  });
5522
5557
  }
5523
5558
 
5559
+ /** @returns {FoDetails} */
5560
+ static FoDetails() {
5561
+ return Joi.object({
5562
+ serviceability_type: Joi.string().allow("").required(),
5563
+ active_non_default_zone_count: Joi.number().required(),
5564
+ });
5565
+ }
5566
+
5524
5567
  /** @returns {ZoneStores} */
5525
5568
  static ZoneStores() {
5526
5569
  return Joi.object({
@@ -538,6 +538,7 @@ export = UserPlatformModel;
538
538
  * @property {Facebook} [facebook]
539
539
  * @property {Accountkit} [account_kit]
540
540
  * @property {Google} [google]
541
+ * @property {Apple} [apple]
541
542
  */
542
543
  /**
543
544
  * @typedef DeleteAccountReasons
@@ -577,6 +578,11 @@ export = UserPlatformModel;
577
578
  * @property {string} [app_id]
578
579
  * @property {string} [app_secret]
579
580
  */
581
+ /**
582
+ * @typedef Apple
583
+ * @property {string} [app_id]
584
+ * @property {string} [redirect_uri]
585
+ */
580
586
  /**
581
587
  * @typedef SessionExpiry
582
588
  * @property {number} [duration]
@@ -722,7 +728,7 @@ export = UserPlatformModel;
722
728
  declare class UserPlatformModel {
723
729
  }
724
730
  declare namespace UserPlatformModel {
725
- export { SuccessMessage, UserAttributeDefinitionList, UserAttributeDefinitionsResponseSchema, UserAttributeDefinition, UserAttributeDefinitionDetails, AttributeMaskingProperties, AttributeRegistrationProperties, UserAttributeDefinitionValidation, BulkUserAttribute, UserAttribute, CreateBulkUserAttribute, BulkUserAttributeRequestBody, CreateUserAttribute, CreateUserAttributeDefinition, CreateStoreFrontUsersPayload, BulkUserExportSchema, BulkActionModel, CreatedBySchema, BulkActionLinkSchema, FileLinks, BulkActionCountSchema, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, BulkActionPaginationSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, DeleteBulkUserAttribute, UserAttributeFilter, UserAttributeFilterQuery, UserAttributeFilterRequestConditions, UserAttributeFiltered, UserAttributeFilteredList, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, GetUserTimeline, UserTimeline, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email, UserConsent, DeleteUserGroupSuccess, PrivacyPolicyConsentSchema };
731
+ export { SuccessMessage, UserAttributeDefinitionList, UserAttributeDefinitionsResponseSchema, UserAttributeDefinition, UserAttributeDefinitionDetails, AttributeMaskingProperties, AttributeRegistrationProperties, UserAttributeDefinitionValidation, BulkUserAttribute, UserAttribute, CreateBulkUserAttribute, BulkUserAttributeRequestBody, CreateUserAttribute, CreateUserAttributeDefinition, CreateStoreFrontUsersPayload, BulkUserExportSchema, BulkActionModel, CreatedBySchema, BulkActionLinkSchema, FileLinks, BulkActionCountSchema, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, BulkActionPaginationSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, DeleteBulkUserAttribute, UserAttributeFilter, UserAttributeFilterQuery, UserAttributeFilterRequestConditions, UserAttributeFiltered, UserAttributeFilteredList, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, GetUserTimeline, UserTimeline, Facebook, Accountkit, Google, Apple, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email, UserConsent, DeleteUserGroupSuccess, PrivacyPolicyConsentSchema };
726
732
  }
727
733
  /** @returns {SuccessMessage} */
728
734
  declare function SuccessMessage(): SuccessMessage;
@@ -1702,6 +1708,7 @@ type SocialTokens = {
1702
1708
  facebook?: Facebook;
1703
1709
  account_kit?: Accountkit;
1704
1710
  google?: Google;
1711
+ apple?: Apple;
1705
1712
  };
1706
1713
  /** @returns {DeleteAccountReasons} */
1707
1714
  declare function DeleteAccountReasons(): DeleteAccountReasons;
@@ -1769,6 +1776,12 @@ type Google = {
1769
1776
  app_id?: string;
1770
1777
  app_secret?: string;
1771
1778
  };
1779
+ /** @returns {Apple} */
1780
+ declare function Apple(): Apple;
1781
+ type Apple = {
1782
+ app_id?: string;
1783
+ redirect_uri?: string;
1784
+ };
1772
1785
  /** @returns {SessionExpiry} */
1773
1786
  declare function SessionExpiry(): SessionExpiry;
1774
1787
  type SessionExpiry = {
@@ -603,6 +603,7 @@ const Joi = require("joi");
603
603
  * @property {Facebook} [facebook]
604
604
  * @property {Accountkit} [account_kit]
605
605
  * @property {Google} [google]
606
+ * @property {Apple} [apple]
606
607
  */
607
608
 
608
609
  /**
@@ -650,6 +651,12 @@ const Joi = require("joi");
650
651
  * @property {string} [app_secret]
651
652
  */
652
653
 
654
+ /**
655
+ * @typedef Apple
656
+ * @property {string} [app_id]
657
+ * @property {string} [redirect_uri]
658
+ */
659
+
653
660
  /**
654
661
  * @typedef SessionExpiry
655
662
  * @property {number} [duration]
@@ -1489,6 +1496,7 @@ class UserPlatformModel {
1489
1496
  facebook: UserPlatformModel.Facebook(),
1490
1497
  account_kit: UserPlatformModel.Accountkit(),
1491
1498
  google: UserPlatformModel.Google(),
1499
+ apple: UserPlatformModel.Apple(),
1492
1500
  });
1493
1501
  }
1494
1502
 
@@ -1551,6 +1559,14 @@ class UserPlatformModel {
1551
1559
  });
1552
1560
  }
1553
1561
 
1562
+ /** @returns {Apple} */
1563
+ static Apple() {
1564
+ return Joi.object({
1565
+ app_id: Joi.string().allow(""),
1566
+ redirect_uri: Joi.string().allow(""),
1567
+ });
1568
+ }
1569
+
1554
1570
  /** @returns {SessionExpiry} */
1555
1571
  static SessionExpiry() {
1556
1572
  return Joi.object({
@@ -157,7 +157,7 @@ class Configuration {
157
157
  query_params["query"] = query;
158
158
 
159
159
  const xHeaders = {};
160
- xHeaders["authorization"] = authorization;
160
+ if (authorization !== undefined) xHeaders["authorization"] = authorization;
161
161
 
162
162
  const response = await PublicAPIClient.execute(
163
163
  this._conf,