@gofynd/fdk-client-javascript 1.6.3 → 2.0.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 (146) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
  4. package/sdk/application/Cart/CartApplicationClient.js +26 -268
  5. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +20 -20
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
  7. package/sdk/application/Common/CommonApplicationClient.js +1 -16
  8. package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
  9. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +24 -2
  10. package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
  11. package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
  12. package/sdk/application/Content/ContentApplicationClient.js +222 -191
  13. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  14. package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
  15. package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
  16. package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
  17. package/sdk/application/Lead/LeadApplicationClient.js +21 -52
  18. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -56
  19. package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
  20. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
  21. package/sdk/application/Order/OrderApplicationClient.js +68 -153
  22. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -12
  23. package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
  24. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
  25. package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
  26. package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
  27. package/sdk/application/Share/ShareApplicationClient.js +21 -75
  28. package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
  29. package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
  30. package/sdk/application/User/UserApplicationClient.js +1 -407
  31. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
  32. package/sdk/common/Utility.d.ts +1 -1
  33. package/sdk/common/Utility.js +4 -4
  34. package/sdk/common/Validator.d.ts +1 -0
  35. package/sdk/common/Validator.js +20 -0
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
  37. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
  38. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
  40. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
  41. package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
  42. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
  43. package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
  45. package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
  46. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +64 -1
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +36 -0
  49. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
  50. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
  51. package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
  52. package/sdk/platform/Cart/CartPlatformModel.js +38 -5
  53. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
  54. package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
  57. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
  58. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
  63. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
  64. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
  65. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
  66. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
  67. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
  68. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
  69. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
  70. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
  71. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
  72. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
  73. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
  74. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
  75. package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
  76. package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
  77. package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
  78. package/sdk/platform/Content/ContentPlatformModel.js +717 -34
  79. package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
  80. package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
  81. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
  82. package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
  83. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
  84. package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
  85. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
  86. package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
  87. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
  88. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
  89. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
  90. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
  91. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
  92. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
  93. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
  94. package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
  95. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
  96. package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
  97. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  98. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  99. package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
  100. package/sdk/platform/Order/OrderPlatformClient.js +397 -0
  101. package/sdk/platform/Order/OrderPlatformModel.d.ts +66 -10
  102. package/sdk/platform/Order/OrderPlatformModel.js +39 -7
  103. package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
  104. package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
  105. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
  106. package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
  107. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
  108. package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
  109. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
  110. package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
  111. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
  112. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
  113. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
  114. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
  115. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
  116. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
  117. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
  118. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
  119. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
  120. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
  121. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
  122. package/sdk/platform/Share/SharePlatformModel.js +2 -0
  123. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +73 -0
  124. package/sdk/platform/User/UserPlatformApplicationClient.js +543 -0
  125. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +129 -1
  126. package/sdk/platform/User/UserPlatformApplicationValidator.js +97 -0
  127. package/sdk/platform/User/UserPlatformModel.d.ts +269 -6
  128. package/sdk/platform/User/UserPlatformModel.js +187 -5
  129. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +64 -1
  130. package/sdk/platform/Webhook/WebhookPlatformModel.js +36 -0
  131. package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
  132. package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
  133. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
  134. package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
  135. package/sdk/public/Content/ContentPublicClient.js +261 -104
  136. package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
  137. package/sdk/public/Content/ContentPublicModel.js +102 -0
  138. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
  139. package/sdk/public/Content/ContentPublicValidator.js +26 -0
  140. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  141. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  142. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  143. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  144. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  145. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  146. package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
@@ -86,6 +86,71 @@ const Joi = require("joi");
86
86
  * @property {Object[]} [validations]
87
87
  */
88
88
 
