@gofynd/fdk-client-javascript 1.3.11-beta.8 → 1.4.0-beta.2

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 (48) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +2 -0
  4. package/sdk/application/Cart/CartApplicationModel.js +2 -0
  5. package/sdk/application/Order/OrderApplicationModel.d.ts +2 -0
  6. package/sdk/application/Order/OrderApplicationModel.js +2 -0
  7. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +3 -15
  8. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -14
  9. package/sdk/partner/Theme/ThemePartnerModel.d.ts +185 -315
  10. package/sdk/partner/Theme/ThemePartnerModel.js +182 -222
  11. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -12
  12. package/sdk/platform/Catalog/CatalogPlatformClient.js +17 -87
  13. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +11 -25
  14. package/sdk/platform/Catalog/CatalogPlatformValidator.js +4 -17
  15. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
  16. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +4 -1
  17. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +5 -0
  18. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +2 -0
  19. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
  20. package/sdk/platform/Content/ContentPlatformApplicationClient.js +14 -3
  21. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +14 -5
  22. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +13 -4
  23. package/sdk/platform/Content/ContentPlatformClient.d.ts +1 -1
  24. package/sdk/platform/Content/ContentPlatformClient.js +14 -3
  25. package/sdk/platform/Content/ContentPlatformModel.d.ts +6 -0
  26. package/sdk/platform/Content/ContentPlatformModel.js +6 -0
  27. package/sdk/platform/Content/ContentPlatformValidator.d.ts +12 -3
  28. package/sdk/platform/Content/ContentPlatformValidator.js +11 -2
  29. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +2 -0
  30. package/sdk/platform/Discount/DiscountPlatformModel.js +2 -0
  31. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +118 -58
  32. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +122 -68
  33. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -12
  34. package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -85
  35. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -12
  36. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -14
  37. package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -61
  38. package/sdk/platform/Order/OrderPlatformClient.js +87 -481
  39. package/sdk/platform/Order/OrderPlatformModel.d.ts +442 -171
  40. package/sdk/platform/Order/OrderPlatformModel.js +483 -169
  41. package/sdk/platform/Order/OrderPlatformValidator.d.ts +22 -69
  42. package/sdk/platform/Order/OrderPlatformValidator.js +17 -79
  43. package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -21
  44. package/sdk/platform/Theme/ThemePlatformModel.js +108 -20
  45. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +2 -2
  46. package/sdk/platform/Webhook/WebhookPlatformClient.js +4 -2
  47. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +21 -27
  48. package/sdk/platform/Webhook/WebhookPlatformModel.js +30 -27
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.11-beta.8' --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.4.0-beta.2' --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.11-beta.8",
3
+ "version": "1.4.0-beta.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -497,6 +497,7 @@ export = CartApplicationModel;
497
497
  * @property {string} [display]
498
498
  * @property {string} [key]
499
499
  * @property {string[]} [message]
500
+ * @property {number} [preset]
500
501
  * @property {number} [value]
501
502
  */
502
503
  /**
@@ -1611,6 +1612,7 @@ type DisplayBreakup = {
1611
1612
  display?: string;
1612
1613
  key?: string;
1613
1614
  message?: string[];
1615
+ preset?: number;
1614
1616
  value?: number;
1615
1617
  };
1616
1618
  /** @returns {FreeGiftItem} */
@@ -545,6 +545,7 @@ const Joi = require("joi");
545
545
  * @property {string} [display]
546
546
  * @property {string} [key]
547
547
  * @property {string[]} [message]
548
+ * @property {number} [preset]
548
549
  * @property {number} [value]
549
550
  */
550
551
 
@@ -1671,6 +1672,7 @@ class CartApplicationModel {
1671
1672
  display: Joi.string().allow(""),
1672
1673
  key: Joi.string().allow(""),
1673
1674
  message: Joi.array().items(Joi.string().allow("")),
1675
+ preset: Joi.number(),
1674
1676
  value: Joi.number(),
1675
1677
  });
1676
1678
  }
@@ -110,6 +110,7 @@ export = OrderApplicationModel;
110
110
  * @property {string} [country_iso_code]
111
111
  * @property {string} [country_phone_code]
112
112
  * @property {string} [created_at]
113
+ * @property {string} [display_address]
113
114
  * @property {string} [email]
114
115
  * @property {string} [landmark]
