@gofynd/fdk-client-javascript 1.4.6 → 1.4.8-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
  6. package/sdk/application/Cart/CartApplicationClient.js +118 -13
  7. package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
  8. package/sdk/application/Cart/CartApplicationModel.js +98 -26
  9. package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
  10. package/sdk/application/Cart/CartApplicationValidator.js +26 -0
  11. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +10 -2
  12. package/sdk/application/Catalog/CatalogApplicationModel.js +10 -2
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
  14. package/sdk/application/Content/ContentApplicationClient.js +5 -3
  15. package/sdk/application/Content/ContentApplicationModel.d.ts +7 -18
  16. package/sdk/application/Content/ContentApplicationModel.js +6 -20
  17. package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
  18. package/sdk/application/Content/ContentApplicationValidator.js +4 -0
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
  20. package/sdk/application/Lead/LeadApplicationClient.js +0 -167
  21. package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
  22. package/sdk/application/Lead/LeadApplicationModel.js +0 -126
  23. package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
  24. package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
  25. package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
  26. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
  27. package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
  28. package/sdk/application/Order/OrderApplicationModel.d.ts +72 -9
  29. package/sdk/application/Order/OrderApplicationModel.js +45 -7
  30. package/sdk/application/Payment/PaymentApplicationModel.d.ts +27 -20
  31. package/sdk/application/Payment/PaymentApplicationModel.js +23 -20
  32. package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
  33. package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
  34. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +22 -0
  35. package/sdk/application/Webhook/WebhookApplicationClient.js +115 -0
  36. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +37 -0
  37. package/sdk/application/Webhook/WebhookApplicationModel.js +46 -0
  38. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +16 -0
  39. package/sdk/application/Webhook/WebhookApplicationValidator.js +19 -0
  40. package/sdk/application/index.d.ts +1 -0
  41. package/sdk/application/index.js +2 -0
  42. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
  43. package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
  44. package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
  45. package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
  46. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
  47. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
  48. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
  49. package/sdk/partner/Logistics/LogisticsPartnerModel.js +4 -4
  50. package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
  51. package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
  52. package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
  53. package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
  54. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
  55. package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
  56. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +2 -2
  57. package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
  58. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +23 -19
  59. package/sdk/partner/Webhook/WebhookPartnerModel.js +19 -22
  60. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +43 -0
  61. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +257 -0
  62. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +39 -0
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +45 -0
  64. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +60 -0
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +57 -0
  66. package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
  67. package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
  68. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
  69. package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
  70. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
  71. package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
  72. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +36 -3
  73. package/sdk/platform/Cart/CartPlatformApplicationClient.js +276 -3
  74. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +93 -1
  75. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +60 -0
  76. package/sdk/platform/Cart/CartPlatformModel.d.ts +216 -40
  77. package/sdk/platform/Cart/CartPlatformModel.js +166 -24
  78. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +11 -7
  79. package/sdk/platform/Catalog/CatalogPlatformClient.js +37 -14
  80. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +122 -17
  81. package/sdk/platform/Catalog/CatalogPlatformModel.js +141 -15
  82. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -7
  83. package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -5
  84. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
  85. package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
  86. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
  87. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
  88. package/sdk/platform/Content/ContentPlatformModel.d.ts +8 -4
  89. package/sdk/platform/Content/ContentPlatformModel.js +8 -4
  90. package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
  91. package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
  92. package/sdk/platform/Finance/FinancePlatformModel.d.ts +350 -127
  93. package/sdk/platform/Finance/FinancePlatformModel.js +378 -108
  94. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
  95. package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
  96. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
  97. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
  98. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
  99. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
  100. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
  101. package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
  102. package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
  103. package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
  104. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
  105. package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
  106. package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -1
  107. package/sdk/platform/Order/OrderPlatformClient.js +82 -5
  108. package/sdk/platform/Order/OrderPlatformModel.d.ts +270 -29
  109. package/sdk/platform/Order/OrderPlatformModel.js +139 -28
  110. package/sdk/platform/Order/OrderPlatformValidator.d.ts +58 -17
  111. package/sdk/platform/Order/OrderPlatformValidator.js +28 -16
  112. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +14 -2
  113. package/sdk/platform/Payment/PaymentPlatformModel.js +7 -2
  114. package/sdk/platform/PlatformApplicationClient.d.ts +2 -0
  115. package/sdk/platform/PlatformApplicationClient.js +4 -0
  116. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -4
  117. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
  118. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
  119. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
  120. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
  121. package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
  122. package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
  123. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +24 -40
  124. package/sdk/platform/Webhook/WebhookPlatformClient.js +78 -221
  125. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +168 -167
  126. package/sdk/platform/Webhook/WebhookPlatformModel.js +180 -178
  127. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +23 -31
  128. package/sdk/platform/Webhook/WebhookPlatformValidator.js +28 -42
  129. package/sdk/platform/index.d.ts +1 -0
  130. package/sdk/platform/index.js +2 -0
  131. package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
  132. package/sdk/public/Billing/BillingPublicClient.js +156 -3
  133. package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
  134. package/sdk/public/Billing/BillingPublicModel.js +317 -18
  135. package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
  136. package/sdk/public/Billing/BillingPublicValidator.js +22 -3
  137. package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
  138. package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
  139. package/sdk/public/Webhook/WebhookPublicModel.d.ts +24 -22
  140. package/sdk/public/Webhook/WebhookPublicModel.js +24 -22
