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

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 (229) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  4. package/sdk/application/Cart/CartApplicationClient.js +5 -3
  5. package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
  6. package/sdk/application/Cart/CartApplicationModel.js +74 -0
  7. package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
  8. package/sdk/application/Cart/CartApplicationValidator.js +4 -0
  9. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
  10. package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
  11. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
  12. package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
  13. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
  14. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
  15. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
  16. package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
  17. package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
  18. package/sdk/application/Content/ContentApplicationClient.js +246 -0
  19. package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
  20. package/sdk/application/Content/ContentApplicationModel.js +252 -0
  21. package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
  22. package/sdk/application/Content/ContentApplicationValidator.js +41 -0
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
  25. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
  26. package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
  27. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
  28. package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
  29. package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
  30. package/sdk/application/Order/OrderApplicationClient.js +32 -8
  31. package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
  32. package/sdk/application/Order/OrderApplicationModel.js +6 -0
  33. package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
  34. package/sdk/application/Order/OrderApplicationValidator.js +8 -0
  35. package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
  36. package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
  37. package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
  38. package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
  39. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
  40. package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
  41. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
  42. package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
  43. package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
  44. package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
  45. package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
  46. package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
  47. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
  48. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
  49. package/sdk/application/User/UserApplicationClient.d.ts +33 -0
  50. package/sdk/application/User/UserApplicationClient.js +239 -0
  51. package/sdk/application/User/UserApplicationModel.d.ts +28 -13
  52. package/sdk/application/User/UserApplicationModel.js +36 -12
  53. package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
  54. package/sdk/application/User/UserApplicationValidator.js +36 -0
  55. package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
  56. package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
  57. package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
  58. package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
  59. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
  60. package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
  61. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
  62. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
  63. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
  64. package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
  65. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
  66. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
  67. package/sdk/partner/PartnerClient.d.ts +6 -0
  68. package/sdk/partner/PartnerClient.js +9 -0
  69. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
  70. package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
  71. package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
  72. package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
  73. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
  74. package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
  75. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
  76. package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
  77. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
  78. package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
  79. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
  80. package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
  81. package/sdk/partner/index.d.ts +3 -0
  82. package/sdk/partner/index.js +6 -0
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
  84. package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
  85. package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
  86. package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
  87. package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
  88. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
  89. package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
  90. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
  91. package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
  92. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
  93. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
  94. package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
  95. package/sdk/platform/Cart/CartPlatformModel.js +71 -4
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
  97. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
  98. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
  100. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
  101. package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
  102. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
  103. package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
  104. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
  105. package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
  106. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
  107. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
  110. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
  111. package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
  112. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
  113. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
  114. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
  118. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
  119. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
  120. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
  121. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
  122. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
  123. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
  124. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
  125. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3630 -1059
  126. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +342 -1
  127. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +401 -0
  128. package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
  129. package/sdk/platform/Content/ContentPlatformClient.js +2000 -0
  130. package/sdk/platform/Content/ContentPlatformModel.d.ts +1094 -1
  131. package/sdk/platform/Content/ContentPlatformModel.js +1356 -46
  132. package/sdk/platform/Content/ContentPlatformValidator.d.ts +238 -0
  133. package/sdk/platform/Content/ContentPlatformValidator.js +310 -0
  134. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
  137. package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
  141. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -5
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +18 -4
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
  145. package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
  147. package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
  148. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
  149. package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
  150. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
  151. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
  152. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
  153. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
  154. package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
  155. package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
  156. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
  157. package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
  158. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
  159. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
  160. package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
  161. package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
  162. package/sdk/platform/Order/OrderPlatformModel.d.ts +1030 -468
  163. package/sdk/platform/Order/OrderPlatformModel.js +1176 -523
  164. package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
  165. package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
  166. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
  167. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
  168. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
  169. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
  170. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
  171. package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
  172. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
  173. package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
  174. package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
  175. package/sdk/platform/PlatformApplicationClient.js +4 -4
  176. package/sdk/platform/PlatformClient.d.ts +4 -2
  177. package/sdk/platform/PlatformClient.js +8 -4
  178. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
  179. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
  180. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
  181. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
  182. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
  183. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
  188. package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
  189. package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
  190. package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
  191. package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
  192. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
  193. package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
  194. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
  195. package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
  196. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
  197. package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
  198. package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
  199. package/sdk/platform/User/UserPlatformModel.js +256 -5
  200. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
  201. package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
  202. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
  203. package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
  204. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
  205. package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
  206. package/sdk/platform/index.d.ts +1 -1
  207. package/sdk/platform/index.js +2 -2
  208. package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
  209. package/sdk/public/Billing/BillingPublicClient.js +116 -0
  210. package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
  211. package/sdk/public/Billing/BillingPublicModel.js +96 -0
  212. package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
  213. package/sdk/public/Billing/BillingPublicValidator.js +19 -0
  214. package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
  215. package/sdk/public/Content/ContentPublicClient.js +114 -0
  216. package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
  217. package/sdk/public/Content/ContentPublicModel.js +60 -0
  218. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
  219. package/sdk/public/Content/ContentPublicValidator.js +19 -0
  220. package/sdk/public/PublicClient.d.ts +4 -0
  221. package/sdk/public/PublicClient.js +8 -0
  222. package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
  223. package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
  224. package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
  225. package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
  226. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
  227. package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
  228. package/sdk/public/index.d.ts +2 -0
  229. package/sdk/public/index.js +4 -0