115
116
  * @property {number} [latitude]
@@ -648,6 +649,7 @@ type DeliveryAddress = {
648
649
  country_iso_code?: string;
649
650
  country_phone_code?: string;
650
651
  created_at?: string;
652
+ display_address?: string;
651
653
  email?: string;
652
654
  landmark?: string;
653
655
  latitude?: number;
@@ -123,6 +123,7 @@ const Joi = require("joi");
123
123
  * @property {string} [country_iso_code]
124
124
  * @property {string} [country_phone_code]
125
125
  * @property {string} [created_at]
126
+ * @property {string} [display_address]
126
127
  * @property {string} [email]
127
128
  * @property {string} [landmark]
128
129
  * @property {number} [latitude]
@@ -737,6 +738,7 @@ class OrderApplicationModel {
737
738
  country_iso_code: Joi.string().allow(""),
738
739
  country_phone_code: Joi.string().allow(""),
739
740
  created_at: Joi.string().allow(""),
741
+ display_address: Joi.string().allow(""),
740
742
  email: Joi.string().allow(""),
741
743
  landmark: Joi.string().allow(""),
742
744
  latitude: Joi.number().allow(null),
@@ -30,15 +30,11 @@ export = FileStoragePartnerModel;
30
30
  * @typedef FailedResponse
31
31
  * @property {string} message
32
32
  */
33
- /**
34
- * @typedef Params
35
- * @property {string} [subpath] - The subpath for the file.
36
- */
37
33
  /**
38
34
  * @typedef StartRequest
39
35
  * @property {string} content_type
40
36
  * @property {string} file_name
41
- * @property {Params} [params]
37
+ * @property {Object} [params]
42
38
  * @property {number} size
43
39
  * @property {string[]} [tags]
44
40
  */
@@ -63,7 +59,7 @@ export = FileStoragePartnerModel;
63
59
  declare class FileStoragePartnerModel {
64
60
  }
65
61
  declare namespace FileStoragePartnerModel {
66
- export { CDN, CompleteResponse, CreatedBy, FailedResponse, Params, StartRequest, StartResponse, Upload };
62
+ export { CDN, CompleteResponse, CreatedBy, FailedResponse, StartRequest, StartResponse, Upload };
67
63
  }
68
64
  /** @returns {CDN} */
69
65
  declare function CDN(): CDN;
@@ -100,20 +96,12 @@ declare function FailedResponse(): FailedResponse;
100
96
  type FailedResponse = {
101
97
  message: string;
102
98
  };
103
- /** @returns {Params} */
104
- declare function Params(): Params;
105
- type Params = {
106
- /**
107
- * - The subpath for the file.
108
- */
109
- subpath?: string;
110
- };
111
99
  /** @returns {StartRequest} */
112
100
  declare function StartRequest(): StartRequest;
113
101
  type StartRequest = {
114
102
  content_type: string;
115
103
  file_name: string;
116
- params?: Params;
104
+ params?: any;
117
105
  size: number;
118
106
  tags?: string[];
119
107
  };
@@ -35,16 +35,11 @@ const Joi = require("joi");
35
35
  * @property {string} message
36
36
  */
37
37
 
38
- /**
39
- * @typedef Params
40
- * @property {string} [subpath] - The subpath for the file.
41
- */
42
-
43
38
  /**
44
39
  * @typedef StartRequest
45
40
  * @property {string} content_type
46
41
  * @property {string} file_name
47
- * @property {Params} [params]
42
+ * @property {Object} [params]
48
43
  * @property {number} size
49
44
  * @property {string[]} [tags]
50
45
  */
@@ -113,19 +108,12 @@ class FileStoragePartnerModel {
113
108
  });
114
109
  }
115
110
 
116
- /** @returns {Params} */
117
- static Params() {
118
- return Joi.object({
119
- subpath: Joi.string().allow(""),
120
- });
121
- }
122
-
123
111
  /** @returns {StartRequest} */
124
112
  static StartRequest() {
125
113
  return Joi.object({
126
114
  content_type: Joi.string().allow("").required(),
127
115
  file_name: Joi.string().allow("").required(),
128
- params: FileStoragePartnerModel.Params(),
116
+ params: Joi.object().pattern(/\S/, Joi.any()),
129
117
  size: Joi.number().required(),
130
118
  tags: Joi.array().items(Joi.string().allow("")),
131
119
  });