@@ -1370,6 +1370,168 @@ class Theme {
1370
1370
  return response;
1371
1371
  }
1372
1372
 
1373
+ /**
1374
+ * @param {ThemePartnerValidator.CreateExtensionSectionDraftParam} arg - Arg object.
1375
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1376
+ * @param {import("../PartnerAPIClient").Options} - Options
1377
+ * @returns {Promise<ThemePartnerModel.DraftExtensionSectionResponse>} -
1378
+ * Success response
1379
+ * @name createExtensionSectionDraft
1380
+ * @summary: Draft extension section
1381
+ * @description: Create a new draft for an extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/createExtensionSectionDraft/).
1382
+ */
1383
+ async createExtensionSectionDraft(
1384
+ { extensionId, body, requestHeaders } = { requestHeaders: {} },
1385
+ { responseHeaders } = { responseHeaders: false }
1386
+ ) {
1387
+ const {
1388
+ error,
1389
+ } = ThemePartnerValidator.createExtensionSectionDraft().validate(
1390
+ {
1391
+ extensionId,
1392
+ body,
1393
+ },
1394
+ { abortEarly: false, allowUnknown: true }
1395
+ );
1396
+ if (error) {
1397
+ return Promise.reject(new FDKClientValidationError(error));
1398
+ }
1399
+
1400
+ // Showing warrnings if extra unknown parameters are found
1401
+ const {
1402
+ error: warrning,
1403
+ } = ThemePartnerValidator.createExtensionSectionDraft().validate(
1404
+ {
1405
+ extensionId,
1406
+ body,
1407
+ },
1408
+ { abortEarly: false, allowUnknown: false }
1409
+ );
1410
+ if (warrning) {
1411
+ Logger({
1412
+ level: "WARN",
1413
+ message: `Parameter Validation warrnings for partner > Theme > createExtensionSectionDraft \n ${warrning}`,
1414
+ });
1415
+ }
1416
+
1417
+ const query_params = {};
1418
+
1419
+ const response = await PartnerAPIClient.execute(
1420
+ this.config,
1421
+ "post",
1422
+ `/service/partner/theme/v1.0/organization/${this.config.organizationId}/extension-section/${extensionId}/draft`,
1423
+ query_params,
1424
+ body,
1425
+ requestHeaders,
1426
+ { responseHeaders }
1427
+ );
1428
+
1429
+ let responseData = response;
1430
+ if (responseHeaders) {
1431
+ responseData = response[0];
1432
+ }
1433
+
1434
+ const {
1435
+ error: res_error,
1436
+ } = ThemePartnerModel.DraftExtensionSectionResponse().validate(
1437
+ responseData,
1438
+ { abortEarly: false, allowUnknown: true }
1439
+ );
1440
+
1441
+ if (res_error) {
1442
+ if (this.config.options.strictResponseCheck === true) {
1443
+ return Promise.reject(new FDKResponseValidationError(res_error));
1444
+ } else {
1445
+ Logger({
1446
+ level: "WARN",
1447
+ message: `Response Validation Warnings for partner > Theme > createExtensionSectionDraft \n ${res_error}`,
1448
+ });
1449
+ }
1450
+ }
1451
+
1452
+ return response;
1453
+ }
1454
+
1455
+ /**
1456
+ * @param {ThemePartnerValidator.PublishExtensionSectionsParam} arg - Arg object.
1457
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1458
+ * @param {import("../PartnerAPIClient").Options} - Options
1459
+ * @returns {Promise<ThemePartnerModel.PublishExtensionSectionResponse>} -
1460
+ * Success response
1461
+ * @name publishExtensionSections
1462
+ * @summary: Publish an extension section
1463
+ * @description: Publish a draft extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/publishExtensionSections/).
1464
+ */
1465
+ async publishExtensionSections(
1466
+ { extensionId, body, requestHeaders } = { requestHeaders: {} },
1467
+ { responseHeaders } = { responseHeaders: false }
1468
+ ) {
1469
+ const { error } = ThemePartnerValidator.publishExtensionSections().validate(
1470
+ {
1471
+ extensionId,
1472
+ body,
1473
+ },
1474
+ { abortEarly: false, allowUnknown: true }
1475
+ );
1476
+ if (error) {
1477
+ return Promise.reject(new FDKClientValidationError(error));
1478
+ }
1479
+
1480
+ // Showing warrnings if extra unknown parameters are found
1481
+ const {
1482
+ error: warrning,
1483
+ } = ThemePartnerValidator.publishExtensionSections().validate(
1484
+ {
1485
+ extensionId,
1486
+ body,
1487
+ },
1488
+ { abortEarly: false, allowUnknown: false }
1489
+ );
1490
+ if (warrning) {
1491
+ Logger({
1492
+ level: "WARN",
1493
+ message: `Parameter Validation warrnings for partner > Theme > publishExtensionSections \n ${warrning}`,
1494
+ });
1495
+ }
1496
+
1497
+ const query_params = {};
1498
+
1499
+ const response = await PartnerAPIClient.execute(
1500
+ this.config,
1501
+ "post",
1502
+ `/service/partner/theme/v1.0/organization/${this.config.organizationId}/extension-section/${extensionId}/publish`,
1503
+ query_params,
1504
+ body,
1505
+ requestHeaders,
1506
+ { responseHeaders }
1507
+ );
1508
+
1509
+ let responseData = response;
1510
+ if (responseHeaders) {
1511
+ responseData = response[0];
1512
+ }
1513
+
1514
+ const {
1515
+ error: res_error,
1516
+ } = ThemePartnerModel.PublishExtensionSectionResponse().validate(
1517
+ responseData,
1518
+ { abortEarly: false, allowUnknown: true }
1519
+ );
1520
+
1521
+ if (res_error) {
1522
+ if (this.config.options.strictResponseCheck === true) {
1523
+ return Promise.reject(new FDKResponseValidationError(res_error));
1524
+ } else {
1525
+ Logger({
1526
+ level: "WARN",
1527
+ message: `Response Validation Warnings for partner > Theme > publishExtensionSections \n ${res_error}`,
1528
+ });
1529
+ }
1530
+ }
1531
+
1532
+ return response;
1533
+ }
1534
+
1373
1535
  /**
1374
1536
  * @param {ThemePartnerValidator.GetThemeRejectionReasonsParam} arg - Arg object.
1375
1537
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -14,6 +14,61 @@ export = ThemePartnerModel;
14
14
  * @property {string} [created_at] - The creation timestamp of the page
15
15
  * @property {string} [updated_at] - The last update timestamp of the page
16
16
  */
