@gofynd/fdk-client-javascript 1.4.7 → 1.4.8-beta.3

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 (123) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
  4. package/sdk/application/Cart/CartApplicationClient.js +118 -13
  5. package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
  6. package/sdk/application/Cart/CartApplicationModel.js +98 -26
  7. package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
  8. package/sdk/application/Cart/CartApplicationValidator.js +26 -0
  9. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +4 -2
  10. package/sdk/application/Catalog/CatalogApplicationModel.js +4 -2
  11. package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
  12. package/sdk/application/Content/ContentApplicationClient.js +5 -3
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +7 -18
  14. package/sdk/application/Content/ContentApplicationModel.js +6 -20
  15. package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
  16. package/sdk/application/Content/ContentApplicationValidator.js +4 -0
  17. package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
  18. package/sdk/application/Lead/LeadApplicationClient.js +0 -167
  19. package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
  20. package/sdk/application/Lead/LeadApplicationModel.js +0 -126
  21. package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
  22. package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
  23. package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
  24. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
  25. package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
  26. package/sdk/application/Order/OrderApplicationModel.d.ts +4 -0
  27. package/sdk/application/Order/OrderApplicationModel.js +4 -0
  28. package/sdk/application/Payment/PaymentApplicationModel.d.ts +9 -2
  29. package/sdk/application/Payment/PaymentApplicationModel.js +5 -2
  30. package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
  31. package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
  32. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
  33. package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
  34. package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
  35. package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
  36. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
  37. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
  38. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
  39. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +47 -1
  40. package/sdk/partner/Logistics/LogisticsPartnerModel.js +56 -4
  41. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +2 -2
  42. package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
  43. package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
  44. package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
  45. package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
  46. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
  47. package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
  48. package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
  49. package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
  50. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
  51. package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
  52. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
  53. package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
  54. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +28 -5
  55. package/sdk/platform/Cart/CartPlatformApplicationClient.js +198 -5
  56. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +81 -1
  57. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -0
  58. package/sdk/platform/Cart/CartPlatformModel.d.ts +214 -40
  59. package/sdk/platform/Cart/CartPlatformModel.js +164 -24
  60. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  61. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +20 -0
  62. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +37 -0
  63. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +16 -0
  64. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
  65. package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -2
  66. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
  67. package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
  68. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +28 -0
  69. package/sdk/platform/Catalog/CatalogPlatformValidator.js +12 -0
  70. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
  71. package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
  72. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
  73. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
  74. package/sdk/platform/Content/ContentPlatformModel.d.ts +8 -4
  75. package/sdk/platform/Content/ContentPlatformModel.js +8 -4
  76. package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
  77. package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
  78. package/sdk/platform/Finance/FinancePlatformModel.d.ts +369 -129
  79. package/sdk/platform/Finance/FinancePlatformModel.js +404 -110
  80. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
  81. package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
  82. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
  83. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
  84. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
  85. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
  86. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
  87. package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
  88. package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
  89. package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
  90. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
  91. package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
  92. package/sdk/platform/Order/OrderPlatformModel.d.ts +126 -15
  93. package/sdk/platform/Order/OrderPlatformModel.js +55 -14
  94. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -0
  95. package/sdk/platform/Payment/PaymentPlatformModel.js +5 -0
  96. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
  97. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
  98. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +20 -1
  99. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +26 -4
  100. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
  101. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
  102. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
  103. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
  104. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
  105. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
  106. package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
  107. package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
  108. package/sdk/platform/User/UserPlatformModel.d.ts +0 -2
  109. package/sdk/platform/User/UserPlatformModel.js +0 -2
  110. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +0 -40
  111. package/sdk/platform/Webhook/WebhookPlatformClient.js +0 -307
  112. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +94 -146
  113. package/sdk/platform/Webhook/WebhookPlatformModel.js +100 -151
  114. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +9 -35
  115. package/sdk/platform/Webhook/WebhookPlatformValidator.js +8 -46
  116. package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
  117. package/sdk/public/Billing/BillingPublicClient.js +156 -3
  118. package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
  119. package/sdk/public/Billing/BillingPublicModel.js +317 -18
  120. package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
  121. package/sdk/public/Billing/BillingPublicValidator.js +22 -3
  122. package/sdk/public/Webhook/WebhookPublicModel.d.ts +22 -22
  123. package/sdk/public/Webhook/WebhookPublicModel.js +22 -22
@@ -87,6 +87,16 @@ const Joi = require("joi");
87
87
  * @property {boolean} is_own_account
88
88
  */
89
89
 
90
+ /**
91
+ * @typedef CourierAccountRequestBody
92
+ * @property {string} extension_id
93
+ * @property {string} [account_id]
94
+ * @property {string} scheme_id
95
+ * @property {boolean} is_self_ship
96
+ * @property {string} stage
97
+ * @property {boolean} is_own_account
98
+ */
99
+
90
100
  /**
91
101
  * @typedef CourierPartnerAccountFailureResponse
92
102
  * @property {boolean} success
@@ -123,6 +133,20 @@ const Joi = require("joi");
123
133
  * @property {CourierPartnerSchemeFeatures} feature
124
134
  */
125
135
 