89
+ /**
90
+ * @typedef CreateStoreFrontUsersPayload
91
+ * @property {string} absolute_url - A valid URL linking to the file containing
92
+ * user data to be imported.
93
+ * @property {string} file_format - The format of the file containing the user's
94
+ * data. Supported formats are CSV and XLSX.
95
+ * @property {string} relative_url - A valid relative path to the file within
96
+ * the storage system. This path should not include the base URL or domain and
97
+ * must conform to the storage structure
98
+ */
99
+
100
+ /**
101
+ * @typedef BulkUserExportSchema
102
+ * @property {string} file_format - The format of the file in which you want to
103
+ * export data. Supported formats are CSV and XLSX.
104
+ */
105
+
106
+ /**
107
+ * @typedef BulkActionModel
108
+ * @property {string} _id - The Job ID associated with an Import or Export Job
109
+ * @property {string} file_name - The name of the file
110
+ * @property {string} file_format - The format of the uploaded file (e.g., CSV, XLSX).
111
+ * @property {string} action_type - The type of bulk action being performed
112
+ * (e.g., import, export).
113
+ * @property {CreatedBySchema} created_by
114
+ * @property {BulkActionCountSchema} [count]
115
+ * @property {string} [status] - The current status of the bulk action.
116
+ * @property {BulkActionLinkSchema} [links]
117
+ * @property {string} application_id - The unique identifier of the associated
118
+ * application.
119
+ * @property {string} company_id - The unique identifier of the company
120
+ * associated with the bulk action.
121
+ * @property {string} [created_at] - The timestamp when the bulk action was created.
122
+ * @property {string} [updated_at] - The timestamp when the bulk action was last updated.
123
+ */
124
+
125
+ /**
126
+ * @typedef CreatedBySchema
127
+ * @property {string} name - The name of the user who initiated the operation.
128
+ * @property {string} user_id - A unique identifier for the user who initiated
129
+ * the operation.
130
+ */
131
+
132
+ /**
133
+ * @typedef BulkActionLinkSchema
134
+ * @property {FileLinks} [file]
135
+ * @property {FileLinks} [error]
136
+ */
137
+
138
+ /**
139
+ * @typedef FileLinks
140
+ * @property {string} [absolute_url] - The full URL of the file, including the
141
+ * domain and protocol, allowing direct access to the file from any location.
142
+ * @property {string} [relative_url] - The relative path to the file within the
143
+ * storage system, excluding the base URL or domain. This path is specific to
144
+ * the storage structure.
145
+ */
146
+
147
+ /**
148
+ * @typedef BulkActionCountSchema
149
+ * @property {number} [total] - The total number of items to be processed.
150
+ * @property {number} [success] - The number of successfully processed items.
151
+ * @property {number} [error] - The number of items that failed to process.
152
+ */
153
+
89
154
  /**
90
155
  * @typedef BlockUserRequestSchema
91
156
  * @property {boolean} [status]
@@ -131,13 +196,19 @@ const Joi = require("joi");
131
196
  * @property {PaginationSchema} [page]
132
197
  */
133
198
 
199
+ /**
200
+ * @typedef BulkActionPaginationSchema
201
+ * @property {BulkActionModel[]} [items] - Array of Bulk Action Documents
202
+ * @property {PaginationSchema} [page]
203
+ */
204
+
134
205
  /**
135
206
  * @typedef PaginationSchema
136
- * @property {number} [size]
137
- * @property {number} [item_total]
138
- * @property {boolean} [has_next]
139
- * @property {string} [type]
140
- * @property {number} [current]
207
+ * @property {number} [size] - The number of items per page.
208
+ * @property {number} [item_total] - The total number of items across all pages.
209
+ * @property {boolean} [has_next] - Indicates whether there are more pages to retrieve.
210
+ * @property {string} [type] - The type of pagination used (eg Number).
211
+ * @property {number} [current] - The current page number.
141
212
  */
142
213
 
143
214
  /**
@@ -382,6 +453,21 @@ const Joi = require("joi");
382
453
  * @property {string} [consent_text]
383
454
  */
384
455
 
456
+ /**
457
+ * @typedef GetUserTimeline
458
+ * @property {string} [delete_on] - Denotes the date on which the user will be deleted
459
+ * @property {UserTimeline[]} [timeline] - List of user timeline events
460
+ */
461
+
462
+ /**
463
+ * @typedef UserTimeline
464
+ * @property {string} [date] - Denotes the date at which this event occured
465
+ * @property {string} [title] - Title of the timeline event
466
+ * @property {string} [type] - Type of the event, indicating its status
467
+ * @property {boolean} [visible] - Indicates whether the event should be shown on the UI
468
+ * @property {string} [sub_title] - Additional information about the event
469
+ */
470
+
385
471
  /**
386
472
  * @typedef Facebook
387
473
  * @property {string} [app_id]
@@ -512,6 +598,7 @@ const Joi = require("joi");
512
598
  * @property {string} [rr_id]
513
599
  * @property {boolean} [archive]
514
600
  * @property {string} [status]
601
+ * @property {string} [deleted_on]
515
602
  */