@@ -17,6 +17,10 @@ class Content {
17
17
  getAnnouncements: "/service/application/content/v1.0/announcements",
18
18
  getBlog: "/service/application/content/v1.0/blogs/{slug}",
19
19
  getBlogs: "/service/application/content/v1.0/blogs/",
20
+ getCustomFields:
21
+ "/service/application/content/v1.0/metafields/{resource}/{resource_id}",
22
+ getCustomObject:
23
+ "/service/application/content/v1.0/metaobjects/{metaobject_id}",
20
24
  getDataLoaders: "/service/application/content/v1.0/data-loader",
21
25
  getFaqBySlug: "/service/application/content/v1.0/faq/{slug}",
22
26
  getFaqCategories: "/service/application/content/v1.0/faq/categories",
@@ -31,6 +35,7 @@ class Content {
31
35
  getPage: "/service/application/content/v2.0/pages/{slug}",
32
36
  getPages: "/service/application/content/v2.0/pages/",
33
37
  getSEOConfiguration: "/service/application/content/v1.0/seo",
38
+ getSEOMarkupSchemas: "/service/application/content/v1.0/seo/schema",
34
39
  getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
35
40
  getSlideshows: "/service/application/content/v1.0/slideshow/",
36
41
  getSupportInformation: "/service/application/content/v1.0/support",
@@ -314,6 +319,165 @@ class Content {
314
319
  return paginator;
315
320
  }
316
321
 
322
+ /**
323
+ * @param {ContentApplicationValidator.GetCustomFieldsParam} arg - Arg object.
324
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
325
+ * @param {import("../ApplicationAPIClient").Options} - Options
326
+ * @returns {Promise<ContentApplicationModel.CustomFieldsResponseByResourceIdSchema>}
327
+ * - Success response
328
+ *
329
+ * @name getCustomFields
330
+ * @summary: Get list of custom fields of given resource and resource_id.
331
+ * @description: Use this API to retrieve the custom fields for given resource and resource_id in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFields/).
332
+ */
333
+ async getCustomFields(
334
+ { resource, resourceId, requestHeaders } = { requestHeaders: {} },
335
+ { responseHeaders } = { responseHeaders: false }
336
+ ) {
337
+ const { error } = ContentApplicationValidator.getCustomFields().validate(
338
+ { resource, resourceId },
339
+ { abortEarly: false, allowUnknown: true }
340
+ );
341
+ if (error) {
342
+ return Promise.reject(new FDKClientValidationError(error));
343
+ }
344
+
345
+ // Showing warrnings if extra unknown parameters are found
346
+ const {
347
+ error: warrning,
348
+ } = ContentApplicationValidator.getCustomFields().validate(
349
+ { resource, resourceId },
350
+ { abortEarly: false, allowUnknown: false }
351
+ );
352
+ if (warrning) {
353
+ Logger({
354
+ level: "WARN",
355
+ message: `Parameter Validation warrnings for application > Content > getCustomFields \n ${warrning}`,
356
+ });
357
+ }
358
+
359
+ const query_params = {};
360
+
361
+ const xHeaders = {};
362
+
363
+ const response = await ApplicationAPIClient.execute(
364
+ this._conf,
365
+ "get",
366
+ constructUrl({
367
+ url: this._urls["getCustomFields"],
368
+ params: { resource, resourceId },
369
+ }),
370
+ query_params,
371
+ undefined,
372
+ { ...xHeaders, ...requestHeaders },
373
+ { responseHeaders }
374
+ );
375
+
376
+ let responseData = response;
377
+ if (responseHeaders) {
378
+ responseData = response[0];
379
+ }
380
+
381
+ const {
382
+ error: res_error,
383
+ } = ContentApplicationModel.CustomFieldsResponseByResourceIdSchema().validate(
384
+ responseData,
385
+ { abortEarly: false, allowUnknown: true }
386
+ );
387
+
388
+ if (res_error) {
389
+ if (this._conf.options.strictResponseCheck === true) {
390
+ return Promise.reject(new FDKResponseValidationError(res_error));
391
+ } else {
392
+ Logger({
393
+ level: "WARN",
394
+ message: `Response Validation Warnings for application > Content > getCustomFields \n ${res_error}`,
395
+ });
396
+ }
397
+ }
398
+
399
+ return response;
400
+ }
401
+
402
+ /**
403
+ * @param {ContentApplicationValidator.GetCustomObjectParam} arg - Arg object.
404
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
405
+ * @param {import("../ApplicationAPIClient").Options} - Options
406
+ * @returns {Promise<ContentApplicationModel.CustomObjectByIdSchema>} -
407
+ * Success response
408
+ * @name getCustomObject
409
+ * @summary: Get custom object details
410
+ * @description: Use this API to retrieve the custom object details, their fields details with definitions and references. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObject/).
411
+ */
412
+ async getCustomObject(
413
+ { metaobjectId, requestHeaders } = { requestHeaders: {} },
414
+ { responseHeaders } = { responseHeaders: false }
415
+ ) {
416
+ const { error } = ContentApplicationValidator.getCustomObject().validate(
417
+ { metaobjectId },
418
+ { abortEarly: false, allowUnknown: true }
419
+ );
420
+ if (error) {
421
+ return Promise.reject(new FDKClientValidationError(error));
422
+ }
423
+
424
+ // Showing warrnings if extra unknown parameters are found
425
+ const {
426
+ error: warrning,
427
+ } = ContentApplicationValidator.getCustomObject().validate(
428
+ { metaobjectId },
429
+ { abortEarly: false, allowUnknown: false }
430
+ );
431
+ if (warrning) {
432
+ Logger({
433
+ level: "WARN",
434
+ message: `Parameter Validation warrnings for application > Content > getCustomObject \n ${warrning}`,
435
+ });
436
+ }
437
+
438
+ const query_params = {};
439
+
440
+ const xHeaders = {};
441
+
442
+ const response = await ApplicationAPIClient.execute(
443
+ this._conf,
444
+ "get",
445
+ constructUrl({
446
+ url: this._urls["getCustomObject"],
447
+ params: { metaobjectId },
448
+ }),
449
+ query_params,
450
+ undefined,
451
+ { ...xHeaders, ...requestHeaders },
452
+ { responseHeaders }
453
+ );
454
+
455
+ let responseData = response;
456
+ if (responseHeaders) {
457
+ responseData = response[0];
458
+ }
459
+
460
+ const {
461
+ error: res_error,
462
+ } = ContentApplicationModel.CustomObjectByIdSchema().validate(
463
+ responseData,
464
+ { abortEarly: false, allowUnknown: true }
465
+ );
466
+
467
+ if (res_error) {
468
+ if (this._conf.options.strictResponseCheck === true) {
469
+ return Promise.reject(new FDKResponseValidationError(res_error));
470
+ } else {
471
+ Logger({
472
+ level: "WARN",
473
+ message: `Response Validation Warnings for application > Content > getCustomObject \n ${res_error}`,
474
+ });
475
+ }
476
+ }
477
+
478
+ return response;
479
+ }
480
+
317
481
  /**
318
482
  * @param {ContentApplicationValidator.GetDataLoadersParam} arg - Arg object.
319
483
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1314,6 +1478,88 @@ class Content {
1314
1478
  return response;
1315
1479
  }
1316
1480
 
1481
+ /**
1482
+ * @param {ContentApplicationValidator.GetSEOMarkupSchemasParam} arg - Arg object.
1483
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1484
+ * @param {import("../ApplicationAPIClient").Options} - Options
1485
+ * @returns {Promise<ContentApplicationModel.SeoSchemaComponent>} - Success response
1486
+ * @name getSEOMarkupSchemas
1487
+ * @summary: Get SEO Markup schemas of an application
1488
+ * @description: Use this API to get all SEO Markup schema Templates setup for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSEOMarkupSchemas/).
1489
+ */
1490
+ async getSEOMarkupSchemas(
1491
+ { pageType, active, requestHeaders } = { requestHeaders: {} },
1492
+ { responseHeaders } = { responseHeaders: false }
1493
+ ) {
1494
+ const {
1495
+ error,
1496
+ } = ContentApplicationValidator.getSEOMarkupSchemas().validate(
1497
+ { pageType, active },
1498
+ { abortEarly: false, allowUnknown: true }
1499
+ );
1500
+ if (error) {
1501
+ return Promise.reject(new FDKClientValidationError(error));
1502
+ }
1503
+
1504
+ // Showing warrnings if extra unknown parameters are found
1505
+ const {
1506
+ error: warrning,
1507
+ } = ContentApplicationValidator.getSEOMarkupSchemas().validate(
1508
+ { pageType, active },
1509
+ { abortEarly: false, allowUnknown: false }
1510
+ );
1511
+ if (warrning) {
1512
+ Logger({
1513
+ level: "WARN",
1514
+ message: `Parameter Validation warrnings for application > Content > getSEOMarkupSchemas \n ${warrning}`,
1515
+ });
1516
+ }
1517
+
1518
+ const query_params = {};
1519
+ query_params["page_type"] = pageType;
1520
+ query_params["active"] = active;
1521
+
1522
+ const xHeaders = {};
1523
+
1524
+ const response = await ApplicationAPIClient.execute(
1525
+ this._conf,
1526
+ "get",
1527
+ constructUrl({
1528
+ url: this._urls["getSEOMarkupSchemas"],
1529
+ params: {},
1530
+ }),
1531
+ query_params,
1532
+ undefined,
1533
+ { ...xHeaders, ...requestHeaders },
1534
+ { responseHeaders }
1535
+ );
1536
+
1537
+ let responseData = response;
1538
+ if (responseHeaders) {
1539
+ responseData = response[0];
1540
+ }
1541
+
1542
+ const {
1543
+ error: res_error,
1544
+ } = ContentApplicationModel.SeoSchemaComponent().validate(responseData, {
1545
+ abortEarly: false,
1546
+ allowUnknown: true,
1547
+ });
1548
+
1549
+ if (res_error) {
1550
+ if (this._conf.options.strictResponseCheck === true) {
1551
+ return Promise.reject(new FDKResponseValidationError(res_error));
1552
+ } else {
1553
+ Logger({
1554
+ level: "WARN",
1555
+ message: `Response Validation Warnings for application > Content > getSEOMarkupSchemas \n ${res_error}`,
1556
+ });
1557
+ }
1558
+ }
1559
+
1560
+ return response;
1561
+ }
1562
+
1317
1563
  /**
1318
1564
  * @param {ContentApplicationValidator.GetSlideshowParam} arg - Arg object.
1319
1565
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -135,12 +135,68 @@ export = ContentApplicationModel;
135
135
  * @property {string} [end]
136
136
  * @property {string} [start]
137
137
  */
138
+ /**
139
+ * @typedef CustomFieldSchema
140
+ * @property {string} [_id]
141
+ * @property {string} [application_id]
142
+ * @property {string} [company_id]
143
+ * @property {string} [created_at]
144
+ * @property {string} [created_by]
145
+ * @property {string} [creator]
146
+ * @property {string} [definition_id]
147
+ * @property {boolean} [has_invalid_values]
148
+ * @property {Object[]} [invalid_value_errors]
149
+ * @property {boolean} [is_deleted]
150
+ * @property {string} [key]
151
+ * @property {boolean} [multi_value]
152
+ * @property {string} [namespace]
153
+ * @property {string} [resource]
154
+ * @property {string} [resource_id]
155
+ * @property {string} [type]
156
+ * @property {string} [updated_at]
157
+ * @property {CustomFieldValue[]} [value]
158
+ */
159
+ /**
160
+ * @typedef CustomFieldsResponseByResourceIdSchema
161
+ * @property {CustomFieldSchema[]} [items]
162
+ */
163
+ /**
164
+ * @typedef CustomFieldValue
165
+ * @property {Object} [value]
166
+ */
138
167
  /**
139
168
  * @typedef CustomMetaTag
140
169
  * @property {string} [_id]
141
170
  * @property {string} [content]
142
171
  * @property {string} [name]
143
172
  */
173
+ /**
174
+ * @typedef CustomObjectByIdSchema
175
+ * @property {string} [_id]
176
+ * @property {CustomObjectListItemDefinationSchema} [definition]
177
+ * @property {string} [display_name]
178
+ * @property {CustomObjectFieldSchema[]} [fields]
179
+ * @property {Object[]} [references]
180
+ * @property {string} [status]
181
+ */
182
+ /**
183
+ * @typedef CustomObjectFieldSchema
184
+ * @property {string} [_id]
185
+ * @property {string} [definition_id]
186
+ * @property {string} [key]
187
+ * @property {string} [type]
188
+ * @property {CustomObjectFieldValue[]} [value]
189
+ */
190
+ /**
191
+ * @typedef CustomObjectFieldValue
192
+ * @property {Object} [value]
193
+ */
194
+ /**
195
+ * @typedef CustomObjectListItemDefinationSchema
196
+ * @property {string} [_id]
197
+ * @property {string} [name]
198
+ * @property {string} [type]
199
+ */
144
200
  /**
145
201
  * @typedef DataLoaderSchema
146
202
  * @property {DataLoaderSourceSchema} [__source]
@@ -355,10 +411,19 @@ export = ContentApplicationModel;
355
411
  */
356
412
  /**
357
413
  * @typedef SEO
414
+ * @property {SEObreadcrumb[]} [breadcrumb]
415
+ * @property {string} [canonical_url]
358
416
  * @property {string} [description]
359
417
  * @property {SEOImage} [image]
418
+ * @property {SEOMetaItem[]} [meta_tags]
419
+ * @property {SEOSitemap} [sitemap]
360
420
  * @property {string} [title]
361
421
  */
422
+ /**
423
+ * @typedef SEObreadcrumb
424
+ * @property {Action} [action]
425
+ * @property {string} [url]
426
+ */
362
427
  /**
363
428
  * @typedef SeoComponent
364
429
  * @property {SeoSchema} [seo]
@@ -367,9 +432,20 @@ export = ContentApplicationModel;
367
432
  * @typedef SEOImage
368
433
  * @property {string} [url]
369
434
  */
435
+ /**
436
+ * @typedef SEOMetaItem
437
+ * @property {SEOMetaItems[]} [items]
438
+ * @property {string} [title]
439
+ */
440
+ /**
441
+ * @typedef SEOMetaItems
442
+ * @property {string} [key]
443
+ * @property {string} [value]
444
+ */
370
445
  /**
371
446
  * @typedef SeoSchema
372
447
  * @property {string} [_id]
448
+ * @property {string} [additonal_sitemap]
373
449
  * @property {string} [app]
374
450
  * @property {boolean} [cannonical_enabled]
375
451
  * @property {string} [created_at]
@@ -379,6 +455,27 @@ export = ContentApplicationModel;
379
455
  * @property {boolean} [sitemap_enabled]
380
456
  * @property {string} [updated_at]
381
457
  */
458
+ /**
459
+ * @typedef SeoSchemaComponent
460
+ * @property {SEOSchemaMarkupTemplate[]} [items]
461
+ */
462
+ /**
463
+ * @typedef SEOSchemaMarkupTemplate
464
+ * @property {boolean} [active]
465
+ * @property {string} [application]
466
+ * @property {string} [created_at]
467
+ * @property {string} [description]
468
+ * @property {string} [id]
469
+ * @property {string} [page_type]
470
+ * @property {string} [schema]
471
+ * @property {string} [title]
472
+ * @property {string} [updated_at]
473
+ */
474
+ /**
475
+ * @typedef SEOSitemap
476
+ * @property {string} [frequency]
477
+ * @property {number} [priority]
478
+ */
382
479
  /**
383
480
  * @typedef SlideshowGetResponse
384
481
  * @property {SlideshowSchema[]} [items]
@@ -491,7 +588,7 @@ export = ContentApplicationModel;
491
588
  declare class ContentApplicationModel {
492
589
  }
493
590
  declare namespace ContentApplicationModel {
494
- export { Action, ActionPage, AnnouncementSchema, AnnouncementsResponseSchema, ApplicationLegal, ApplicationLegalFAQ, Asset, Author, BlogGetResponse, BlogSchema, CategorySchema, ChildrenSchema, CommonError, ConfigurationSchema, ContactSchema, ContentAPIError, CreatedBySchema, CronSchedule, CustomMetaTag, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, DateMeta, Detail, EmailProperties, EmailSchema, FAQCategorySchema, FaqResponseSchema, FaqSchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, GetFaqSchema, LandingPageSchema, Language, LocaleLanguage, NavigationGetResponse, NavigationReference, NavigationSchema, NextSchedule, Orientation, Page, PageGetResponse, PageSchema, PhoneProperties, PhoneSchema, ResourceContent, ScheduleSchema, ScheduleStartSchema, SEO, SeoComponent, SEOImage, SeoSchema, SlideshowGetResponse, SlideshowMedia, SlideshowSchema, Support, TagSchema, TagSourceSchema, TagsSchema, PageType };
591
+ export { Action, ActionPage, AnnouncementSchema, AnnouncementsResponseSchema, ApplicationLegal, ApplicationLegalFAQ, Asset, Author, BlogGetResponse, BlogSchema, CategorySchema, ChildrenSchema, CommonError, ConfigurationSchema, ContactSchema, ContentAPIError, CreatedBySchema, CronSchedule, CustomFieldSchema, CustomFieldsResponseByResourceIdSchema, CustomFieldValue, CustomMetaTag, CustomObjectByIdSchema, CustomObjectFieldSchema, CustomObjectFieldValue, CustomObjectListItemDefinationSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, DateMeta, Detail, EmailProperties, EmailSchema, FAQCategorySchema, FaqResponseSchema, FaqSchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, GetFaqSchema, LandingPageSchema, Language, LocaleLanguage, NavigationGetResponse, NavigationReference, NavigationSchema, NextSchedule, Orientation, Page, PageGetResponse, PageSchema, PhoneProperties, PhoneSchema, ResourceContent, ScheduleSchema, ScheduleStartSchema, SEO, SEObreadcrumb, SeoComponent, SEOImage, SEOMetaItem, SEOMetaItems, SeoSchema, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSitemap, SlideshowGetResponse, SlideshowMedia, SlideshowSchema, Support, TagSchema, TagSourceSchema, TagsSchema, PageType };
495
592
  }
496
593
  /** @returns {Action} */
497
594
  declare function Action(): Action;
@@ -653,6 +750,38 @@ type CronSchedule = {
653
750
  end?: string;
654
751
  start?: string;
655
752
  };
753
+ /** @returns {CustomFieldSchema} */
754
+ declare function CustomFieldSchema(): CustomFieldSchema;
755
+ type CustomFieldSchema = {
756
+ _id?: string;
757
+ application_id?: string;
758
+ company_id?: string;
759
+ created_at?: string;
760
+ created_by?: string;
761
+ creator?: string;
762
+ definition_id?: string;
763
+ has_invalid_values?: boolean;
764
+ invalid_value_errors?: any[];
765
+ is_deleted?: boolean;
766
+ key?: string;
767
+ multi_value?: boolean;
768
+ namespace?: string;
769
+ resource?: string;
770
+ resource_id?: string;
771
+ type?: string;
772
+ updated_at?: string;
773
+ value?: CustomFieldValue[];
774
+ };
775
+ /** @returns {CustomFieldsResponseByResourceIdSchema} */
776
+ declare function CustomFieldsResponseByResourceIdSchema(): CustomFieldsResponseByResourceIdSchema;
777
+ type CustomFieldsResponseByResourceIdSchema = {
778
+ items?: CustomFieldSchema[];
779
+ };
780
+ /** @returns {CustomFieldValue} */
781
+ declare function CustomFieldValue(): CustomFieldValue;
782
+ type CustomFieldValue = {
783
+ value?: any;
784
+ };
656
785
  /** @returns {CustomMetaTag} */
657
786
  declare function CustomMetaTag(): CustomMetaTag;
658
787
  type CustomMetaTag = {
@@ -660,6 +789,37 @@ type CustomMetaTag = {
660
789
  content?: string;
661
790
  name?: string;
662
791
  };
792
+ /** @returns {CustomObjectByIdSchema} */
793
+ declare function CustomObjectByIdSchema(): CustomObjectByIdSchema;
794
+ type CustomObjectByIdSchema = {
795
+ _id?: string;
796
+ definition?: CustomObjectListItemDefinationSchema;
797
+ display_name?: string;
798
+ fields?: CustomObjectFieldSchema[];
799
+ references?: any[];
800
+ status?: string;
801
+ };
802
+ /** @returns {CustomObjectFieldSchema} */
803
+ declare function CustomObjectFieldSchema(): CustomObjectFieldSchema;
804
+ type CustomObjectFieldSchema = {
805
+ _id?: string;
806
+ definition_id?: string;
807
+ key?: string;
808
+ type?: string;
809
+ value?: CustomObjectFieldValue[];
810
+ };
811
+ /** @returns {CustomObjectFieldValue} */
812
+ declare function CustomObjectFieldValue(): CustomObjectFieldValue;
813
+ type CustomObjectFieldValue = {
814
+ value?: any;
815
+ };
816
+ /** @returns {CustomObjectListItemDefinationSchema} */
817
+ declare function CustomObjectListItemDefinationSchema(): CustomObjectListItemDefinationSchema;
818
+ type CustomObjectListItemDefinationSchema = {
819
+ _id?: string;
820
+ name?: string;
821
+ type?: string;
822
+ };
663
823
  /** @returns {DataLoaderSchema} */
664
824
  declare function DataLoaderSchema(): DataLoaderSchema;
665
825
  type DataLoaderSchema = {
@@ -907,10 +1067,20 @@ type ScheduleStartSchema = {
907
1067
  /** @returns {SEO} */
908
1068
  declare function SEO(): SEO;
909
1069
  type SEO = {
1070
+ breadcrumb?: SEObreadcrumb[];
1071
+ canonical_url?: string;
910
1072
  description?: string;
911
1073
  image?: SEOImage;
1074
+ meta_tags?: SEOMetaItem[];
1075
+ sitemap?: SEOSitemap;
912
1076
  title?: string;
913
1077
  };
1078
+ /** @returns {SEObreadcrumb} */
1079
+ declare function SEObreadcrumb(): SEObreadcrumb;
1080
+ type SEObreadcrumb = {
1081
+ action?: Action;
1082
+ url?: string;
1083
+ };
914
1084
  /** @returns {SeoComponent} */
915
1085
  declare function SeoComponent(): SeoComponent;
916
1086
  type SeoComponent = {
@@ -921,10 +1091,23 @@ declare function SEOImage(): SEOImage;
921
1091
  type SEOImage = {
922
1092
  url?: string;
923
1093
  };
1094
+ /** @returns {SEOMetaItem} */
1095
+ declare function SEOMetaItem(): SEOMetaItem;
1096
+ type SEOMetaItem = {
1097
+ items?: SEOMetaItems[];
1098
+ title?: string;
1099
+ };
1100
+ /** @returns {SEOMetaItems} */
1101
+ declare function SEOMetaItems(): SEOMetaItems;
1102
+ type SEOMetaItems = {
1103
+ key?: string;
1104
+ value?: string;
1105
+ };
924
1106
  /** @returns {SeoSchema} */
925
1107
  declare function SeoSchema(): SeoSchema;
926
1108
  type SeoSchema = {
927
1109
  _id?: string;
1110
+ additonal_sitemap?: string;
928
1111
  app?: string;
929
1112
  cannonical_enabled?: boolean;
930
1113
  created_at?: string;
@@ -934,6 +1117,30 @@ type SeoSchema = {
934
1117
  sitemap_enabled?: boolean;
935
1118
  updated_at?: string;
936
1119
  };
1120
+ /** @returns {SeoSchemaComponent} */
1121
+ declare function SeoSchemaComponent(): SeoSchemaComponent;
1122
+ type SeoSchemaComponent = {
1123
+ items?: SEOSchemaMarkupTemplate[];
1124
+ };
1125
+ /** @returns {SEOSchemaMarkupTemplate} */
1126
+ declare function SEOSchemaMarkupTemplate(): SEOSchemaMarkupTemplate;
1127
+ type SEOSchemaMarkupTemplate = {
1128
+ active?: boolean;
1129
+ application?: string;
1130
+ created_at?: string;
1131
+ description?: string;
1132
+ id?: string;
1133
+ page_type?: string;
1134
+ schema?: string;
1135
+ title?: string;
1136
+ updated_at?: string;
1137
+ };
1138
+ /** @returns {SEOSitemap} */
1139
+ declare function SEOSitemap(): SEOSitemap;
1140
+ type SEOSitemap = {
1141
+ frequency?: string;
1142
+ priority?: number;
1143
+ };
937
1144
  /** @returns {SlideshowGetResponse} */
938
1145
  declare function SlideshowGetResponse(): SlideshowGetResponse;
939
1146
  type SlideshowGetResponse = {