136
+ /**
137
+ * @typedef CourierPartnerSchemeRequestModel
138
+ * @property {string} extension_id
139
+ * @property {string} [scheme_id]
140
+ * @property {string} name
141
+ * @property {ArithmeticOperations} weight
142
+ * @property {string} transport_type
143
+ * @property {string} region
144
+ * @property {string} delivery_type
145
+ * @property {string[]} payment_mode
146
+ * @property {string} stage
147
+ * @property {CourierPartnerSchemeFeatures} feature
148
+ */
149
+
126
150
  /**
127
151
  * @typedef CourierPartnerSchemeFeatures
128
152
  * @property {boolean} [doorstep_qc]
@@ -307,6 +331,18 @@ class LogisticsPartnerModel {
307
331
  });
308
332
  }
309
333
 
334
+ /** @returns {CourierAccountRequestBody} */
335
+ static CourierAccountRequestBody() {
336
+ return Joi.object({
337
+ extension_id: Joi.string().allow("").required(),
338
+ account_id: Joi.string().allow(""),
339
+ scheme_id: Joi.string().allow("").required(),
340
+ is_self_ship: Joi.boolean().required(),
341
+ stage: Joi.string().allow("").required(),
342
+ is_own_account: Joi.boolean().required(),
343
+ });
344
+ }
345
+
310
346
  /** @returns {CourierPartnerAccountFailureResponse} */
311
347
  static CourierPartnerAccountFailureResponse() {
312
348
  return Joi.object({
@@ -355,6 +391,22 @@ class LogisticsPartnerModel {
355
391
  });
356
392
  }
357
393
 
394
+ /** @returns {CourierPartnerSchemeRequestModel} */
395
+ static CourierPartnerSchemeRequestModel() {
396
+ return Joi.object({
397
+ extension_id: Joi.string().allow("").required(),
398
+ scheme_id: Joi.string().allow(""),
399
+ name: Joi.string().allow("").required(),
400
+ weight: LogisticsPartnerModel.ArithmeticOperations().required(),
401
+ transport_type: Joi.string().allow("").required(),
402
+ region: Joi.string().allow("").required(),
403
+ delivery_type: Joi.string().allow("").required(),
404
+ payment_mode: Joi.array().items(Joi.string().allow("")).required(),
405
+ stage: Joi.string().allow("").required(),
406
+ feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
407
+ });
408
+ }
409
+
358
410
  /** @returns {CourierPartnerSchemeFeatures} */
359
411
  static CourierPartnerSchemeFeatures() {
360
412
  return Joi.object({
@@ -382,10 +434,10 @@ class LogisticsPartnerModel {
382
434
  /** @returns {ArithmeticOperations} */
383
435
  static ArithmeticOperations() {
384
436
  return Joi.object({
385
- lt: Joi.number(),
386
- gt: Joi.number(),
387
- lte: Joi.number(),
388
- gte: Joi.number(),
437
+ lt: Joi.number().allow(null),
438
+ gt: Joi.number().allow(null),
439
+ lte: Joi.number().allow(null),
440
+ gte: Joi.number().allow(null),
389
441
  });
390
442
  }
391
443
 
@@ -67,7 +67,7 @@ class LogisticsValidator {
67
67
  static createCourierPartnerAccount() {
68
68
  return Joi.object({
69
69
  companyId: Joi.number().required(),
70
- body: LogisticsModel.CourierAccount().required(),
70
+ body: LogisticsModel.CourierAccountRequestBody().required(),
71
71
  }).required();
72
72
  }
73
73
 
@@ -99,7 +99,7 @@ class LogisticsValidator {
99
99
 
100
100
  static createCourierPartnerScheme() {
101
101
  return Joi.object({
102
- body: LogisticsModel.CourierPartnerSchemeModel().required(),
102
+ body: LogisticsModel.CourierPartnerSchemeRequestModel().required(),
103
103
  }).required();
104
104
  }
105
105
 
@@ -172,6 +172,28 @@ declare class Theme {
172
172
  * @description: Add a new theme to partner server organizations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/createNewThemeInOrganization/).
173
173
  */
174
174
  createNewThemeInOrganization({ body, slug, requestHeaders }?: ThemePartnerValidator.CreateNewThemeInOrganizationParam, { responseHeaders }?: object): Promise<ThemePartnerModel.MarketplaceTheme>;
175
+ /**
176
+ * @param {ThemePartnerValidator.CreateExtensionSectionDraftParam} arg - Arg object.
177
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
178
+ * @param {import("../PartnerAPIClient").Options} - Options
179
+ * @returns {Promise<ThemePartnerModel.DraftExtensionSectionResponse>} -
180
+ * Success response
181
+ * @name createExtensionSectionDraft
182
+ * @summary: Draft extension section
183
+ * @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/).
184
+ */
185
+ createExtensionSectionDraft({ extensionId, body, requestHeaders }?: ThemePartnerValidator.CreateExtensionSectionDraftParam, { responseHeaders }?: object): Promise<ThemePartnerModel.DraftExtensionSectionResponse>;
186
+ /**
187
+ * @param {ThemePartnerValidator.PublishExtensionSectionsParam} arg - Arg object.
188
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
189
+ * @param {import("../PartnerAPIClient").Options} - Options
190
+ * @returns {Promise<ThemePartnerModel.PublishExtensionSectionResponse>} -
191
+ * Success response
192
+ * @name publishExtensionSections
193
+ * @summary: Publish an extension section
194
+ * @description: Publish a draft extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/publishExtensionSections/).
195
+ */
196
+ publishExtensionSections({ extensionId, body, requestHeaders }?: ThemePartnerValidator.PublishExtensionSectionsParam, { responseHeaders }?: object): Promise<ThemePartnerModel.PublishExtensionSectionResponse>;
175
197
  /**
176
198
  * @param {ThemePartnerValidator.GetThemeRejectionReasonsParam} arg - Arg object.
177
199
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -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(),