17
+ /**
18
+ * @typedef DraftExtensionSectionRequest
19
+ * @property {string} [extension_id]
20
+ * @property {string} [bundle_name]
21
+ * @property {string} [organization_id]
22
+ * @property {ExtensionSection[]} [sections]
23
+ * @property {AssetsExtension} [assets]
24
+ * @property {string} [type]
25
+ * @property {string} [status]
26
+ */
27
+ /**
28
+ * @typedef DraftExtensionSectionResponse
29
+ * @property {SectionsResponse} [sections]
30
+ */
31
+ /**
32
+ * @typedef SectionsResponse
33
+ * @property {boolean} [acknowledged]
34
+ * @property {number} [matched_count]
35
+ * @property {number} [modified_count]
36
+ * @property {string} [upserted_id]
37
+ * @property {number} [upserted_count]
38
+ */
39
+ /**
40
+ * @typedef ExtensionSection
41
+ * @property {string} [label]
42
+ * @property {string} [name]
43
+ * @property {PropExtension[]} [props]
44
+ * @property {Object[]} [blocks]
45
+ */
46
+ /**
47
+ * @typedef PropExtension
48
+ * @property {string} [id]
49
+ * @property {string} [label]
50
+ * @property {string} [type]
51
+ * @property {string} [info]
52
+ */
53
+ /**
54
+ * @typedef AssetsExtension
55
+ * @property {string} [js]
56
+ * @property {string} [css]
57
+ */
58
+ /**
59
+ * @typedef PublishExtensionSectionRequest
60
+ * @property {string} [extension_id]
61
+ * @property {string} [bundle_name]
62
+ * @property {string} [organization_id]
63
+ * @property {ExtensionSection[]} [sections]
64
+ * @property {AssetsExtension} [assets]
65
+ * @property {string} [type]
66
+ * @property {string} [status]
67
+ */
68
+ /**
69
+ * @typedef PublishExtensionSectionResponse
70
+ * @property {SectionsResponse} [sections]
71
+ */
17
72
  /**
18
73
  * @typedef AvailablePageSectionMetaAttributes
19
74
  * @property {Object} [attributes]
@@ -590,7 +645,7 @@ export = ThemePartnerModel;
590
645
  declare class ThemePartnerModel {
591
646
  }
592
647
  declare namespace ThemePartnerModel {
593
- export { AvailablePageSchema, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema, Prop, Preset, Page, SectionProps, SectionPreset, ImagePickerProp, UrlProp, BlockProps, TextProp, CheckboxProp, RangeProp, Section, Block, Predicate, Screen, ThemeUserSchema, Route, UpdateThemeRequestBody, CreateNewTheme, ActionPage, PageType };
648
+ export { AvailablePageSchema, DraftExtensionSectionRequest, DraftExtensionSectionResponse, SectionsResponse, ExtensionSection, PropExtension, AssetsExtension, PublishExtensionSectionRequest, PublishExtensionSectionResponse, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema, Prop, Preset, Page, SectionProps, SectionPreset, ImagePickerProp, UrlProp, BlockProps, TextProp, CheckboxProp, RangeProp, Section, Block, Predicate, Screen, ThemeUserSchema, Route, UpdateThemeRequestBody, CreateNewTheme, ActionPage, PageType };
594
649
  }
595
650
  /** @returns {AvailablePageSchema} */
