@gofynd/fdk-client-javascript 3.16.2 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationClient.js +53 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
- package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
- package/sdk/application/Order/OrderApplicationClient.js +50 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +4 -4
- package/sdk/application/Payment/PaymentApplicationClient.js +3 -4
- package/sdk/application/User/UserApplicationClient.d.ts +10 -0
- package/sdk/application/User/UserApplicationClient.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +3 -3
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1 -4
- package/sdk/platform/Cart/CartPlatformModel.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -80
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6 -131
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -141
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -10
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -12
- package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
- package/sdk/platform/Common/CommonPlatformModel.js +14 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +18 -459
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +28 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +12 -52
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +54 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +47 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1 -7
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +0 -14
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -6
- package/sdk/platform/Content/ContentPlatformModel.d.ts +0 -2
- package/sdk/platform/Content/ContentPlatformModel.js +0 -2
- package/sdk/platform/Order/OrderPlatformClient.d.ts +26 -18
- package/sdk/platform/Order/OrderPlatformClient.js +175 -107
- package/sdk/platform/Order/OrderPlatformModel.d.ts +339 -43
- package/sdk/platform/Order/OrderPlatformModel.js +209 -43
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
- package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformModel.js +14 -10
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +79 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +13 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +12 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +42 -5
- package/sdk/platform/User/UserPlatformModel.js +25 -6
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
- package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
|
@@ -149,6 +149,16 @@ declare class User {
|
|
|
149
149
|
* @description: This request deletes attribute values for a single user based on the provided user attribute definition. Each user attribute definition represents a distinct attribute, and for each definition, a user can have one corresponding value. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserAttributesInBulk/).
|
|
150
150
|
*/
|
|
151
151
|
deleteUserAttributesInBulk({ userId, body, requestHeaders }?: UserPlatformApplicationValidator.DeleteUserAttributesInBulkParam, { responseHeaders }?: object): Promise<UserPlatformModel.SuccessMessage>;
|
|
152
|
+
/**
|
|
153
|
+
* @param {UserPlatformApplicationValidator.DeleteUserGroupParam} arg - Arg object
|
|
154
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
155
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
156
|
+
* @returns {Promise<UserPlatformModel.DeleteUserGroupSuccess>} - Success response
|
|
157
|
+
* @name deleteUserGroup
|
|
158
|
+
* @summary: Delete User Group
|
|
159
|
+
* @description: Permanently delete a user group by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserGroup/).
|
|
160
|
+
*/
|
|
161
|
+
deleteUserGroup({ groupId, requestHeaders }?: UserPlatformApplicationValidator.DeleteUserGroupParam, { responseHeaders }?: object): Promise<UserPlatformModel.DeleteUserGroupSuccess>;
|
|
152
162
|
/**
|
|
153
163
|
* @param {UserPlatformApplicationValidator.FilterUsersByAttributesParam} arg
|
|
154
164
|
* - Arg object
|
|
@@ -1062,6 +1062,85 @@ class User {
|
|
|
1062
1062
|
return response;
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
|
+
/**
|
|
1066
|
+
* @param {UserPlatformApplicationValidator.DeleteUserGroupParam} arg - Arg object
|
|
1067
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1068
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1069
|
+
* @returns {Promise<UserPlatformModel.DeleteUserGroupSuccess>} - Success response
|
|
1070
|
+
* @name deleteUserGroup
|
|
1071
|
+
* @summary: Delete User Group
|
|
1072
|
+
* @description: Permanently delete a user group by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserGroup/).
|
|
1073
|
+
*/
|
|
1074
|
+
async deleteUserGroup(
|
|
1075
|
+
{ groupId, requestHeaders } = { requestHeaders: {} },
|
|
1076
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1077
|
+
) {
|
|
1078
|
+
const {
|
|
1079
|
+
error,
|
|
1080
|
+
} = UserPlatformApplicationValidator.deleteUserGroup().validate(
|
|
1081
|
+
{
|
|
1082
|
+
groupId,
|
|
1083
|
+
},
|
|
1084
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1085
|
+
);
|
|
1086
|
+
if (error) {
|
|
1087
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1091
|
+
const {
|
|
1092
|
+
error: warrning,
|
|
1093
|
+
} = UserPlatformApplicationValidator.deleteUserGroup().validate(
|
|
1094
|
+
{
|
|
1095
|
+
groupId,
|
|
1096
|
+
},
|
|
1097
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1098
|
+
);
|
|
1099
|
+
if (warrning) {
|
|
1100
|
+
Logger({
|
|
1101
|
+
level: "WARN",
|
|
1102
|
+
message: `Parameter Validation warrnings for platform > User > deleteUserGroup \n ${warrning}`,
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
const query_params = {};
|
|
1107
|
+
|
|
1108
|
+
const response = await PlatformAPIClient.execute(
|
|
1109
|
+
this.config,
|
|
1110
|
+
"delete",
|
|
1111
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
|
|
1112
|
+
query_params,
|
|
1113
|
+
undefined,
|
|
1114
|
+
requestHeaders,
|
|
1115
|
+
{ responseHeaders }
|
|
1116
|
+
);
|
|
1117
|
+
|
|
1118
|
+
let responseData = response;
|
|
1119
|
+
if (responseHeaders) {
|
|
1120
|
+
responseData = response[0];
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
const {
|
|
1124
|
+
error: res_error,
|
|
1125
|
+
} = UserPlatformModel.DeleteUserGroupSuccess().validate(responseData, {
|
|
1126
|
+
abortEarly: false,
|
|
1127
|
+
allowUnknown: true,
|
|
1128
|
+
});
|
|
1129
|
+
|
|
1130
|
+
if (res_error) {
|
|
1131
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1132
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1133
|
+
} else {
|
|
1134
|
+
Logger({
|
|
1135
|
+
level: "WARN",
|
|
1136
|
+
message: `Response Validation Warnings for platform > User > deleteUserGroup \n ${res_error}`,
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
return response;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1065
1144
|
/**
|
|
1066
1145
|
* @param {UserPlatformApplicationValidator.FilterUsersByAttributesParam} arg
|
|
1067
1146
|
* - Arg object
|
|
@@ -60,6 +60,10 @@ export = UserPlatformApplicationValidator;
|
|
|
60
60
|
* @property {string} userId - The unique identifier of the user to update.
|
|
61
61
|
* @property {UserPlatformModel.DeleteBulkUserAttribute} body
|
|
62
62
|
*/
|
|
63
|
+
/**
|
|
64
|
+
* @typedef DeleteUserGroupParam
|
|
65
|
+
* @property {string} groupId - Unique ID allotted to a User Group
|
|
66
|
+
*/
|
|
63
67
|
/**
|
|
64
68
|
* @typedef FilterUsersByAttributesParam
|
|
65
69
|
* @property {UserPlatformModel.UserAttributeFilter} body
|
|
@@ -232,6 +236,8 @@ declare class UserPlatformApplicationValidator {
|
|
|
232
236
|
static deleteUserAttributeDefinitionById(): DeleteUserAttributeDefinitionByIdParam;
|
|
233
237
|
/** @returns {DeleteUserAttributesInBulkParam} */
|
|
234
238
|
static deleteUserAttributesInBulk(): DeleteUserAttributesInBulkParam;
|
|
239
|
+
/** @returns {DeleteUserGroupParam} */
|
|
240
|
+
static deleteUserGroup(): DeleteUserGroupParam;
|
|
235
241
|
/** @returns {FilterUsersByAttributesParam} */
|
|
236
242
|
static filterUsersByAttributes(): FilterUsersByAttributesParam;
|
|
237
243
|
/** @returns {GetActiveSessionsParam} */
|
|
@@ -282,7 +288,7 @@ declare class UserPlatformApplicationValidator {
|
|
|
282
288
|
static updateUserGroupPartially(): UpdateUserGroupPartiallyParam;
|
|
283
289
|
}
|
|
284
290
|
declare namespace UserPlatformApplicationValidator {
|
|
285
|
-
export { ArchiveUserParam, BlockOrUnblockUsersParam, BulkImportStoreFrontUsersParam, CreateBulkExportUsersParam, CreateUserParam, CreateUserAttributeDefinitionParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, DeleteUserAttributeParam, DeleteUserAttributeDefinitionByIdParam, DeleteUserAttributesInBulkParam, FilterUsersByAttributesParam, GetActiveSessionsParam, GetBulkExportUsersListParam, GetBulkImportUsersListParam, GetCustomersParam, GetPlatformConfigParam, GetUserAttributeParam, GetUserAttributeByIdParam, GetUserAttributeDefinitionByIdParam, GetUserAttributeDefinitionsParam, GetUserAttributesForUserParam, GetUserGroupByIdParam, GetUserGroupsParam, GetUserTimelineParam, GetUsersJobByJobIdParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserAttributeParam, UpdateUserAttributeDefinitionParam, UpdateUserAttributesParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam };
|
|
291
|
+
export { ArchiveUserParam, BlockOrUnblockUsersParam, BulkImportStoreFrontUsersParam, CreateBulkExportUsersParam, CreateUserParam, CreateUserAttributeDefinitionParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, DeleteUserAttributeParam, DeleteUserAttributeDefinitionByIdParam, DeleteUserAttributesInBulkParam, DeleteUserGroupParam, FilterUsersByAttributesParam, GetActiveSessionsParam, GetBulkExportUsersListParam, GetBulkImportUsersListParam, GetCustomersParam, GetPlatformConfigParam, GetUserAttributeParam, GetUserAttributeByIdParam, GetUserAttributeDefinitionByIdParam, GetUserAttributeDefinitionsParam, GetUserAttributesForUserParam, GetUserGroupByIdParam, GetUserGroupsParam, GetUserTimelineParam, GetUsersJobByJobIdParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserAttributeParam, UpdateUserAttributeDefinitionParam, UpdateUserAttributesParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam };
|
|
286
292
|
}
|
|
287
293
|
type ArchiveUserParam = {
|
|
288
294
|
body: UserPlatformModel.ArchiveUserRequestSchema;
|
|
@@ -362,6 +368,12 @@ type DeleteUserAttributesInBulkParam = {
|
|
|
362
368
|
userId: string;
|
|
363
369
|
body: UserPlatformModel.DeleteBulkUserAttribute;
|
|
364
370
|
};
|
|
371
|
+
type DeleteUserGroupParam = {
|
|
372
|
+
/**
|
|
373
|
+
* - Unique ID allotted to a User Group
|
|
374
|
+
*/
|
|
375
|
+
groupId: string;
|
|
376
|
+
};
|
|
365
377
|
type FilterUsersByAttributesParam = {
|
|
366
378
|
body: UserPlatformModel.UserAttributeFilter;
|
|
367
379
|
};
|
|
@@ -76,6 +76,11 @@ const UserPlatformModel = require("./UserPlatformModel");
|
|
|
76
76
|
* @property {UserPlatformModel.DeleteBulkUserAttribute} body
|
|
77
77
|
*/
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* @typedef DeleteUserGroupParam
|
|
81
|
+
* @property {string} groupId - Unique ID allotted to a User Group
|
|
82
|
+
*/
|
|
83
|
+
|
|
79
84
|
/**
|
|
80
85
|
* @typedef FilterUsersByAttributesParam
|
|
81
86
|
* @property {UserPlatformModel.UserAttributeFilter} body
|
|
@@ -344,6 +349,13 @@ class UserPlatformApplicationValidator {
|
|
|
344
349
|
}).required();
|
|
345
350
|
}
|
|
346
351
|
|
|
352
|
+
/** @returns {DeleteUserGroupParam} */
|
|
353
|
+
static deleteUserGroup() {
|
|
354
|
+
return Joi.object({
|
|
355
|
+
groupId: Joi.string().allow("").required(),
|
|
356
|
+
}).required();
|
|
357
|
+
}
|
|
358
|
+
|
|
347
359
|
/** @returns {FilterUsersByAttributesParam} */
|
|
348
360
|
static filterUsersByAttributes() {
|
|
349
361
|
return Joi.object({
|
|
@@ -321,9 +321,12 @@ export = UserPlatformModel;
|
|
|
321
321
|
*/
|
|
322
322
|
/**
|
|
323
323
|
* @typedef ConditionsSchema
|
|
324
|
-
* @property {string} [user_attribute_definition_id]
|
|
325
|
-
*
|
|
326
|
-
* @property {string} [value
|
|
324
|
+
* @property {string} [user_attribute_definition_id] - ID of the user attribute
|
|
325
|
+
* definition used in the condition
|
|
326
|
+
* @property {string} [type] - Type of condition to apply on the attribute value.
|
|
327
|
+
* @property {Object} [value] - Value of the condition
|
|
328
|
+
* @property {boolean} [ignore_year] - Indicates if the year should be ignored
|
|
329
|
+
* for the condition
|
|
327
330
|
*/
|
|
328
331
|
/**
|
|
329
332
|
* @typedef DeleteBulkUserAttribute
|
|
@@ -693,6 +696,12 @@ export = UserPlatformModel;
|
|
|
693
696
|
* @typedef UserConsent
|
|
694
697
|
* @property {PrivacyPolicyConsentSchema} [privacy_policy]
|
|
695
698
|
*/
|
|
699
|
+
/**
|
|
700
|
+
* @typedef DeleteUserGroupSuccess
|
|
701
|
+
* @property {string} id - ID of the user group that was deleted
|
|
702
|
+
* @property {boolean} success - Success indicating the user group was deleted
|
|
703
|
+
* successfully.
|
|
704
|
+
*/
|
|
696
705
|
/**
|
|
697
706
|
* @typedef PrivacyPolicyConsentSchema
|
|
698
707
|
* @property {boolean} [value] - Whether the user has consented to the privacy policy
|
|
@@ -701,7 +710,7 @@ export = UserPlatformModel;
|
|
|
701
710
|
declare class UserPlatformModel {
|
|
702
711
|
}
|
|
703
712
|
declare namespace UserPlatformModel {
|
|
704
|
-
export { SuccessMessage, UserAttributeDefinitionList, UserAttributeDefinition, UserAttributeDefinitionDetails, AttributeMaskingProperties, AttributeRegistrationProperties, UserAttributeDefinitionValidation, BulkUserAttribute, UserAttribute, CreateBulkUserAttribute, BulkUserAttributeRequestBody, CreateUserAttribute, CreateUserAttributeDefinition, CreateStoreFrontUsersPayload, BulkUserExportSchema, BulkActionModel, CreatedBySchema, BulkActionLinkSchema, FileLinks, BulkActionCountSchema, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, BulkActionPaginationSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, DeleteBulkUserAttribute, UserAttributeFilter, UserAttributeFilterQuery, UserAttributeFilterRequestConditions, UserAttributeFiltered, UserAttributeFilteredList, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, GetUserTimeline, UserTimeline, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email, UserConsent, PrivacyPolicyConsentSchema };
|
|
713
|
+
export { SuccessMessage, UserAttributeDefinitionList, UserAttributeDefinition, UserAttributeDefinitionDetails, AttributeMaskingProperties, AttributeRegistrationProperties, UserAttributeDefinitionValidation, BulkUserAttribute, UserAttribute, CreateBulkUserAttribute, BulkUserAttributeRequestBody, CreateUserAttribute, CreateUserAttributeDefinition, CreateStoreFrontUsersPayload, BulkUserExportSchema, BulkActionModel, CreatedBySchema, BulkActionLinkSchema, FileLinks, BulkActionCountSchema, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, BulkActionPaginationSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, DeleteBulkUserAttribute, UserAttributeFilter, UserAttributeFilterQuery, UserAttributeFilterRequestConditions, UserAttributeFiltered, UserAttributeFilteredList, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, GetUserTimeline, UserTimeline, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email, UserConsent, DeleteUserGroupSuccess, PrivacyPolicyConsentSchema };
|
|
705
714
|
}
|
|
706
715
|
/** @returns {SuccessMessage} */
|
|
707
716
|
declare function SuccessMessage(): SuccessMessage;
|
|
@@ -1326,9 +1335,24 @@ type UserGroupListResponseSchema = {
|
|
|
1326
1335
|
/** @returns {ConditionsSchema} */
|
|
1327
1336
|
declare function ConditionsSchema(): ConditionsSchema;
|
|
1328
1337
|
type ConditionsSchema = {
|
|
1338
|
+
/**
|
|
1339
|
+
* - ID of the user attribute
|
|
1340
|
+
* definition used in the condition
|
|
1341
|
+
*/
|
|
1329
1342
|
user_attribute_definition_id?: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* - Type of condition to apply on the attribute value.
|
|
1345
|
+
*/
|
|
1330
1346
|
type?: string;
|
|
1331
|
-
|
|
1347
|
+
/**
|
|
1348
|
+
* - Value of the condition
|
|
1349
|
+
*/
|
|
1350
|
+
value?: any;
|
|
1351
|
+
/**
|
|
1352
|
+
* - Indicates if the year should be ignored
|
|
1353
|
+
* for the condition
|
|
1354
|
+
*/
|
|
1355
|
+
ignore_year?: boolean;
|
|
1332
1356
|
};
|
|
1333
1357
|
/** @returns {DeleteBulkUserAttribute} */
|
|
1334
1358
|
declare function DeleteBulkUserAttribute(): DeleteBulkUserAttribute;
|
|
@@ -1902,6 +1926,19 @@ declare function UserConsent(): UserConsent;
|
|
|
1902
1926
|
type UserConsent = {
|
|
1903
1927
|
privacy_policy?: PrivacyPolicyConsentSchema;
|
|
1904
1928
|
};
|
|
1929
|
+
/** @returns {DeleteUserGroupSuccess} */
|
|
1930
|
+
declare function DeleteUserGroupSuccess(): DeleteUserGroupSuccess;
|
|
1931
|
+
type DeleteUserGroupSuccess = {
|
|
1932
|
+
/**
|
|
1933
|
+
* - ID of the user group that was deleted
|
|
1934
|
+
*/
|
|
1935
|
+
id: string;
|
|
1936
|
+
/**
|
|
1937
|
+
* - Success indicating the user group was deleted
|
|
1938
|
+
* successfully.
|
|
1939
|
+
*/
|
|
1940
|
+
success: boolean;
|
|
1941
|
+
};
|
|
1905
1942
|
/** @returns {PrivacyPolicyConsentSchema} */
|
|
1906
1943
|
declare function PrivacyPolicyConsentSchema(): PrivacyPolicyConsentSchema;
|
|
1907
1944
|
type PrivacyPolicyConsentSchema = {
|
|
@@ -361,9 +361,12 @@ const Joi = require("joi");
|
|
|
361
361
|
|
|
362
362
|
/**
|
|
363
363
|
* @typedef ConditionsSchema
|
|
364
|
-
* @property {string} [user_attribute_definition_id]
|
|
365
|
-
*
|
|
366
|
-
* @property {string} [value
|
|
364
|
+
* @property {string} [user_attribute_definition_id] - ID of the user attribute
|
|
365
|
+
* definition used in the condition
|
|
366
|
+
* @property {string} [type] - Type of condition to apply on the attribute value.
|
|
367
|
+
* @property {Object} [value] - Value of the condition
|
|
368
|
+
* @property {boolean} [ignore_year] - Indicates if the year should be ignored
|
|
369
|
+
* for the condition
|
|
367
370
|
*/
|
|
368
371
|
|
|
369
372
|
/**
|
|
@@ -777,6 +780,13 @@ const Joi = require("joi");
|
|
|
777
780
|
* @property {PrivacyPolicyConsentSchema} [privacy_policy]
|
|
778
781
|
*/
|
|
779
782
|
|
|
783
|
+
/**
|
|
784
|
+
* @typedef DeleteUserGroupSuccess
|
|
785
|
+
* @property {string} id - ID of the user group that was deleted
|
|
786
|
+
* @property {boolean} success - Success indicating the user group was deleted
|
|
787
|
+
* successfully.
|
|
788
|
+
*/
|
|
789
|
+
|
|
780
790
|
/**
|
|
781
791
|
* @typedef PrivacyPolicyConsentSchema
|
|
782
792
|
* @property {boolean} [value] - Whether the user has consented to the privacy policy
|
|
@@ -916,7 +926,7 @@ class UserPlatformModel {
|
|
|
916
926
|
static BulkUserAttributeRequestBody() {
|
|
917
927
|
return Joi.object({
|
|
918
928
|
definition_id: Joi.string().allow("").required(),
|
|
919
|
-
value: Joi.any().required(),
|
|
929
|
+
value: Joi.object().pattern(/\S/, Joi.any()).required(),
|
|
920
930
|
});
|
|
921
931
|
}
|
|
922
932
|
|
|
@@ -1196,7 +1206,8 @@ class UserPlatformModel {
|
|
|
1196
1206
|
return Joi.object({
|
|
1197
1207
|
user_attribute_definition_id: Joi.string().allow(""),
|
|
1198
1208
|
type: Joi.string().allow(""),
|
|
1199
|
-
value: Joi.
|
|
1209
|
+
value: Joi.object().pattern(/\S/, Joi.any()),
|
|
1210
|
+
ignore_year: Joi.boolean(),
|
|
1200
1211
|
});
|
|
1201
1212
|
}
|
|
1202
1213
|
|
|
@@ -1236,7 +1247,7 @@ class UserPlatformModel {
|
|
|
1236
1247
|
return Joi.object({
|
|
1237
1248
|
definition_id: Joi.string().allow("").required(),
|
|
1238
1249
|
type: Joi.string().allow("").required(),
|
|
1239
|
-
value: Joi.any().required(),
|
|
1250
|
+
value: Joi.object().pattern(/\S/, Joi.any()).required(),
|
|
1240
1251
|
});
|
|
1241
1252
|
}
|
|
1242
1253
|
|
|
@@ -1674,6 +1685,14 @@ class UserPlatformModel {
|
|
|
1674
1685
|
});
|
|
1675
1686
|
}
|
|
1676
1687
|
|
|
1688
|
+
/** @returns {DeleteUserGroupSuccess} */
|
|
1689
|
+
static DeleteUserGroupSuccess() {
|
|
1690
|
+
return Joi.object({
|
|
1691
|
+
id: Joi.string().allow("").required(),
|
|
1692
|
+
success: Joi.boolean().required(),
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1677
1696
|
/** @returns {PrivacyPolicyConsentSchema} */
|
|
1678
1697
|
static PrivacyPolicyConsentSchema() {
|
|
1679
1698
|
return Joi.object({
|
package/sdk/platform/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ export namespace PlatformModel {
|
|
|
18
18
|
const OrderPlatformModel: typeof import("./Order/OrderPlatformModel");
|
|
19
19
|
const PartnerPlatformModel: typeof import("./Partner/PartnerPlatformModel");
|
|
20
20
|
const PaymentPlatformModel: typeof import("./Payment/PaymentPlatformModel");
|
|
21
|
-
const RewardsPlatformModel: typeof import("./Rewards/RewardsPlatformModel");
|
|
22
21
|
const SharePlatformModel: typeof import("./Share/SharePlatformModel");
|
|
23
22
|
const ThemePlatformModel: typeof import("./Theme/ThemePlatformModel");
|
|
24
23
|
const UserPlatformModel: typeof import("./User/UserPlatformModel");
|
package/sdk/platform/index.js
CHANGED
|
@@ -36,8 +36,6 @@ module.exports = {
|
|
|
36
36
|
|
|
37
37
|
PaymentPlatformModel: require("./Payment/PaymentPlatformModel"),
|
|
38
38
|
|
|
39
|
-
RewardsPlatformModel: require("./Rewards/RewardsPlatformModel"),
|
|
40
|
-
|
|
41
39
|
SharePlatformModel: require("./Share/SharePlatformModel"),
|
|
42
40
|
|
|
43
41
|
ThemePlatformModel: require("./Theme/ThemePlatformModel"),
|
|
@@ -37,6 +37,11 @@ export = ConfigurationPublicModel;
|
|
|
37
37
|
* redirection is for long time period redirection, and temporary redirection
|
|
38
38
|
* for a short time period.
|
|
39
39
|
*/
|
|
40
|
+
/**
|
|
41
|
+
* @typedef RegionDetails
|
|
42
|
+
* @property {string} [slug] - Region slug identifier.
|
|
43
|
+
* @property {string} [zone] - Zone identifier within the region.
|
|
44
|
+
*/
|
|
40
45
|
/**
|
|
41
46
|
* @typedef ApplicationMeta
|
|
42
47
|
* @property {string} [name] - Indicates the name of application meta
|
|
@@ -82,6 +87,9 @@ export = ConfigurationPublicModel;
|
|
|
82
87
|
* @property {SecureUrl} [mobile_logo]
|
|
83
88
|
* @property {Domain} [domain]
|
|
84
89
|
* @property {string} [slug]
|
|
90
|
+
* @property {string} [region] - Region identifier for the sales channel. When
|
|
91
|
+
* zone is "default", this equals the slug. Otherwise, it is formatted as "slug/zone".
|
|
92
|
+
* @property {RegionDetails} [region_details]
|
|
85
93
|
*/
|
|
86
94
|
/**
|
|
87
95
|
* @typedef NotFound
|
|
@@ -129,7 +137,7 @@ export = ConfigurationPublicModel;
|
|
|
129
137
|
declare class ConfigurationPublicModel {
|
|
130
138
|
}
|
|
131
139
|
declare namespace ConfigurationPublicModel {
|
|
132
|
-
export { ApplicationResponseSchema, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, NotFound, BadRequestSchema, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations };
|
|
140
|
+
export { ApplicationResponseSchema, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, RegionDetails, ApplicationMeta, SecureUrl, Application, NotFound, BadRequestSchema, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations };
|
|
133
141
|
}
|
|
134
142
|
/** @returns {ApplicationResponseSchema} */
|
|
135
143
|
declare function ApplicationResponseSchema(): ApplicationResponseSchema;
|
|
@@ -208,6 +216,18 @@ type ApplicationRedirections = {
|
|
|
208
216
|
*/
|
|
209
217
|
type?: string;
|
|
210
218
|
};
|
|
219
|
+
/** @returns {RegionDetails} */
|
|
220
|
+
declare function RegionDetails(): RegionDetails;
|
|
221
|
+
type RegionDetails = {
|
|
222
|
+
/**
|
|
223
|
+
* - Region slug identifier.
|
|
224
|
+
*/
|
|
225
|
+
slug?: string;
|
|
226
|
+
/**
|
|
227
|
+
* - Zone identifier within the region.
|
|
228
|
+
*/
|
|
229
|
+
zone?: string;
|
|
230
|
+
};
|
|
211
231
|
/** @returns {ApplicationMeta} */
|
|
212
232
|
declare function ApplicationMeta(): ApplicationMeta;
|
|
213
233
|
type ApplicationMeta = {
|
|
@@ -307,6 +327,12 @@ type Application = {
|
|
|
307
327
|
mobile_logo?: SecureUrl;
|
|
308
328
|
domain?: Domain;
|
|
309
329
|
slug?: string;
|
|
330
|
+
/**
|
|
331
|
+
* - Region identifier for the sales channel. When
|
|
332
|
+
* zone is "default", this equals the slug. Otherwise, it is formatted as "slug/zone".
|
|
333
|
+
*/
|
|
334
|
+
region?: string;
|
|
335
|
+
region_details?: RegionDetails;
|
|
310
336
|
};
|
|
311
337
|
/** @returns {NotFound} */
|
|
312
338
|
declare function NotFound(): NotFound;
|
|
@@ -44,6 +44,12 @@ const Joi = require("joi");
|
|
|
44
44
|
* for a short time period.
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @typedef RegionDetails
|
|
49
|
+
* @property {string} [slug] - Region slug identifier.
|
|
50
|
+
* @property {string} [zone] - Zone identifier within the region.
|
|
51
|
+
*/
|
|
52
|
+
|
|
47
53
|
/**
|
|
48
54
|
* @typedef ApplicationMeta
|
|
49
55
|
* @property {string} [name] - Indicates the name of application meta
|
|
@@ -91,6 +97,9 @@ const Joi = require("joi");
|
|
|
91
97
|
* @property {SecureUrl} [mobile_logo]
|
|
92
98
|
* @property {Domain} [domain]
|
|
93
99
|
* @property {string} [slug]
|
|
100
|
+
* @property {string} [region] - Region identifier for the sales channel. When
|
|
101
|
+
* zone is "default", this equals the slug. Otherwise, it is formatted as "slug/zone".
|
|
102
|
+
* @property {RegionDetails} [region_details]
|
|
94
103
|
*/
|
|
95
104
|
|
|
96
105
|
/**
|
|
@@ -193,6 +202,14 @@ class ConfigurationPublicModel {
|
|
|
193
202
|
});
|
|
194
203
|
}
|
|
195
204
|
|
|
205
|
+
/** @returns {RegionDetails} */
|
|
206
|
+
static RegionDetails() {
|
|
207
|
+
return Joi.object({
|
|
208
|
+
slug: Joi.string().allow(""),
|
|
209
|
+
zone: Joi.string().allow(""),
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
196
213
|
/** @returns {ApplicationMeta} */
|
|
197
214
|
static ApplicationMeta() {
|
|
198
215
|
return Joi.object({
|
|
@@ -239,6 +256,8 @@ class ConfigurationPublicModel {
|
|
|
239
256
|
mobile_logo: ConfigurationPublicModel.SecureUrl(),
|
|
240
257
|
domain: ConfigurationPublicModel.Domain(),
|
|
241
258
|
slug: Joi.string().allow(""),
|
|
259
|
+
region: Joi.string().allow(""),
|
|
260
|
+
region_details: ConfigurationPublicModel.RegionDetails(),
|
|
242
261
|
});
|
|
243
262
|
}
|
|
244
263
|
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export = Rewards;
|
|
2
|
-
declare class Rewards {
|
|
3
|
-
constructor(_conf: any);
|
|
4
|
-
_conf: any;
|
|
5
|
-
_relativeUrls: {
|
|
6
|
-
catalogueOrder: string;
|
|
7
|
-
getOfferByName: string;
|
|
8
|
-
getOrderDiscount: string;
|
|
9
|
-
getUserPoints: string;
|
|
10
|
-
getUserPointsHistory: string;
|
|
11
|
-
getUserReferralDetails: string;
|
|
12
|
-
redeemReferralCode: string;
|
|
13
|
-
};
|
|
14
|
-
_urls: {};
|
|
15
|
-
updateUrls(urls: any): void;
|
|
16
|
-
/**
|
|
17
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
18
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
19
|
-
* @returns {Promise<CatalogueOrderDetails>} - Success response
|
|
20
|
-
* @name catalogueOrder
|
|
21
|
-
* @summary: Order from catalogue
|
|
22
|
-
* @description: Place a reward on order items available in the catalogue. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/rewards/catalogueOrder/).
|
|
23
|
-
*/
|
|
24
|
-
catalogueOrder({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CatalogueOrderDetails>;
|
|
25
|
-
/**
|
|
26
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
27
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
28
|
-
* @returns {Promise<Offer>} - Success response
|
|
29
|
-
* @name getOfferByName
|
|
30
|
-
* @summary: Get specific offer
|
|
31
|
-
* @description: Retrieves detailed information about an offer by its name. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/rewards/getOfferByName/).
|
|
32
|
-
*/
|
|
33
|
-
getOfferByName({ name, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<Offer>;
|
|
34
|
-
/**
|
|
35
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
36
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
37
|
-
* @returns {Promise<OrderDiscountDetails>} - Success response
|
|
38
|
-
* @name getOrderDiscount
|
|
39
|
-
* @summary: Order discount
|
|
40
|
-
* @description: Retrieve the discount applied to a specific order. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/rewards/getOrderDiscount/).
|
|
41
|
-
*/
|
|
42
|
-
getOrderDiscount({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<OrderDiscountDetails>;
|
|
43
|
-
/**
|
|
44
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
45
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
46
|
-
* @returns {Promise<PointsDetails>} - Success response
|
|
47
|
-
* @name getUserPoints
|
|
48
|
-
* @summary: Current points
|
|
49
|
-
* @description: Retrieves the current reward points balance for the user. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/rewards/getUserPoints/).
|
|
50
|
-
*/
|
|
51
|
-
getUserPoints({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PointsDetails>;
|
|
52
|
-
/**
|
|
53
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
54
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
55
|
-
* @returns {Promise<PointsHistoryDetails>} - Success response
|
|
56
|
-
* @name getUserPointsHistory
|
|
57
|
-
* @summary: Points history
|
|
58
|
-
* @description: Gets the historical data of points earned or spent by the user. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/rewards/getUserPointsHistory/).
|
|
59
|
-
*/
|
|
60
|
-
getUserPointsHistory({ pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PointsHistoryDetails>;
|
|
61
|
-
/**
|
|
62
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
63
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
64
|
-
* @returns {Promise<ReferralDetails>} - Success response
|
|
65
|
-
* @name getUserReferralDetails
|
|
66
|
-
* @summary: Referral details
|
|
67
|
-
* @description: Gets the details of the user’s referral status and codes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/rewards/getUserReferralDetails/).
|
|
68
|
-
*/
|
|
69
|
-
getUserReferralDetails({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ReferralDetails>;
|
|
70
|
-
/**
|
|
71
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
72
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
73
|
-
* @returns {Promise<RedeemReferralCodeDetails>} - Success response
|
|
74
|
-
* @name redeemReferralCode
|
|
75
|
-
* @summary: Redeem code
|
|
76
|
-
* @description: Applies a referral code to earn or redeem rewards. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/rewards/redeemReferralCode/).
|
|
77
|
-
*/
|
|
78
|
-
redeemReferralCode({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<RedeemReferralCodeDetails>;
|
|
79
|
-
}
|