516
603
 
517
604
  /**
@@ -633,6 +720,73 @@ class UserPlatformModel {
633
720
  });
634
721
  }
635
722
 
723
+ /** @returns {CreateStoreFrontUsersPayload} */
724
+ static CreateStoreFrontUsersPayload() {
725
+ return Joi.object({
726
+ absolute_url: Joi.string().allow("").required(),
727
+ file_format: Joi.string().allow("").required(),
728
+ relative_url: Joi.string().allow("").required(),
729
+ });
730
+ }
731
+
732
+ /** @returns {BulkUserExportSchema} */
733
+ static BulkUserExportSchema() {
734
+ return Joi.object({
735
+ file_format: Joi.string().allow("").required(),
736
+ });
737
+ }
738
+
739
+ /** @returns {BulkActionModel} */
740
+ static BulkActionModel() {
741
+ return Joi.object({
742
+ _id: Joi.string().allow("").required(),
743
+ file_name: Joi.string().allow("").required(),
744
+ file_format: Joi.string().allow("").required(),
745
+ action_type: Joi.string().allow("").required(),
746
+ created_by: UserPlatformModel.CreatedBySchema().required(),
747
+ count: UserPlatformModel.BulkActionCountSchema(),
748
+ status: Joi.string().allow(""),
749
+ links: UserPlatformModel.BulkActionLinkSchema(),
750
+ application_id: Joi.string().allow("").required(),
751
+ company_id: Joi.string().allow("").required(),
752
+ created_at: Joi.string().allow(""),
753
+ updated_at: Joi.string().allow(""),
754
+ });
755
+ }
756
+
757
+ /** @returns {CreatedBySchema} */
758
+ static CreatedBySchema() {
759
+ return Joi.object({
760
+ name: Joi.string().allow("").required(),
761
+ user_id: Joi.string().allow("").required(),
762
+ });
763
+ }
764
+
765
+ /** @returns {BulkActionLinkSchema} */
766
+ static BulkActionLinkSchema() {
767
+ return Joi.object({
768
+ file: UserPlatformModel.FileLinks(),
769
+ error: UserPlatformModel.FileLinks(),
770
+ });
771
+ }
772
+
773
+ /** @returns {FileLinks} */
774
+ static FileLinks() {
775
+ return Joi.object({
776
+ absolute_url: Joi.string().allow(""),
777
+ relative_url: Joi.string().allow(""),
778
+ });
779
+ }
780
+
781
+ /** @returns {BulkActionCountSchema} */
782
+ static BulkActionCountSchema() {
783
+ return Joi.object({
784
+ total: Joi.number(),
785
+ success: Joi.number(),
786
+ error: Joi.number(),
787
+ });
788
+ }
789
+
636
790
  /** @returns {BlockUserRequestSchema} */
