@gofynd/fdk-client-javascript 3.16.0 → 3.16.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +27 -4
- package/sdk/platform/Cart/CartPlatformModel.js +12 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +85 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +24 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +15 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +241 -1
- package/sdk/platform/Content/ContentPlatformModel.js +163 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +4 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +9 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +4 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +14 -0
- package/sdk/platform/User/UserPlatformModel.js +6 -0
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
234
234
|
The above code will log the curl command in the console
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.16.
|
|
237
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.16.2' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
238
238
|
Active Theme: Emerge
|
|
239
239
|
```
|
|
240
240
|
|
package/package.json
CHANGED
|
@@ -772,6 +772,7 @@ export = CartPlatformModel;
|
|
|
772
772
|
* article. If the article's price after all discounts and adjustments falls
|
|
773
773
|
* below this threshold, the price adjustment will be automatically removed.
|
|
774
774
|
* (Applicable only for price adjustment discount type)
|
|
775
|
+
* @property {number} [article_index] - Index of the line item in the cart
|
|
775
776
|
*/
|
|
776
777
|
/**
|
|
777
778
|
* @typedef PriceAdjustmentRestrictions
|
|
@@ -1206,14 +1207,20 @@ export = CartPlatformModel;
|
|
|
1206
1207
|
*/
|
|
1207
1208
|
/**
|
|
1208
1209
|
* @typedef ProductPrice
|
|
1209
|
-
* @property {number} [marked] -
|
|
1210
|
+
* @property {number} [marked] - Original MRP of product.
|
|
1210
1211
|
* @property {number} [add_on] - Price before promotion and coupon amount
|
|
1211
1212
|
* applied for calculation
|
|
1212
1213
|
* @property {string} [currency_code] - Currency code of the price defined for the product
|
|
1213
1214
|
* @property {string} [currency_symbol] - Currency symbol of the price defined
|
|
1214
1215
|
* for the product
|
|
1215
|
-
* @property {number} [effective] -
|
|
1216
|
+
* @property {number} [effective] - Price of the product after applying
|
|
1217
|
+
* inventory discount and before applying promotion, coupon and engage discount.
|
|
1216
1218
|
* @property {number} [selling] - Selling price of the product
|
|
1219
|
+
* @property {number} [final_price] - Final price of the product in cart after
|
|
1220
|
+
* applying all discounts such as promotion, coupon and engage discount."
|
|
1221
|
+
* @property {number} [discount] - Net discount applied on product, contains
|
|
1222
|
+
* total discount amount including promotions, coupons and engage discount
|
|
1223
|
+
* [excluding inventory discount].
|
|
1217
1224
|
*/
|
|
1218
1225
|
/**
|
|
1219
1226
|
* @typedef ProductPriceInfo
|
|
@@ -4433,6 +4440,10 @@ type Article = {
|
|
|
4433
4440
|
* (Applicable only for price adjustment discount type)
|
|
4434
4441
|
*/
|
|
4435
4442
|
min_price_threshold?: number;
|
|
4443
|
+
/**
|
|
4444
|
+
* - Index of the line item in the cart
|
|
4445
|
+
*/
|
|
4446
|
+
article_index?: number;
|
|
4436
4447
|
};
|
|
4437
4448
|
/** @returns {PriceAdjustmentRestrictions} */
|
|
4438
4449
|
declare function PriceAdjustmentRestrictions(): PriceAdjustmentRestrictions;
|
|
@@ -5507,7 +5518,7 @@ type CouponDetails = {
|
|
|
5507
5518
|
declare function ProductPrice(): ProductPrice;
|
|
5508
5519
|
type ProductPrice = {
|
|
5509
5520
|
/**
|
|
5510
|
-
* -
|
|
5521
|
+
* - Original MRP of product.
|
|
5511
5522
|
*/
|
|
5512
5523
|
marked?: number;
|
|
5513
5524
|
/**
|
|
@@ -5525,13 +5536,25 @@ type ProductPrice = {
|
|
|
5525
5536
|
*/
|
|
5526
5537
|
currency_symbol?: string;
|
|
5527
5538
|
/**
|
|
5528
|
-
* -
|
|
5539
|
+
* - Price of the product after applying
|
|
5540
|
+
* inventory discount and before applying promotion, coupon and engage discount.
|
|
5529
5541
|
*/
|
|
5530
5542
|
effective?: number;
|
|
5531
5543
|
/**
|
|
5532
5544
|
* - Selling price of the product
|
|
5533
5545
|
*/
|
|
5534
5546
|
selling?: number;
|
|
5547
|
+
/**
|
|
5548
|
+
* - Final price of the product in cart after
|
|
5549
|
+
* applying all discounts such as promotion, coupon and engage discount."
|
|
5550
|
+
*/
|
|
5551
|
+
final_price?: number;
|
|
5552
|
+
/**
|
|
5553
|
+
* - Net discount applied on product, contains
|
|
5554
|
+
* total discount amount including promotions, coupons and engage discount
|
|
5555
|
+
* [excluding inventory discount].
|
|
5556
|
+
*/
|
|
5557
|
+
discount?: number;
|
|
5535
5558
|
};
|
|
5536
5559
|
/** @returns {ProductPriceInfo} */
|
|
5537
5560
|
declare function ProductPriceInfo(): ProductPriceInfo;
|
|
@@ -836,6 +836,7 @@ const Joi = require("joi");
|
|
|
836
836
|
* article. If the article's price after all discounts and adjustments falls
|
|
837
837
|
* below this threshold, the price adjustment will be automatically removed.
|
|
838
838
|
* (Applicable only for price adjustment discount type)
|
|
839
|
+
* @property {number} [article_index] - Index of the line item in the cart
|
|
839
840
|
*/
|
|
840
841
|
|
|
841
842
|
/**
|
|
@@ -1315,14 +1316,20 @@ const Joi = require("joi");
|
|
|
1315
1316
|
|
|
1316
1317
|
/**
|
|
1317
1318
|
* @typedef ProductPrice
|
|
1318
|
-
* @property {number} [marked] -
|
|
1319
|
+
* @property {number} [marked] - Original MRP of product.
|
|
1319
1320
|
* @property {number} [add_on] - Price before promotion and coupon amount
|
|
1320
1321
|
* applied for calculation
|
|
1321
1322
|
* @property {string} [currency_code] - Currency code of the price defined for the product
|
|
1322
1323
|
* @property {string} [currency_symbol] - Currency symbol of the price defined
|
|
1323
1324
|
* for the product
|
|
1324
|
-
* @property {number} [effective] -
|
|
1325
|
+
* @property {number} [effective] - Price of the product after applying
|
|
1326
|
+
* inventory discount and before applying promotion, coupon and engage discount.
|
|
1325
1327
|
* @property {number} [selling] - Selling price of the product
|
|
1328
|
+
* @property {number} [final_price] - Final price of the product in cart after
|
|
1329
|
+
* applying all discounts such as promotion, coupon and engage discount."
|
|
1330
|
+
* @property {number} [discount] - Net discount applied on product, contains
|
|
1331
|
+
* total discount amount including promotions, coupons and engage discount
|
|
1332
|
+
* [excluding inventory discount].
|
|
1326
1333
|
*/
|
|
1327
1334
|
|
|
1328
1335
|
/**
|
|
@@ -3605,6 +3612,7 @@ class CartPlatformModel {
|
|
|
3605
3612
|
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3606
3613
|
allowed_refund: Joi.boolean(),
|
|
3607
3614
|
min_price_threshold: Joi.number(),
|
|
3615
|
+
article_index: Joi.number(),
|
|
3608
3616
|
});
|
|
3609
3617
|
}
|
|
3610
3618
|
|
|
@@ -4113,6 +4121,8 @@ class CartPlatformModel {
|
|
|
4113
4121
|
currency_symbol: Joi.string().allow(""),
|
|
4114
4122
|
effective: Joi.number(),
|
|
4115
4123
|
selling: Joi.number(),
|
|
4124
|
+
final_price: Joi.number(),
|
|
4125
|
+
discount: Joi.number(),
|
|
4116
4126
|
});
|
|
4117
4127
|
}
|
|
4118
4128
|
|
|
@@ -757,7 +757,7 @@ declare class Content {
|
|
|
757
757
|
* @summary: Get all HTML tags
|
|
758
758
|
* @description: Retrieve a list of injectable tags. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getInjectableTags/).
|
|
759
759
|
*/
|
|
760
|
-
getInjectableTags({ all, requestHeaders }?: ContentPlatformApplicationValidator.GetInjectableTagsParam, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsSchema>;
|
|
760
|
+
getInjectableTags({ all, pageNo, pageSize, search, requestHeaders }?: ContentPlatformApplicationValidator.GetInjectableTagsParam, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsSchema>;
|
|
761
761
|
/**
|
|
762
762
|
* @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object
|
|
763
763
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -914,6 +914,16 @@ declare class Content {
|
|
|
914
914
|
* @description: Retrieve information related to customer support. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getSupportInformation/).
|
|
915
915
|
*/
|
|
916
916
|
getSupportInformation({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ContentPlatformModel.Support>;
|
|
917
|
+
/**
|
|
918
|
+
* @param {ContentPlatformApplicationValidator.GetTagsTemplateParam} arg - Arg object
|
|
919
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
920
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
921
|
+
* @returns {Promise<ContentPlatformModel.TagsTemplateSchema>} - Success response
|
|
922
|
+
* @name getTagsTemplate
|
|
923
|
+
* @summary: Get Script Tags Templates
|
|
924
|
+
* @description: Retrieve the available script tag templates - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getTagsTemplate/).
|
|
925
|
+
*/
|
|
926
|
+
getTagsTemplate({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsTemplateSchema>;
|
|
917
927
|
/**
|
|
918
928
|
* @param {ContentPlatformApplicationValidator.GetTranslateUILabelsParam} arg
|
|
919
929
|
* - Arg object
|
|
@@ -5207,7 +5207,7 @@ class Content {
|
|
|
5207
5207
|
* @description: Retrieve a list of injectable tags. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getInjectableTags/).
|
|
5208
5208
|
*/
|
|
5209
5209
|
async getInjectableTags(
|
|
5210
|
-
{ all, requestHeaders } = { requestHeaders: {} },
|
|
5210
|
+
{ all, pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} },
|
|
5211
5211
|
{ responseHeaders } = { responseHeaders: false }
|
|
5212
5212
|
) {
|
|
5213
5213
|
const {
|
|
@@ -5215,6 +5215,9 @@ class Content {
|
|
|
5215
5215
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
5216
5216
|
{
|
|
5217
5217
|
all,
|
|
5218
|
+
pageNo,
|
|
5219
|
+
pageSize,
|
|
5220
|
+
search,
|
|
5218
5221
|
},
|
|
5219
5222
|
{ abortEarly: false, allowUnknown: true }
|
|
5220
5223
|
);
|
|
@@ -5228,6 +5231,9 @@ class Content {
|
|
|
5228
5231
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
5229
5232
|
{
|
|
5230
5233
|
all,
|
|
5234
|
+
pageNo,
|
|
5235
|
+
pageSize,
|
|
5236
|
+
search,
|
|
5231
5237
|
},
|
|
5232
5238
|
{ abortEarly: false, allowUnknown: false }
|
|
5233
5239
|
);
|
|
@@ -5240,6 +5246,9 @@ class Content {
|
|
|
5240
5246
|
|
|
5241
5247
|
const query_params = {};
|
|
5242
5248
|
query_params["all"] = all;
|
|
5249
|
+
query_params["page_no"] = pageNo;
|
|
5250
|
+
query_params["page_size"] = pageSize;
|
|
5251
|
+
query_params["search"] = search;
|
|
5243
5252
|
|
|
5244
5253
|
const response = await PlatformAPIClient.execute(
|
|
5245
5254
|
this.config,
|
|
@@ -6413,6 +6422,81 @@ class Content {
|
|
|
6413
6422
|
return response;
|
|
6414
6423
|
}
|
|
6415
6424
|
|
|
6425
|
+
/**
|
|
6426
|
+
* @param {ContentPlatformApplicationValidator.GetTagsTemplateParam} arg - Arg object
|
|
6427
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6428
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6429
|
+
* @returns {Promise<ContentPlatformModel.TagsTemplateSchema>} - Success response
|
|
6430
|
+
* @name getTagsTemplate
|
|
6431
|
+
* @summary: Get Script Tags Templates
|
|
6432
|
+
* @description: Retrieve the available script tag templates - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getTagsTemplate/).
|
|
6433
|
+
*/
|
|
6434
|
+
async getTagsTemplate(
|
|
6435
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
6436
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
6437
|
+
) {
|
|
6438
|
+
const {
|
|
6439
|
+
error,
|
|
6440
|
+
} = ContentPlatformApplicationValidator.getTagsTemplate().validate(
|
|
6441
|
+
{},
|
|
6442
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6443
|
+
);
|
|
6444
|
+
if (error) {
|
|
6445
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
6446
|
+
}
|
|
6447
|
+
|
|
6448
|
+
// Showing warrnings if extra unknown parameters are found
|
|
6449
|
+
const {
|
|
6450
|
+
error: warrning,
|
|
6451
|
+
} = ContentPlatformApplicationValidator.getTagsTemplate().validate(
|
|
6452
|
+
{},
|
|
6453
|
+
{ abortEarly: false, allowUnknown: false }
|
|
6454
|
+
);
|
|
6455
|
+
if (warrning) {
|
|
6456
|
+
Logger({
|
|
6457
|
+
level: "WARN",
|
|
6458
|
+
message: `Parameter Validation warrnings for platform > Content > getTagsTemplate \n ${warrning}`,
|
|
6459
|
+
});
|
|
6460
|
+
}
|
|
6461
|
+
|
|
6462
|
+
const query_params = {};
|
|
6463
|
+
|
|
6464
|
+
const response = await PlatformAPIClient.execute(
|
|
6465
|
+
this.config,
|
|
6466
|
+
"get",
|
|
6467
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags/templates`,
|
|
6468
|
+
query_params,
|
|
6469
|
+
undefined,
|
|
6470
|
+
requestHeaders,
|
|
6471
|
+
{ responseHeaders }
|
|
6472
|
+
);
|
|
6473
|
+
|
|
6474
|
+
let responseData = response;
|
|
6475
|
+
if (responseHeaders) {
|
|
6476
|
+
responseData = response[0];
|
|
6477
|
+
}
|
|
6478
|
+
|
|
6479
|
+
const {
|
|
6480
|
+
error: res_error,
|
|
6481
|
+
} = ContentPlatformModel.TagsTemplateSchema().validate(responseData, {
|
|
6482
|
+
abortEarly: false,
|
|
6483
|
+
allowUnknown: true,
|
|
6484
|
+
});
|
|
6485
|
+
|
|
6486
|
+
if (res_error) {
|
|
6487
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
6488
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6489
|
+
} else {
|
|
6490
|
+
Logger({
|
|
6491
|
+
level: "WARN",
|
|
6492
|
+
message: `Response Validation Warnings for platform > Content > getTagsTemplate \n ${res_error}`,
|
|
6493
|
+
});
|
|
6494
|
+
}
|
|
6495
|
+
}
|
|
6496
|
+
|
|
6497
|
+
return response;
|
|
6498
|
+
}
|
|
6499
|
+
|
|
6416
6500
|
/**
|
|
6417
6501
|
* @param {ContentPlatformApplicationValidator.GetTranslateUILabelsParam} arg
|
|
6418
6502
|
* - Arg object
|
|
@@ -294,6 +294,11 @@ export = ContentPlatformApplicationValidator;
|
|
|
294
294
|
/**
|
|
295
295
|
* @typedef GetInjectableTagsParam
|
|
296
296
|
* @property {boolean} [all] - Get all tags irrespective of the creator of tags
|
|
297
|
+
* @property {number} [pageNo] - The page number to navigate through the given
|
|
298
|
+
* set of results. Default value is 1.
|
|
299
|
+
* @property {number} [pageSize] - The number of items to retrieve in each page.
|
|
300
|
+
* Default value is 10.
|
|
301
|
+
* @property {string} [search] - Keyword to filter and find tags by name.
|
|
297
302
|
*/
|
|
298
303
|
/**
|
|
299
304
|
* @typedef GetLandingPagesParam
|
|
@@ -360,6 +365,7 @@ export = ContentPlatformApplicationValidator;
|
|
|
360
365
|
* Default value is 10.
|
|
361
366
|
*/
|
|
362
367
|
/** @typedef GetSupportInformationParam */
|
|
368
|
+
/** @typedef GetTagsTemplateParam */
|
|
363
369
|
/**
|
|
364
370
|
* @typedef GetTranslateUILabelsParam
|
|
365
371
|
* @property {string} [templateThemeId] - Unique id of template theme
|
|
@@ -661,6 +667,8 @@ declare class ContentPlatformApplicationValidator {
|
|
|
661
667
|
static getSEOMarkupSchemas(): GetSEOMarkupSchemasParam;
|
|
662
668
|
/** @returns {GetSupportInformationParam} */
|
|
663
669
|
static getSupportInformation(): any;
|
|
670
|
+
/** @returns {GetTagsTemplateParam} */
|
|
671
|
+
static getTagsTemplate(): any;
|
|
664
672
|
/** @returns {GetTranslateUILabelsParam} */
|
|
665
673
|
static getTranslateUILabels(): GetTranslateUILabelsParam;
|
|
666
674
|
/** @returns {GetTranslateUILabelsByIdParam} */
|
|
@@ -721,7 +729,7 @@ declare class ContentPlatformApplicationValidator {
|
|
|
721
729
|
static upsertApplicationResourceTranslationInBulk(): UpsertApplicationResourceTranslationInBulkParam;
|
|
722
730
|
}
|
|
723
731
|
declare namespace ContentPlatformApplicationValidator {
|
|
724
|
-
export { AddApplicationLanguageParam, AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, BulkUnPublishApplicationLanguageParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateApplicationResourceTranslationParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreateSEOMarkupSchemaParam, CreateTranslateUILabelsParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteApplicationLanguageParam, DeleteApplicationResourceTranslationParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetApplicationLanguagesParam, GetApplicationResourceTranslationsParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSupportInformationParam, GetTranslateUILabelsParam, GetTranslateUILabelsByIdParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateApplicationLanguageStatusParam, UpdateApplicationResourceTranslationParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSupportInformationParam, UpdateTranslateUILabelsParam, UpsertApplicationResourceTranslationInBulkParam };
|
|
732
|
+
export { AddApplicationLanguageParam, AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, BulkUnPublishApplicationLanguageParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateApplicationResourceTranslationParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreateSEOMarkupSchemaParam, CreateTranslateUILabelsParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteApplicationLanguageParam, DeleteApplicationResourceTranslationParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetApplicationLanguagesParam, GetApplicationResourceTranslationsParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSupportInformationParam, GetTagsTemplateParam, GetTranslateUILabelsParam, GetTranslateUILabelsByIdParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateApplicationLanguageStatusParam, UpdateApplicationResourceTranslationParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSupportInformationParam, UpdateTranslateUILabelsParam, UpsertApplicationResourceTranslationInBulkParam };
|
|
725
733
|
}
|
|
726
734
|
type AddApplicationLanguageParam = {
|
|
727
735
|
body: ContentPlatformModel.ApplicationLanguageCreate;
|
|
@@ -1053,6 +1061,20 @@ type GetInjectableTagsParam = {
|
|
|
1053
1061
|
* - Get all tags irrespective of the creator of tags
|
|
1054
1062
|
*/
|
|
1055
1063
|
all?: boolean;
|
|
1064
|
+
/**
|
|
1065
|
+
* - The page number to navigate through the given
|
|
1066
|
+
* set of results. Default value is 1.
|
|
1067
|
+
*/
|
|
1068
|
+
pageNo?: number;
|
|
1069
|
+
/**
|
|
1070
|
+
* - The number of items to retrieve in each page.
|
|
1071
|
+
* Default value is 10.
|
|
1072
|
+
*/
|
|
1073
|
+
pageSize?: number;
|
|
1074
|
+
/**
|
|
1075
|
+
* - Keyword to filter and find tags by name.
|
|
1076
|
+
*/
|
|
1077
|
+
search?: string;
|
|
1056
1078
|
};
|
|
1057
1079
|
type GetLandingPagesParam = {
|
|
1058
1080
|
/**
|
|
@@ -1345,4 +1367,5 @@ type GetPageMetaParam = any;
|
|
|
1345
1367
|
type GetPageSpecParam = any;
|
|
1346
1368
|
type GetSEOConfigurationParam = any;
|
|
1347
1369
|
type GetSupportInformationParam = any;
|
|
1370
|
+
type GetTagsTemplateParam = any;
|
|
1348
1371
|
import ContentPlatformModel = require("./ContentPlatformModel");
|
|
@@ -360,6 +360,11 @@ const ContentPlatformModel = require("./ContentPlatformModel");
|
|
|
360
360
|
/**
|
|
361
361
|
* @typedef GetInjectableTagsParam
|
|
362
362
|
* @property {boolean} [all] - Get all tags irrespective of the creator of tags
|
|
363
|
+
* @property {number} [pageNo] - The page number to navigate through the given
|
|
364
|
+
* set of results. Default value is 1.
|
|
365
|
+
* @property {number} [pageSize] - The number of items to retrieve in each page.
|
|
366
|
+
* Default value is 10.
|
|
367
|
+
* @property {string} [search] - Keyword to filter and find tags by name.
|
|
363
368
|
*/
|
|
364
369
|
|
|
365
370
|
/**
|
|
@@ -441,6 +446,8 @@ const ContentPlatformModel = require("./ContentPlatformModel");
|
|
|
441
446
|
|
|
442
447
|
/** @typedef GetSupportInformationParam */
|
|
443
448
|
|
|
449
|
+
/** @typedef GetTagsTemplateParam */
|
|
450
|
+
|
|
444
451
|
/**
|
|
445
452
|
* @typedef GetTranslateUILabelsParam
|
|
446
453
|
* @property {string} [templateThemeId] - Unique id of template theme
|
|
@@ -1090,6 +1097,9 @@ class ContentPlatformApplicationValidator {
|
|
|
1090
1097
|
static getInjectableTags() {
|
|
1091
1098
|
return Joi.object({
|
|
1092
1099
|
all: Joi.boolean(),
|
|
1100
|
+
pageNo: Joi.number(),
|
|
1101
|
+
pageSize: Joi.number(),
|
|
1102
|
+
search: Joi.string().allow(""),
|
|
1093
1103
|
}).required();
|
|
1094
1104
|
}
|
|
1095
1105
|
|
|
@@ -1190,6 +1200,11 @@ class ContentPlatformApplicationValidator {
|
|
|
1190
1200
|
return Joi.object({}).required();
|
|
1191
1201
|
}
|
|
1192
1202
|
|
|
1203
|
+
/** @returns {GetTagsTemplateParam} */
|
|
1204
|
+
static getTagsTemplate() {
|
|
1205
|
+
return Joi.object({}).required();
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1193
1208
|
/** @returns {GetTranslateUILabelsParam} */
|
|
1194
1209
|
static getTranslateUILabels() {
|
|
1195
1210
|
return Joi.object({
|
|
@@ -353,6 +353,7 @@ export = ContentPlatformModel;
|
|
|
353
353
|
* the HTML (inline) or linked externally (external).
|
|
354
354
|
* @property {string} [content] - The actual content of the inline tag, such as
|
|
355
355
|
* JavaScript or CSS code if the tag is inline.
|
|
356
|
+
* @property {TemplateSchema} [template]
|
|
356
357
|
*/
|
|
357
358
|
/**
|
|
358
359
|
* @typedef RemoveHandpickedSchema
|
|
@@ -386,6 +387,21 @@ export = ContentPlatformModel;
|
|
|
386
387
|
* injected or active.
|
|
387
388
|
* @property {string} [content] - The inline content for tags of type 'inline'
|
|
388
389
|
* (e.g., JavaScript or CSS code).
|
|
390
|
+
* @property {TemplateSchema} [template]
|
|
391
|
+
*/
|
|
392
|
+
/**
|
|
393
|
+
* @typedef TemplateSchema
|
|
394
|
+
* @property {string} [template_id] - Unique identifier for the template linked
|
|
395
|
+
* to the tag.
|
|
396
|
+
* @property {string} [template_version] - Version number of the template used
|
|
397
|
+
* for configuration.
|
|
398
|
+
* @property {TemplateField[]} [template_fields] - List of dynamic key-value
|
|
399
|
+
* pairs defining configuration fields for third-party integrations or custom settings.
|
|
400
|
+
*/
|
|
401
|
+
/**
|
|
402
|
+
* @typedef TemplateField
|
|
403
|
+
* @property {string} [key] - Field name representing the configuration key.
|
|
404
|
+
* @property {string} [value] - Value assigned to the configuration field.
|
|
389
405
|
*/
|
|
390
406
|
/**
|
|
391
407
|
* @typedef CreateTagRequestSchema
|
|
@@ -403,6 +419,57 @@ export = ContentPlatformModel;
|
|
|
403
419
|
* @property {DataLoaderSourceSchema} [__source]
|
|
404
420
|
* @property {string} [_id]
|
|
405
421
|
*/
|
|
422
|
+
/**
|
|
423
|
+
* @typedef TagsTemplateSchema
|
|
424
|
+
* @property {TagTemplateItem[]} [items] - Array of tag template objects.
|
|
425
|
+
*/
|
|
426
|
+
/**
|
|
427
|
+
* @typedef TagTemplateItem
|
|
428
|
+
* @property {string} [template_name] - Static name of the tag template (e.g.,
|
|
429
|
+
* gtm, ga4, metaPixel, sentry).
|
|
430
|
+
* @property {string} [type] - Script type.
|
|
431
|
+
* @property {string} [sub_type] - Script loading subtype.
|
|
432
|
+
* @property {string} [position] - Where the script should be injected.
|
|
433
|
+
* @property {string[]} [pages] - List of page types where the tag should be active.
|
|
434
|
+
* @property {Object} [attributes] - HTML attributes to apply on the script tag.
|
|
435
|
+
* @property {string[]} [compatible_engines] - List of compatible UI frameworks.
|
|
436
|
+
* @property {Object} [field_mappings] - Maps UI field names to backend keys.
|
|
437
|
+
* @property {TemplateLayout} [layout]
|
|
438
|
+
* @property {string} [name] - Human-readable name of the template.
|
|
439
|
+
* @property {string} [path] - URL-safe path or slug for the template.
|
|
440
|
+
* @property {string} [description] - Explains the purpose or behavior of the template.
|
|
441
|
+
* @property {string} [image] - URL to an icon or image for the template.
|
|
442
|
+
* @property {string} [note] - Helpful guidance for configuring the template.
|
|
443
|
+
* @property {string} [template_id] - Unique template identifier.
|
|
444
|
+
* @property {string} [template_version] - Version of this template.
|
|
445
|
+
* @property {string} [category] - Functional category of the template.
|
|
446
|
+
* @property {FieldDefinition[]} [fields] - Array of field definitions for
|
|
447
|
+
* template configuration.
|
|
448
|
+
* @property {string} [script] - JavaScript snippet or template script code.
|
|
449
|
+
*/
|
|
450
|
+
/**
|
|
451
|
+
* @typedef TemplateLayout
|
|
452
|
+
* @property {number} [columns]
|
|
453
|
+
* @property {string} [gap]
|
|
454
|
+
* @property {boolean} [responsive]
|
|
455
|
+
*/
|
|
456
|
+
/**
|
|
457
|
+
* @typedef FieldDefinition
|
|
458
|
+
* @property {string} [name] - Field key used in templates and mappings.
|
|
459
|
+
* @property {string} [type] - Input type (e.g., text, boolean, array, note).
|
|
460
|
+
* @property {string} [label]
|
|
461
|
+
* @property {string} [placeholder]
|
|
462
|
+
* @property {boolean} [required]
|
|
463
|
+
* @property {string} [size] - Visual width in the form layout.
|
|
464
|
+
* @property {string} [description]
|
|
465
|
+
* @property {FieldValidation} [validation]
|
|
466
|
+
* @property {Object} [events] - Optional client-side events configuration.
|
|
467
|
+
*/
|
|
468
|
+
/**
|
|
469
|
+
* @typedef FieldValidation
|
|
470
|
+
* @property {string} [pattern] - Regex pattern used for validation.
|
|
471
|
+
* @property {string} [message] - Error message shown when validation fails.
|
|
472
|
+
*/
|
|
406
473
|
/**
|
|
407
474
|
* @typedef DataLoaderSourceSchema
|
|
408
475
|
* @property {string} [type]
|
|
@@ -704,8 +771,10 @@ export = ContentPlatformModel;
|
|
|
704
771
|
* @typedef TagsSchema
|
|
705
772
|
* @property {string} [application] - The ID of the application that owns the tags.
|
|
706
773
|
* @property {string} [_id] - The unique identifier for the tag set.
|
|
774
|
+
* @property {string} [company] - The ID of the company associated with this tags.
|
|
707
775
|
* @property {TagSchema[]} [tags] - A list of tags (HTML resources like scripts
|
|
708
776
|
* or stylesheets) that are configured for the application.
|
|
777
|
+
* @property {Page} [page]
|
|
709
778
|
*/
|
|
710
779
|
/**
|
|
711
780
|
* @typedef TagSchema
|
|
@@ -734,6 +803,7 @@ export = ContentPlatformModel;
|
|
|
734
803
|
* third-party tag can be injected or supported.
|
|
735
804
|
* @property {Object[]} [pages] - Pages or environments where the tag should be active.
|
|
736
805
|
* @property {TagSourceSchema} [__source]
|
|
806
|
+
* @property {TemplateSchema} [template]
|
|
737
807
|
*/
|
|
738
808
|
/**
|
|
739
809
|
* @typedef TagSourceSchema
|
|
@@ -1559,7 +1629,7 @@ export = ContentPlatformModel;
|
|
|
1559
1629
|
declare class ContentPlatformModel {
|
|
1560
1630
|
}
|
|
1561
1631
|
declare namespace ContentPlatformModel {
|
|
1562
|
-
export { ValidationError, GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetDetails, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogPayload, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, CreateTagRequestSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessDetails, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetDetails, LandingPageSchema, DefaultNavigationDetails, NavigationGetDetails, Orientation, NavigationSchema, NavigationPayload, PageGetDetails, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PagePayload, CronSchedule, PagePublishPayload, PageMetaSchema, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, MetaFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsDeleteSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSlugSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadDetails, CustomObjectListItemDefinitionModel, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldDefinition, CustomObjectBySlugSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, JobSchema, CustomFieldBulkEntry, CustomObjectBulkEntry, MetafieldTypesSchema, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, Duration, HTML, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectEntryFieldSchemaWithoutID, CustomObjectRequestSchema, CustomObjectRequestSchemaWithoutId, CustomObjectBulkSchema, ActionPage, TranslateUiLabels, TranslateUiLabelsCreate, StaticResourceUpdate, TranslateUiLabelsPage, Error, Meta, CompanyLanguage, CompanyLanguageCreate, CompanyLanguageUpdate, ApplicationLanguage, unPublishApplicationLanguage, ApplicationLanguageCreate, ApplicationLanguageUpdate, TranslatableResource, ResourceDefinition, ResourceJsonSchema, ResourceJsonSchemaType, ResourceUISchema, ResourceBulkDetails, Title, FeatureImage, Seo, MetaTag, MetaTagItem, ResourceTranslation, TranslationSeo, ResourceTranslationList, ResourceTranslationCreate, ResourceTranslationUpdate, TranslatableSection, Metrics, ResourceTranslationUpsertItem, ResourceTranslationBulkUpsert, StandardError, OperationResponseSchema, GenerationEntityType, PageType };
|
|
1632
|
+
export { ValidationError, GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetDetails, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogPayload, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, TemplateSchema, TemplateField, CreateTagRequestSchema, DataLoaderSchema, TagsTemplateSchema, TagTemplateItem, TemplateLayout, FieldDefinition, FieldValidation, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessDetails, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetDetails, LandingPageSchema, DefaultNavigationDetails, NavigationGetDetails, Orientation, NavigationSchema, NavigationPayload, PageGetDetails, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PagePayload, CronSchedule, PagePublishPayload, PageMetaSchema, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, MetaFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsDeleteSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSlugSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadDetails, CustomObjectListItemDefinitionModel, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldDefinition, CustomObjectBySlugSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, JobSchema, CustomFieldBulkEntry, CustomObjectBulkEntry, MetafieldTypesSchema, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, Duration, HTML, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectEntryFieldSchemaWithoutID, CustomObjectRequestSchema, CustomObjectRequestSchemaWithoutId, CustomObjectBulkSchema, ActionPage, TranslateUiLabels, TranslateUiLabelsCreate, StaticResourceUpdate, TranslateUiLabelsPage, Error, Meta, CompanyLanguage, CompanyLanguageCreate, CompanyLanguageUpdate, ApplicationLanguage, unPublishApplicationLanguage, ApplicationLanguageCreate, ApplicationLanguageUpdate, TranslatableResource, ResourceDefinition, ResourceJsonSchema, ResourceJsonSchemaType, ResourceUISchema, ResourceBulkDetails, Title, FeatureImage, Seo, MetaTag, MetaTagItem, ResourceTranslation, TranslationSeo, ResourceTranslationList, ResourceTranslationCreate, ResourceTranslationUpdate, TranslatableSection, Metrics, ResourceTranslationUpsertItem, ResourceTranslationBulkUpsert, StandardError, OperationResponseSchema, GenerationEntityType, PageType };
|
|
1563
1633
|
}
|
|
1564
1634
|
/** @returns {ValidationError} */
|
|
1565
1635
|
declare function ValidationError(): ValidationError;
|
|
@@ -1997,6 +2067,7 @@ type HandpickedTagSchema = {
|
|
|
1997
2067
|
* JavaScript or CSS code if the tag is inline.
|
|
1998
2068
|
*/
|
|
1999
2069
|
content?: string;
|
|
2070
|
+
template?: TemplateSchema;
|
|
2000
2071
|
};
|
|
2001
2072
|
/** @returns {RemoveHandpickedSchema} */
|
|
2002
2073
|
declare function RemoveHandpickedSchema(): RemoveHandpickedSchema;
|
|
@@ -2064,6 +2135,38 @@ type CreateTagSchema = {
|
|
|
2064
2135
|
* (e.g., JavaScript or CSS code).
|
|
2065
2136
|
*/
|
|
2066
2137
|
content?: string;
|
|
2138
|
+
template?: TemplateSchema;
|
|
2139
|
+
};
|
|
2140
|
+
/** @returns {TemplateSchema} */
|
|
2141
|
+
declare function TemplateSchema(): TemplateSchema;
|
|
2142
|
+
type TemplateSchema = {
|
|
2143
|
+
/**
|
|
2144
|
+
* - Unique identifier for the template linked
|
|
2145
|
+
* to the tag.
|
|
2146
|
+
*/
|
|
2147
|
+
template_id?: string;
|
|
2148
|
+
/**
|
|
2149
|
+
* - Version number of the template used
|
|
2150
|
+
* for configuration.
|
|
2151
|
+
*/
|
|
2152
|
+
template_version?: string;
|
|
2153
|
+
/**
|
|
2154
|
+
* - List of dynamic key-value
|
|
2155
|
+
* pairs defining configuration fields for third-party integrations or custom settings.
|
|
2156
|
+
*/
|
|
2157
|
+
template_fields?: TemplateField[];
|
|
2158
|
+
};
|
|
2159
|
+
/** @returns {TemplateField} */
|
|
2160
|
+
declare function TemplateField(): TemplateField;
|
|
2161
|
+
type TemplateField = {
|
|
2162
|
+
/**
|
|
2163
|
+
* - Field name representing the configuration key.
|
|
2164
|
+
*/
|
|
2165
|
+
key?: string;
|
|
2166
|
+
/**
|
|
2167
|
+
* - Value assigned to the configuration field.
|
|
2168
|
+
*/
|
|
2169
|
+
value?: string;
|
|
2067
2170
|
};
|
|
2068
2171
|
/** @returns {CreateTagRequestSchema} */
|
|
2069
2172
|
declare function CreateTagRequestSchema(): CreateTagRequestSchema;
|
|
@@ -2086,6 +2189,137 @@ type DataLoaderSchema = {
|
|
|
2086
2189
|
__source?: DataLoaderSourceSchema;
|
|
2087
2190
|
_id?: string;
|
|
2088
2191
|
};
|
|
2192
|
+
/** @returns {TagsTemplateSchema} */
|
|
2193
|
+
declare function TagsTemplateSchema(): TagsTemplateSchema;
|
|
2194
|
+
type TagsTemplateSchema = {
|
|
2195
|
+
/**
|
|
2196
|
+
* - Array of tag template objects.
|
|
2197
|
+
*/
|
|
2198
|
+
items?: TagTemplateItem[];
|
|
2199
|
+
};
|
|
2200
|
+
/** @returns {TagTemplateItem} */
|
|
2201
|
+
declare function TagTemplateItem(): TagTemplateItem;
|
|
2202
|
+
type TagTemplateItem = {
|
|
2203
|
+
/**
|
|
2204
|
+
* - Static name of the tag template (e.g.,
|
|
2205
|
+
* gtm, ga4, metaPixel, sentry).
|
|
2206
|
+
*/
|
|
2207
|
+
template_name?: string;
|
|
2208
|
+
/**
|
|
2209
|
+
* - Script type.
|
|
2210
|
+
*/
|
|
2211
|
+
type?: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* - Script loading subtype.
|
|
2214
|
+
*/
|
|
2215
|
+
sub_type?: string;
|
|
2216
|
+
/**
|
|
2217
|
+
* - Where the script should be injected.
|
|
2218
|
+
*/
|
|
2219
|
+
position?: string;
|
|
2220
|
+
/**
|
|
2221
|
+
* - List of page types where the tag should be active.
|
|
2222
|
+
*/
|
|
2223
|
+
pages?: string[];
|
|
2224
|
+
/**
|
|
2225
|
+
* - HTML attributes to apply on the script tag.
|
|
2226
|
+
*/
|
|
2227
|
+
attributes?: any;
|
|
2228
|
+
/**
|
|
2229
|
+
* - List of compatible UI frameworks.
|
|
2230
|
+
*/
|
|
2231
|
+
compatible_engines?: string[];
|
|
2232
|
+
/**
|
|
2233
|
+
* - Maps UI field names to backend keys.
|
|
2234
|
+
*/
|
|
2235
|
+
field_mappings?: any;
|
|
2236
|
+
layout?: TemplateLayout;
|
|
2237
|
+
/**
|
|
2238
|
+
* - Human-readable name of the template.
|
|
2239
|
+
*/
|
|
2240
|
+
name?: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* - URL-safe path or slug for the template.
|
|
2243
|
+
*/
|
|
2244
|
+
path?: string;
|
|
2245
|
+
/**
|
|
2246
|
+
* - Explains the purpose or behavior of the template.
|
|
2247
|
+
*/
|
|
2248
|
+
description?: string;
|
|
2249
|
+
/**
|
|
2250
|
+
* - URL to an icon or image for the template.
|
|
2251
|
+
*/
|
|
2252
|
+
image?: string;
|
|
2253
|
+
/**
|
|
2254
|
+
* - Helpful guidance for configuring the template.
|
|
2255
|
+
*/
|
|
2256
|
+
note?: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* - Unique template identifier.
|
|
2259
|
+
*/
|
|
2260
|
+
template_id?: string;
|
|
2261
|
+
/**
|
|
2262
|
+
* - Version of this template.
|
|
2263
|
+
*/
|
|
2264
|
+
template_version?: string;
|
|
2265
|
+
/**
|
|
2266
|
+
* - Functional category of the template.
|
|
2267
|
+
*/
|
|
2268
|
+
category?: string;
|
|
2269
|
+
/**
|
|
2270
|
+
* - Array of field definitions for
|
|
2271
|
+
* template configuration.
|
|
2272
|
+
*/
|
|
2273
|
+
fields?: FieldDefinition[];
|
|
2274
|
+
/**
|
|
2275
|
+
* - JavaScript snippet or template script code.
|
|
2276
|
+
*/
|
|
2277
|
+
script?: string;
|
|
2278
|
+
};
|
|
2279
|
+
/** @returns {TemplateLayout} */
|
|
2280
|
+
declare function TemplateLayout(): TemplateLayout;
|
|
2281
|
+
type TemplateLayout = {
|
|
2282
|
+
columns?: number;
|
|
2283
|
+
gap?: string;
|
|
2284
|
+
responsive?: boolean;
|
|
2285
|
+
};
|
|
2286
|
+
/** @returns {FieldDefinition} */
|
|
2287
|
+
declare function FieldDefinition(): FieldDefinition;
|
|
2288
|
+
type FieldDefinition = {
|
|
2289
|
+
/**
|
|
2290
|
+
* - Field key used in templates and mappings.
|
|
2291
|
+
*/
|
|
2292
|
+
name?: string;
|
|
2293
|
+
/**
|
|
2294
|
+
* - Input type (e.g., text, boolean, array, note).
|
|
2295
|
+
*/
|
|
2296
|
+
type?: string;
|
|
2297
|
+
label?: string;
|
|
2298
|
+
placeholder?: string;
|
|
2299
|
+
required?: boolean;
|
|
2300
|
+
/**
|
|
2301
|
+
* - Visual width in the form layout.
|
|
2302
|
+
*/
|
|
2303
|
+
size?: string;
|
|
2304
|
+
description?: string;
|
|
2305
|
+
validation?: FieldValidation;
|
|
2306
|
+
/**
|
|
2307
|
+
* - Optional client-side events configuration.
|
|
2308
|
+
*/
|
|
2309
|
+
events?: any;
|
|
2310
|
+
};
|
|
2311
|
+
/** @returns {FieldValidation} */
|
|
2312
|
+
declare function FieldValidation(): FieldValidation;
|
|
2313
|
+
type FieldValidation = {
|
|
2314
|
+
/**
|
|
2315
|
+
* - Regex pattern used for validation.
|
|
2316
|
+
*/
|
|
2317
|
+
pattern?: string;
|
|
2318
|
+
/**
|
|
2319
|
+
* - Error message shown when validation fails.
|
|
2320
|
+
*/
|
|
2321
|
+
message?: string;
|
|
2322
|
+
};
|
|
2089
2323
|
/** @returns {DataLoaderSourceSchema} */
|
|
2090
2324
|
declare function DataLoaderSourceSchema(): DataLoaderSourceSchema;
|
|
2091
2325
|
type DataLoaderSourceSchema = {
|
|
@@ -2467,11 +2701,16 @@ type TagsSchema = {
|
|
|
2467
2701
|
* - The unique identifier for the tag set.
|
|
2468
2702
|
*/
|
|
2469
2703
|
_id?: string;
|
|
2704
|
+
/**
|
|
2705
|
+
* - The ID of the company associated with this tags.
|
|
2706
|
+
*/
|
|
2707
|
+
company?: string;
|
|
2470
2708
|
/**
|
|
2471
2709
|
* - A list of tags (HTML resources like scripts
|
|
2472
2710
|
* or stylesheets) that are configured for the application.
|
|
2473
2711
|
*/
|
|
2474
2712
|
tags?: TagSchema[];
|
|
2713
|
+
page?: Page;
|
|
2475
2714
|
};
|
|
2476
2715
|
/** @returns {TagSchema} */
|
|
2477
2716
|
declare function TagSchema(): TagSchema;
|
|
@@ -2530,6 +2769,7 @@ type TagSchema = {
|
|
|
2530
2769
|
*/
|
|
2531
2770
|
pages?: any[];
|
|
2532
2771
|
__source?: TagSourceSchema;
|
|
2772
|
+
template?: TemplateSchema;
|
|
2533
2773
|
};
|
|
2534
2774
|
/** @returns {TagSourceSchema} */
|
|
2535
2775
|
declare function TagSourceSchema(): TagSourceSchema;
|
|
@@ -400,6 +400,7 @@ const Joi = require("joi");
|
|
|
400
400
|
* the HTML (inline) or linked externally (external).
|
|
401
401
|
* @property {string} [content] - The actual content of the inline tag, such as
|
|
402
402
|
* JavaScript or CSS code if the tag is inline.
|
|
403
|
+
* @property {TemplateSchema} [template]
|
|
403
404
|
*/
|
|
404
405
|
|
|
405
406
|
/**
|
|
@@ -435,6 +436,23 @@ const Joi = require("joi");
|
|
|
435
436
|
* injected or active.
|
|
436
437
|
* @property {string} [content] - The inline content for tags of type 'inline'
|
|
437
438
|
* (e.g., JavaScript or CSS code).
|
|
439
|
+
* @property {TemplateSchema} [template]
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @typedef TemplateSchema
|
|
444
|
+
* @property {string} [template_id] - Unique identifier for the template linked
|
|
445
|
+
* to the tag.
|
|
446
|
+
* @property {string} [template_version] - Version number of the template used
|
|
447
|
+
* for configuration.
|
|
448
|
+
* @property {TemplateField[]} [template_fields] - List of dynamic key-value
|
|
449
|
+
* pairs defining configuration fields for third-party integrations or custom settings.
|
|
450
|
+
*/
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* @typedef TemplateField
|
|
454
|
+
* @property {string} [key] - Field name representing the configuration key.
|
|
455
|
+
* @property {string} [value] - Value assigned to the configuration field.
|
|
438
456
|
*/
|
|
439
457
|
|
|
440
458
|
/**
|
|
@@ -455,6 +473,62 @@ const Joi = require("joi");
|
|
|
455
473
|
* @property {string} [_id]
|
|
456
474
|
*/
|
|
457
475
|
|
|
476
|
+
/**
|
|
477
|
+
* @typedef TagsTemplateSchema
|
|
478
|
+
* @property {TagTemplateItem[]} [items] - Array of tag template objects.
|
|
479
|
+
*/
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* @typedef TagTemplateItem
|
|
483
|
+
* @property {string} [template_name] - Static name of the tag template (e.g.,
|
|
484
|
+
* gtm, ga4, metaPixel, sentry).
|
|
485
|
+
* @property {string} [type] - Script type.
|
|
486
|
+
* @property {string} [sub_type] - Script loading subtype.
|
|
487
|
+
* @property {string} [position] - Where the script should be injected.
|
|
488
|
+
* @property {string[]} [pages] - List of page types where the tag should be active.
|
|
489
|
+
* @property {Object} [attributes] - HTML attributes to apply on the script tag.
|
|
490
|
+
* @property {string[]} [compatible_engines] - List of compatible UI frameworks.
|
|
491
|
+
* @property {Object} [field_mappings] - Maps UI field names to backend keys.
|
|
492
|
+
* @property {TemplateLayout} [layout]
|
|
493
|
+
* @property {string} [name] - Human-readable name of the template.
|
|
494
|
+
* @property {string} [path] - URL-safe path or slug for the template.
|
|
495
|
+
* @property {string} [description] - Explains the purpose or behavior of the template.
|
|
496
|
+
* @property {string} [image] - URL to an icon or image for the template.
|
|
497
|
+
* @property {string} [note] - Helpful guidance for configuring the template.
|
|
498
|
+
* @property {string} [template_id] - Unique template identifier.
|
|
499
|
+
* @property {string} [template_version] - Version of this template.
|
|
500
|
+
* @property {string} [category] - Functional category of the template.
|
|
501
|
+
* @property {FieldDefinition[]} [fields] - Array of field definitions for
|
|
502
|
+
* template configuration.
|
|
503
|
+
* @property {string} [script] - JavaScript snippet or template script code.
|
|
504
|
+
*/
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @typedef TemplateLayout
|
|
508
|
+
* @property {number} [columns]
|
|
509
|
+
* @property {string} [gap]
|
|
510
|
+
* @property {boolean} [responsive]
|
|
511
|
+
*/
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @typedef FieldDefinition
|
|
515
|
+
* @property {string} [name] - Field key used in templates and mappings.
|
|
516
|
+
* @property {string} [type] - Input type (e.g., text, boolean, array, note).
|
|
517
|
+
* @property {string} [label]
|
|
518
|
+
* @property {string} [placeholder]
|
|
519
|
+
* @property {boolean} [required]
|
|
520
|
+
* @property {string} [size] - Visual width in the form layout.
|
|
521
|
+
* @property {string} [description]
|
|
522
|
+
* @property {FieldValidation} [validation]
|
|
523
|
+
* @property {Object} [events] - Optional client-side events configuration.
|
|
524
|
+
*/
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* @typedef FieldValidation
|
|
528
|
+
* @property {string} [pattern] - Regex pattern used for validation.
|
|
529
|
+
* @property {string} [message] - Error message shown when validation fails.
|
|
530
|
+
*/
|
|
531
|
+
|
|
458
532
|
/**
|
|
459
533
|
* @typedef DataLoaderSourceSchema
|
|
460
534
|
* @property {string} [type]
|
|
@@ -799,8 +873,10 @@ const Joi = require("joi");
|
|
|
799
873
|
* @typedef TagsSchema
|
|
800
874
|
* @property {string} [application] - The ID of the application that owns the tags.
|
|
801
875
|
* @property {string} [_id] - The unique identifier for the tag set.
|
|
876
|
+
* @property {string} [company] - The ID of the company associated with this tags.
|
|
802
877
|
* @property {TagSchema[]} [tags] - A list of tags (HTML resources like scripts
|
|
803
878
|
* or stylesheets) that are configured for the application.
|
|
879
|
+
* @property {Page} [page]
|
|
804
880
|
*/
|
|
805
881
|
|
|
806
882
|
/**
|
|
@@ -830,6 +906,7 @@ const Joi = require("joi");
|
|
|
830
906
|
* third-party tag can be injected or supported.
|
|
831
907
|
* @property {Object[]} [pages] - Pages or environments where the tag should be active.
|
|
832
908
|
* @property {TagSourceSchema} [__source]
|
|
909
|
+
* @property {TemplateSchema} [template]
|
|
833
910
|
*/
|
|
834
911
|
|
|
835
912
|
/**
|
|
@@ -2233,6 +2310,7 @@ class ContentPlatformModel {
|
|
|
2233
2310
|
type: Joi.string().allow(""),
|
|
2234
2311
|
sub_type: Joi.string().allow(""),
|
|
2235
2312
|
content: Joi.string().allow(""),
|
|
2313
|
+
template: ContentPlatformModel.TemplateSchema(),
|
|
2236
2314
|
});
|
|
2237
2315
|
}
|
|
2238
2316
|
|
|
@@ -2256,6 +2334,24 @@ class ContentPlatformModel {
|
|
|
2256
2334
|
compatible_engines: Joi.array().items(Joi.string().allow("")),
|
|
2257
2335
|
pages: Joi.array().items(Joi.any()),
|
|
2258
2336
|
content: Joi.string().allow(""),
|
|
2337
|
+
template: ContentPlatformModel.TemplateSchema(),
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
/** @returns {TemplateSchema} */
|
|
2342
|
+
static TemplateSchema() {
|
|
2343
|
+
return Joi.object({
|
|
2344
|
+
template_id: Joi.string().allow(""),
|
|
2345
|
+
template_version: Joi.string().allow(""),
|
|
2346
|
+
template_fields: Joi.array().items(ContentPlatformModel.TemplateField()),
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
/** @returns {TemplateField} */
|
|
2351
|
+
static TemplateField() {
|
|
2352
|
+
return Joi.object({
|
|
2353
|
+
key: Joi.string().allow(""),
|
|
2354
|
+
value: Joi.string().allow(""),
|
|
2259
2355
|
});
|
|
2260
2356
|
}
|
|
2261
2357
|
|
|
@@ -2280,6 +2376,70 @@ class ContentPlatformModel {
|
|
|
2280
2376
|
});
|
|
2281
2377
|
}
|
|
2282
2378
|
|
|
2379
|
+
/** @returns {TagsTemplateSchema} */
|
|
2380
|
+
static TagsTemplateSchema() {
|
|
2381
|
+
return Joi.object({
|
|
2382
|
+
items: Joi.array().items(ContentPlatformModel.TagTemplateItem()),
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
/** @returns {TagTemplateItem} */
|
|
2387
|
+
static TagTemplateItem() {
|
|
2388
|
+
return Joi.object({
|
|
2389
|
+
template_name: Joi.string().allow(""),
|
|
2390
|
+
type: Joi.string().allow(""),
|
|
2391
|
+
sub_type: Joi.string().allow(""),
|
|
2392
|
+
position: Joi.string().allow(""),
|
|
2393
|
+
pages: Joi.array().items(Joi.string().allow("")),
|
|
2394
|
+
attributes: Joi.object().pattern(/\S/, Joi.any()),
|
|
2395
|
+
compatible_engines: Joi.array().items(Joi.string().allow("")),
|
|
2396
|
+
field_mappings: Joi.object().pattern(/\S/, Joi.any()),
|
|
2397
|
+
layout: ContentPlatformModel.TemplateLayout(),
|
|
2398
|
+
name: Joi.string().allow(""),
|
|
2399
|
+
path: Joi.string().allow(""),
|
|
2400
|
+
description: Joi.string().allow(""),
|
|
2401
|
+
image: Joi.string().allow(""),
|
|
2402
|
+
note: Joi.string().allow(""),
|
|
2403
|
+
template_id: Joi.string().allow(""),
|
|
2404
|
+
template_version: Joi.string().allow(""),
|
|
2405
|
+
category: Joi.string().allow(""),
|
|
2406
|
+
fields: Joi.array().items(ContentPlatformModel.FieldDefinition()),
|
|
2407
|
+
script: Joi.string().allow(""),
|
|
2408
|
+
});
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
/** @returns {TemplateLayout} */
|
|
2412
|
+
static TemplateLayout() {
|
|
2413
|
+
return Joi.object({
|
|
2414
|
+
columns: Joi.number(),
|
|
2415
|
+
gap: Joi.string().allow(""),
|
|
2416
|
+
responsive: Joi.boolean(),
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
/** @returns {FieldDefinition} */
|
|
2421
|
+
static FieldDefinition() {
|
|
2422
|
+
return Joi.object({
|
|
2423
|
+
name: Joi.string().allow(""),
|
|
2424
|
+
type: Joi.string().allow(""),
|
|
2425
|
+
label: Joi.string().allow(""),
|
|
2426
|
+
placeholder: Joi.string().allow(""),
|
|
2427
|
+
required: Joi.boolean(),
|
|
2428
|
+
size: Joi.string().allow(""),
|
|
2429
|
+
description: Joi.string().allow(""),
|
|
2430
|
+
validation: ContentPlatformModel.FieldValidation(),
|
|
2431
|
+
events: Joi.object().pattern(/\S/, Joi.any()),
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
/** @returns {FieldValidation} */
|
|
2436
|
+
static FieldValidation() {
|
|
2437
|
+
return Joi.object({
|
|
2438
|
+
pattern: Joi.string().allow(""),
|
|
2439
|
+
message: Joi.string().allow(""),
|
|
2440
|
+
});
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2283
2443
|
/** @returns {DataLoaderSourceSchema} */
|
|
2284
2444
|
static DataLoaderSourceSchema() {
|
|
2285
2445
|
return Joi.object({
|
|
@@ -2709,7 +2869,9 @@ class ContentPlatformModel {
|
|
|
2709
2869
|
return Joi.object({
|
|
2710
2870
|
application: Joi.string().allow(""),
|
|
2711
2871
|
_id: Joi.string().allow(""),
|
|
2872
|
+
company: Joi.string().allow(""),
|
|
2712
2873
|
tags: Joi.array().items(ContentPlatformModel.TagSchema()),
|
|
2874
|
+
page: ContentPlatformModel.Page(),
|
|
2713
2875
|
});
|
|
2714
2876
|
}
|
|
2715
2877
|
|
|
@@ -2727,6 +2889,7 @@ class ContentPlatformModel {
|
|
|
2727
2889
|
compatible_engines: Joi.array().items(Joi.string().allow("")),
|
|
2728
2890
|
pages: Joi.array().items(Joi.any()),
|
|
2729
2891
|
__source: ContentPlatformModel.TagSourceSchema(),
|
|
2892
|
+
template: ContentPlatformModel.TemplateSchema(),
|
|
2730
2893
|
});
|
|
2731
2894
|
}
|
|
2732
2895
|
|
|
@@ -56,7 +56,7 @@ declare class User {
|
|
|
56
56
|
* @summary: Create User
|
|
57
57
|
* @description: Register and add a new user to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUser/).
|
|
58
58
|
*/
|
|
59
|
-
createUser({ body, requestHeaders }?: UserPlatformApplicationValidator.CreateUserParam, { responseHeaders }?: object): Promise<UserPlatformModel.CreateUserResponseSchema>;
|
|
59
|
+
createUser({ body, verified, requestHeaders }?: UserPlatformApplicationValidator.CreateUserParam, { responseHeaders }?: object): Promise<UserPlatformModel.CreateUserResponseSchema>;
|
|
60
60
|
/**
|
|
61
61
|
* @param {UserPlatformApplicationValidator.CreateUserAttributeDefinitionParam} arg
|
|
62
62
|
* - Arg object
|
|
@@ -343,12 +343,13 @@ class User {
|
|
|
343
343
|
* @description: Register and add a new user to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUser/).
|
|
344
344
|
*/
|
|
345
345
|
async createUser(
|
|
346
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
346
|
+
{ body, verified, requestHeaders } = { requestHeaders: {} },
|
|
347
347
|
{ responseHeaders } = { responseHeaders: false }
|
|
348
348
|
) {
|
|
349
349
|
const { error } = UserPlatformApplicationValidator.createUser().validate(
|
|
350
350
|
{
|
|
351
351
|
body,
|
|
352
|
+
verified,
|
|
352
353
|
},
|
|
353
354
|
{ abortEarly: false, allowUnknown: true }
|
|
354
355
|
);
|
|
@@ -362,6 +363,7 @@ class User {
|
|
|
362
363
|
} = UserPlatformApplicationValidator.createUser().validate(
|
|
363
364
|
{
|
|
364
365
|
body,
|
|
366
|
+
verified,
|
|
365
367
|
},
|
|
366
368
|
{ abortEarly: false, allowUnknown: false }
|
|
367
369
|
);
|
|
@@ -373,6 +375,7 @@ class User {
|
|
|
373
375
|
}
|
|
374
376
|
|
|
375
377
|
const query_params = {};
|
|
378
|
+
query_params["verified"] = verified;
|
|
376
379
|
|
|
377
380
|
const response = await PlatformAPIClient.execute(
|
|
378
381
|
this.config,
|
|
@@ -17,6 +17,9 @@ export = UserPlatformApplicationValidator;
|
|
|
17
17
|
*/
|
|
18
18
|
/**
|
|
19
19
|
* @typedef CreateUserParam
|
|
20
|
+
* @property {boolean} [verified] - Controls whether newly created emails and
|
|
21
|
+
* phone numbers are marked as verified. Pass verified=false to keep them
|
|
22
|
+
* unverified. When omitted, they are auto-marked verified.
|
|
20
23
|
* @property {UserPlatformModel.CreateUserRequestSchema} body
|
|
21
24
|
*/
|
|
22
25
|
/**
|
|
@@ -294,6 +297,12 @@ type CreateBulkExportUsersParam = {
|
|
|
294
297
|
body: UserPlatformModel.BulkUserExportSchema;
|
|
295
298
|
};
|
|
296
299
|
type CreateUserParam = {
|
|
300
|
+
/**
|
|
301
|
+
* - Controls whether newly created emails and
|
|
302
|
+
* phone numbers are marked as verified. Pass verified=false to keep them
|
|
303
|
+
* unverified. When omitted, they are auto-marked verified.
|
|
304
|
+
*/
|
|
305
|
+
verified?: boolean;
|
|
297
306
|
body: UserPlatformModel.CreateUserRequestSchema;
|
|
298
307
|
};
|
|
299
308
|
type CreateUserAttributeDefinitionParam = {
|
|
@@ -24,6 +24,9 @@ const UserPlatformModel = require("./UserPlatformModel");
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* @typedef CreateUserParam
|
|
27
|
+
* @property {boolean} [verified] - Controls whether newly created emails and
|
|
28
|
+
* phone numbers are marked as verified. Pass verified=false to keep them
|
|
29
|
+
* unverified. When omitted, they are auto-marked verified.
|
|
27
30
|
* @property {UserPlatformModel.CreateUserRequestSchema} body
|
|
28
31
|
*/
|
|
29
32
|
|
|
@@ -274,6 +277,7 @@ class UserPlatformApplicationValidator {
|
|
|
274
277
|
/** @returns {CreateUserParam} */
|
|
275
278
|
static createUser() {
|
|
276
279
|
return Joi.object({
|
|
280
|
+
verified: Joi.boolean(),
|
|
277
281
|
body: UserPlatformModel.CreateUserRequestSchema().required(),
|
|
278
282
|
}).required();
|
|
279
283
|
}
|
|
@@ -341,6 +341,10 @@ export = UserPlatformModel;
|
|
|
341
341
|
* @property {number} limit - Number of results to return per page.
|
|
342
342
|
* @property {number} page - Page number to fetch.
|
|
343
343
|
* @property {string} [email] - Filter users by their exact email address.
|
|
344
|
+
* @property {boolean} [has_email] - Apply a filter to retrieve users who have a
|
|
345
|
+
* valid email address specified in their profile.
|
|
346
|
+
* @property {boolean} [has_phone] - Apply a filter to retrieve users who have a
|
|
347
|
+
* valid phone number specified in their profile.
|
|
344
348
|
* @property {string} [phone] - Filter users by their exact phone number.
|
|
345
349
|
* @property {string[]} [definition_ids] - List of user attribute definition IDs
|
|
346
350
|
* to fetch attributes values available for each user.
|
|
@@ -1360,6 +1364,16 @@ type UserAttributeFilterQuery = {
|
|
|
1360
1364
|
* - Filter users by their exact email address.
|
|
1361
1365
|
*/
|
|
1362
1366
|
email?: string;
|
|
1367
|
+
/**
|
|
1368
|
+
* - Apply a filter to retrieve users who have a
|
|
1369
|
+
* valid email address specified in their profile.
|
|
1370
|
+
*/
|
|
1371
|
+
has_email?: boolean;
|
|
1372
|
+
/**
|
|
1373
|
+
* - Apply a filter to retrieve users who have a
|
|
1374
|
+
* valid phone number specified in their profile.
|
|
1375
|
+
*/
|
|
1376
|
+
has_phone?: boolean;
|
|
1363
1377
|
/**
|
|
1364
1378
|
* - Filter users by their exact phone number.
|
|
1365
1379
|
*/
|
|
@@ -384,6 +384,10 @@ const Joi = require("joi");
|
|
|
384
384
|
* @property {number} limit - Number of results to return per page.
|
|
385
385
|
* @property {number} page - Page number to fetch.
|
|
386
386
|
* @property {string} [email] - Filter users by their exact email address.
|
|
387
|
+
* @property {boolean} [has_email] - Apply a filter to retrieve users who have a
|
|
388
|
+
* valid email address specified in their profile.
|
|
389
|
+
* @property {boolean} [has_phone] - Apply a filter to retrieve users who have a
|
|
390
|
+
* valid phone number specified in their profile.
|
|
387
391
|
* @property {string} [phone] - Filter users by their exact phone number.
|
|
388
392
|
* @property {string[]} [definition_ids] - List of user attribute definition IDs
|
|
389
393
|
* to fetch attributes values available for each user.
|
|
@@ -1217,6 +1221,8 @@ class UserPlatformModel {
|
|
|
1217
1221
|
limit: Joi.number().required(),
|
|
1218
1222
|
page: Joi.number().required(),
|
|
1219
1223
|
email: Joi.string().allow(""),
|
|
1224
|
+
has_email: Joi.boolean(),
|
|
1225
|
+
has_phone: Joi.boolean(),
|
|
1220
1226
|
phone: Joi.string().allow(""),
|
|
1221
1227
|
definition_ids: Joi.array().items(Joi.string().allow("")),
|
|
1222
1228
|
conditions: Joi.array()
|