596
651
  declare function AvailablePageSchema(): AvailablePageSchema;
@@ -614,6 +669,69 @@ type AvailablePageSchema = {
614
669
  */
615
670
  updated_at?: string;
616
671
  };
672
+ /** @returns {DraftExtensionSectionRequest} */
673
+ declare function DraftExtensionSectionRequest(): DraftExtensionSectionRequest;
674
+ type DraftExtensionSectionRequest = {
675
+ extension_id?: string;
676
+ bundle_name?: string;
677
+ organization_id?: string;
678
+ sections?: ExtensionSection[];
679
+ assets?: AssetsExtension;
680
+ type?: string;
681
+ status?: string;
682
+ };
683
+ /** @returns {DraftExtensionSectionResponse} */
684
+ declare function DraftExtensionSectionResponse(): DraftExtensionSectionResponse;
685
+ type DraftExtensionSectionResponse = {
686
+ sections?: SectionsResponse;
687
+ };
688
+ /** @returns {SectionsResponse} */
689
+ declare function SectionsResponse(): SectionsResponse;
690
+ type SectionsResponse = {
691
+ acknowledged?: boolean;
692
+ matched_count?: number;
693
+ modified_count?: number;
694
+ upserted_id?: string;
695
+ upserted_count?: number;
696
+ };
697
+ /** @returns {ExtensionSection} */
698
+ declare function ExtensionSection(): ExtensionSection;
699
+ type ExtensionSection = {
700
+ label?: string;
701
+ name?: string;
702
+ props?: PropExtension[];
703
+ blocks?: any[];
704
+ };
705
+ /** @returns {PropExtension} */
706
+ declare function PropExtension(): PropExtension;
707
+ type PropExtension = {
708
+ id?: string;
709
+ label?: string;
710
+ type?: string;
711
+ info?: string;
712
+ };
713
+ /** @returns {AssetsExtension} */
714
+ declare function AssetsExtension(): AssetsExtension;
715
+ type AssetsExtension = {
716
+ js?: string;
717
+ css?: string;
718
+ };
719
+ /** @returns {PublishExtensionSectionRequest} */
720
+ declare function PublishExtensionSectionRequest(): PublishExtensionSectionRequest;
721
+ type PublishExtensionSectionRequest = {
722
+ extension_id?: string;
723
+ bundle_name?: string;
724
+ organization_id?: string;
725
+ sections?: ExtensionSection[];
726
+ assets?: AssetsExtension;
727
+ type?: string;
728
+ status?: string;
729
+ };
730
+ /** @returns {PublishExtensionSectionResponse} */
731
+ declare function PublishExtensionSectionResponse(): PublishExtensionSectionResponse;
732
+ type PublishExtensionSectionResponse = {
733
+ sections?: SectionsResponse;
734
+ };
617
735
  /** @returns {AvailablePageSectionMetaAttributes} */