637
791
  static BlockUserRequestSchema() {
638
792
  return Joi.object({
@@ -694,6 +848,14 @@ class UserPlatformModel {
694
848
  });
695
849
  }
696
850
 
851
+ /** @returns {BulkActionPaginationSchema} */
852
+ static BulkActionPaginationSchema() {
853
+ return Joi.object({
854
+ items: Joi.array().items(UserPlatformModel.BulkActionModel()),
855
+ page: UserPlatformModel.PaginationSchema(),
856
+ });
857
+ }
858
+
697
859
  /** @returns {PaginationSchema} */
698
860
  static PaginationSchema() {
699
861
  return Joi.object({
@@ -1009,6 +1171,25 @@ class UserPlatformModel {
1009
1171
  });
1010
1172
  }
1011
1173
 
1174
+ /** @returns {GetUserTimeline} */
1175
+ static GetUserTimeline() {
1176
+ return Joi.object({
1177
+ delete_on: Joi.string().allow(""),
1178
+ timeline: Joi.array().items(UserPlatformModel.UserTimeline()),
1179
+ });
1180
+ }
1181
+
1182
+ /** @returns {UserTimeline} */
1183
+ static UserTimeline() {
1184
+ return Joi.object({
1185
+ date: Joi.string().allow(""),
1186
+ title: Joi.string().allow(""),
1187
+ type: Joi.string().allow(""),
1188
+ visible: Joi.boolean(),
1189
+ sub_title: Joi.string().allow("").allow(null),
1190
+ });
1191
+ }
1192
+
1012
1193
  /** @returns {Facebook} */
1013
1194
  static Facebook() {
1014
1195
  return Joi.object({
@@ -1156,6 +1337,7 @@ class UserPlatformModel {
1156
1337
  rr_id: Joi.string().allow(""),
1157
1338
  archive: Joi.boolean(),
1158
1339
  status: Joi.string().allow(""),
1340
+ deleted_on: Joi.string().allow(""),
1159
1341
  });
1160
1342
  }
1161
1343
 
@@ -8,6 +8,7 @@ export = WebhookPlatformModel;
8
8
  * @property {number} [current] - The current page number.
9
9
  * @property {string} type - The type of the page, such as 'PageType'.
10
10
  * @property {number} [size] - The number of items per page.
11
+ * @property {number} [page_size] - The number of items per page.
11
12
  */
12
13
  /**
13
14
  * @typedef BroadcasterConfig
@@ -26,10 +27,31 @@ export = WebhookPlatformModel;
26
27
  * @property {number} [id] - The unique identifier for the subscriber event mapping.
27
28
  * @property {number} [event_id] - The ID of the event associated with the subscriber.
28
29
  * @property {number} [subscriber_id] - The ID of the subscriber.
30
+ * @property {FilterSchema} [filters]
31
+ * @property {Object} [reducer] - The reducer property allows users to customize
32
+ * the JSON structure of the webhook payload using JSONPath queries. They can
33
+ * also create new properties by mapping existing ones. Note that it overrides
34
+ * the entire JSON structure of the webhook payload sent via the webhook. See
35
+ * the partner documentation's filter and reducer section for details.
29
36
  * @property {BroadcasterConfig} [broadcaster_config]
30
37
  * @property {string} [created_on] - The date and time when the subscriber event
31
38
  * mapping was created.
32
39
  */
40
+ /**
41
+ * @typedef FilterSchema
42
+ * @property {string} [query] - JSONPath expression that specifies the property
43
+ * in the webhook payload to filter on. This enables targeting specific data
44
+ * within the payload.
45
+ * @property {string} [condition] - JavaScript function used to evaluate the
46
+ * specified property in the webhook payload against a condition. This
47
+ * function determines whether the filter passes based on its return value.
48
+ * @property {string} [logic] - Logical operator used to combine multiple
49
+ * conditions in the `conditions` array. Supported values are `AND` and `OR`.
50
+ * @property {Object[]} [conditions] - An array of filter objects to be
51
+ * evaluated using the specified logical operator. This array will contain
52
+ * more filters including a combination of single condition mode and logical
53
+ * group mode filters.
54
+ */
33
55
  /**
34
56
  * @typedef EventConfig
35
57
  * @property {number} [id] - The unique identifier for the event configuration.
@@ -293,7 +315,7 @@ export = WebhookPlatformModel;
293
315
  declare class WebhookPlatformModel {
294
316
  }
295
317
  declare namespace WebhookPlatformModel {
296
- export { Page, BroadcasterConfig, SubscriberEventMapping, EventConfig, EventConfigResult, Association, AssociationResp, AuthMeta, SubscriberDetails, Events, SubscriberConfigPostRequestV2, SubscriberConfigUpdateRequestV2, SubscriberConfigPost, SubscriberConfigUpdate, SubscriberConfigResult, SubscriberConfigList, RestEventData, RestConfig, QueueEventData, KafkaConfig, PubSubConfig, TemporalEventData, TemporalConfig, SqsEventData, SqsConfig, EventBridgeData, EventBridgeConfig, EventMapBody, WebhookConfig, UpsertSubscriberConfig, UpsertSubscriberConfigResult, SubscriberStatus };
318
+ export { Page, BroadcasterConfig, SubscriberEventMapping, FilterSchema, EventConfig, EventConfigResult, Association, AssociationResp, AuthMeta, SubscriberDetails, Events, SubscriberConfigPostRequestV2, SubscriberConfigUpdateRequestV2, SubscriberConfigPost, SubscriberConfigUpdate, SubscriberConfigResult, SubscriberConfigList, RestEventData, RestConfig, QueueEventData, KafkaConfig, PubSubConfig, TemporalEventData, TemporalConfig, SqsEventData, SqsConfig, EventBridgeData, EventBridgeConfig, EventMapBody, WebhookConfig, UpsertSubscriberConfig, UpsertSubscriberConfigResult, SubscriberStatus };
297
319
  }
298
320
  /** @returns {Page} */
299
321
  declare function Page(): Page;
@@ -326,6 +348,10 @@ type Page = {
326
348
  * - The number of items per page.
327
349
  */
328
350
  size?: number;
351
+ /**
352
+ * - The number of items per page.
353
+ */
354
+ page_size?: number;
329
355
  };
330
356
  /** @returns {BroadcasterConfig} */
331
357
  declare function BroadcasterConfig(): BroadcasterConfig;
@@ -373,6 +399,15 @@ type SubscriberEventMapping = {
373
399
  * - The ID of the subscriber.
374
400
  */
375
401
  subscriber_id?: number;
402
+ filters?: FilterSchema;
403
+ /**
404
+ * - The reducer property allows users to customize
405
+ * the JSON structure of the webhook payload using JSONPath queries. They can
406
+ * also create new properties by mapping existing ones. Note that it overrides
407
+ * the entire JSON structure of the webhook payload sent via the webhook. See
408
+ * the partner documentation's filter and reducer section for details.
409
+ */
410
+ reducer?: any;
376
411
  broadcaster_config?: BroadcasterConfig;
377
412
  /**
378
413
  * - The date and time when the subscriber event
@@ -380,6 +415,34 @@ type SubscriberEventMapping = {
380
415
  */
381
416
  created_on?: string;
382
417
  };
418
+ /** @returns {FilterSchema} */
419
+ declare function FilterSchema(): FilterSchema;
420
+ type FilterSchema = {
421
+ /**
422
+ * - JSONPath expression that specifies the property
423
+ * in the webhook payload to filter on. This enables targeting specific data
424
+ * within the payload.
425
+ */
426
+ query?: string;
427
+ /**
428
+ * - JavaScript function used to evaluate the
429
+ * specified property in the webhook payload against a condition. This
430
+ * function determines whether the filter passes based on its return value.
431
+ */
432
+ condition?: string;
433
+ /**
434
+ * - Logical operator used to combine multiple
435
+ * conditions in the `conditions` array. Supported values are `AND` and `OR`.
436
+ */
437
+ logic?: string;
438
+ /**
439
+ * - An array of filter objects to be
440
+ * evaluated using the specified logical operator. This array will contain
441
+ * more filters including a combination of single condition mode and logical
442
+ * group mode filters.
443
+ */
444
+ conditions?: any[];
445
+ };
383
446
  /** @returns {EventConfig} */
384
447
  declare function EventConfig(): EventConfig;
385
448
  type EventConfig = {
@@ -9,6 +9,7 @@ const Joi = require("joi");
9
9
  * @property {number} [current] - The current page number.
10
10
  * @property {string} type - The type of the page, such as 'PageType'.
11
11
  * @property {number} [size] - The number of items per page.
12
+ * @property {number} [page_size] - The number of items per page.
12
13
  */
13
14
 
14
15
  /**
@@ -29,11 +30,33 @@ const Joi = require("joi");
29
30
  * @property {number} [id] - The unique identifier for the subscriber event mapping.
30
31
  * @property {number} [event_id] - The ID of the event associated with the subscriber.
31
32
  * @property {number} [subscriber_id] - The ID of the subscriber.
33
+ * @property {FilterSchema} [filters]
34
+ * @property {Object} [reducer] - The reducer property allows users to customize
35
+ * the JSON structure of the webhook payload using JSONPath queries. They can
36
+ * also create new properties by mapping existing ones. Note that it overrides
37
+ * the entire JSON structure of the webhook payload sent via the webhook. See
38
+ * the partner documentation's filter and reducer section for details.
32
39
  * @property {BroadcasterConfig} [broadcaster_config]
33
40
  * @property {string} [created_on] - The date and time when the subscriber event
34
41
  * mapping was created.
35
42
  */
36
43
 
44
+ /**
45
+ * @typedef FilterSchema
46
+ * @property {string} [query] - JSONPath expression that specifies the property
47
+ * in the webhook payload to filter on. This enables targeting specific data
48
+ * within the payload.
49
+ * @property {string} [condition] - JavaScript function used to evaluate the
50
+ * specified property in the webhook payload against a condition. This
51
+ * function determines whether the filter passes based on its return value.
52
+ * @property {string} [logic] - Logical operator used to combine multiple
53
+ * conditions in the `conditions` array. Supported values are `AND` and `OR`.
54
+ * @property {Object[]} [conditions] - An array of filter objects to be
55
+ * evaluated using the specified logical operator. This array will contain
56
+ * more filters including a combination of single condition mode and logical
57
+ * group mode filters.
58
+ */
59
+
37
60
  /**
38
61
  * @typedef EventConfig
39
62
  * @property {number} [id] - The unique identifier for the event configuration.
@@ -334,6 +357,7 @@ class WebhookPlatformModel {
334
357
  current: Joi.number(),
335
358
  type: Joi.string().allow("").required(),
336
359
  size: Joi.number(),
360
+ page_size: Joi.number(),
337
361
  });
338
362
  }
339
363
 
@@ -355,11 +379,23 @@ class WebhookPlatformModel {
355
379
  id: Joi.number(),
356
380
  event_id: Joi.number(),
357
381
  subscriber_id: Joi.number(),
382
+ filters: WebhookPlatformModel.FilterSchema(),
383
+ reducer: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
358
384
  broadcaster_config: WebhookPlatformModel.BroadcasterConfig(),
359
385
  created_on: Joi.string().allow(""),
360
386
  });
361
387
  }
362
388
 
389
+ /** @returns {FilterSchema} */
390
+ static FilterSchema() {
391
+ return Joi.object({
392
+ query: Joi.string().allow(""),
393
+ condition: Joi.string().allow(""),
394
+ logic: Joi.string().allow(""),
395
+ conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
396
+ }).allow(null);
397
+ }
398
+
363
399
  /** @returns {EventConfig} */
364
400
  static EventConfig() {
365
401
  return Joi.object({
@@ -16,7 +16,7 @@ declare class Catalog {
16
16
  * @summary: Get Taxonomy Information by Level
17
17
  * @description: Get Taxonomy Details for a given level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/catalog/getTaxonomyByLevel/).
18
18
  */
19
- getTaxonomyByLevel({ level, l0Slug, l1Slug, l2Slug, l3Slug, limit, requestHeaders }?: CatalogPublicValidator.GetTaxonomyByLevelParam, { responseHeaders }?: object): Promise<CatalogPublicModel.TaxonomyResponseSchema>;
19
+ getTaxonomyByLevel({ level, l0Slug, l1Slug, l2Slug, l3Slug, limit, requestHeaders }?: CatalogPublicValidator.GetTaxonomyByLevelParam, { responseHeaders }?: object, ...args: any[]): Promise<CatalogPublicModel.TaxonomyResponseSchema>;
20
20
  }
21
21
  import CatalogPublicValidator = require("./CatalogPublicValidator");
22
22
  import CatalogPublicModel = require("./CatalogPublicModel");
@@ -6,6 +6,7 @@ const {
6
6
  const PublicAPIClient = require("../PublicAPIClient");
7
7
  const constructUrl = require("../constructUrl");
8
8
  const Paginator = require("../../common/Paginator");
9
+ const { validateRequiredParams } = require("../../common/Validator");
9
10
 
10
11
  const CatalogPublicValidator = require("./CatalogPublicValidator");
11
12
  const CatalogPublicModel = require("./CatalogPublicModel");
@@ -49,18 +50,12 @@ class Catalog {
49
50
  },
50
51
  { responseHeaders } = { responseHeaders: false }
51
52
  ) {
52
- let invalidInput = [];
53
-
54
- if (!level) {
55
- invalidInput.push({
56
- message: `The 'level' field is required.`,
57
- path: ["level"],
53
+ const errors = validateRequiredParams(arguments[0], ["level"]);
54
+ if (errors.length > 0) {
55
+ const error = new FDKClientValidationError({
56
+ message: "Missing required field",
57
+ details: errors,
58
58
  });
59
- }
60
- if (invalidInput.length) {
61
- const error = new Error();
62
- error.message = "Missing required field";
63
- error.details = invalidInput;
64
59
  return Promise.reject(new FDKClientValidationError(error));
65
60
  }
66
61
 
@@ -6,6 +6,7 @@ const {
6
6
  const PublicAPIClient = require("../PublicAPIClient");
7
7
  const constructUrl = require("../constructUrl");
8
8
  const Paginator = require("../../common/Paginator");
9
+ const { validateRequiredParams } = require("../../common/Validator");
9
10
 
10
11
  const ConfigurationPublicValidator = require("./ConfigurationPublicValidator");
11
12
  const ConfigurationPublicModel = require("./ConfigurationPublicModel");
@@ -49,14 +50,6 @@ class Configuration {
49
50
  { locationType, id, requestHeaders } = { requestHeaders: {} },
50
51
  { responseHeaders } = { responseHeaders: false }
51
52
  ) {
52
- let invalidInput = [];
53
- if (invalidInput.length) {
54
- const error = new Error();
55
- error.message = "Missing required field";
56
- error.details = invalidInput;
57
- return Promise.reject(new FDKClientValidationError(error));
58
- }
59
-
60
53
  const { error } = ConfigurationPublicValidator.getLocations().validate(
61
54
  { locationType, id },
62
55
  { abortEarly: false, allowUnknown: true }
@@ -138,14 +131,6 @@ class Configuration {
138
131
  { authorization, query, requestHeaders } = { requestHeaders: {} },
139
132
  { responseHeaders } = { responseHeaders: false }
140
133
  ) {
141
- let invalidInput = [];
142
- if (invalidInput.length) {
143
- const error = new Error();
144
- error.message = "Missing required field";
145
- error.details = invalidInput;
146
- return Promise.reject(new FDKClientValidationError(error));
147
- }
148
-
149
134
  const { error } = ConfigurationPublicValidator.searchApplication().validate(
150
135
  { authorization, query },
151
136
  { abortEarly: false, allowUnknown: true }
@@ -3,13 +3,16 @@ declare class Content {
3
3
  constructor(_conf: any);
4
4
  _conf: any;
5
5
  _relativeUrls: {
6
+ getAllLanguages: string;
6
7
  getAllTags: string;
8
+ getAllTranslatableResources: string;
7
9
  getAnalyticsTags: string;
8
10
  getBasicDetails: string;
9
11
  getCredentialsByEntity: string;
10
12
  getCustomPage: string;
11
13
  getFooterContent: string;
12
14
  getHomePageContent: string;
15
+ getLanguageByLocale: string;
13
16
  getMenuContent: string;
14
17
  getMenuContentByType: string;
15
18
  getNavbar: string;
@@ -17,6 +20,16 @@ declare class Content {
17
20
  };
18
21
  _urls: {};
19
22
  updateUrls(urls: any): void;
23
+ /**
24
+ * @param {ContentPublicValidator.GetAllLanguagesParam} arg - Arg object.
25
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
26
+ * @param {import("../PublicAPIClient").Options} - Options
27
+ * @returns {Promise<Object>} - Success response
28
+ * @name getAllLanguages
29
+ * @summary: Get All Languages
30
+ * @description: Fetches complete list of languages supported by the platform with their locale codes and text directions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllLanguages/).
31
+ */
32
+ getAllLanguages({ requestHeaders }?: any, { responseHeaders }?: object): Promise<any>;
20
33
  /**
21
34
  * @param {ContentPublicValidator.GetAllTagsParam} arg - Arg object.
22
35
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -27,6 +40,16 @@ declare class Content {
27
40
  * @description: Retrieve custom tag with injected css/javascript info. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllTags/).
28
41
  */
29
42
  getAllTags({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ContentPublicModel.TagsSchema>;
43
+ /**
44
+ * @param {ContentPublicValidator.GetAllTranslatableResourcesParam} arg - Arg object.
45
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
46
+ * @param {import("../PublicAPIClient").Options} - Options
47
+ * @returns {Promise<Object>} - Success response
48
+ * @name getAllTranslatableResources
49
+ * @summary: Get Translatable Items
50
+ * @description: Retrieves all resources that can be translated across different languages in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllTranslatableResources/).
51
+ */
52
+ getAllTranslatableResources({ requestHeaders }?: any, { responseHeaders }?: object): Promise<any>;
30
53
  /**
31
54
  * @param {ContentPublicValidator.GetAnalyticsTagsParam} arg - Arg object.
32
55
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -56,7 +79,7 @@ declare class Content {
56
79
  * @summary: Get credentials to power chat support systems
57
80
  * @description: Get credentials for support system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCredentialsByEntity/).
58
81
  */
59
- getCredentialsByEntity({ entityType, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object): Promise<ContentPublicModel.CredentialsSchema>;
82
+ getCredentialsByEntity({ entityType, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.CredentialsSchema>;
60
83
  /**
61
84
  * @param {ContentPublicValidator.GetCustomPageParam} arg - Arg object.
62
85
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -66,7 +89,7 @@ declare class Content {
66
89
  * @summary: Retrieve info for custom page.
67
90
  * @description: Retrieve info of custom pagee to develop and manage custom webpages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCustomPage/).
68
91
  */
69
- getCustomPage({ slug, requestHeaders }?: ContentPublicValidator.GetCustomPageParam, { responseHeaders }?: object): Promise<ContentPublicModel.CustomPageBySlugSchema>;
92
+ getCustomPage({ slug, requestHeaders }?: ContentPublicValidator.GetCustomPageParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.CustomPageBySlugSchema>;
70
93
  /**
71
94
  * @param {ContentPublicValidator.GetFooterContentParam} arg - Arg object.
72
95
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -87,6 +110,16 @@ declare class Content {
87
110
  * @description: Retrieve home page content for a specific page type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getHomePageContent/).
88
111
  */
89
112
  getHomePageContent({ pageType, requestHeaders }?: ContentPublicValidator.GetHomePageContentParam, { responseHeaders }?: object): Promise<ContentPublicModel.HomePageContentSchema>;
113
+ /**
114
+ * @param {ContentPublicValidator.GetLanguageByLocaleParam} arg - Arg object.
115
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
116
+ * @param {import("../PublicAPIClient").Options} - Options
117
+ * @returns {Promise<ContentPublicModel.Language>} - Success response
118
+ * @name getLanguageByLocale
119
+ * @summary: Get Single Language
120
+ * @description: Retrieves detailed information about a specific language using its locale identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getLanguageByLocale/).
121
+ */
122
+ getLanguageByLocale({ locale, requestHeaders }?: ContentPublicValidator.GetLanguageByLocaleParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.Language>;
90
123
  /**
91
124
  * @param {ContentPublicValidator.GetMenuContentParam} arg - Arg object.
92
125
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -106,7 +139,7 @@ declare class Content {
106
139
  * @summary: Get desktop menu content
107
140
  * @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContentByType/).
108
141
  */
109
- getMenuContentByType({ type, requestHeaders }?: ContentPublicValidator.GetMenuContentByTypeParam, { responseHeaders }?: object): Promise<ContentPublicModel.MenuTypeSchema>;
142
+ getMenuContentByType({ type, requestHeaders }?: ContentPublicValidator.GetMenuContentByTypeParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.MenuTypeSchema>;
110
143
  /**
111
144
  * @param {ContentPublicValidator.GetNavbarParam} arg - Arg object.
112
145
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`