@gofynd/fdk-client-javascript 1.6.3 → 3.0.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/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
- package/sdk/application/Cart/CartApplicationClient.js +270 -139
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
- package/sdk/application/Content/ContentApplicationClient.js +197 -36
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
- package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -234
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
- package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
- package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
- package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
- package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
- package/sdk/platform/Content/ContentPlatformModel.js +893 -582
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
- package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4111 -9093
- package/sdk/platform/Order/OrderPlatformModel.js +3202 -4230
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
- package/sdk/platform/Share/SharePlatformModel.js +3 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +22 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +91 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +14 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +223 -59
- package/sdk/platform/User/UserPlatformModel.js +204 -65
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +434 -758
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
- package/sdk/public/Billing/BillingPublicClient.js +397 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
- package/sdk/public/Billing/BillingPublicModel.js +560 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
- package/sdk/public/Billing/BillingPublicValidator.js +50 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -55,8 +55,6 @@ class User {
|
|
|
55
55
|
"/service/application/user/authentication/v1.0/otp/mobile/send",
|
|
56
56
|
sendResetPasswordEmail:
|
|
57
57
|
"/service/application/user/authentication/v1.0/login/password/reset",
|
|
58
|
-
sendResetPasswordMobile:
|
|
59
|
-
"/service/application/user/authentication/v1.0/login/password/mobile/reset",
|
|
60
58
|
sendResetToken:
|
|
61
59
|
"/service/application/user/authentication/v1.0/login/password/reset/token",
|
|
62
60
|
sendVerificationLinkToEmail:
|
|
@@ -589,7 +587,7 @@ class User {
|
|
|
589
587
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
590
588
|
* @returns {Promise<UserAttributes>} - Success response
|
|
591
589
|
* @name getUserAttributes
|
|
592
|
-
* @summary: Get
|
|
590
|
+
* @summary: Get user attributes
|
|
593
591
|
* @description: Get the list of user attributes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getUserAttributes/).
|
|
594
592
|
*/
|
|
595
593
|
async getUserAttributes(
|
|
@@ -953,7 +951,7 @@ class User {
|
|
|
953
951
|
/**
|
|
954
952
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
955
953
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
956
|
-
* @returns {Promise<
|
|
954
|
+
* @returns {Promise<SendOtpResponse>} - Success response
|
|
957
955
|
* @name loginWithOTP
|
|
958
956
|
* @summary: Login with Mobile OTP
|
|
959
957
|
* @description: Allow users to log in using a one-time password sent to their mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithOTP/).
|
|
@@ -1226,7 +1224,7 @@ class User {
|
|
|
1226
1224
|
/**
|
|
1227
1225
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1228
1226
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1229
|
-
* @returns {Promise<
|
|
1227
|
+
* @returns {Promise<OtpSuccess>} - Success response
|
|
1230
1228
|
* @name sendForgotOTPOnMobile
|
|
1231
1229
|
* @summary: Send mobile OTP for forgot-password
|
|
1232
1230
|
* @description: Send a one-time password to the user's mobile for verification when resetting a forgotten password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendForgotOTPOnMobile/).
|
|
@@ -1318,7 +1316,7 @@ class User {
|
|
|
1318
1316
|
/**
|
|
1319
1317
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1320
1318
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1321
|
-
* @returns {Promise<
|
|
1319
|
+
* @returns {Promise<OtpSuccess>} - Success response
|
|
1322
1320
|
* @name sendOTPOnMobile
|
|
1323
1321
|
* @summary: Send OTP on Mobile
|
|
1324
1322
|
* @description: Send a one-time password to the user's mobile for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnMobile/).
|
|
@@ -1407,52 +1405,6 @@ class User {
|
|
|
1407
1405
|
return response;
|
|
1408
1406
|
}
|
|
1409
1407
|
|
|
1410
|
-
/**
|
|
1411
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1412
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1413
|
-
* @returns {Promise<any>} - Success response
|
|
1414
|
-
* @name sendResetPasswordMobile
|
|
1415
|
-
* @summary: Reset Password via Mobile
|
|
1416
|
-
* @description: Send a password reset link to the user's mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetPasswordMobile/).
|
|
1417
|
-
*/
|
|
1418
|
-
async sendResetPasswordMobile(
|
|
1419
|
-
{ body, platform, requestHeaders } = { requestHeaders: {} },
|
|
1420
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1421
|
-
) {
|
|
1422
|
-
let invalidInput = [];
|
|
1423
|
-
if (invalidInput.length) {
|
|
1424
|
-
const error = new Error();
|
|
1425
|
-
error.message = "Missing required field";
|
|
1426
|
-
error.details = invalidInput;
|
|
1427
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
const query_params = {};
|
|
1431
|
-
query_params["platform"] = platform;
|
|
1432
|
-
|
|
1433
|
-
const xHeaders = {};
|
|
1434
|
-
|
|
1435
|
-
const response = await ApplicationAPIClient.execute(
|
|
1436
|
-
this._conf,
|
|
1437
|
-
"post",
|
|
1438
|
-
constructUrl({
|
|
1439
|
-
url: this._urls["sendResetPasswordMobile"],
|
|
1440
|
-
params: {},
|
|
1441
|
-
}),
|
|
1442
|
-
query_params,
|
|
1443
|
-
body,
|
|
1444
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1445
|
-
{ responseHeaders }
|
|
1446
|
-
);
|
|
1447
|
-
|
|
1448
|
-
let responseData = response;
|
|
1449
|
-
if (responseHeaders) {
|
|
1450
|
-
responseData = response[0];
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
return response;
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
1408
|
/**
|
|
1457
1409
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1458
1410
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -1685,7 +1637,7 @@ class User {
|
|
|
1685
1637
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1686
1638
|
* @returns {Promise<VerifyEmailSuccess>} - Success response
|
|
1687
1639
|
* @name updatePassword
|
|
1688
|
-
* @summary: Update
|
|
1640
|
+
* @summary: Update Password
|
|
1689
1641
|
* @description: Allow user to change their password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updatePassword/).
|
|
1690
1642
|
*/
|
|
1691
1643
|
async updatePassword(
|
|
@@ -1776,7 +1728,7 @@ class User {
|
|
|
1776
1728
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1777
1729
|
* @returns {Promise<UserAttributes>} - Success response
|
|
1778
1730
|
* @name updateUserAttributes
|
|
1779
|
-
* @summary: Update
|
|
1731
|
+
* @summary: Update user attributes
|
|
1780
1732
|
* @description: Update user attributes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updateUserAttributes/).
|
|
1781
1733
|
*/
|
|
1782
1734
|
async updateUserAttributes(
|
|
@@ -1819,9 +1771,9 @@ class User {
|
|
|
1819
1771
|
/**
|
|
1820
1772
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1821
1773
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1822
|
-
* @returns {Promise<
|
|
1774
|
+
* @returns {Promise<UserExistsResponse>} - Success response
|
|
1823
1775
|
* @name userExists
|
|
1824
|
-
* @summary:
|
|
1776
|
+
* @summary: Check User Existence
|
|
1825
1777
|
* @description: 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/).
|
|
1826
1778
|
*/
|
|
1827
1779
|
async userExists(
|
|
@@ -2102,7 +2054,7 @@ class User {
|
|
|
2102
2054
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2103
2055
|
* @returns {Promise<VerifyOtpSuccess>} - Success response
|
|
2104
2056
|
* @name verifyMobileOTP
|
|
2105
|
-
* @summary: Verify
|
|
2057
|
+
* @summary: Verify Mobile OTP
|
|
2106
2058
|
* @description: Verify one-time password sent to user's mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobileOTP/).
|
|
2107
2059
|
*/
|
|
2108
2060
|
async verifyMobileOTP(
|
|
@@ -10,10 +10,10 @@ declare class Webhook {
|
|
|
10
10
|
/**
|
|
11
11
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
12
12
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
13
|
-
* @returns {Promise<
|
|
13
|
+
* @returns {Promise<ClickEventResponse>} - Success response
|
|
14
14
|
* @name saveClickEvent
|
|
15
|
-
* @summary:
|
|
16
|
-
* @description: Send click events from
|
|
15
|
+
* @summary: Endpoint to capture click events from sales channels and persist them in database.
|
|
16
|
+
* @description: Send click events from sales channels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/webhook/saveClickEvent/).
|
|
17
17
|
*/
|
|
18
|
-
saveClickEvent({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<
|
|
18
|
+
saveClickEvent({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ClickEventResponse>;
|
|
19
19
|
}
|
|
@@ -33,10 +33,10 @@ class Webhook {
|
|
|
33
33
|
/**
|
|
34
34
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
35
35
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
36
|
-
* @returns {Promise<
|
|
36
|
+
* @returns {Promise<ClickEventResponse>} - Success response
|
|
37
37
|
* @name saveClickEvent
|
|
38
|
-
* @summary:
|
|
39
|
-
* @description: Send click events from
|
|
38
|
+
* @summary: Endpoint to capture click events from sales channels and persist them in database.
|
|
39
|
+
* @description: Send click events from sales channels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/webhook/saveClickEvent/).
|
|
40
40
|
*/
|
|
41
41
|
async saveClickEvent(
|
|
42
42
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export = Authorization;
|
|
2
|
+
declare class Authorization {
|
|
3
|
+
constructor(config: any);
|
|
4
|
+
config: any;
|
|
5
|
+
/**
|
|
6
|
+
* @param {AuthorizationPartnerValidator.CreateOrganizationClientParam} arg
|
|
7
|
+
* - Arg object.
|
|
8
|
+
*
|
|
9
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
10
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
11
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
12
|
+
* @name createOrganizationClient
|
|
13
|
+
* @summary: Create a new client for a specific organization
|
|
14
|
+
* @description: Use this Api to create a new client for an organization - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/createOrganizationClient/).
|
|
15
|
+
*/
|
|
16
|
+
createOrganizationClient({ body, requestHeaders }?: AuthorizationPartnerValidator.CreateOrganizationClientParam, { responseHeaders }?: object): Promise<AuthorizationPartnerModel.ClientResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* @param {AuthorizationPartnerValidator.GetOrganizationClientListParam} arg
|
|
19
|
+
* - Arg object.
|
|
20
|
+
*
|
|
21
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
22
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
23
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientListSchema>} - Success response
|
|
24
|
+
* @name getOrganizationClientList
|
|
25
|
+
* @summary: Get organization OAuth client
|
|
26
|
+
* @description: Get the list of organization OAuth Client - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/getOrganizationClientList/).
|
|
27
|
+
*/
|
|
28
|
+
getOrganizationClientList({ pageNo, pageSize, isActive, requestHeaders }?: AuthorizationPartnerValidator.GetOrganizationClientListParam, { responseHeaders }?: object): Promise<AuthorizationPartnerModel.ClientListSchema>;
|
|
29
|
+
/**
|
|
30
|
+
* @param {AuthorizationPartnerValidator.GetOrganizationClientByIdParam} arg
|
|
31
|
+
* - Arg object.
|
|
32
|
+
*
|
|
33
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
34
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
35
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
36
|
+
* @name getOrganizationClientById
|
|
37
|
+
* @summary: Get organization OAuth client
|
|
38
|
+
* @description: Get the organization oauth client by cliend id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/getOrganizationClientById/).
|
|
39
|
+
*/
|
|
40
|
+
getOrganizationClientById({ clientId, requestHeaders }?: AuthorizationPartnerValidator.GetOrganizationClientByIdParam, { responseHeaders }?: object): Promise<AuthorizationPartnerModel.ClientResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* @param {AuthorizationPartnerValidator.UpdateOrganizationClientByIdParam} arg
|
|
43
|
+
* - Arg object.
|
|
44
|
+
*
|
|
45
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
46
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
47
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
48
|
+
* @name updateOrganizationClientById
|
|
49
|
+
* @summary: Update Specific Oauth client of organization
|
|
50
|
+
* @description: Use this Api to Update OAuth Client name and tags description - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/updateOrganizationClientById/).
|
|
51
|
+
*/
|
|
52
|
+
updateOrganizationClientById({ clientId, body, requestHeaders }?: AuthorizationPartnerValidator.UpdateOrganizationClientByIdParam, { responseHeaders }?: object): Promise<AuthorizationPartnerModel.ClientResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* @param {AuthorizationPartnerValidator.DeleteOrganizationOAuthClientByIdParam} arg
|
|
55
|
+
* - Arg object.
|
|
56
|
+
*
|
|
57
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
58
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
59
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
60
|
+
* @name deleteOrganizationOAuthClientById
|
|
61
|
+
* @summary: Delete Organization OAuth client
|
|
62
|
+
* @description: This endpoint allows you to delete a specific Organization OAuth client. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/deleteOrganizationOAuthClientById/).
|
|
63
|
+
*/
|
|
64
|
+
deleteOrganizationOAuthClientById({ clientId, requestHeaders }?: AuthorizationPartnerValidator.DeleteOrganizationOAuthClientByIdParam, { responseHeaders }?: object): Promise<AuthorizationPartnerModel.ClientResponse>;
|
|
65
|
+
}
|
|
66
|
+
import AuthorizationPartnerModel = require("./AuthorizationPartnerModel");
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
const PartnerAPIClient = require("../PartnerAPIClient");
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
6
|
+
const Paginator = require("../../common/Paginator");
|
|
7
|
+
const AuthorizationPartnerValidator = require("./AuthorizationPartnerValidator");
|
|
8
|
+
const AuthorizationPartnerModel = require("./AuthorizationPartnerModel");
|
|
9
|
+
const { Logger } = require("./../../common/Logger");
|
|
10
|
+
const Joi = require("joi");
|
|
11
|
+
|
|
12
|
+
class Authorization {
|
|
13
|
+
constructor(config) {
|
|
14
|
+
this.config = config;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @param {AuthorizationPartnerValidator.CreateOrganizationClientParam} arg
|
|
19
|
+
* - Arg object.
|
|
20
|
+
*
|
|
21
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
22
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
23
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
24
|
+
* @name createOrganizationClient
|
|
25
|
+
* @summary: Create a new client for a specific organization
|
|
26
|
+
* @description: Use this Api to create a new client for an organization - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/createOrganizationClient/).
|
|
27
|
+
*/
|
|
28
|
+
async createOrganizationClient(
|
|
29
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
30
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
31
|
+
) {
|
|
32
|
+
const {
|
|
33
|
+
error,
|
|
34
|
+
} = AuthorizationPartnerValidator.createOrganizationClient().validate(
|
|
35
|
+
{
|
|
36
|
+
body,
|
|
37
|
+
},
|
|
38
|
+
{ abortEarly: false, allowUnknown: true }
|
|
39
|
+
);
|
|
40
|
+
if (error) {
|
|
41
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Showing warrnings if extra unknown parameters are found
|
|
45
|
+
const {
|
|
46
|
+
error: warrning,
|
|
47
|
+
} = AuthorizationPartnerValidator.createOrganizationClient().validate(
|
|
48
|
+
{
|
|
49
|
+
body,
|
|
50
|
+
},
|
|
51
|
+
{ abortEarly: false, allowUnknown: false }
|
|
52
|
+
);
|
|
53
|
+
if (warrning) {
|
|
54
|
+
Logger({
|
|
55
|
+
level: "WARN",
|
|
56
|
+
message: `Parameter Validation warrnings for partner > Authorization > createOrganizationClient \n ${warrning}`,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const query_params = {};
|
|
61
|
+
|
|
62
|
+
const response = await PartnerAPIClient.execute(
|
|
63
|
+
this.config,
|
|
64
|
+
"post",
|
|
65
|
+
`/service/partner/authorization/v1.0/organization/${this.config.organizationId}/oauth/client`,
|
|
66
|
+
query_params,
|
|
67
|
+
body,
|
|
68
|
+
requestHeaders,
|
|
69
|
+
{ responseHeaders }
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
let responseData = response;
|
|
73
|
+
if (responseHeaders) {
|
|
74
|
+
responseData = response[0];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const {
|
|
78
|
+
error: res_error,
|
|
79
|
+
} = AuthorizationPartnerModel.ClientResponse().validate(responseData, {
|
|
80
|
+
abortEarly: false,
|
|
81
|
+
allowUnknown: true,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
if (res_error) {
|
|
85
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
86
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
87
|
+
} else {
|
|
88
|
+
Logger({
|
|
89
|
+
level: "WARN",
|
|
90
|
+
message: `Response Validation Warnings for partner > Authorization > createOrganizationClient \n ${res_error}`,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return response;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @param {AuthorizationPartnerValidator.GetOrganizationClientListParam} arg
|
|
100
|
+
* - Arg object.
|
|
101
|
+
*
|
|
102
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
103
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
104
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientListSchema>} - Success response
|
|
105
|
+
* @name getOrganizationClientList
|
|
106
|
+
* @summary: Get organization OAuth client
|
|
107
|
+
* @description: Get the list of organization OAuth Client - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/getOrganizationClientList/).
|
|
108
|
+
*/
|
|
109
|
+
async getOrganizationClientList(
|
|
110
|
+
{ pageNo, pageSize, isActive, requestHeaders } = { requestHeaders: {} },
|
|
111
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
112
|
+
) {
|
|
113
|
+
const {
|
|
114
|
+
error,
|
|
115
|
+
} = AuthorizationPartnerValidator.getOrganizationClientList().validate(
|
|
116
|
+
{
|
|
117
|
+
pageNo,
|
|
118
|
+
pageSize,
|
|
119
|
+
isActive,
|
|
120
|
+
},
|
|
121
|
+
{ abortEarly: false, allowUnknown: true }
|
|
122
|
+
);
|
|
123
|
+
if (error) {
|
|
124
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Showing warrnings if extra unknown parameters are found
|
|
128
|
+
const {
|
|
129
|
+
error: warrning,
|
|
130
|
+
} = AuthorizationPartnerValidator.getOrganizationClientList().validate(
|
|
131
|
+
{
|
|
132
|
+
pageNo,
|
|
133
|
+
pageSize,
|
|
134
|
+
isActive,
|
|
135
|
+
},
|
|
136
|
+
{ abortEarly: false, allowUnknown: false }
|
|
137
|
+
);
|
|
138
|
+
if (warrning) {
|
|
139
|
+
Logger({
|
|
140
|
+
level: "WARN",
|
|
141
|
+
message: `Parameter Validation warrnings for partner > Authorization > getOrganizationClientList \n ${warrning}`,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const query_params = {};
|
|
146
|
+
query_params["page_no"] = pageNo;
|
|
147
|
+
query_params["page_size"] = pageSize;
|
|
148
|
+
query_params["is_active"] = isActive;
|
|
149
|
+
|
|
150
|
+
const response = await PartnerAPIClient.execute(
|
|
151
|
+
this.config,
|
|
152
|
+
"get",
|
|
153
|
+
`/service/partner/authorization/v1.0/organization/${this.config.organizationId}/oauth/client`,
|
|
154
|
+
query_params,
|
|
155
|
+
undefined,
|
|
156
|
+
requestHeaders,
|
|
157
|
+
{ responseHeaders }
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
let responseData = response;
|
|
161
|
+
if (responseHeaders) {
|
|
162
|
+
responseData = response[0];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const {
|
|
166
|
+
error: res_error,
|
|
167
|
+
} = AuthorizationPartnerModel.ClientListSchema().validate(responseData, {
|
|
168
|
+
abortEarly: false,
|
|
169
|
+
allowUnknown: true,
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
if (res_error) {
|
|
173
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
174
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
175
|
+
} else {
|
|
176
|
+
Logger({
|
|
177
|
+
level: "WARN",
|
|
178
|
+
message: `Response Validation Warnings for partner > Authorization > getOrganizationClientList \n ${res_error}`,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return response;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @param {AuthorizationPartnerValidator.GetOrganizationClientByIdParam} arg
|
|
188
|
+
* - Arg object.
|
|
189
|
+
*
|
|
190
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
191
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
192
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
193
|
+
* @name getOrganizationClientById
|
|
194
|
+
* @summary: Get organization OAuth client
|
|
195
|
+
* @description: Get the organization oauth client by cliend id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/getOrganizationClientById/).
|
|
196
|
+
*/
|
|
197
|
+
async getOrganizationClientById(
|
|
198
|
+
{ clientId, requestHeaders } = { requestHeaders: {} },
|
|
199
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
200
|
+
) {
|
|
201
|
+
const {
|
|
202
|
+
error,
|
|
203
|
+
} = AuthorizationPartnerValidator.getOrganizationClientById().validate(
|
|
204
|
+
{
|
|
205
|
+
clientId,
|
|
206
|
+
},
|
|
207
|
+
{ abortEarly: false, allowUnknown: true }
|
|
208
|
+
);
|
|
209
|
+
if (error) {
|
|
210
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Showing warrnings if extra unknown parameters are found
|
|
214
|
+
const {
|
|
215
|
+
error: warrning,
|
|
216
|
+
} = AuthorizationPartnerValidator.getOrganizationClientById().validate(
|
|
217
|
+
{
|
|
218
|
+
clientId,
|
|
219
|
+
},
|
|
220
|
+
{ abortEarly: false, allowUnknown: false }
|
|
221
|
+
);
|
|
222
|
+
if (warrning) {
|
|
223
|
+
Logger({
|
|
224
|
+
level: "WARN",
|
|
225
|
+
message: `Parameter Validation warrnings for partner > Authorization > getOrganizationClientById \n ${warrning}`,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const query_params = {};
|
|
230
|
+
|
|
231
|
+
const response = await PartnerAPIClient.execute(
|
|
232
|
+
this.config,
|
|
233
|
+
"get",
|
|
234
|
+
`/service/partner/authorization/v1.0/organization/${this.config.organizationId}/oauth/client/${clientId}`,
|
|
235
|
+
query_params,
|
|
236
|
+
undefined,
|
|
237
|
+
requestHeaders,
|
|
238
|
+
{ responseHeaders }
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
let responseData = response;
|
|
242
|
+
if (responseHeaders) {
|
|
243
|
+
responseData = response[0];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const {
|
|
247
|
+
error: res_error,
|
|
248
|
+
} = AuthorizationPartnerModel.ClientResponse().validate(responseData, {
|
|
249
|
+
abortEarly: false,
|
|
250
|
+
allowUnknown: true,
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
if (res_error) {
|
|
254
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
255
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
256
|
+
} else {
|
|
257
|
+
Logger({
|
|
258
|
+
level: "WARN",
|
|
259
|
+
message: `Response Validation Warnings for partner > Authorization > getOrganizationClientById \n ${res_error}`,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return response;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @param {AuthorizationPartnerValidator.UpdateOrganizationClientByIdParam} arg
|
|
269
|
+
* - Arg object.
|
|
270
|
+
*
|
|
271
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
272
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
273
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
274
|
+
* @name updateOrganizationClientById
|
|
275
|
+
* @summary: Update Specific Oauth client of organization
|
|
276
|
+
* @description: Use this Api to Update OAuth Client name and tags description - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/updateOrganizationClientById/).
|
|
277
|
+
*/
|
|
278
|
+
async updateOrganizationClientById(
|
|
279
|
+
{ clientId, body, requestHeaders } = { requestHeaders: {} },
|
|
280
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
281
|
+
) {
|
|
282
|
+
const {
|
|
283
|
+
error,
|
|
284
|
+
} = AuthorizationPartnerValidator.updateOrganizationClientById().validate(
|
|
285
|
+
{
|
|
286
|
+
clientId,
|
|
287
|
+
body,
|
|
288
|
+
},
|
|
289
|
+
{ abortEarly: false, allowUnknown: true }
|
|
290
|
+
);
|
|
291
|
+
if (error) {
|
|
292
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Showing warrnings if extra unknown parameters are found
|
|
296
|
+
const {
|
|
297
|
+
error: warrning,
|
|
298
|
+
} = AuthorizationPartnerValidator.updateOrganizationClientById().validate(
|
|
299
|
+
{
|
|
300
|
+
clientId,
|
|
301
|
+
body,
|
|
302
|
+
},
|
|
303
|
+
{ abortEarly: false, allowUnknown: false }
|
|
304
|
+
);
|
|
305
|
+
if (warrning) {
|
|
306
|
+
Logger({
|
|
307
|
+
level: "WARN",
|
|
308
|
+
message: `Parameter Validation warrnings for partner > Authorization > updateOrganizationClientById \n ${warrning}`,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
const query_params = {};
|
|
313
|
+
|
|
314
|
+
const response = await PartnerAPIClient.execute(
|
|
315
|
+
this.config,
|
|
316
|
+
"put",
|
|
317
|
+
`/service/partner/authorization/v1.0/organization/${this.config.organizationId}/oauth/client/${clientId}`,
|
|
318
|
+
query_params,
|
|
319
|
+
body,
|
|
320
|
+
requestHeaders,
|
|
321
|
+
{ responseHeaders }
|
|
322
|
+
);
|
|
323
|
+
|
|
324
|
+
let responseData = response;
|
|
325
|
+
if (responseHeaders) {
|
|
326
|
+
responseData = response[0];
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
const {
|
|
330
|
+
error: res_error,
|
|
331
|
+
} = AuthorizationPartnerModel.ClientResponse().validate(responseData, {
|
|
332
|
+
abortEarly: false,
|
|
333
|
+
allowUnknown: true,
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
if (res_error) {
|
|
337
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
338
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
339
|
+
} else {
|
|
340
|
+
Logger({
|
|
341
|
+
level: "WARN",
|
|
342
|
+
message: `Response Validation Warnings for partner > Authorization > updateOrganizationClientById \n ${res_error}`,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return response;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* @param {AuthorizationPartnerValidator.DeleteOrganizationOAuthClientByIdParam} arg
|
|
352
|
+
* - Arg object.
|
|
353
|
+
*
|
|
354
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
355
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
356
|
+
* @returns {Promise<AuthorizationPartnerModel.ClientResponse>} - Success response
|
|
357
|
+
* @name deleteOrganizationOAuthClientById
|
|
358
|
+
* @summary: Delete Organization OAuth client
|
|
359
|
+
* @description: This endpoint allows you to delete a specific Organization OAuth client. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/authorization/deleteOrganizationOAuthClientById/).
|
|
360
|
+
*/
|
|
361
|
+
async deleteOrganizationOAuthClientById(
|
|
362
|
+
{ clientId, requestHeaders } = { requestHeaders: {} },
|
|
363
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
364
|
+
) {
|
|
365
|
+
const {
|
|
366
|
+
error,
|
|
367
|
+
} = AuthorizationPartnerValidator.deleteOrganizationOAuthClientById().validate(
|
|
368
|
+
{
|
|
369
|
+
clientId,
|
|
370
|
+
},
|
|
371
|
+
{ abortEarly: false, allowUnknown: true }
|
|
372
|
+
);
|
|
373
|
+
if (error) {
|
|
374
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// Showing warrnings if extra unknown parameters are found
|
|
378
|
+
const {
|
|
379
|
+
error: warrning,
|
|
380
|
+
} = AuthorizationPartnerValidator.deleteOrganizationOAuthClientById().validate(
|
|
381
|
+
{
|
|
382
|
+
clientId,
|
|
383
|
+
},
|
|
384
|
+
{ abortEarly: false, allowUnknown: false }
|
|
385
|
+
);
|
|
386
|
+
if (warrning) {
|
|
387
|
+
Logger({
|
|
388
|
+
level: "WARN",
|
|
389
|
+
message: `Parameter Validation warrnings for partner > Authorization > deleteOrganizationOAuthClientById \n ${warrning}`,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
const query_params = {};
|
|
394
|
+
|
|
395
|
+
const response = await PartnerAPIClient.execute(
|
|
396
|
+
this.config,
|
|
397
|
+
"delete",
|
|
398
|
+
`/service/partner/authorization/v1.0/organization/${this.config.organizationId}/oauth/client/${clientId}`,
|
|
399
|
+
query_params,
|
|
400
|
+
undefined,
|
|
401
|
+
requestHeaders,
|
|
402
|
+
{ responseHeaders }
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
let responseData = response;
|
|
406
|
+
if (responseHeaders) {
|
|
407
|
+
responseData = response[0];
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
const {
|
|
411
|
+
error: res_error,
|
|
412
|
+
} = AuthorizationPartnerModel.ClientResponse().validate(responseData, {
|
|
413
|
+
abortEarly: false,
|
|
414
|
+
allowUnknown: true,
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
if (res_error) {
|
|
418
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
419
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
420
|
+
} else {
|
|
421
|
+
Logger({
|
|
422
|
+
level: "WARN",
|
|
423
|
+
message: `Response Validation Warnings for partner > Authorization > deleteOrganizationOAuthClientById \n ${res_error}`,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
return response;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
module.exports = Authorization;
|