618
736
  declare function AvailablePageSectionMetaAttributes(): AvailablePageSectionMetaAttributes;
619
737
  type AvailablePageSectionMetaAttributes = {
@@ -16,6 +16,69 @@ const Joi = require("joi");
16
16
  * @property {string} [updated_at] - The last update timestamp of the page
17
17
  */
18
18
 
19
+ /**
20
+ * @typedef DraftExtensionSectionRequest
21
+ * @property {string} [extension_id]
22
+ * @property {string} [bundle_name]
23
+ * @property {string} [organization_id]
24
+ * @property {ExtensionSection[]} [sections]
25
+ * @property {AssetsExtension} [assets]
26
+ * @property {string} [type]
27
+ * @property {string} [status]
28
+ */
29
+
30
+ /**
31
+ * @typedef DraftExtensionSectionResponse
32
+ * @property {SectionsResponse} [sections]
33
+ */
34
+
35
+ /**
36
+ * @typedef SectionsResponse
37
+ * @property {boolean} [acknowledged]
38
+ * @property {number} [matched_count]
39
+ * @property {number} [modified_count]
40
+ * @property {string} [upserted_id]
41
+ * @property {number} [upserted_count]
42
+ */
43
+
44
+ /**
45
+ * @typedef ExtensionSection
46
+ * @property {string} [label]
47
+ * @property {string} [name]
48
+ * @property {PropExtension[]} [props]
49
+ * @property {Object[]} [blocks]
50
+ */
51
+
52
+ /**
53
+ * @typedef PropExtension
54
+ * @property {string} [id]
55
+ * @property {string} [label]
56
+ * @property {string} [type]
57
+ * @property {string} [info]
58
+ */
59
+
60
+ /**
61
+ * @typedef AssetsExtension
62
+ * @property {string} [js]
63
+ * @property {string} [css]
64
+ */
65
+
66
+ /**
67
+ * @typedef PublishExtensionSectionRequest
68
+ * @property {string} [extension_id]
69
+ * @property {string} [bundle_name]
70
+ * @property {string} [organization_id]
71
+ * @property {ExtensionSection[]} [sections]
72
+ * @property {AssetsExtension} [assets]
73
+ * @property {string} [type]
74
+ * @property {string} [status]
75
+ */
76
+
77
+ /**
78
+ * @typedef PublishExtensionSectionResponse
79
+ * @property {SectionsResponse} [sections]
80
+ */
81
+
19
82
  /**
20
83
  * @typedef AvailablePageSectionMetaAttributes
21
84
  * @property {Object} [attributes]
@@ -690,6 +753,85 @@ class ThemePartnerModel {
690
753
  });
691
754
  }
692
755
 
756
+ /** @returns {DraftExtensionSectionRequest} */
757
+ static DraftExtensionSectionRequest() {
758
+ return Joi.object({
759
+ extension_id: Joi.string().allow(""),
760
+ bundle_name: Joi.string().allow(""),
761
+ organization_id: Joi.string().allow(""),
762
+ sections: Joi.array().items(ThemePartnerModel.ExtensionSection()),
763
+ assets: ThemePartnerModel.AssetsExtension(),
764
+ type: Joi.string().allow(""),
765
+ status: Joi.string().allow(""),
766
+ });
767
+ }
768
+
769
+ /** @returns {DraftExtensionSectionResponse} */
770
+ static DraftExtensionSectionResponse() {
771
+ return Joi.object({
772
+ sections: ThemePartnerModel.SectionsResponse(),
773
+ });
774
+ }
775
+
776
+ /** @returns {SectionsResponse} */
777
+ static SectionsResponse() {
778
+ return Joi.object({
779
+ acknowledged: Joi.boolean(),
780
+ matched_count: Joi.number(),
781
+ modified_count: Joi.number(),
782
+ upserted_id: Joi.string().allow(""),
783
+ upserted_count: Joi.number(),
784
+ });
785
+ }
786
+
787
+ /** @returns {ExtensionSection} */
788
+ static ExtensionSection() {
789
+ return Joi.object({
790
+ label: Joi.string().allow(""),
791
+ name: Joi.string().allow(""),
792
+ props: Joi.array().items(ThemePartnerModel.PropExtension()),
793
+ blocks: Joi.array().items(Joi.any()),
794
+ });
795
+ }
796
+
797
+ /** @returns {PropExtension} */
798
+ static PropExtension() {
799
+ return Joi.object({
800
+ id: Joi.string().allow(""),
801
+ label: Joi.string().allow(""),
802
+ type: Joi.string().allow(""),
803
+ info: Joi.string().allow(""),
804
+ });
805
+ }
806
+
807
+ /** @returns {AssetsExtension} */
808
+ static AssetsExtension() {
809
+ return Joi.object({
810
+ js: Joi.string().allow(""),
811
+ css: Joi.string().allow(""),
812
+ });
813
+ }
814
+
815
+ /** @returns {PublishExtensionSectionRequest} */
816
+ static PublishExtensionSectionRequest() {
817
+ return Joi.object({
818
+ extension_id: Joi.string().allow(""),
819
+ bundle_name: Joi.string().allow(""),
820
+ organization_id: Joi.string().allow(""),
821
+ sections: Joi.array().items(ThemePartnerModel.ExtensionSection()),
822
+ assets: ThemePartnerModel.AssetsExtension(),
823
+ type: Joi.string().allow(""),
824
+ status: Joi.string().allow(""),
825
+ });
826
+ }
827
+
828
+ /** @returns {PublishExtensionSectionResponse} */
829
+ static PublishExtensionSectionResponse() {
830
+ return Joi.object({
831
+ sections: ThemePartnerModel.SectionsResponse(),
832
+ });
833
+ }
834
+
693
835
  /** @returns {AvailablePageSectionMetaAttributes} */
694
836
  static AvailablePageSectionMetaAttributes() {
695
837
  return Joi.object({
@@ -17,6 +17,8 @@ declare class ThemeValidator {
17
17
  static deleteOrganizationTheme(): any;
18
18
  static getLatestVersionOfThemeBySlug(): any;
19
19
  static createNewThemeInOrganization(): any;
20
+ static createExtensionSectionDraft(): any;
21
+ static publishExtensionSections(): any;
20
22
  static getThemeRejectionReasons(): any;
21
23
  static getThemeVersions(): any;
22
24
  static createTheme(): any;
@@ -139,6 +139,20 @@ class ThemeValidator {
139
139
  }).required();
140
140
  }
141
141
 
142
+ static createExtensionSectionDraft() {
143
+ return Joi.object({
144
+ extensionId: Joi.string().allow("").required(),
145
+ body: ThemeModel.DraftExtensionSectionRequest().required(),
146
+ }).required();
147
+ }
148
+
149
+ static publishExtensionSections() {
150
+ return Joi.object({
151
+ extensionId: Joi.string().allow("").required(),
152
+ body: ThemeModel.PublishExtensionSectionRequest().required(),
153
+ }).required();
154
+ }
155
+
142
156
  static getThemeRejectionReasons() {
143
157
  return Joi.object({
144
158
  themeId: Joi.string().allow("").required(),
@@ -58,7 +58,7 @@ declare class Webhook {
58
58
  * @param {import("../PartnerAPIClient").Options} - Options
59
59
  * @returns {Promise<WebhookPartnerModel.HistoryResponse>} - Success response
60
60
  * @name getHistoricalReports
61
- * @summary: Get report download history
61
+ * @summary: Get report download history.
62
62
  * @description: Retrieve history reports for a specific company based on the provided filters.
63
63
  * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/getHistoricalReports/).
64
64
  */
@@ -90,7 +90,7 @@ declare class Webhook {
90
90
  * @param {import("../PartnerAPIClient").Options} - Options
91
91
  * @returns {Promise<WebhookPartnerModel.UpdateSubscriberResponse>} - Success response
92
92
  * @name updateSubscriber
93
- * @summary: Update subscriber status by id
93
+ * @summary: Update subscriber status by id.
94
94
  * @description: Update subscriber status by id.
95
95
  * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/updateSubscriber/).
96
96
  */
@@ -438,7 +438,7 @@ class Webhook {
438
438
  * @param {import("../PartnerAPIClient").Options} - Options
439
439
  * @returns {Promise<WebhookPartnerModel.HistoryResponse>} - Success response
440
440
  * @name getHistoricalReports
441
- * @summary: Get report download history
441
+ * @summary: Get report download history.
442
442
  * @description: Retrieve history reports for a specific company based on the provided filters.
443
443
  * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/getHistoricalReports/).
444
444
  */
@@ -672,7 +672,7 @@ class Webhook {
672
672
  * @param {import("../PartnerAPIClient").Options} - Options
673
673
  * @returns {Promise<WebhookPartnerModel.UpdateSubscriberResponse>} - Success response
674
674
  * @name updateSubscriber
675
- * @summary: Update subscriber status by id
675
+ * @summary: Update subscriber status by id.
676
676
  * @description: Update subscriber status by id.
677
677
  * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/updateSubscriber/).
678
678
  */
@@ -1,12 +1,12 @@
1
1
  export = WebhookPartnerModel;
2
- /**
3
- * @typedef UpdateSubscriberResponse
4
- * @property {string} [message]
5
- */
6
2
  /**
7
3
  * @typedef UpdateSubscriberRequest
8
4
  * @property {string} [status]
9
5
  */
6
+ /**
7
+ * @typedef UpdateSubscriberResponse
8
+ * @property {string} [message]
9
+ */
10
10
  /**
11
11
  * @typedef Association
12
12
  * @property {number} [company_id]
@@ -24,6 +24,7 @@ export = WebhookPartnerModel;
24
24
  * @property {number} [id]
25
25
  * @property {number} [event_id]
26
26
  * @property {number} [subscriber_id]
27
+ * @property {string} [topic]
27
28
  * @property {string} [created_on]
28
29
  */
29
30
  /**
@@ -38,6 +39,7 @@ export = WebhookPartnerModel;
38
39
  * @property {string} [description]
39
40
  * @property {string} [created_on]
40
41
  * @property {string} [updated_on]
42
+ * @property {string} [group]
41
43
  * @property {SubscriberEventMapping} [subscriber_event_mapping]
42
44
  */
43
45
  /**
@@ -61,10 +63,6 @@ export = WebhookPartnerModel;
61
63
  * @property {string} [category]
62
64
  * @property {number} [count]
63
65
  */
64
- /**
65
- * @typedef DownloadReponse
66
- * @property {string} [file_name]
67
- */
68
66
  /**
69
67
  * @typedef HistoryFilters
70
68
  * @property {string[]} [events]
@@ -74,6 +72,8 @@ export = WebhookPartnerModel;
74
72
  * @property {string} [start_date] - The start date and time of the history report.
75
73
  * @property {number[]} [subscribers] - An array of subscriber IDs associated
76
74
  * with the history report.
75
+ * @property {string[]} [webhook_type] - An array of webhook type to identify
76
+ * thetype of subscriber i.e (KAFKA or REST).
77
77
  */
78
78
  /**
79
79
  * @typedef Url
@@ -215,6 +215,7 @@ export = WebhookPartnerModel;
215
215
  * @property {string} [modified_by]
216
216
  * @property {string} [name]
217
217
  * @property {string} [webhook_url]
218
+ * @property {string} [provider]
218
219
  * @property {Association} [association]
219
220
  * @property {Object} [custom_headers]
220
221
  * @property {string} [status]
@@ -229,18 +230,18 @@ export = WebhookPartnerModel;
229
230
  declare class WebhookPartnerModel {
230
231
  }
231
232
  declare namespace WebhookPartnerModel {
232
- export { UpdateSubscriberResponse, UpdateSubscriberRequest, Association, AuthMeta, SubscriberEventMapping, EventConfigResponse, SubscriberConfigResponse, InvalidEventsRequest, InvalidEventsResponse, DownloadReponse, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResponse, HistoryPayload, CancelDownloadResponse, FilterReportResponse, DeliveryTsResponse, DeliveryTsSchema, DeliveryDetailsRequest, EventDeliveryDetailSchema, DeliveryDetailsResponse, EventProcessReportObject, Page, DeliveryEventLevelSchema, DeliverySummaryResponse, DeliverySummarySchema, ItemSchema };
233
+ export { UpdateSubscriberRequest, UpdateSubscriberResponse, Association, AuthMeta, SubscriberEventMapping, EventConfigResponse, SubscriberConfigResponse, InvalidEventsRequest, InvalidEventsResponse, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResponse, HistoryPayload, CancelDownloadResponse, FilterReportResponse, DeliveryTsResponse, DeliveryTsSchema, DeliveryDetailsRequest, EventDeliveryDetailSchema, DeliveryDetailsResponse, EventProcessReportObject, Page, DeliveryEventLevelSchema, DeliverySummaryResponse, DeliverySummarySchema, ItemSchema };
233
234
  }
234
- /** @returns {UpdateSubscriberResponse} */
235
- declare function UpdateSubscriberResponse(): UpdateSubscriberResponse;
236
- type UpdateSubscriberResponse = {
237
- message?: string;
238
- };
239
235
  /** @returns {UpdateSubscriberRequest} */
240
236
  declare function UpdateSubscriberRequest(): UpdateSubscriberRequest;
241
237
  type UpdateSubscriberRequest = {
242
238
  status?: string;
243
239
  };
240
+ /** @returns {UpdateSubscriberResponse} */
241
+ declare function UpdateSubscriberResponse(): UpdateSubscriberResponse;
242
+ type UpdateSubscriberResponse = {
243
+ message?: string;
244
+ };
244
245
  /** @returns {Association} */
245
246
  declare function Association(): Association;
246
247
  type Association = {
@@ -261,6 +262,7 @@ type SubscriberEventMapping = {
261
262
  id?: number;
262
263
  event_id?: number;
263
264
  subscriber_id?: number;
265
+ topic?: string;
264
266
  created_on?: string;
265
267
  };
266
268
  /** @returns {EventConfigResponse} */
@@ -276,6 +278,7 @@ type EventConfigResponse = {
276
278
  description?: string;
277
279
  created_on?: string;
278
280
  updated_on?: string;
281
+ group?: string;
279
282
  subscriber_event_mapping?: SubscriberEventMapping;
280
283
  };
281
284
  /** @returns {SubscriberConfigResponse} */
@@ -302,11 +305,6 @@ type InvalidEventsResponse = {
302
305
  category?: string;
303
306
  count?: number;
304
307
  };
305
- /** @returns {DownloadReponse} */
306
- declare function DownloadReponse(): DownloadReponse;
307
- type DownloadReponse = {
308
- file_name?: string;
309
- };
310
308
  /** @returns {HistoryFilters} */
311
309
  declare function HistoryFilters(): HistoryFilters;
312
310
  type HistoryFilters = {
@@ -329,6 +327,11 @@ type HistoryFilters = {
329
327
  * with the history report.
330
328
  */
331
329
  subscribers?: number[];
330
+ /**
331
+ * - An array of webhook type to identify
332
+ * thetype of subscriber i.e (KAFKA or REST).
333
+ */
334
+ webhook_type?: string[];
332
335
  };
333
336
  /** @returns {Url} */
334
337
  declare function Url(): Url;
@@ -553,6 +556,7 @@ type ItemSchema = {
553
556
  modified_by?: string;
554
557
  name?: string;
555
558
  webhook_url?: string;
559
+ provider?: string;
556
560
  association?: Association;
557
561
  custom_headers?: any;
558
562
  status?: string;