@gofynd/fdk-client-javascript 3.16.2 → 3.17.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 (82) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Content/ContentApplicationClient.d.ts +10 -0
  6. package/sdk/application/Content/ContentApplicationClient.js +53 -0
  7. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
  8. package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
  9. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
  10. package/sdk/application/Order/OrderApplicationClient.js +50 -0
  11. package/sdk/application/Payment/PaymentApplicationClient.d.ts +4 -4
  12. package/sdk/application/Payment/PaymentApplicationClient.js +3 -4
  13. package/sdk/application/User/UserApplicationClient.d.ts +10 -0
  14. package/sdk/application/User/UserApplicationClient.js +67 -0
  15. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
  16. package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
  17. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
  18. package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
  19. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
  20. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
  21. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +3 -3
  22. package/sdk/platform/Cart/CartPlatformApplicationClient.js +3 -3
  23. package/sdk/platform/Cart/CartPlatformModel.d.ts +1 -4
  24. package/sdk/platform/Cart/CartPlatformModel.js +1 -1
  25. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +2 -2
  26. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2 -2
  27. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -11
  28. package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -80
  29. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6 -131
  30. package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -141
  31. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -10
  32. package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -12
  33. package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
  34. package/sdk/platform/Common/CommonPlatformModel.js +14 -0
  35. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
  36. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +18 -459
  37. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +28 -41
  38. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +12 -52
  39. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +54 -1
  40. package/sdk/platform/Communication/CommunicationPlatformModel.js +47 -0
  41. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
  42. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
  43. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
  44. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1 -7
  45. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +0 -14
  46. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -6
  47. package/sdk/platform/Content/ContentPlatformModel.d.ts +0 -2
  48. package/sdk/platform/Content/ContentPlatformModel.js +0 -2
  49. package/sdk/platform/Order/OrderPlatformClient.d.ts +26 -18
  50. package/sdk/platform/Order/OrderPlatformClient.js +175 -107
  51. package/sdk/platform/Order/OrderPlatformModel.d.ts +339 -43
  52. package/sdk/platform/Order/OrderPlatformModel.js +209 -43
  53. package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
  54. package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
  55. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +20 -10
  56. package/sdk/platform/Payment/PaymentPlatformModel.js +14 -10
  57. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  58. package/sdk/platform/PlatformApplicationClient.js +0 -4
  59. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
  60. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
  61. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
  62. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
  63. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
  64. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
  65. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +10 -0
  66. package/sdk/platform/User/UserPlatformApplicationClient.js +79 -0
  67. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +13 -1
  68. package/sdk/platform/User/UserPlatformApplicationValidator.js +12 -0
  69. package/sdk/platform/User/UserPlatformModel.d.ts +42 -5
  70. package/sdk/platform/User/UserPlatformModel.js +25 -6
  71. package/sdk/platform/index.d.ts +0 -1
  72. package/sdk/platform/index.js +0 -2
  73. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
  74. package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
  75. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  76. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  77. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  78. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  79. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  80. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  81. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
  82. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
@@ -51,6 +51,11 @@ export = CommonPlatformModel;
51
51
  * redirection is for long time period redirection, and temporary redirection
52
52
  * for a short time period.
53
53
  */
54
+ /**
55
+ * @typedef RegionDetails
56
+ * @property {string} [slug] - Region slug identifier.
57
+ * @property {string} [zone] - Zone identifier within the region.
58
+ */
54
59
  /**
55
60
  * @typedef ApplicationMeta
56
61
  * @property {string} [name] - Indicates the name of application meta
@@ -142,7 +147,7 @@ export = CommonPlatformModel;
142
147
  declare class CommonPlatformModel {
143
148
  }
144
149
  declare namespace CommonPlatformModel {
145
- export { ApplicationResponseSchema, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, NotFound, BadRequestSchema, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations };
150
+ export { ApplicationResponseSchema, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, RegionDetails, ApplicationMeta, SecureUrl, Application, NotFound, BadRequestSchema, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations };
146
151
  }
147
152
  /** @returns {ApplicationResponseSchema} */
148
153
  declare function ApplicationResponseSchema(): ApplicationResponseSchema;
@@ -259,6 +264,18 @@ type ApplicationRedirections = {
259
264
  */
260
265
  type?: string;
261
266
  };
