@gofynd/fdk-client-javascript 1.3.11-beta.7 → 1.4.0-beta.1
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/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +5 -3
- package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
- package/sdk/application/Cart/CartApplicationModel.js +74 -0
- package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
- package/sdk/application/Cart/CartApplicationValidator.js +4 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
- package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
- package/sdk/application/Content/ContentApplicationClient.js +246 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
- package/sdk/application/Content/ContentApplicationModel.js +252 -0
- package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
- package/sdk/application/Content/ContentApplicationValidator.js +41 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
- package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +32 -8
- package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
- package/sdk/application/Order/OrderApplicationModel.js +6 -0
- package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
- package/sdk/application/Order/OrderApplicationValidator.js +8 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
- package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
- package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
- package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
- package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
- package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
- package/sdk/application/User/UserApplicationClient.d.ts +33 -0
- package/sdk/application/User/UserApplicationClient.js +239 -0
- package/sdk/application/User/UserApplicationModel.d.ts +28 -13
- package/sdk/application/User/UserApplicationModel.js +36 -12
- package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
- package/sdk/application/User/UserApplicationValidator.js +36 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +3 -15
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -14
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
- package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
- package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
- package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
- package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
- package/sdk/platform/Cart/CartPlatformModel.js +71 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
- package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3641 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +351 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +410 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2011 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1100 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1362 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +247 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +319 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +18 -19
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -18
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
- package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
- package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1032 -470
- package/sdk/platform/Order/OrderPlatformModel.js +1187 -534
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
- package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
- package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +4 -2
- package/sdk/platform/PlatformClient.js +8 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
- package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
- package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
- package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
- package/sdk/platform/User/UserPlatformModel.js +256 -5
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
- package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
- package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
- package/sdk/public/Billing/BillingPublicClient.js +116 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
- package/sdk/public/Billing/BillingPublicModel.js +96 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
- package/sdk/public/Billing/BillingPublicValidator.js +19 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +114 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
- package/sdk/public/Content/ContentPublicModel.js +60 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +4 -0
- package/sdk/public/PublicClient.js +8 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
- package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
|
@@ -25,6 +25,8 @@ class User {
|
|
|
25
25
|
"/service/application/user/authentication/v1.0/sessions",
|
|
26
26
|
getLoggedInUser: "/service/application/user/authentication/v1.0/session",
|
|
27
27
|
getPlatformConfig: "/service/application/user/platform/v1.0/config",
|
|
28
|
+
getUserAttributes:
|
|
29
|
+
"/service/application/user/profile/v1.0/user-attributes",
|
|
28
30
|
hasPassword: "/service/application/user/authentication/v1.0/has-password",
|
|
29
31
|
loginWithAppleIOS:
|
|
30
32
|
"/service/application/user/authentication/v1.0/login/apple-ios",
|
|
@@ -69,6 +71,9 @@ class User {
|
|
|
69
71
|
"/service/application/user/profile/v1.0/mobile/primary",
|
|
70
72
|
updatePassword: "/service/application/user/authentication/v1.0/password",
|
|
71
73
|
updateProfile: "/service/application/user/profile/v1.0/detail",
|
|
74
|
+
updateUserAttributes:
|
|
75
|
+
"/service/application/user/profile/v1.0/user-attributes",
|
|
76
|
+
userExists: "/service/application/user/authentication/v1.0/user-exists",
|
|
72
77
|
verifyEmail: "/service/application/user/authentication/v1.0/verify/email",
|
|
73
78
|
verifyEmailForgotOTP:
|
|
74
79
|
"/service/application/user/authentication/v1.0/otp/forgot/email/verify",
|
|
@@ -819,6 +824,85 @@ class User {
|
|
|
819
824
|
return response;
|
|
820
825
|
}
|
|
821
826
|
|
|
827
|
+
/**
|
|
828
|
+
* @param {UserApplicationValidator.GetUserAttributesParam} arg - Arg object.
|
|
829
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
830
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
831
|
+
* @returns {Promise<UserApplicationModel.UserAttributes>} - Success response
|
|
832
|
+
* @name getUserAttributes
|
|
833
|
+
* @summary: Get user attributes
|
|
834
|
+
* @description: Use this API to get the list of user attributes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getUserAttributes/).
|
|
835
|
+
*/
|
|
836
|
+
async getUserAttributes(
|
|
837
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
838
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
839
|
+
) {
|
|
840
|
+
const { error } = UserApplicationValidator.getUserAttributes().validate(
|
|
841
|
+
{ slug },
|
|
842
|
+
{ abortEarly: false, allowUnknown: true }
|
|
843
|
+
);
|
|
844
|
+
if (error) {
|
|
845
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
// Showing warrnings if extra unknown parameters are found
|
|
849
|
+
const {
|
|
850
|
+
error: warrning,
|
|
851
|
+
} = UserApplicationValidator.getUserAttributes().validate(
|
|
852
|
+
{ slug },
|
|
853
|
+
{ abortEarly: false, allowUnknown: false }
|
|
854
|
+
);
|
|
855
|
+
if (warrning) {
|
|
856
|
+
Logger({
|
|
857
|
+
level: "WARN",
|
|
858
|
+
message: `Parameter Validation warrnings for application > User > getUserAttributes \n ${warrning}`,
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
const query_params = {};
|
|
863
|
+
query_params["slug"] = slug;
|
|
864
|
+
|
|
865
|
+
const xHeaders = {};
|
|
866
|
+
|
|
867
|
+
const response = await ApplicationAPIClient.execute(
|
|
868
|
+
this._conf,
|
|
869
|
+
"get",
|
|
870
|
+
constructUrl({
|
|
871
|
+
url: this._urls["getUserAttributes"],
|
|
872
|
+
params: {},
|
|
873
|
+
}),
|
|
874
|
+
query_params,
|
|
875
|
+
undefined,
|
|
876
|
+
{ ...xHeaders, ...requestHeaders },
|
|
877
|
+
{ responseHeaders }
|
|
878
|
+
);
|
|
879
|
+
|
|
880
|
+
let responseData = response;
|
|
881
|
+
if (responseHeaders) {
|
|
882
|
+
responseData = response[0];
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
const {
|
|
886
|
+
error: res_error,
|
|
887
|
+
} = UserApplicationModel.UserAttributes().validate(responseData, {
|
|
888
|
+
abortEarly: false,
|
|
889
|
+
allowUnknown: true,
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
if (res_error) {
|
|
893
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
894
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
895
|
+
} else {
|
|
896
|
+
Logger({
|
|
897
|
+
level: "WARN",
|
|
898
|
+
message: `Response Validation Warnings for application > User > getUserAttributes \n ${res_error}`,
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
return response;
|
|
904
|
+
}
|
|
905
|
+
|
|
822
906
|
/**
|
|
823
907
|
* @param {UserApplicationValidator.HasPasswordParam} arg - Arg object.
|
|
824
908
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2801,6 +2885,161 @@ class User {
|
|
|
2801
2885
|
return response;
|
|
2802
2886
|
}
|
|
2803
2887
|
|
|
2888
|
+
/**
|
|
2889
|
+
* @param {UserApplicationValidator.UpdateUserAttributesParam} arg - Arg object.
|
|
2890
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2891
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2892
|
+
* @returns {Promise<UserApplicationModel.UserAttributes>} - Success response
|
|
2893
|
+
* @name updateUserAttributes
|
|
2894
|
+
* @summary: Update user attributes
|
|
2895
|
+
* @description: Use this API to update user attributes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updateUserAttributes/).
|
|
2896
|
+
*/
|
|
2897
|
+
async updateUserAttributes(
|
|
2898
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2899
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2900
|
+
) {
|
|
2901
|
+
const { error } = UserApplicationValidator.updateUserAttributes().validate(
|
|
2902
|
+
{ body },
|
|
2903
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2904
|
+
);
|
|
2905
|
+
if (error) {
|
|
2906
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2910
|
+
const {
|
|
2911
|
+
error: warrning,
|
|
2912
|
+
} = UserApplicationValidator.updateUserAttributes().validate(
|
|
2913
|
+
{ body },
|
|
2914
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2915
|
+
);
|
|
2916
|
+
if (warrning) {
|
|
2917
|
+
Logger({
|
|
2918
|
+
level: "WARN",
|
|
2919
|
+
message: `Parameter Validation warrnings for application > User > updateUserAttributes \n ${warrning}`,
|
|
2920
|
+
});
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
const query_params = {};
|
|
2924
|
+
|
|
2925
|
+
const xHeaders = {};
|
|
2926
|
+
|
|
2927
|
+
const response = await ApplicationAPIClient.execute(
|
|
2928
|
+
this._conf,
|
|
2929
|
+
"patch",
|
|
2930
|
+
constructUrl({
|
|
2931
|
+
url: this._urls["updateUserAttributes"],
|
|
2932
|
+
params: {},
|
|
2933
|
+
}),
|
|
2934
|
+
query_params,
|
|
2935
|
+
body,
|
|
2936
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2937
|
+
{ responseHeaders }
|
|
2938
|
+
);
|
|
2939
|
+
|
|
2940
|
+
let responseData = response;
|
|
2941
|
+
if (responseHeaders) {
|
|
2942
|
+
responseData = response[0];
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
const {
|
|
2946
|
+
error: res_error,
|
|
2947
|
+
} = UserApplicationModel.UserAttributes().validate(responseData, {
|
|
2948
|
+
abortEarly: false,
|
|
2949
|
+
allowUnknown: true,
|
|
2950
|
+
});
|
|
2951
|
+
|
|
2952
|
+
if (res_error) {
|
|
2953
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2954
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2955
|
+
} else {
|
|
2956
|
+
Logger({
|
|
2957
|
+
level: "WARN",
|
|
2958
|
+
message: `Response Validation Warnings for application > User > updateUserAttributes \n ${res_error}`,
|
|
2959
|
+
});
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
return response;
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2966
|
+
/**
|
|
2967
|
+
* @param {UserApplicationValidator.UserExistsParam} arg - Arg object.
|
|
2968
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2969
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2970
|
+
* @returns {Promise<UserApplicationModel.UserExistsResponse>} - Success response
|
|
2971
|
+
* @name userExists
|
|
2972
|
+
* @summary: Check user is already registered or not
|
|
2973
|
+
* @description: Use this API to check whether user is already registered or not to the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/userExists/).
|
|
2974
|
+
*/
|
|
2975
|
+
async userExists(
|
|
2976
|
+
{ q, requestHeaders } = { requestHeaders: {} },
|
|
2977
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2978
|
+
) {
|
|
2979
|
+
const { error } = UserApplicationValidator.userExists().validate(
|
|
2980
|
+
{ q },
|
|
2981
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2982
|
+
);
|
|
2983
|
+
if (error) {
|
|
2984
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2985
|
+
}
|
|
2986
|
+
|
|
2987
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2988
|
+
const { error: warrning } = UserApplicationValidator.userExists().validate(
|
|
2989
|
+
{ q },
|
|
2990
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2991
|
+
);
|
|
2992
|
+
if (warrning) {
|
|
2993
|
+
Logger({
|
|
2994
|
+
level: "WARN",
|
|
2995
|
+
message: `Parameter Validation warrnings for application > User > userExists \n ${warrning}`,
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
const query_params = {};
|
|
3000
|
+
query_params["q"] = q;
|
|
3001
|
+
|
|
3002
|
+
const xHeaders = {};
|
|
3003
|
+
|
|
3004
|
+
const response = await ApplicationAPIClient.execute(
|
|
3005
|
+
this._conf,
|
|
3006
|
+
"get",
|
|
3007
|
+
constructUrl({
|
|
3008
|
+
url: this._urls["userExists"],
|
|
3009
|
+
params: {},
|
|
3010
|
+
}),
|
|
3011
|
+
query_params,
|
|
3012
|
+
undefined,
|
|
3013
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3014
|
+
{ responseHeaders }
|
|
3015
|
+
);
|
|
3016
|
+
|
|
3017
|
+
let responseData = response;
|
|
3018
|
+
if (responseHeaders) {
|
|
3019
|
+
responseData = response[0];
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
const {
|
|
3023
|
+
error: res_error,
|
|
3024
|
+
} = UserApplicationModel.UserExistsResponse().validate(responseData, {
|
|
3025
|
+
abortEarly: false,
|
|
3026
|
+
allowUnknown: true,
|
|
3027
|
+
});
|
|
3028
|
+
|
|
3029
|
+
if (res_error) {
|
|
3030
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
3031
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3032
|
+
} else {
|
|
3033
|
+
Logger({
|
|
3034
|
+
level: "WARN",
|
|
3035
|
+
message: `Response Validation Warnings for application > User > userExists \n ${res_error}`,
|
|
3036
|
+
});
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3040
|
+
return response;
|
|
3041
|
+
}
|
|
3042
|
+
|
|
2804
3043
|
/**
|
|
2805
3044
|
* @param {UserApplicationValidator.VerifyEmailParam} arg - Arg object.
|
|
2806
3045
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -202,7 +202,6 @@ export = UserApplicationModel;
|
|
|
202
202
|
*/
|
|
203
203
|
/**
|
|
204
204
|
* @typedef PasswordLoginRequestSchema
|
|
205
|
-
* @property {string} [captcha_code]
|
|
206
205
|
* @property {string} [password]
|
|
207
206
|
* @property {string} [username]
|
|
208
207
|
*/
|
|
@@ -323,7 +322,6 @@ export = UserApplicationModel;
|
|
|
323
322
|
/**
|
|
324
323
|
* @typedef SendEmailOtpRequestSchema
|
|
325
324
|
* @property {string} [action]
|
|
326
|
-
* @property {string} [captcha_code]
|
|
327
325
|
* @property {string} [email]
|
|
328
326
|
* @property {string} [register_token]
|
|
329
327
|
* @property {string} [token]
|
|
@@ -344,7 +342,6 @@ export = UserApplicationModel;
|
|
|
344
342
|
* @typedef SendMobileOtpRequestSchema
|
|
345
343
|
* @property {string} [action]
|
|
346
344
|
* @property {string} [android_hash]
|
|
347
|
-
* @property {string} [captcha_code]
|
|
348
345
|
* @property {string} [country_code]
|
|
349
346
|
* @property {string} [force]
|
|
350
347
|
* @property {string} [mobile]
|
|
@@ -357,7 +354,6 @@ export = UserApplicationModel;
|
|
|
357
354
|
/**
|
|
358
355
|
* @typedef SendOtpRequestSchema
|
|
359
356
|
* @property {string} [android_hash]
|
|
360
|
-
* @property {string} [captcha_code]
|
|
361
357
|
* @property {string} [country_code]
|
|
362
358
|
* @property {string} [mobile]
|
|
363
359
|
*/
|
|
@@ -379,12 +375,10 @@ export = UserApplicationModel;
|
|
|
379
375
|
*/
|
|
380
376
|
/**
|
|
381
377
|
* @typedef SendResetPasswordEmailRequestSchema
|
|
382
|
-
* @property {string} [captcha_code]
|
|
383
378
|
* @property {string} [email]
|
|
384
379
|
*/
|
|
385
380
|
/**
|
|
386
381
|
* @typedef SendResetPasswordMobileRequestSchema
|
|
387
|
-
* @property {string} [captcha_code]
|
|
388
382
|
* @property {string} [country_code]
|
|
389
383
|
* @property {string} [mobile]
|
|
390
384
|
*/
|
|
@@ -428,6 +422,18 @@ export = UserApplicationModel;
|
|
|
428
422
|
* @property {string} [new_password]
|
|
429
423
|
* @property {string} [old_password]
|
|
430
424
|
*/
|
|
425
|
+
/**
|
|
426
|
+
* @typedef UpdateUserAttributesRequest
|
|
427
|
+
* @property {Object} [attributes]
|
|
428
|
+
*/
|
|
429
|
+
/**
|
|
430
|
+
* @typedef UserAttributes
|
|
431
|
+
* @property {Object} [attributes]
|
|
432
|
+
*/
|
|
433
|
+
/**
|
|
434
|
+
* @typedef UserExistsResponse
|
|
435
|
+
* @property {boolean} [user_exists]
|
|
436
|
+
*/
|
|
431
437
|
/**
|
|
432
438
|
* @typedef UserObjectSchema
|
|
433
439
|
* @property {UserSchema} [user]
|
|
@@ -502,7 +508,7 @@ export = UserApplicationModel;
|
|
|
502
508
|
declare class UserApplicationModel {
|
|
503
509
|
}
|
|
504
510
|
declare namespace UserApplicationModel {
|
|
505
|
-
export { Accountkit, APIError, AuthenticationApiErrorSchema, AuthenticationInternalServerErrorSchema, AuthSuccess, CodeRequestBodySchema, DeleteAccountConsent, DeleteAccountReasons, DeleteApplicationUserRequestSchema, DeleteUserSuccess, EditEmailRequestSchema, EditMobileRequestSchema, EditProfileMobileSchema, EditProfileRequestSchema, Email, EmailOtpSuccess, Facebook, FlashCard, ForgotPasswordRequestSchema, FormRegisterRequestSchema, FormRegisterRequestSchemaPhone, Google, HasPasswordSuccess, Login, LoginSuccess, LogoutSuccess, LookAndFeel, MetaSchema, OAuthRequestAppleSchema, OAuthRequestAppleSchemaOauth, OAuthRequestAppleSchemaProfile, OAuthRequestSchema, OAuthRequestSchemaOauth2, OAuthRequestSchemaProfile, OtpSuccess, PasswordLoginRequestSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, ProfileEditSuccess, RegisterFormSuccess, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, ResetForgotPasswordSuccess, ResetPasswordSuccess, SendEmailForgotOtpRequestSchema, SendEmailOtpRequestSchema, SendEmailVerifyLinkSuccess, SendMobileForgotOtpRequestSchema, SendMobileOtpRequestSchema, SendMobileVerifyLinkSuccess, SendOtpRequestSchema, SendOtpResponse, SendResetPasswordEmailRequestSchema, SendResetPasswordMobileRequestSchema, SendVerificationLinkMobileRequestSchema, SessionExpiry, SessionListSuccess, Social, SocialTokens, TokenRequestBodySchema, UpdatePasswordRequestSchema, UserObjectSchema, UserSchema, VerifyEmailForgotOtpRequestSchema, VerifyEmailOtpRequestSchema, VerifyEmailOTPSuccess, VerifyEmailSuccess, VerifyForgotOtpSuccess, VerifyMobileForgotOtpRequestSchema, VerifyMobileOTPSuccess, VerifyOtpRequestSchema, VerifyOtpSuccess };
|
|
511
|
+
export { Accountkit, APIError, AuthenticationApiErrorSchema, AuthenticationInternalServerErrorSchema, AuthSuccess, CodeRequestBodySchema, DeleteAccountConsent, DeleteAccountReasons, DeleteApplicationUserRequestSchema, DeleteUserSuccess, EditEmailRequestSchema, EditMobileRequestSchema, EditProfileMobileSchema, EditProfileRequestSchema, Email, EmailOtpSuccess, Facebook, FlashCard, ForgotPasswordRequestSchema, FormRegisterRequestSchema, FormRegisterRequestSchemaPhone, Google, HasPasswordSuccess, Login, LoginSuccess, LogoutSuccess, LookAndFeel, MetaSchema, OAuthRequestAppleSchema, OAuthRequestAppleSchemaOauth, OAuthRequestAppleSchemaProfile, OAuthRequestSchema, OAuthRequestSchemaOauth2, OAuthRequestSchemaProfile, OtpSuccess, PasswordLoginRequestSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, ProfileEditSuccess, RegisterFormSuccess, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, ResetForgotPasswordSuccess, ResetPasswordSuccess, SendEmailForgotOtpRequestSchema, SendEmailOtpRequestSchema, SendEmailVerifyLinkSuccess, SendMobileForgotOtpRequestSchema, SendMobileOtpRequestSchema, SendMobileVerifyLinkSuccess, SendOtpRequestSchema, SendOtpResponse, SendResetPasswordEmailRequestSchema, SendResetPasswordMobileRequestSchema, SendVerificationLinkMobileRequestSchema, SessionExpiry, SessionListSuccess, Social, SocialTokens, TokenRequestBodySchema, UpdatePasswordRequestSchema, UpdateUserAttributesRequest, UserAttributes, UserExistsResponse, UserObjectSchema, UserSchema, VerifyEmailForgotOtpRequestSchema, VerifyEmailOtpRequestSchema, VerifyEmailOTPSuccess, VerifyEmailSuccess, VerifyForgotOtpSuccess, VerifyMobileForgotOtpRequestSchema, VerifyMobileOTPSuccess, VerifyOtpRequestSchema, VerifyOtpSuccess };
|
|
506
512
|
}
|
|
507
513
|
/** @returns {Accountkit} */
|
|
508
514
|
declare function Accountkit(): Accountkit;
|
|
@@ -746,7 +752,6 @@ type OtpSuccess = {
|
|
|
746
752
|
/** @returns {PasswordLoginRequestSchema} */
|
|
747
753
|
declare function PasswordLoginRequestSchema(): PasswordLoginRequestSchema;
|
|
748
754
|
type PasswordLoginRequestSchema = {
|
|
749
|
-
captcha_code?: string;
|
|
750
755
|
password?: string;
|
|
751
756
|
username?: string;
|
|
752
757
|
};
|
|
@@ -881,7 +886,6 @@ type SendEmailForgotOtpRequestSchema = {
|
|
|
881
886
|
declare function SendEmailOtpRequestSchema(): SendEmailOtpRequestSchema;
|
|
882
887
|
type SendEmailOtpRequestSchema = {
|
|
883
888
|
action?: string;
|
|
884
|
-
captcha_code?: string;
|
|
885
889
|
email?: string;
|
|
886
890
|
register_token?: string;
|
|
887
891
|
token?: string;
|
|
@@ -905,7 +909,6 @@ declare function SendMobileOtpRequestSchema(): SendMobileOtpRequestSchema;
|
|
|
905
909
|
type SendMobileOtpRequestSchema = {
|
|
906
910
|
action?: string;
|
|
907
911
|
android_hash?: string;
|
|
908
|
-
captcha_code?: string;
|
|
909
912
|
country_code?: string;
|
|
910
913
|
force?: string;
|
|
911
914
|
mobile?: string;
|
|
@@ -920,7 +923,6 @@ type SendMobileVerifyLinkSuccess = {
|
|
|
920
923
|
declare function SendOtpRequestSchema(): SendOtpRequestSchema;
|
|
921
924
|
type SendOtpRequestSchema = {
|
|
922
925
|
android_hash?: string;
|
|
923
|
-
captcha_code?: string;
|
|
924
926
|
country_code?: string;
|
|
925
927
|
mobile?: string;
|
|
926
928
|
};
|
|
@@ -944,13 +946,11 @@ type SendOtpResponse = {
|
|
|
944
946
|
/** @returns {SendResetPasswordEmailRequestSchema} */
|
|
945
947
|
declare function SendResetPasswordEmailRequestSchema(): SendResetPasswordEmailRequestSchema;
|
|
946
948
|
type SendResetPasswordEmailRequestSchema = {
|
|
947
|
-
captcha_code?: string;
|
|
948
949
|
email?: string;
|
|
949
950
|
};
|
|
950
951
|
/** @returns {SendResetPasswordMobileRequestSchema} */
|
|
951
952
|
declare function SendResetPasswordMobileRequestSchema(): SendResetPasswordMobileRequestSchema;
|
|
952
953
|
type SendResetPasswordMobileRequestSchema = {
|
|
953
|
-
captcha_code?: string;
|
|
954
954
|
country_code?: string;
|
|
955
955
|
mobile?: string;
|
|
956
956
|
};
|
|
@@ -1001,6 +1001,21 @@ type UpdatePasswordRequestSchema = {
|
|
|
1001
1001
|
new_password?: string;
|
|
1002
1002
|
old_password?: string;
|
|
1003
1003
|
};
|
|
1004
|
+
/** @returns {UpdateUserAttributesRequest} */
|
|
1005
|
+
declare function UpdateUserAttributesRequest(): UpdateUserAttributesRequest;
|
|
1006
|
+
type UpdateUserAttributesRequest = {
|
|
1007
|
+
attributes?: any;
|
|
1008
|
+
};
|
|
1009
|
+
/** @returns {UserAttributes} */
|
|
1010
|
+
declare function UserAttributes(): UserAttributes;
|
|
1011
|
+
type UserAttributes = {
|
|
1012
|
+
attributes?: any;
|
|
1013
|
+
};
|
|
1014
|
+
/** @returns {UserExistsResponse} */
|
|
1015
|
+
declare function UserExistsResponse(): UserExistsResponse;
|
|
1016
|
+
type UserExistsResponse = {
|
|
1017
|
+
user_exists?: boolean;
|
|
1018
|
+
};
|
|
1004
1019
|
/** @returns {UserObjectSchema} */
|
|
1005
1020
|
declare function UserObjectSchema(): UserObjectSchema;
|
|
1006
1021
|
type UserObjectSchema = {
|
|
@@ -238,7 +238,6 @@ const Joi = require("joi");
|
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
240
|
* @typedef PasswordLoginRequestSchema
|
|
241
|
-
* @property {string} [captcha_code]
|
|
242
241
|
* @property {string} [password]
|
|
243
242
|
* @property {string} [username]
|
|
244
243
|
*/
|
|
@@ -373,7 +372,6 @@ const Joi = require("joi");
|
|
|
373
372
|
/**
|
|
374
373
|
* @typedef SendEmailOtpRequestSchema
|
|
375
374
|
* @property {string} [action]
|
|
376
|
-
* @property {string} [captcha_code]
|
|
377
375
|
* @property {string} [email]
|
|
378
376
|
* @property {string} [register_token]
|
|
379
377
|
* @property {string} [token]
|
|
@@ -397,7 +395,6 @@ const Joi = require("joi");
|
|
|
397
395
|
* @typedef SendMobileOtpRequestSchema
|
|
398
396
|
* @property {string} [action]
|
|
399
397
|
* @property {string} [android_hash]
|
|
400
|
-
* @property {string} [captcha_code]
|
|
401
398
|
* @property {string} [country_code]
|
|
402
399
|
* @property {string} [force]
|
|
403
400
|
* @property {string} [mobile]
|
|
@@ -412,7 +409,6 @@ const Joi = require("joi");
|
|
|
412
409
|
/**
|
|
413
410
|
* @typedef SendOtpRequestSchema
|
|
414
411
|
* @property {string} [android_hash]
|
|
415
|
-
* @property {string} [captcha_code]
|
|
416
412
|
* @property {string} [country_code]
|
|
417
413
|
* @property {string} [mobile]
|
|
418
414
|
*/
|
|
@@ -436,13 +432,11 @@ const Joi = require("joi");
|
|
|
436
432
|
|
|
437
433
|
/**
|
|
438
434
|
* @typedef SendResetPasswordEmailRequestSchema
|
|
439
|
-
* @property {string} [captcha_code]
|
|
440
435
|
* @property {string} [email]
|
|
441
436
|
*/
|
|
442
437
|
|
|
443
438
|
/**
|
|
444
439
|
* @typedef SendResetPasswordMobileRequestSchema
|
|
445
|
-
* @property {string} [captcha_code]
|
|
446
440
|
* @property {string} [country_code]
|
|
447
441
|
* @property {string} [mobile]
|
|
448
442
|
*/
|
|
@@ -494,6 +488,21 @@ const Joi = require("joi");
|
|
|
494
488
|
* @property {string} [old_password]
|
|
495
489
|
*/
|
|
496
490
|
|
|
491
|
+
/**
|
|
492
|
+
* @typedef UpdateUserAttributesRequest
|
|
493
|
+
* @property {Object} [attributes]
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @typedef UserAttributes
|
|
498
|
+
* @property {Object} [attributes]
|
|
499
|
+
*/
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @typedef UserExistsResponse
|
|
503
|
+
* @property {boolean} [user_exists]
|
|
504
|
+
*/
|
|
505
|
+
|
|
497
506
|
/**
|
|
498
507
|
* @typedef UserObjectSchema
|
|
499
508
|
* @property {UserSchema} [user]
|
|
@@ -886,7 +895,6 @@ class UserApplicationModel {
|
|
|
886
895
|
/** @returns {PasswordLoginRequestSchema} */
|
|
887
896
|
static PasswordLoginRequestSchema() {
|
|
888
897
|
return Joi.object({
|
|
889
|
-
captcha_code: Joi.string().allow(""),
|
|
890
898
|
password: Joi.string().allow(""),
|
|
891
899
|
username: Joi.string().allow(""),
|
|
892
900
|
});
|
|
@@ -1051,7 +1059,6 @@ class UserApplicationModel {
|
|
|
1051
1059
|
static SendEmailOtpRequestSchema() {
|
|
1052
1060
|
return Joi.object({
|
|
1053
1061
|
action: Joi.string().allow(""),
|
|
1054
|
-
captcha_code: Joi.string().allow(""),
|
|
1055
1062
|
email: Joi.string().allow(""),
|
|
1056
1063
|
register_token: Joi.string().allow(""),
|
|
1057
1064
|
token: Joi.string().allow(""),
|
|
@@ -1081,7 +1088,6 @@ class UserApplicationModel {
|
|
|
1081
1088
|
return Joi.object({
|
|
1082
1089
|
action: Joi.string().allow(""),
|
|
1083
1090
|
android_hash: Joi.string().allow(""),
|
|
1084
|
-
captcha_code: Joi.string().allow(""),
|
|
1085
1091
|
country_code: Joi.string().allow(""),
|
|
1086
1092
|
force: Joi.string().allow(""),
|
|
1087
1093
|
mobile: Joi.string().allow(""),
|
|
@@ -1100,7 +1106,6 @@ class UserApplicationModel {
|
|
|
1100
1106
|
static SendOtpRequestSchema() {
|
|
1101
1107
|
return Joi.object({
|
|
1102
1108
|
android_hash: Joi.string().allow(""),
|
|
1103
|
-
captcha_code: Joi.string().allow(""),
|
|
1104
1109
|
country_code: Joi.string().allow(""),
|
|
1105
1110
|
mobile: Joi.string().allow(""),
|
|
1106
1111
|
});
|
|
@@ -1128,7 +1133,6 @@ class UserApplicationModel {
|
|
|
1128
1133
|
/** @returns {SendResetPasswordEmailRequestSchema} */
|
|
1129
1134
|
static SendResetPasswordEmailRequestSchema() {
|
|
1130
1135
|
return Joi.object({
|
|
1131
|
-
captcha_code: Joi.string().allow(""),
|
|
1132
1136
|
email: Joi.string().allow(""),
|
|
1133
1137
|
});
|
|
1134
1138
|
}
|
|
@@ -1136,7 +1140,6 @@ class UserApplicationModel {
|
|
|
1136
1140
|
/** @returns {SendResetPasswordMobileRequestSchema} */
|
|
1137
1141
|
static SendResetPasswordMobileRequestSchema() {
|
|
1138
1142
|
return Joi.object({
|
|
1139
|
-
captcha_code: Joi.string().allow(""),
|
|
1140
1143
|
country_code: Joi.string().allow(""),
|
|
1141
1144
|
mobile: Joi.string().allow(""),
|
|
1142
1145
|
});
|
|
@@ -1203,6 +1206,27 @@ class UserApplicationModel {
|
|
|
1203
1206
|
});
|
|
1204
1207
|
}
|
|
1205
1208
|
|
|
1209
|
+
/** @returns {UpdateUserAttributesRequest} */
|
|
1210
|
+
static UpdateUserAttributesRequest() {
|
|
1211
|
+
return Joi.object({
|
|
1212
|
+
attributes: Joi.any(),
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
/** @returns {UserAttributes} */
|
|
1217
|
+
static UserAttributes() {
|
|
1218
|
+
return Joi.object({
|
|
1219
|
+
attributes: Joi.any(),
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/** @returns {UserExistsResponse} */
|
|
1224
|
+
static UserExistsResponse() {
|
|
1225
|
+
return Joi.object({
|
|
1226
|
+
user_exists: Joi.boolean(),
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1206
1230
|
/** @returns {UserObjectSchema} */
|
|
1207
1231
|
static UserObjectSchema() {
|
|
1208
1232
|
return Joi.object({
|
|
@@ -48,6 +48,10 @@ export = UserApplicationValidator;
|
|
|
48
48
|
* @typedef GetPlatformConfigParam
|
|
49
49
|
* @property {string} [name] - Name of the application, e.g. Fynd
|
|
50
50
|
*/
|
|
51
|
+
/**
|
|
52
|
+
* @typedef GetUserAttributesParam
|
|
53
|
+
* @property {string} [slug] - Filter by attribute slug.
|
|
54
|
+
*/
|
|
51
55
|
/** @typedef HasPasswordParam */
|
|
52
56
|
/**
|
|
53
57
|
* @typedef LoginWithAppleIOSParam
|
|
@@ -158,6 +162,14 @@ export = UserApplicationValidator;
|
|
|
158
162
|
* @property {string} [platform] - ID of the application
|
|
159
163
|
* @property {UserApplicationModel.EditProfileRequestSchema} body
|
|
160
164
|
*/
|
|
165
|
+
/**
|
|
166
|
+
* @typedef UpdateUserAttributesParam
|
|
167
|
+
* @property {UserApplicationModel.UpdateUserAttributesRequest} body
|
|
168
|
+
*/
|
|
169
|
+
/**
|
|
170
|
+
* @typedef UserExistsParam
|
|
171
|
+
* @property {string} q - Email id or phone number of user
|
|
172
|
+
*/
|
|
161
173
|
/**
|
|
162
174
|
* @typedef VerifyEmailParam
|
|
163
175
|
* @property {UserApplicationModel.CodeRequestBodySchema} body
|
|
@@ -205,6 +217,8 @@ declare class UserApplicationValidator {
|
|
|
205
217
|
static getLoggedInUser(): any;
|
|
206
218
|
/** @returns {GetPlatformConfigParam} */
|
|
207
219
|
static getPlatformConfig(): GetPlatformConfigParam;
|
|
220
|
+
/** @returns {GetUserAttributesParam} */
|
|
221
|
+
static getUserAttributes(): GetUserAttributesParam;
|
|
208
222
|
/** @returns {HasPasswordParam} */
|
|
209
223
|
static hasPassword(): any;
|
|
210
224
|
/** @returns {LoginWithAppleIOSParam} */
|
|
@@ -255,6 +269,10 @@ declare class UserApplicationValidator {
|
|
|
255
269
|
static updatePassword(): UpdatePasswordParam;
|
|
256
270
|
/** @returns {UpdateProfileParam} */
|
|
257
271
|
static updateProfile(): UpdateProfileParam;
|
|
272
|
+
/** @returns {UpdateUserAttributesParam} */
|
|
273
|
+
static updateUserAttributes(): UpdateUserAttributesParam;
|
|
274
|
+
/** @returns {UserExistsParam} */
|
|
275
|
+
static userExists(): UserExistsParam;
|
|
258
276
|
/** @returns {VerifyEmailParam} */
|
|
259
277
|
static verifyEmail(): VerifyEmailParam;
|
|
260
278
|
/** @returns {VerifyEmailForgotOTPParam} */
|
|
@@ -269,7 +287,7 @@ declare class UserApplicationValidator {
|
|
|
269
287
|
static verifyMobileOTP(): VerifyMobileOTPParam;
|
|
270
288
|
}
|
|
271
289
|
declare namespace UserApplicationValidator {
|
|
272
|
-
export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam, HasPasswordParam, LoginWithAppleIOSParam, LoginWithEmailAndPasswordParam, LoginWithFacebookParam, LoginWithGoogleParam, LoginWithGoogleAndroidParam, LoginWithGoogleIOSParam, LoginWithOTPParam, LoginWithTokenParam, LogoutParam, RegisterWithFormParam, ResetForgotPasswordParam, SendForgotOTPOnEmailParam, SendForgotOTPOnMobileParam, SendOTPOnEmailParam, SendOTPOnMobileParam, SendResetPasswordEmailParam, SendResetPasswordMobileParam, SendResetTokenParam, SendVerificationLinkToEmailParam, SendVerificationLinkToMobileParam, SetEmailAsPrimaryParam, SetMobileNumberAsPrimaryParam, UpdatePasswordParam, UpdateProfileParam, VerifyEmailParam, VerifyEmailForgotOTPParam, VerifyEmailOTPParam, VerifyMobileParam, VerifyMobileForgotOTPParam, VerifyMobileOTPParam };
|
|
290
|
+
export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam, GetUserAttributesParam, HasPasswordParam, LoginWithAppleIOSParam, LoginWithEmailAndPasswordParam, LoginWithFacebookParam, LoginWithGoogleParam, LoginWithGoogleAndroidParam, LoginWithGoogleIOSParam, LoginWithOTPParam, LoginWithTokenParam, LogoutParam, RegisterWithFormParam, ResetForgotPasswordParam, SendForgotOTPOnEmailParam, SendForgotOTPOnMobileParam, SendOTPOnEmailParam, SendOTPOnMobileParam, SendResetPasswordEmailParam, SendResetPasswordMobileParam, SendResetTokenParam, SendVerificationLinkToEmailParam, SendVerificationLinkToMobileParam, SetEmailAsPrimaryParam, SetMobileNumberAsPrimaryParam, UpdatePasswordParam, UpdateProfileParam, UpdateUserAttributesParam, UserExistsParam, VerifyEmailParam, VerifyEmailForgotOTPParam, VerifyEmailOTPParam, VerifyMobileParam, VerifyMobileForgotOTPParam, VerifyMobileOTPParam };
|
|
273
291
|
}
|
|
274
292
|
type AddEmailParam = {
|
|
275
293
|
/**
|
|
@@ -353,6 +371,12 @@ type GetPlatformConfigParam = {
|
|
|
353
371
|
*/
|
|
354
372
|
name?: string;
|
|
355
373
|
};
|
|
374
|
+
type GetUserAttributesParam = {
|
|
375
|
+
/**
|
|
376
|
+
* - Filter by attribute slug.
|
|
377
|
+
*/
|
|
378
|
+
slug?: string;
|
|
379
|
+
};
|
|
356
380
|
type LoginWithAppleIOSParam = {
|
|
357
381
|
/**
|
|
358
382
|
* - ID of the application
|
|
@@ -486,6 +510,15 @@ type UpdateProfileParam = {
|
|
|
486
510
|
platform?: string;
|
|
487
511
|
body: UserApplicationModel.EditProfileRequestSchema;
|
|
488
512
|
};
|
|
513
|
+
type UpdateUserAttributesParam = {
|
|
514
|
+
body: UserApplicationModel.UpdateUserAttributesRequest;
|
|
515
|
+
};
|
|
516
|
+
type UserExistsParam = {
|
|
517
|
+
/**
|
|
518
|
+
* - Email id or phone number of user
|
|
519
|
+
*/
|
|
520
|
+
q: string;
|
|
521
|
+
};
|
|
489
522
|
type VerifyEmailParam = {
|
|
490
523
|
body: UserApplicationModel.CodeRequestBodySchema;
|
|
491
524
|
};
|
|
@@ -60,6 +60,11 @@ const UserApplicationModel = require("./UserApplicationModel");
|
|
|
60
60
|
* @property {string} [name] - Name of the application, e.g. Fynd
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* @typedef GetUserAttributesParam
|
|
65
|
+
* @property {string} [slug] - Filter by attribute slug.
|
|
66
|
+
*/
|
|
67
|
+
|
|
63
68
|
/** @typedef HasPasswordParam */
|
|
64
69
|
|
|
65
70
|
/**
|
|
@@ -195,6 +200,16 @@ const UserApplicationModel = require("./UserApplicationModel");
|
|
|
195
200
|
* @property {UserApplicationModel.EditProfileRequestSchema} body
|
|
196
201
|
*/
|
|
197
202
|
|
|
203
|
+
/**
|
|
204
|
+
* @typedef UpdateUserAttributesParam
|
|
205
|
+
* @property {UserApplicationModel.UpdateUserAttributesRequest} body
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @typedef UserExistsParam
|
|
210
|
+
* @property {string} q - Email id or phone number of user
|
|
211
|
+
*/
|
|
212
|
+
|
|
198
213
|
/**
|
|
199
214
|
* @typedef VerifyEmailParam
|
|
200
215
|
* @property {UserApplicationModel.CodeRequestBodySchema} body
|
|
@@ -300,6 +315,13 @@ class UserApplicationValidator {
|
|
|
300
315
|
});
|
|
301
316
|
}
|
|
302
317
|
|
|
318
|
+
/** @returns {GetUserAttributesParam} */
|
|
319
|
+
static getUserAttributes() {
|
|
320
|
+
return Joi.object({
|
|
321
|
+
slug: Joi.string().allow(""),
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
303
325
|
/** @returns {HasPasswordParam} */
|
|
304
326
|
static hasPassword() {
|
|
305
327
|
return Joi.object({});
|
|
@@ -487,6 +509,20 @@ class UserApplicationValidator {
|
|
|
487
509
|
}).required();
|
|
488
510
|
}
|
|
489
511
|
|
|
512
|
+
/** @returns {UpdateUserAttributesParam} */
|
|
513
|
+
static updateUserAttributes() {
|
|
514
|
+
return Joi.object({
|
|
515
|
+
body: UserApplicationModel.UpdateUserAttributesRequest().required(),
|
|
516
|
+
}).required();
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/** @returns {UserExistsParam} */
|
|
520
|
+
static userExists() {
|
|
521
|
+
return Joi.object({
|
|
522
|
+
q: Joi.string().allow("").required(),
|
|
523
|
+
}).required();
|
|
524
|
+
}
|
|
525
|
+
|
|
490
526
|
/** @returns {VerifyEmailParam} */
|
|
491
527
|
static verifyEmail() {
|
|
492
528
|
return Joi.object({
|