@gofynd/fdk-client-javascript 0.1.36 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/application.d.ts +2 -1
- package/application.js +2 -1
- package/documentation/application/CART.md +313 -281
- package/documentation/application/CATALOG.md +458 -435
- package/documentation/application/FILESTORAGE.md +2 -0
- package/documentation/application/LEAD.md +18 -18
- package/documentation/application/LOGISTIC.md +424 -102
- package/documentation/application/ORDER.md +293 -293
- package/documentation/application/PAYMENT.md +278 -278
- package/documentation/application/POSCART.md +350 -318
- package/documentation/application/README.md +1 -1
- package/documentation/application/REWARDS.md +1 -0
- package/documentation/application/USER.md +19 -14
- package/documentation/platform/AUDITTRAIL.md +2 -2
- package/documentation/platform/CART.md +442 -439
- package/documentation/platform/CATALOG.md +2925 -2641
- package/documentation/platform/COMPANYPROFILE.md +228 -369
- package/documentation/platform/DISCOUNT.md +86 -0
- package/documentation/platform/FILESTORAGE.md +2 -0
- package/documentation/platform/LEAD.md +60 -60
- package/documentation/platform/ORDER.md +1296 -1618
- package/documentation/platform/PAYMENT.md +89 -89
- package/documentation/platform/REWARDS.md +145 -0
- package/documentation/platform/USER.md +24 -14
- package/index.d.ts +4 -1
- package/index.js +6 -3
- package/package.json +9 -9
- package/platform.d.ts +2 -1
- package/platform.js +3 -2
- package/public.d.ts +1 -0
- package/public.js +3 -2
- package/sdk/application/ApplicationAPIClient.js +6 -1
- package/sdk/application/ApplicationClient.d.ts +17 -16
- package/sdk/application/ApplicationClient.js +43 -17
- package/sdk/application/ApplicationConfig.d.ts +1 -0
- package/sdk/application/ApplicationConfig.js +4 -2
- package/sdk/application/ApplicationModels.d.ts +0 -827
- package/sdk/application/ApplicationModels.js +6 -10486
- package/sdk/application/{client → Cart}/CartApplicationClient.d.ts +9 -3
- package/sdk/application/{client → Cart}/CartApplicationClient.js +14 -8
- package/sdk/application/Cart/CartApplicationModel.d.ts +81 -0
- package/sdk/application/Cart/CartApplicationModel.js +1136 -0
- package/sdk/application/{models/CartValidator.js → Cart/CartApplicationValidator.js} +16 -12
- package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
- package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +11 -8
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +117 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +1606 -0
- package/sdk/application/{models/CatalogValidator.js → Catalog/CatalogApplicationValidator.js} +3 -1
- package/sdk/application/{client → Common}/CommonApplicationClient.js +2 -2
- package/sdk/application/Common/CommonApplicationModel.d.ts +20 -0
- package/sdk/application/Common/CommonApplicationModel.js +228 -0
- package/sdk/{platform/models/CommonValidator.js → application/Common/CommonApplicationValidator.js} +2 -1
- package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +2 -2
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +15 -0
- package/sdk/application/Communication/CommunicationApplicationModel.js +144 -0
- package/sdk/application/{models/CommunicationValidator.js → Communication/CommunicationApplicationValidator.js} +4 -3
- package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +111 -0
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1182 -0
- package/sdk/application/{models/ConfigurationValidator.js → Configuration/ConfigurationApplicationValidator.js} +3 -2
- package/sdk/application/{client → Content}/ContentApplicationClient.js +2 -2
- package/sdk/application/Content/ContentApplicationModel.d.ts +105 -0
- package/sdk/application/Content/ContentApplicationModel.js +1349 -0
- package/sdk/application/{models/ContentValidator.js → Content/ContentApplicationValidator.js} +2 -1
- package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +21 -0
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +244 -0
- package/sdk/application/{models/FileStorageValidator.js → FileStorage/FileStorageApplicationValidator.js} +5 -4
- package/sdk/application/{client → Lead}/LeadApplicationClient.js +2 -2
- package/sdk/application/Lead/LeadApplicationModel.d.ts +55 -0
- package/sdk/application/Lead/LeadApplicationModel.js +690 -0
- package/sdk/application/{models/LeadValidator.js → Lead/LeadApplicationValidator.js} +5 -4
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +53 -0
- package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +64 -29
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
- package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +2 -1
- package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +13 -7
- package/sdk/application/{client → Order}/OrderApplicationClient.js +2 -2
- package/sdk/application/Order/OrderApplicationModel.d.ts +67 -0
- package/sdk/application/Order/OrderApplicationModel.js +872 -0
- package/sdk/application/{models/OrderValidator.js → Order/OrderApplicationValidator.js} +4 -3
- package/sdk/application/{client → Payment}/PaymentApplicationClient.js +2 -2
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +96 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +1318 -0
- package/sdk/application/{models/PaymentValidator.js → Payment/PaymentApplicationValidator.js} +24 -23
- package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
- package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +14 -8
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +79 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +1132 -0
- package/sdk/application/{models/PosCartValidator.js → PosCart/PosCartApplicationValidator.js} +17 -13
- package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +23 -0
- package/sdk/application/Rewards/RewardsApplicationModel.js +276 -0
- package/sdk/application/{models/RewardsValidator.js → Rewards/RewardsApplicationValidator.js} +5 -4
- package/sdk/application/{client → Share}/ShareApplicationClient.js +2 -2
- package/sdk/application/Share/ShareApplicationModel.d.ts +16 -0
- package/sdk/application/Share/ShareApplicationModel.js +178 -0
- package/sdk/application/{models/ShareValidator.js → Share/ShareApplicationValidator.js} +3 -2
- package/sdk/application/{client → Theme}/ThemeApplicationClient.js +2 -2
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +49 -0
- package/sdk/application/Theme/ThemeApplicationModel.js +486 -0
- package/sdk/application/{models/ThemeValidator.js → Theme/ThemeApplicationValidator.js} +2 -1
- package/sdk/application/{client → User}/UserApplicationClient.js +2 -2
- package/sdk/application/User/UserApplicationModel.d.ts +95 -0
- package/sdk/application/User/UserApplicationModel.js +998 -0
- package/sdk/application/{models/UserValidator.js → User/UserApplicationValidator.js} +30 -29
- package/sdk/application/index.d.ts +18 -0
- package/sdk/application/index.js +33 -0
- package/sdk/common/AxiosHelper.js +23 -10
- package/sdk/common/Logger.d.ts +2 -0
- package/sdk/common/Logger.js +6 -0
- package/sdk/common/curlHelper.d.ts +2 -0
- package/sdk/common/curlHelper.js +95 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +101 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +285 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +11 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +56 -0
- package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.js +2 -2
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +23 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +252 -0
- package/sdk/platform/{models/AnalyticsValidator.js → Analytics/AnalyticsPlatformValidator.js} +5 -4
- package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +18 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +144 -0
- package/sdk/platform/{models/AuditTrailValidator.js → AuditTrail/AuditTrailPlatformValidator.js} +3 -2
- package/sdk/platform/{client → Billing}/BillingPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +65 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +906 -0
- package/sdk/platform/{models/BillingValidator.js → Billing/BillingPlatformValidator.js} +6 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +293 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +755 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +138 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +104 -0
- package/sdk/platform/Cart/CartPlatformModel.js +1516 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +856 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2136 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +56 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +389 -0
- package/sdk/platform/{client → Catalog}/CatalogPlatformClient.d.ts +132 -123
- package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +354 -323
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +316 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4690 -0
- package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +15 -14
- package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +91 -84
- package/sdk/platform/{client → Common}/CommonPlatformClient.js +2 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +20 -0
- package/sdk/platform/Common/CommonPlatformModel.js +228 -0
- package/sdk/{application/models/CommonValidator.js → platform/Common/CommonPlatformValidator.js} +2 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +611 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1656 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +43 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +277 -0
- package/sdk/platform/{client → Communication}/CommunicationPlatformClient.js +2 -2
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +102 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1312 -0
- package/sdk/platform/{models/CommunicationValidator.js → Communication/CommunicationPlatformValidator.js} +2 -1
- package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.d.ts +0 -9
- package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.js +2 -33
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +44 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +706 -0
- package/sdk/platform/{models/CompanyProfileValidator.d.ts → CompanyProfile/CompanyProfilePlatformValidator.d.ts} +0 -1
- package/sdk/platform/{models/CompanyProfileValidator.js → CompanyProfile/CompanyProfilePlatformValidator.js} +9 -14
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +309 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +940 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +31 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +164 -0
- package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.js +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +185 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2072 -0
- package/sdk/platform/{models/ConfigurationValidator.js → Configuration/ConfigurationPlatformValidator.js} +9 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +781 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2208 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +71 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +422 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +105 -0
- package/sdk/platform/Content/ContentPlatformModel.js +1349 -0
- package/sdk/platform/{client → Discount}/DiscountPlatformClient.d.ts +11 -0
- package/sdk/platform/{client → Discount}/DiscountPlatformClient.js +35 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +15 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +176 -0
- package/sdk/platform/{models/DiscountValidator.d.ts → Discount/DiscountPlatformValidator.d.ts} +1 -0
- package/sdk/platform/{models/DiscountValidator.js → Discount/DiscountPlatformValidator.js} +13 -5
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +114 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +247 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +38 -0
- package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +21 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +244 -0
- package/sdk/platform/{models/FileStorageValidator.js → FileStorage/FileStoragePlatformValidator.js} +6 -5
- package/sdk/platform/{client → Inventory}/InventoryPlatformClient.js +2 -2
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +62 -0
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1178 -0
- package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js} +5 -4
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +138 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +397 -0
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +16 -0
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +90 -0
- package/sdk/platform/{client → Lead}/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +55 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +690 -0
- package/sdk/platform/{models/LeadValidator.js → Lead/LeadPlatformValidator.js} +7 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +59 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +152 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +37 -0
- package/sdk/platform/{client → Order}/OrderPlatformClient.d.ts +9 -49
- package/sdk/platform/{client → Order}/OrderPlatformClient.js +18 -130
- package/sdk/platform/Order/OrderPlatformModel.d.ts +215 -0
- package/sdk/platform/Order/OrderPlatformModel.js +3530 -0
- package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +0 -2
- package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +22 -44
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +20 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +7 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +54 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +108 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +333 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +14 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +73 -0
- package/sdk/platform/{client → Payment}/PaymentPlatformClient.js +2 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +552 -0
- package/sdk/platform/{models/PaymentValidator.js → Payment/PaymentPlatformValidator.js} +6 -5
- package/sdk/platform/PlatformAPIClient.js +2 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +2884 -18377
- package/sdk/platform/PlatformApplicationClient.js +3750 -13814
- package/sdk/platform/PlatformClient.d.ts +2898 -2861
- package/sdk/platform/PlatformClient.js +3714 -3057
- package/sdk/platform/PlatformConfig.js +2 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +428 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +16 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +24 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.js +294 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +72 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +182 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +35 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +15 -0
- package/sdk/platform/Share/SharePlatformModel.js +170 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +238 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +704 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +155 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +49 -0
- package/sdk/platform/Theme/ThemePlatformModel.js +486 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +121 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +361 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +79 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +95 -0
- package/sdk/platform/User/UserPlatformModel.js +998 -0
- package/sdk/platform/{client → Webhook}/WebhookPlatformClient.js +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +17 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +208 -0
- package/sdk/platform/{models/WebhookValidator.js → Webhook/WebhookPlatformValidator.js} +4 -3
- package/sdk/platform/index.d.ts +24 -0
- package/sdk/platform/index.js +45 -0
- package/sdk/public/{client → Configuration}/ConfigurationPublicClient.js +1 -1
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +20 -0
- package/sdk/public/Configuration/ConfigurationPublicModel.js +230 -0
- package/sdk/public/{models/ConfigurationValidator.js → Configuration/ConfigurationPublicValidator.js} +1 -1
- package/sdk/public/{client → Inventory}/InventoryPublicClient.js +1 -1
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +22 -0
- package/sdk/public/Inventory/InventoryPublicModel.js +334 -0
- package/sdk/public/{models/InventoryValidator.js → Inventory/InventoryPublicValidator.js} +2 -2
- package/sdk/public/PublicClient.d.ts +3 -3
- package/sdk/public/PublicClient.js +8 -3
- package/sdk/public/{client → Webhook}/WebhookPublicClient.js +1 -1
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +17 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +208 -0
- package/sdk/public/{models/WebhookValidator.js → Webhook/WebhookPublicValidator.js} +2 -2
- package/sdk/public/index.d.ts +5 -0
- package/sdk/public/index.js +7 -0
- package/sdk/application/client/LogisticApplicationClient.d.ts +0 -42
- package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
- package/sdk/platform/PlatformApplicationModels.js +0 -22522
- package/sdk/platform/PlatformModels.d.ts +0 -1470
- package/sdk/platform/PlatformModels.js +0 -20510
- package/sdk/platform/models/CartValidator.d.ts +0 -0
- package/sdk/platform/models/CartValidator.js +0 -0
- package/sdk/platform/models/ContentValidator.d.ts +0 -0
- package/sdk/platform/models/ContentValidator.js +0 -0
- package/sdk/platform/models/PartnerValidator.d.ts +0 -0
- package/sdk/platform/models/PartnerValidator.js +0 -0
- package/sdk/platform/models/RewardsValidator.d.ts +0 -0
- package/sdk/platform/models/RewardsValidator.js +0 -0
- package/sdk/platform/models/ShareValidator.d.ts +0 -0
- package/sdk/platform/models/ShareValidator.js +0 -0
- package/sdk/platform/models/ThemeValidator.d.ts +0 -0
- package/sdk/platform/models/ThemeValidator.js +0 -0
- package/sdk/platform/models/UserValidator.d.ts +0 -0
- package/sdk/platform/models/UserValidator.js +0 -0
- package/sdk/public/PublicModels.d.ts +0 -50
- package/sdk/public/PublicModels.js +0 -712
- /package/sdk/application/{models/CartValidator.d.ts → Cart/CartApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{models/CatalogValidator.d.ts → Catalog/CatalogApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Common}/CommonApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/CommonValidator.d.ts → Common/CommonApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Communication}/CommunicationApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/CommunicationValidator.d.ts → Communication/CommunicationApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Content}/ContentApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/ContentValidator.d.ts → Content/ContentApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/FileStorageValidator.d.ts → FileStorage/FileStorageApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Lead}/LeadApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/LeadValidator.d.ts → Lead/LeadApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Order}/OrderApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/OrderValidator.d.ts → Order/OrderApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Payment}/PaymentApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/PaymentValidator.d.ts → Payment/PaymentApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{models/PosCartValidator.d.ts → PosCart/PosCartApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Rewards}/RewardsApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/RewardsValidator.d.ts → Rewards/RewardsApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Share}/ShareApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/ShareValidator.d.ts → Share/ShareApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → Theme}/ThemeApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/ThemeValidator.d.ts → Theme/ThemeApplicationValidator.d.ts} +0 -0
- /package/sdk/application/{client → User}/UserApplicationClient.d.ts +0 -0
- /package/sdk/application/{models/UserValidator.d.ts → User/UserApplicationValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/AnalyticsValidator.d.ts → Analytics/AnalyticsPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/AuditTrailValidator.d.ts → AuditTrail/AuditTrailPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Billing}/BillingPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/BillingValidator.d.ts → Billing/BillingPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Common}/CommonPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/CommonValidator.d.ts → Common/CommonPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Communication}/CommunicationPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/CommunicationValidator.d.ts → Communication/CommunicationPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/FileStorageValidator.d.ts → FileStorage/FileStoragePlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Inventory}/InventoryPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/InventoryValidator.d.ts → Inventory/InventoryPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Lead}/LeadPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/LeadValidator.d.ts → Lead/LeadPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Payment}/PaymentPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/PaymentValidator.d.ts → Payment/PaymentPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Webhook}/WebhookPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/WebhookValidator.d.ts → Webhook/WebhookPlatformValidator.d.ts} +0 -0
- /package/sdk/public/{client → Configuration}/ConfigurationPublicClient.d.ts +0 -0
- /package/sdk/public/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPublicValidator.d.ts} +0 -0
- /package/sdk/public/{client → Inventory}/InventoryPublicClient.d.ts +0 -0
- /package/sdk/public/{models/InventoryValidator.d.ts → Inventory/InventoryPublicValidator.d.ts} +0 -0
- /package/sdk/public/{client → Webhook}/WebhookPublicClient.d.ts +0 -0
- /package/sdk/public/{models/WebhookValidator.d.ts → Webhook/WebhookPublicValidator.d.ts} +0 -0
package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js}
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const InventoryModel = require("./InventoryPlatformModel");
|
|
3
4
|
class InventoryValidator {
|
|
4
5
|
static getJobsByCompany() {
|
|
5
6
|
return Joi.object({
|
|
@@ -10,19 +11,19 @@ class InventoryValidator {
|
|
|
10
11
|
|
|
11
12
|
static updateJob() {
|
|
12
13
|
return Joi.object({
|
|
13
|
-
body:
|
|
14
|
+
body: InventoryModel.JobConfigDTO().required(),
|
|
14
15
|
}).required();
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
static createJob() {
|
|
18
19
|
return Joi.object({
|
|
19
|
-
body:
|
|
20
|
+
body: InventoryModel.JobConfigDTO().required(),
|
|
20
21
|
}).required();
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
static suppressStores() {
|
|
24
25
|
return Joi.object({
|
|
25
|
-
body:
|
|
26
|
+
body: InventoryModel.SuppressStorePayload().required(),
|
|
26
27
|
}).required();
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export = Lead;
|
|
2
|
+
declare class Lead {
|
|
3
|
+
constructor(config: any, applicationId: any);
|
|
4
|
+
config: any;
|
|
5
|
+
applicationId: any;
|
|
6
|
+
/**
|
|
7
|
+
* @param {Object} arg - Arg object.
|
|
8
|
+
* @param {boolean} [arg.items] - Decides that the reponse will contain the
|
|
9
|
+
* list of tickets
|
|
10
|
+
* @param {boolean} [arg.filters] - Decides that the reponse will contain
|
|
11
|
+
* the ticket filters
|
|
12
|
+
* @param {string} [arg.q] - Search through ticket titles and description
|
|
13
|
+
* @param {string} [arg.status] - Filter tickets on status
|
|
14
|
+
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
15
|
+
* @param {string} [arg.category] - Filter tickets on category
|
|
16
|
+
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
17
|
+
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
18
|
+
*/
|
|
19
|
+
getTickets({ items, filters, q, status, priority, category }?: {
|
|
20
|
+
items?: boolean;
|
|
21
|
+
filters?: boolean;
|
|
22
|
+
q?: string;
|
|
23
|
+
status?: string;
|
|
24
|
+
priority?: PriorityEnum;
|
|
25
|
+
category?: string;
|
|
26
|
+
}): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* @param {Object} arg - Arg object.
|
|
29
|
+
* @param {string} arg.id - Tiket ID of the ticket to be fetched
|
|
30
|
+
* @summary: Retreives ticket details of a application level ticket
|
|
31
|
+
* @description: Retreives ticket details of a application level ticket with ticket ID
|
|
32
|
+
*/
|
|
33
|
+
getTicket({ id }?: {
|
|
34
|
+
id: string;
|
|
35
|
+
}): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* @param {Object} arg - Arg object.
|
|
38
|
+
* @param {string} arg.id - Ticket ID of ticket to be edited
|
|
39
|
+
* @param {EditTicketPayload} arg.body
|
|
40
|
+
* @summary: Edits ticket details of a application level ticket
|
|
41
|
+
* @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
42
|
+
*/
|
|
43
|
+
editTicket({ id, body }?: {
|
|
44
|
+
id: string;
|
|
45
|
+
body: EditTicketPayload;
|
|
46
|
+
}): Promise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* @param {Object} arg - Arg object.
|
|
49
|
+
* @param {string} arg.id - Ticket ID for which history is created
|
|
50
|
+
* @param {TicketHistoryPayload} arg.body
|
|
51
|
+
* @summary: Create history for specific application level ticket
|
|
52
|
+
* @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
53
|
+
*/
|
|
54
|
+
createHistory({ id, body }?: {
|
|
55
|
+
id: string;
|
|
56
|
+
body: TicketHistoryPayload;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
/**
|
|
59
|
+
* @param {Object} arg - Arg object.
|
|
60
|
+
* @param {string} arg.id - Ticket ID for which history is to be fetched
|
|
61
|
+
* @summary: Gets history list for specific application level ticket
|
|
62
|
+
* @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
63
|
+
*/
|
|
64
|
+
getTicketHistory({ id }?: {
|
|
65
|
+
id: string;
|
|
66
|
+
}): Promise<any>;
|
|
67
|
+
/**
|
|
68
|
+
* @param {Object} arg - Arg object.
|
|
69
|
+
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
70
|
+
* @summary: Get specific custom form using it's slug
|
|
71
|
+
* @description: Get specific custom form using it's slug, this is used to view the form.
|
|
72
|
+
*/
|
|
73
|
+
getCustomForm({ slug }?: {
|
|
74
|
+
slug: string;
|
|
75
|
+
}): Promise<any>;
|
|
76
|
+
/**
|
|
77
|
+
* @param {Object} arg - Arg object.
|
|
78
|
+
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
79
|
+
* @param {EditCustomFormPayload} arg.body
|
|
80
|
+
* @summary: Edit the given custom form
|
|
81
|
+
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
82
|
+
*/
|
|
83
|
+
editCustomForm({ slug, body }?: {
|
|
84
|
+
slug: string;
|
|
85
|
+
body: EditCustomFormPayload;
|
|
86
|
+
}): Promise<any>;
|
|
87
|
+
/**
|
|
88
|
+
* @param {Object} arg - Arg object.
|
|
89
|
+
* @summary: Get list of custom form
|
|
90
|
+
* @description: Get list of custom form for given application
|
|
91
|
+
*/
|
|
92
|
+
getCustomForms({}?: any): Promise<any>;
|
|
93
|
+
/**
|
|
94
|
+
* @param {Object} arg - Arg object.
|
|
95
|
+
* @param {CreateCustomFormPayload} arg.body
|
|
96
|
+
* @summary: Creates a new custom form
|
|
97
|
+
* @description: Creates a new custom form for given application
|
|
98
|
+
*/
|
|
99
|
+
createCustomForm({ body }?: {
|
|
100
|
+
body: CreateCustomFormPayload;
|
|
101
|
+
}): Promise<any>;
|
|
102
|
+
/**
|
|
103
|
+
* @param {Object} arg - Arg object.
|
|
104
|
+
* @param {string} arg.uniqueName - Unique name of video room
|
|
105
|
+
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
106
|
+
* @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there.
|
|
107
|
+
*/
|
|
108
|
+
getTokenForVideoRoom({ uniqueName }?: {
|
|
109
|
+
uniqueName: string;
|
|
110
|
+
}): Promise<any>;
|
|
111
|
+
/**
|
|
112
|
+
* @param {Object} arg - Arg object.
|
|
113
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
114
|
+
* @summary: Get participants of a specific Video Room using it's unique name
|
|
115
|
+
* @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names.
|
|
116
|
+
*/
|
|
117
|
+
getVideoParticipants({ uniqueName }?: {
|
|
118
|
+
uniqueName: string;
|
|
119
|
+
}): Promise<any>;
|
|
120
|
+
/**
|
|
121
|
+
* @param {Object} arg - Arg object.
|
|
122
|
+
* @param {CreateVideoRoomPayload} arg.body
|
|
123
|
+
* @summary: Open a video room.
|
|
124
|
+
* @description: Open a video room.
|
|
125
|
+
*/
|
|
126
|
+
openVideoRoom({ body }?: {
|
|
127
|
+
body: CreateVideoRoomPayload;
|
|
128
|
+
}): Promise<any>;
|
|
129
|
+
/**
|
|
130
|
+
* @param {Object} arg - Arg object.
|
|
131
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
132
|
+
* @summary: Close the video room and force all participants to leave.
|
|
133
|
+
* @description: Close the video room and force all participants to leave.
|
|
134
|
+
*/
|
|
135
|
+
closeVideoRoom({ uniqueName }?: {
|
|
136
|
+
uniqueName: string;
|
|
137
|
+
}): Promise<any>;
|
|
138
|
+
}
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
const Paginator = require("../../common/Paginator");
|
|
2
|
+
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
|
+
const LeadValidator = require("./LeadPlatformApplicationValidator");
|
|
5
|
+
|
|
6
|
+
class Lead {
|
|
7
|
+
constructor(config, applicationId) {
|
|
8
|
+
this.config = config;
|
|
9
|
+
this.applicationId = applicationId;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {Object} arg - Arg object.
|
|
14
|
+
* @param {boolean} [arg.items] - Decides that the reponse will contain the
|
|
15
|
+
* list of tickets
|
|
16
|
+
* @param {boolean} [arg.filters] - Decides that the reponse will contain
|
|
17
|
+
* the ticket filters
|
|
18
|
+
* @param {string} [arg.q] - Search through ticket titles and description
|
|
19
|
+
* @param {string} [arg.status] - Filter tickets on status
|
|
20
|
+
* @param {PriorityEnum} [arg.priority] - Filter tickets on priority
|
|
21
|
+
* @param {string} [arg.category] - Filter tickets on category
|
|
22
|
+
* @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params
|
|
23
|
+
* @description: Gets the list of Application level Tickets and/or ticket filters
|
|
24
|
+
*/
|
|
25
|
+
getTickets({ items, filters, q, status, priority, category } = {}) {
|
|
26
|
+
const { error } = LeadValidator.getTickets().validate(
|
|
27
|
+
{
|
|
28
|
+
items,
|
|
29
|
+
filters,
|
|
30
|
+
q,
|
|
31
|
+
status,
|
|
32
|
+
priority,
|
|
33
|
+
category,
|
|
34
|
+
},
|
|
35
|
+
{ abortEarly: false, allowUnknown: true }
|
|
36
|
+
);
|
|
37
|
+
if (error) {
|
|
38
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const query_params = {};
|
|
42
|
+
query_params["items"] = items;
|
|
43
|
+
query_params["filters"] = filters;
|
|
44
|
+
query_params["q"] = q;
|
|
45
|
+
query_params["status"] = status;
|
|
46
|
+
query_params["priority"] = priority;
|
|
47
|
+
query_params["category"] = category;
|
|
48
|
+
|
|
49
|
+
return PlatformAPIClient.execute(
|
|
50
|
+
this.config,
|
|
51
|
+
"get",
|
|
52
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket`,
|
|
53
|
+
query_params,
|
|
54
|
+
undefined
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @param {Object} arg - Arg object.
|
|
60
|
+
* @param {string} arg.id - Tiket ID of the ticket to be fetched
|
|
61
|
+
* @summary: Retreives ticket details of a application level ticket
|
|
62
|
+
* @description: Retreives ticket details of a application level ticket with ticket ID
|
|
63
|
+
*/
|
|
64
|
+
getTicket({ id } = {}) {
|
|
65
|
+
const { error } = LeadValidator.getTicket().validate(
|
|
66
|
+
{
|
|
67
|
+
id,
|
|
68
|
+
},
|
|
69
|
+
{ abortEarly: false, allowUnknown: true }
|
|
70
|
+
);
|
|
71
|
+
if (error) {
|
|
72
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const query_params = {};
|
|
76
|
+
|
|
77
|
+
return PlatformAPIClient.execute(
|
|
78
|
+
this.config,
|
|
79
|
+
"get",
|
|
80
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
81
|
+
query_params,
|
|
82
|
+
undefined
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @param {Object} arg - Arg object.
|
|
88
|
+
* @param {string} arg.id - Ticket ID of ticket to be edited
|
|
89
|
+
* @param {EditTicketPayload} arg.body
|
|
90
|
+
* @summary: Edits ticket details of a application level ticket
|
|
91
|
+
* @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
|
|
92
|
+
*/
|
|
93
|
+
editTicket({ id, body } = {}) {
|
|
94
|
+
const { error } = LeadValidator.editTicket().validate(
|
|
95
|
+
{
|
|
96
|
+
id,
|
|
97
|
+
body,
|
|
98
|
+
},
|
|
99
|
+
{ abortEarly: false, allowUnknown: true }
|
|
100
|
+
);
|
|
101
|
+
if (error) {
|
|
102
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const query_params = {};
|
|
106
|
+
|
|
107
|
+
return PlatformAPIClient.execute(
|
|
108
|
+
this.config,
|
|
109
|
+
"put",
|
|
110
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}`,
|
|
111
|
+
query_params,
|
|
112
|
+
body
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @param {Object} arg - Arg object.
|
|
118
|
+
* @param {string} arg.id - Ticket ID for which history is created
|
|
119
|
+
* @param {TicketHistoryPayload} arg.body
|
|
120
|
+
* @summary: Create history for specific application level ticket
|
|
121
|
+
* @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
122
|
+
*/
|
|
123
|
+
createHistory({ id, body } = {}) {
|
|
124
|
+
const { error } = LeadValidator.createHistory().validate(
|
|
125
|
+
{
|
|
126
|
+
id,
|
|
127
|
+
body,
|
|
128
|
+
},
|
|
129
|
+
{ abortEarly: false, allowUnknown: true }
|
|
130
|
+
);
|
|
131
|
+
if (error) {
|
|
132
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const query_params = {};
|
|
136
|
+
|
|
137
|
+
return PlatformAPIClient.execute(
|
|
138
|
+
this.config,
|
|
139
|
+
"post",
|
|
140
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
141
|
+
query_params,
|
|
142
|
+
body
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @param {Object} arg - Arg object.
|
|
148
|
+
* @param {string} arg.id - Ticket ID for which history is to be fetched
|
|
149
|
+
* @summary: Gets history list for specific application level ticket
|
|
150
|
+
* @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
|
|
151
|
+
*/
|
|
152
|
+
getTicketHistory({ id } = {}) {
|
|
153
|
+
const { error } = LeadValidator.getTicketHistory().validate(
|
|
154
|
+
{
|
|
155
|
+
id,
|
|
156
|
+
},
|
|
157
|
+
{ abortEarly: false, allowUnknown: true }
|
|
158
|
+
);
|
|
159
|
+
if (error) {
|
|
160
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const query_params = {};
|
|
164
|
+
|
|
165
|
+
return PlatformAPIClient.execute(
|
|
166
|
+
this.config,
|
|
167
|
+
"get",
|
|
168
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ticket/${id}/history`,
|
|
169
|
+
query_params,
|
|
170
|
+
undefined
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @param {Object} arg - Arg object.
|
|
176
|
+
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
177
|
+
* @summary: Get specific custom form using it's slug
|
|
178
|
+
* @description: Get specific custom form using it's slug, this is used to view the form.
|
|
179
|
+
*/
|
|
180
|
+
getCustomForm({ slug } = {}) {
|
|
181
|
+
const { error } = LeadValidator.getCustomForm().validate(
|
|
182
|
+
{
|
|
183
|
+
slug,
|
|
184
|
+
},
|
|
185
|
+
{ abortEarly: false, allowUnknown: true }
|
|
186
|
+
);
|
|
187
|
+
if (error) {
|
|
188
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const query_params = {};
|
|
192
|
+
|
|
193
|
+
return PlatformAPIClient.execute(
|
|
194
|
+
this.config,
|
|
195
|
+
"get",
|
|
196
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
197
|
+
query_params,
|
|
198
|
+
undefined
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @param {Object} arg - Arg object.
|
|
204
|
+
* @param {string} arg.slug - Slug of form whose response is getting submitted
|
|
205
|
+
* @param {EditCustomFormPayload} arg.body
|
|
206
|
+
* @summary: Edit the given custom form
|
|
207
|
+
* @description: Edit the given custom form field such as adding or deleting input, assignee, title, decription, notification and polling information.
|
|
208
|
+
*/
|
|
209
|
+
editCustomForm({ slug, body } = {}) {
|
|
210
|
+
const { error } = LeadValidator.editCustomForm().validate(
|
|
211
|
+
{
|
|
212
|
+
slug,
|
|
213
|
+
body,
|
|
214
|
+
},
|
|
215
|
+
{ abortEarly: false, allowUnknown: true }
|
|
216
|
+
);
|
|
217
|
+
if (error) {
|
|
218
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const query_params = {};
|
|
222
|
+
|
|
223
|
+
return PlatformAPIClient.execute(
|
|
224
|
+
this.config,
|
|
225
|
+
"put",
|
|
226
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`,
|
|
227
|
+
query_params,
|
|
228
|
+
body
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @param {Object} arg - Arg object.
|
|
234
|
+
* @summary: Get list of custom form
|
|
235
|
+
* @description: Get list of custom form for given application
|
|
236
|
+
*/
|
|
237
|
+
getCustomForms({} = {}) {
|
|
238
|
+
const { error } = LeadValidator.getCustomForms().validate(
|
|
239
|
+
{},
|
|
240
|
+
{ abortEarly: false, allowUnknown: true }
|
|
241
|
+
);
|
|
242
|
+
if (error) {
|
|
243
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const query_params = {};
|
|
247
|
+
|
|
248
|
+
return PlatformAPIClient.execute(
|
|
249
|
+
this.config,
|
|
250
|
+
"get",
|
|
251
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
252
|
+
query_params,
|
|
253
|
+
undefined
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @param {Object} arg - Arg object.
|
|
259
|
+
* @param {CreateCustomFormPayload} arg.body
|
|
260
|
+
* @summary: Creates a new custom form
|
|
261
|
+
* @description: Creates a new custom form for given application
|
|
262
|
+
*/
|
|
263
|
+
createCustomForm({ body } = {}) {
|
|
264
|
+
const { error } = LeadValidator.createCustomForm().validate(
|
|
265
|
+
{
|
|
266
|
+
body,
|
|
267
|
+
},
|
|
268
|
+
{ abortEarly: false, allowUnknown: true }
|
|
269
|
+
);
|
|
270
|
+
if (error) {
|
|
271
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const query_params = {};
|
|
275
|
+
|
|
276
|
+
return PlatformAPIClient.execute(
|
|
277
|
+
this.config,
|
|
278
|
+
"post",
|
|
279
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form`,
|
|
280
|
+
query_params,
|
|
281
|
+
body
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @param {Object} arg - Arg object.
|
|
287
|
+
* @param {string} arg.uniqueName - Unique name of video room
|
|
288
|
+
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
289
|
+
* @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there.
|
|
290
|
+
*/
|
|
291
|
+
getTokenForVideoRoom({ uniqueName } = {}) {
|
|
292
|
+
const { error } = LeadValidator.getTokenForVideoRoom().validate(
|
|
293
|
+
{
|
|
294
|
+
uniqueName,
|
|
295
|
+
},
|
|
296
|
+
{ abortEarly: false, allowUnknown: true }
|
|
297
|
+
);
|
|
298
|
+
if (error) {
|
|
299
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const query_params = {};
|
|
303
|
+
|
|
304
|
+
return PlatformAPIClient.execute(
|
|
305
|
+
this.config,
|
|
306
|
+
"get",
|
|
307
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
|
|
308
|
+
query_params,
|
|
309
|
+
undefined
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* @param {Object} arg - Arg object.
|
|
315
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
316
|
+
* @summary: Get participants of a specific Video Room using it's unique name
|
|
317
|
+
* @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names.
|
|
318
|
+
*/
|
|
319
|
+
getVideoParticipants({ uniqueName } = {}) {
|
|
320
|
+
const { error } = LeadValidator.getVideoParticipants().validate(
|
|
321
|
+
{
|
|
322
|
+
uniqueName,
|
|
323
|
+
},
|
|
324
|
+
{ abortEarly: false, allowUnknown: true }
|
|
325
|
+
);
|
|
326
|
+
if (error) {
|
|
327
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const query_params = {};
|
|
331
|
+
|
|
332
|
+
return PlatformAPIClient.execute(
|
|
333
|
+
this.config,
|
|
334
|
+
"get",
|
|
335
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
|
|
336
|
+
query_params,
|
|
337
|
+
undefined
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* @param {Object} arg - Arg object.
|
|
343
|
+
* @param {CreateVideoRoomPayload} arg.body
|
|
344
|
+
* @summary: Open a video room.
|
|
345
|
+
* @description: Open a video room.
|
|
346
|
+
*/
|
|
347
|
+
openVideoRoom({ body } = {}) {
|
|
348
|
+
const { error } = LeadValidator.openVideoRoom().validate(
|
|
349
|
+
{
|
|
350
|
+
body,
|
|
351
|
+
},
|
|
352
|
+
{ abortEarly: false, allowUnknown: true }
|
|
353
|
+
);
|
|
354
|
+
if (error) {
|
|
355
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const query_params = {};
|
|
359
|
+
|
|
360
|
+
return PlatformAPIClient.execute(
|
|
361
|
+
this.config,
|
|
362
|
+
"post",
|
|
363
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
364
|
+
query_params,
|
|
365
|
+
body
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @param {Object} arg - Arg object.
|
|
371
|
+
* @param {string} arg.uniqueName - Unique name of Video Room
|
|
372
|
+
* @summary: Close the video room and force all participants to leave.
|
|
373
|
+
* @description: Close the video room and force all participants to leave.
|
|
374
|
+
*/
|
|
375
|
+
closeVideoRoom({ uniqueName } = {}) {
|
|
376
|
+
const { error } = LeadValidator.closeVideoRoom().validate(
|
|
377
|
+
{
|
|
378
|
+
uniqueName,
|
|
379
|
+
},
|
|
380
|
+
{ abortEarly: false, allowUnknown: true }
|
|
381
|
+
);
|
|
382
|
+
if (error) {
|
|
383
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const query_params = {};
|
|
387
|
+
|
|
388
|
+
return PlatformAPIClient.execute(
|
|
389
|
+
this.config,
|
|
390
|
+
"delete",
|
|
391
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
392
|
+
query_params,
|
|
393
|
+
undefined
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
module.exports = Lead;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export = LeadValidator;
|
|
2
|
+
declare class LeadValidator {
|
|
3
|
+
static getTickets(): any;
|
|
4
|
+
static getTicket(): any;
|
|
5
|
+
static editTicket(): any;
|
|
6
|
+
static createHistory(): any;
|
|
7
|
+
static getTicketHistory(): any;
|
|
8
|
+
static getCustomForm(): any;
|
|
9
|
+
static editCustomForm(): any;
|
|
10
|
+
static getCustomForms(): any;
|
|
11
|
+
static createCustomForm(): any;
|
|
12
|
+
static getTokenForVideoRoom(): any;
|
|
13
|
+
static getVideoParticipants(): any;
|
|
14
|
+
static openVideoRoom(): any;
|
|
15
|
+
static closeVideoRoom(): any;
|
|
16
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
const LeadModel = require("./LeadPlatformModel");
|
|
3
|
+
|
|
4
|
+
class LeadValidator {
|
|
5
|
+
static getTickets() {
|
|
6
|
+
return Joi.object({
|
|
7
|
+
items: Joi.boolean(),
|
|
8
|
+
filters: Joi.boolean(),
|
|
9
|
+
q: Joi.string().allow(""),
|
|
10
|
+
status: Joi.string().allow(""),
|
|
11
|
+
priority: LeadModel.PriorityEnum(),
|
|
12
|
+
category: Joi.string().allow(""),
|
|
13
|
+
}).required();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static getTicket() {
|
|
17
|
+
return Joi.object({
|
|
18
|
+
id: Joi.string().allow("").required(),
|
|
19
|
+
}).required();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static editTicket() {
|
|
23
|
+
return Joi.object({
|
|
24
|
+
id: Joi.string().allow("").required(),
|
|
25
|
+
body: LeadModel.EditTicketPayload().required(),
|
|
26
|
+
}).required();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static createHistory() {
|
|
30
|
+
return Joi.object({
|
|
31
|
+
id: Joi.string().allow("").required(),
|
|
32
|
+
body: LeadModel.TicketHistoryPayload().required(),
|
|
33
|
+
}).required();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static getTicketHistory() {
|
|
37
|
+
return Joi.object({
|
|
38
|
+
id: Joi.string().allow("").required(),
|
|
39
|
+
}).required();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static getCustomForm() {
|
|
43
|
+
return Joi.object({
|
|
44
|
+
slug: Joi.string().allow("").required(),
|
|
45
|
+
}).required();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static editCustomForm() {
|
|
49
|
+
return Joi.object({
|
|
50
|
+
slug: Joi.string().allow("").required(),
|
|
51
|
+
body: LeadModel.EditCustomFormPayload().required(),
|
|
52
|
+
}).required();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static getCustomForms() {
|
|
56
|
+
return Joi.object({}).required();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static createCustomForm() {
|
|
60
|
+
return Joi.object({
|
|
61
|
+
body: LeadModel.CreateCustomFormPayload().required(),
|
|
62
|
+
}).required();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static getTokenForVideoRoom() {
|
|
66
|
+
return Joi.object({
|
|
67
|
+
uniqueName: Joi.string().allow("").required(),
|
|
68
|
+
}).required();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static getVideoParticipants() {
|
|
72
|
+
return Joi.object({
|
|
73
|
+
uniqueName: Joi.string().allow("").required(),
|
|
74
|
+
}).required();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
static openVideoRoom() {
|
|
78
|
+
return Joi.object({
|
|
79
|
+
body: LeadModel.CreateVideoRoomPayload().required(),
|
|
80
|
+
}).required();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static closeVideoRoom() {
|
|
84
|
+
return Joi.object({
|
|
85
|
+
uniqueName: Joi.string().allow("").required(),
|
|
86
|
+
}).required();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
module.exports = LeadValidator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const Paginator = require("../../common/Paginator");
|
|
2
|
-
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
|
-
const
|
|
3
|
+
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
4
|
+
const LeadValidator = require("./LeadPlatformValidator");
|
|
5
5
|
class Lead {
|
|
6
6
|
constructor(config) {
|
|
7
7
|
this.config = config;
|