267
+ /** @returns {RegionDetails} */
268
+ declare function RegionDetails(): RegionDetails;
269
+ type RegionDetails = {
270
+ /**
271
+ * - Region slug identifier.
272
+ */
273
+ slug?: string;
274
+ /**
275
+ * - Zone identifier within the region.
276
+ */
277
+ zone?: string;
278
+ };
262
279
  /** @returns {ApplicationMeta} */
263
280
  declare function ApplicationMeta(): ApplicationMeta;
264
281
  type ApplicationMeta = {
@@ -58,6 +58,12 @@ const Joi = require("joi");
58
58
  * for a short time period.
59
59
  */
60
60
 
61
+ /**
62
+ * @typedef RegionDetails
63
+ * @property {string} [slug] - Region slug identifier.
64
+ * @property {string} [zone] - Zone identifier within the region.
65
+ */
66
+
61
67
  /**
62
68
  * @typedef ApplicationMeta
63
69
  * @property {string} [name] - Indicates the name of application meta
@@ -214,6 +220,14 @@ class CommonPlatformModel {
214
220
  });
215
221
  }
216
222
 
223
+ /** @returns {RegionDetails} */
224
+ static RegionDetails() {
225
+ return Joi.object({
226
+ slug: Joi.string().allow(""),
227
+ zone: Joi.string().allow(""),
228
+ });
229
+ }
230
+
217
231
  /** @returns {ApplicationMeta} */
218
232
  static ApplicationMeta() {
219
233
  return Joi.object({
@@ -15,42 +15,6 @@ declare class Communication {
15
15
  * @description: Creates a new email audience. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/createAudience/).
16
16
  */
17
17
  createAudience({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateAudienceParam, { responseHeaders }?: object): Promise<CommunicationPlatformModel.Audience>;
18
- /**
19
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryHeadersParam} arg
20
- * - Arg object
21
- *
22
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
23
- * @param {import("../PlatformAPIClient").Options} - Options
24
- * @returns {Promise<Object>} - Success response
25
- * @name createBigQueryHeaders
26
- * @summary: Create BigQuery headers
27
- * @description: Create BigQuery headers - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/createBigQueryHeaders/).
28
- */
29
- createBigQueryHeaders({ requestHeaders }?: any, { responseHeaders }?: object): Promise<any>;
30
- /**
31
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryNCountParam} arg
32
- * - Arg object
33
- *
34
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
35
- * @param {import("../PlatformAPIClient").Options} - Options
36
- * @returns {Promise<Object>} - Success response
37
- * @name createBigQueryNCount
38
- * @summary: Create BigQuery N-count
39
- * @description: Creates big query n count - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/createBigQueryNCount/).
40
- */
41
- createBigQueryNCount({ requestHeaders }?: any, { responseHeaders }?: object): Promise<any>;
42
- /**
43
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryRowCountParam} arg
44
- * - Arg object
45
- *
46
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
47
- * @param {import("../PlatformAPIClient").Options} - Options
48
- * @returns {Promise<Object>} - Success response
49
- * @name createBigQueryRowCount
50
- * @summary: Create a BigQuery row count
51
- * @description: Creates big query row count - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/createBigQueryRowCount/).
52
- */
53
- createBigQueryRowCount({ requestHeaders }?: any, { responseHeaders }?: object): Promise<any>;
54
18
  /**
55
19
  * @param {CommunicationPlatformApplicationValidator.CreateCampaignParam} arg
56
20
  * - Arg object
@@ -273,30 +237,6 @@ declare class Communication {
273
237
  * @description: Retrieves a list of all the audiences. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getAudiences/).
274
238
  */
275
239
  getAudiences({ pageNo, pageSize, sort, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetAudiencesParam, { responseHeaders }?: object): Promise<CommunicationPlatformModel.Audiences>;
276
- /**
277
- * @param {CommunicationPlatformApplicationValidator.GetBigQueryHeadersByIdParam} arg
278
- * - Arg object
279
- *
280
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
281
- * @param {import("../PlatformAPIClient").Options} - Options
282
- * @returns {Promise<Object>} - Success response
283
- * @name getBigQueryHeadersById
284
- * @summary: Get BigQuery headers
285
- * @description: Retrieves header information from BigQuery. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getBigQueryHeadersById/).
286
- */
287
- getBigQueryHeadersById({ id, requestHeaders }?: CommunicationPlatformApplicationValidator.GetBigQueryHeadersByIdParam, { responseHeaders }?: object): Promise<any>;
288
- /**
289
- * @param {CommunicationPlatformApplicationValidator.GetBigQueryRowCountByIdParam} arg
290
- * - Arg object
291
- *
292
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
293
- * @param {import("../PlatformAPIClient").Options} - Options
294
- * @returns {Promise<Object>} - Success response
295
- * @name getBigQueryRowCountById
296
- * @summary: Get BigQuery row count
297
- * @description: Retrieves big query row count by id - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getBigQueryRowCountById/).
298
- */
299
- getBigQueryRowCountById({ id, requestHeaders }?: CommunicationPlatformApplicationValidator.GetBigQueryRowCountByIdParam, { responseHeaders }?: object): Promise<any>;
300
240
  /**
301
241
  * @param {CommunicationPlatformApplicationValidator.GetCampaignByIdParam} arg
302
242
  * - Arg object
@@ -432,7 +372,7 @@ declare class Communication {
432
372
  * @summary: Get all event subscriptions
433
373
  * @description: Retrieves a list of all event subscriptions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getEventSubscriptions/).
434
374
  */
435
- getEventSubscriptions({ pageNo, pageSize, populate, requestHeaders }?: CommunicationPlatformApplicationValidator.GetEventSubscriptionsParam, { responseHeaders }?: object): Promise<CommunicationPlatformModel.EventSubscriptions>;
375
+ getEventSubscriptions({ pageNo, pageSize, populate, group, subGroup, fulfillmentOptionSlug, requestHeaders, }?: CommunicationPlatformApplicationValidator.GetEventSubscriptionsParam, { responseHeaders }?: object): Promise<CommunicationPlatformModel.EventSubscriptions>;
436
376
  /**
437
377
  * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsByIdParam} arg
438
378
  * - Arg object
@@ -611,18 +551,6 @@ declare class Communication {
611
551
  * @description: Retrieve a list of SMS communication templates that are subscribed to an event. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getSubscribedSmsTemplates/).
612
552
  */
613
553
  getSubscribedSmsTemplates({ pageNo, pageSize, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetSubscribedSmsTemplatesParam, { responseHeaders }?: object): Promise<CommunicationPlatformModel.SmsTemplates>;
614
- /**
615
- * @param {CommunicationPlatformApplicationValidator.GetSystemAudiencesParam} arg
616
- * - Arg object
617
- *
618
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
619
- * @param {import("../PlatformAPIClient").Options} - Options
620
- * @returns {Promise<Object>} - Success response
621
- * @name getSystemAudiences
622
- * @summary: Get system audiences
623
- * @description: Retrieves a list of system-defined audiences for communication. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getSystemAudiences/).
624
- */
625
- getSystemAudiences({ requestHeaders }?: any, { responseHeaders }?: object): Promise<any>;
626
554
  /**
627
555
  * @param {CommunicationPlatformApplicationValidator.GetSystemEmailTemplatesParam} arg
628
556
  * - Arg object
@@ -96,231 +96,6 @@ class Communication {
96
96
  return response;
97
97
  }
98
98
 
99
- /**
100
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryHeadersParam} arg
101
- * - Arg object
102
- *
103
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
104
- * @param {import("../PlatformAPIClient").Options} - Options
105
- * @returns {Promise<Object>} - Success response
106
- * @name createBigQueryHeaders
107
- * @summary: Create BigQuery headers
108
- * @description: Create BigQuery headers - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/createBigQueryHeaders/).
109
- */
110
- async createBigQueryHeaders(
111
- { requestHeaders } = { requestHeaders: {} },
112
- { responseHeaders } = { responseHeaders: false }
113
- ) {
114
- const {
115
- error,
116
- } = CommunicationPlatformApplicationValidator.createBigQueryHeaders().validate(
117
- {},
118
- { abortEarly: false, allowUnknown: true }
119
- );
120
- if (error) {
121
- return Promise.reject(new FDKClientValidationError(error));
122
- }
123
-
124
- // Showing warrnings if extra unknown parameters are found
125
- const {
126
- error: warrning,
127
- } = CommunicationPlatformApplicationValidator.createBigQueryHeaders().validate(
128
- {},
129
- { abortEarly: false, allowUnknown: false }
130
- );
131
- if (warrning) {
132
- Logger({
133
- level: "WARN",
134
- message: `Parameter Validation warrnings for platform > Communication > createBigQueryHeaders \n ${warrning}`,
135
- });
136
- }
137
-
138
- const query_params = {};
139
-
140
- const response = await PlatformAPIClient.execute(
141
- this.config,
142
- "post",
143
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-headers`,
144
- query_params,
145
- undefined,
146
- requestHeaders,
147
- { responseHeaders }
148
- );
149
-
150
- let responseData = response;
151
- if (responseHeaders) {
152
- responseData = response[0];
153
- }
154
-
155
- const { error: res_error } = Joi.any().validate(responseData, {
156
- abortEarly: false,
157
- allowUnknown: true,
158
- });
159
-
160
- if (res_error) {
161
- if (this.config.options.strictResponseCheck === true) {
162
- return Promise.reject(new FDKResponseValidationError(res_error));
163
- } else {
164
- Logger({
165
- level: "WARN",
166
- message: `Response Validation Warnings for platform > Communication > createBigQueryHeaders \n ${res_error}`,
167
- });
168
- }
169
- }
170
-
171
- return response;
172
- }
173
-
174
- /**
175
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryNCountParam} arg
176
- * - Arg object
177
- *
178
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
179
- * @param {import("../PlatformAPIClient").Options} - Options
180
- * @returns {Promise<Object>} - Success response
181
- * @name createBigQueryNCount
182
- * @summary: Create BigQuery N-count
183
- * @description: Creates big query n count - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/createBigQueryNCount/).
184
- */
185
- async createBigQueryNCount(
186
- { requestHeaders } = { requestHeaders: {} },
187
- { responseHeaders } = { responseHeaders: false }
188
- ) {
189
- const {
190
- error,
191
- } = CommunicationPlatformApplicationValidator.createBigQueryNCount().validate(
192
- {},
193
- { abortEarly: false, allowUnknown: true }
194
- );
195
- if (error) {
196
- return Promise.reject(new FDKClientValidationError(error));
197
- }
198
-
199
- // Showing warrnings if extra unknown parameters are found
200
- const {
201
- error: warrning,
202
- } = CommunicationPlatformApplicationValidator.createBigQueryNCount().validate(
203
- {},
204
- { abortEarly: false, allowUnknown: false }
205
- );
206
- if (warrning) {
207
- Logger({
208
- level: "WARN",
209
- message: `Parameter Validation warrnings for platform > Communication > createBigQueryNCount \n ${warrning}`,
210
- });
211
- }
212
-
213
- const query_params = {};
214
-
215
- const response = await PlatformAPIClient.execute(
216
- this.config,
217
- "post",
218
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-n-records`,
219
- query_params,
220
- undefined,
221
- requestHeaders,
222
- { responseHeaders }
223
- );
224
-
225
- let responseData = response;
226
- if (responseHeaders) {
227
- responseData = response[0];
228
- }
229
-
230
- const { error: res_error } = Joi.any().validate(responseData, {
231
- abortEarly: false,
232
- allowUnknown: true,
233
- });
234
-
235
- if (res_error) {
236
- if (this.config.options.strictResponseCheck === true) {
237
- return Promise.reject(new FDKResponseValidationError(res_error));
238
- } else {
239
- Logger({
240
- level: "WARN",
241
- message: `Response Validation Warnings for platform > Communication > createBigQueryNCount \n ${res_error}`,
242
- });
243
- }
244
- }
245
-
246
- return response;
247
- }
248
-
249
- /**
250
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryRowCountParam} arg
251
- * - Arg object
252
- *
253
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
254
- * @param {import("../PlatformAPIClient").Options} - Options
255
- * @returns {Promise<Object>} - Success response
256
- * @name createBigQueryRowCount
257
- * @summary: Create a BigQuery row count
258
- * @description: Creates big query row count - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/createBigQueryRowCount/).
259
- */
260
- async createBigQueryRowCount(
261
- { requestHeaders } = { requestHeaders: {} },
262
- { responseHeaders } = { responseHeaders: false }
263
- ) {
264
- const {
265
- error,
266
- } = CommunicationPlatformApplicationValidator.createBigQueryRowCount().validate(
267
- {},
268
- { abortEarly: false, allowUnknown: true }
269
- );
270
- if (error) {
271
- return Promise.reject(new FDKClientValidationError(error));
272
- }
273
-
274
- // Showing warrnings if extra unknown parameters are found
275
- const {
276
- error: warrning,
277
- } = CommunicationPlatformApplicationValidator.createBigQueryRowCount().validate(
278
- {},
279
- { abortEarly: false, allowUnknown: false }
280
- );
281
- if (warrning) {
282
- Logger({
283
- level: "WARN",
284
- message: `Parameter Validation warrnings for platform > Communication > createBigQueryRowCount \n ${warrning}`,
285
- });
286
- }
287
-
288
- const query_params = {};
289
-
290
- const response = await PlatformAPIClient.execute(
291
- this.config,
292
- "post",
293
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-row-count`,
294
- query_params,
295
- undefined,
296
- requestHeaders,
297
- { responseHeaders }
298
- );
299
-
300
- let responseData = response;
301
- if (responseHeaders) {
302
- responseData = response[0];
303
- }
304
-
305
- const { error: res_error } = Joi.any().validate(responseData, {
306
- abortEarly: false,
307
- allowUnknown: true,
308
- });
309
-
310
- if (res_error) {
311
- if (this.config.options.strictResponseCheck === true) {
312
- return Promise.reject(new FDKResponseValidationError(res_error));
313
- } else {
314
- Logger({
315
- level: "WARN",
316
- message: `Response Validation Warnings for platform > Communication > createBigQueryRowCount \n ${res_error}`,
317
- });
318
- }
319
- }
320
-
321
- return response;
322
- }
323
-
324
99
  /**
325
100
  * @param {CommunicationPlatformApplicationValidator.CreateCampaignParam} arg
326
101
  * - Arg object
@@ -1790,164 +1565,6 @@ class Communication {
1790
1565
  return response;
1791
1566
  }
1792
1567
 
1793
- /**
1794
- * @param {CommunicationPlatformApplicationValidator.GetBigQueryHeadersByIdParam} arg
1795
- * - Arg object
1796
- *
1797
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1798
- * @param {import("../PlatformAPIClient").Options} - Options
1799
- * @returns {Promise<Object>} - Success response
1800
- * @name getBigQueryHeadersById
1801
- * @summary: Get BigQuery headers
1802
- * @description: Retrieves header information from BigQuery. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getBigQueryHeadersById/).
1803
- */
1804
- async getBigQueryHeadersById(
1805
- { id, requestHeaders } = { requestHeaders: {} },
1806
- { responseHeaders } = { responseHeaders: false }
1807
- ) {
1808
- const {
1809
- error,
1810
- } = CommunicationPlatformApplicationValidator.getBigQueryHeadersById().validate(
1811
- {
1812
- id,
1813
- },
1814
- { abortEarly: false, allowUnknown: true }
1815
- );
1816
- if (error) {
1817
- return Promise.reject(new FDKClientValidationError(error));
1818
- }
1819
-
1820
- // Showing warrnings if extra unknown parameters are found
1821
- const {
1822
- error: warrning,
1823
- } = CommunicationPlatformApplicationValidator.getBigQueryHeadersById().validate(
1824
- {
1825
- id,
1826
- },
1827
- { abortEarly: false, allowUnknown: false }
1828
- );
1829
- if (warrning) {
1830
- Logger({
1831
- level: "WARN",
1832
- message: `Parameter Validation warrnings for platform > Communication > getBigQueryHeadersById \n ${warrning}`,
1833
- });
1834
- }
1835
-
1836
- const query_params = {};
1837
-
1838
- const response = await PlatformAPIClient.execute(
1839
- this.config,
1840
- "get",
1841
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-headers/${id}`,
1842
- query_params,
1843
- undefined,
1844
- requestHeaders,
1845
- { responseHeaders }
1846
- );
1847
-
1848
- let responseData = response;
1849
- if (responseHeaders) {
1850
- responseData = response[0];
1851
- }
1852
-
1853
- const { error: res_error } = Joi.any().validate(responseData, {
1854
- abortEarly: false,
1855
- allowUnknown: true,
1856
- });
1857
-
1858
- if (res_error) {
1859
- if (this.config.options.strictResponseCheck === true) {
1860
- return Promise.reject(new FDKResponseValidationError(res_error));
1861
- } else {
1862
- Logger({
1863
- level: "WARN",
1864
- message: `Response Validation Warnings for platform > Communication > getBigQueryHeadersById \n ${res_error}`,
1865
- });
1866
- }
1867
- }
1868
-
1869
- return response;
1870
- }
1871
-
1872
- /**
1873
- * @param {CommunicationPlatformApplicationValidator.GetBigQueryRowCountByIdParam} arg
1874
- * - Arg object
1875
- *
1876
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1877
- * @param {import("../PlatformAPIClient").Options} - Options
1878
- * @returns {Promise<Object>} - Success response
1879
- * @name getBigQueryRowCountById
1880
- * @summary: Get BigQuery row count
1881
- * @description: Retrieves big query row count by id - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getBigQueryRowCountById/).
1882
- */
1883
- async getBigQueryRowCountById(
1884
- { id, requestHeaders } = { requestHeaders: {} },
1885
- { responseHeaders } = { responseHeaders: false }
1886
- ) {
1887
- const {
1888
- error,
1889
- } = CommunicationPlatformApplicationValidator.getBigQueryRowCountById().validate(
1890
- {
1891
- id,
1892
- },
1893
- { abortEarly: false, allowUnknown: true }
1894
- );
1895
- if (error) {
1896
- return Promise.reject(new FDKClientValidationError(error));
1897
- }
1898
-
1899
- // Showing warrnings if extra unknown parameters are found
1900
- const {
1901
- error: warrning,
1902
- } = CommunicationPlatformApplicationValidator.getBigQueryRowCountById().validate(
1903
- {
1904
- id,
1905
- },
1906
- { abortEarly: false, allowUnknown: false }
1907
- );
1908
- if (warrning) {
1909
- Logger({
1910
- level: "WARN",
1911
- message: `Parameter Validation warrnings for platform > Communication > getBigQueryRowCountById \n ${warrning}`,
1912
- });
1913
- }
1914
-
1915
- const query_params = {};
1916
-
1917
- const response = await PlatformAPIClient.execute(
1918
- this.config,
1919
- "get",
1920
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-row-count/${id}`,
1921
- query_params,
1922
- undefined,
1923
- requestHeaders,
1924
- { responseHeaders }
1925
- );
1926
-
1927
- let responseData = response;
1928
- if (responseHeaders) {
1929
- responseData = response[0];
1930
- }
1931
-
1932
- const { error: res_error } = Joi.any().validate(responseData, {
1933
- abortEarly: false,
1934
- allowUnknown: true,
1935
- });
1936
-
1937
- if (res_error) {
1938
- if (this.config.options.strictResponseCheck === true) {
1939
- return Promise.reject(new FDKResponseValidationError(res_error));
1940
- } else {
1941
- Logger({
1942
- level: "WARN",
1943
- message: `Response Validation Warnings for platform > Communication > getBigQueryRowCountById \n ${res_error}`,
1944
- });
1945
- }
1946
- }
1947
-
1948
- return response;
1949
- }
1950
-
1951
1568
  /**
1952
1569
  * @param {CommunicationPlatformApplicationValidator.GetCampaignByIdParam} arg
1953
1570
  * - Arg object
@@ -2800,7 +2417,15 @@ class Communication {
2800
2417
  * @description: Retrieves a list of all event subscriptions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getEventSubscriptions/).
2801
2418
  */
2802
2419
  async getEventSubscriptions(
2803
- { pageNo, pageSize, populate, requestHeaders } = { requestHeaders: {} },
2420
+ {
2421
+ pageNo,
2422
+ pageSize,
2423
+ populate,
2424
+ group,
2425
+ subGroup,
2426
+ fulfillmentOptionSlug,
2427
+ requestHeaders,
2428
+ } = { requestHeaders: {} },
2804
2429
  { responseHeaders } = { responseHeaders: false }
2805
2430
  ) {
2806
2431
  const {
@@ -2810,6 +2435,9 @@ class Communication {
2810
2435
  pageNo,
2811
2436
  pageSize,
2812
2437
  populate,
2438
+ group,
2439
+ subGroup,
2440
+ fulfillmentOptionSlug,
2813
2441
  },
2814
2442
  { abortEarly: false, allowUnknown: true }
2815
2443
  );
@@ -2825,6 +2453,9 @@ class Communication {
2825
2453
  pageNo,
2826
2454
  pageSize,
2827
2455
  populate,
2456
+ group,
2457
+ subGroup,
2458
+ fulfillmentOptionSlug,
2828
2459
  },
2829
2460
  { abortEarly: false, allowUnknown: false }
2830
2461
  );
@@ -2839,6 +2470,9 @@ class Communication {
2839
2470
  query_params["page_no"] = pageNo;
2840
2471
  query_params["page_size"] = pageSize;
2841
2472
  query_params["populate"] = populate;
2473
+ query_params["group"] = group;
2474
+ query_params["sub_group"] = subGroup;
2475
+ query_params["fulfillment_option_slug"] = fulfillmentOptionSlug;
2842
2476
 
2843
2477
  const response = await PlatformAPIClient.execute(
2844
2478
  this.config,
@@ -4126,81 +3760,6 @@ class Communication {
4126
3760
  return response;
4127
3761
  }
4128
3762
 
4129
- /**
4130
- * @param {CommunicationPlatformApplicationValidator.GetSystemAudiencesParam} arg
4131
- * - Arg object
4132
- *
4133
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4134
- * @param {import("../PlatformAPIClient").Options} - Options
4135
- * @returns {Promise<Object>} - Success response
4136
- * @name getSystemAudiences
4137
- * @summary: Get system audiences
4138
- * @description: Retrieves a list of system-defined audiences for communication. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/communication/getSystemAudiences/).
4139
- */
4140
- async getSystemAudiences(
4141
- { requestHeaders } = { requestHeaders: {} },
4142
- { responseHeaders } = { responseHeaders: false }
4143
- ) {
4144
- const {
4145
- error,
4146
- } = CommunicationPlatformApplicationValidator.getSystemAudiences().validate(
4147
- {},
4148
- { abortEarly: false, allowUnknown: true }
4149
- );
4150
- if (error) {
4151
- return Promise.reject(new FDKClientValidationError(error));
4152
- }
4153
-
4154
- // Showing warrnings if extra unknown parameters are found
4155
- const {
4156
- error: warrning,
4157
- } = CommunicationPlatformApplicationValidator.getSystemAudiences().validate(
4158
- {},
4159
- { abortEarly: false, allowUnknown: false }
4160
- );
4161
- if (warrning) {
4162
- Logger({
4163
- level: "WARN",
4164
- message: `Parameter Validation warrnings for platform > Communication > getSystemAudiences \n ${warrning}`,
4165
- });
4166
- }
4167
-
4168
- const query_params = {};
4169
-
4170
- const response = await PlatformAPIClient.execute(
4171
- this.config,
4172
- "get",
4173
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/system-datasources`,
4174
- query_params,
4175
- undefined,
4176
- requestHeaders,
4177
- { responseHeaders }
4178
- );
4179
-
4180
- let responseData = response;
4181
- if (responseHeaders) {
4182
- responseData = response[0];
4183
- }
4184
-
4185
- const { error: res_error } = Joi.any().validate(responseData, {
4186
- abortEarly: false,
4187
- allowUnknown: true,
4188
- });
4189
-
4190
- if (res_error) {
4191
- if (this.config.options.strictResponseCheck === true) {
4192
- return Promise.reject(new FDKResponseValidationError(res_error));
4193
- } else {
4194
- Logger({
4195
- level: "WARN",
4196
- message: `Response Validation Warnings for platform > Communication > getSystemAudiences \n ${res_error}`,
4197
- });
4198
- }
4199
- }
4200
-
4201
- return response;
4202
- }
4203
-
4204
3763
  /**
4205
3764
  * @param {CommunicationPlatformApplicationValidator.GetSystemEmailTemplatesParam} arg
4206
3765
  * - Arg object