@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
- package/sdk/application/Cart/CartApplicationModel.js +6 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -12,15 +12,21 @@ class Lead {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {LeadPlatformValidator.
|
|
15
|
+
* @param {LeadPlatformValidator.CreatePlatformTicketHistoryParam} arg - Arg object
|
|
16
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
16
17
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
17
18
|
* @returns {Promise<LeadPlatformModel.TicketHistory>} - Success response
|
|
18
|
-
* @name
|
|
19
|
+
* @name createPlatformTicketHistory
|
|
19
20
|
* @summary: Create history for specific company level ticket
|
|
20
|
-
* @description: Create history for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/
|
|
21
|
+
* @description: Create history for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createPlatformTicketHistory/).
|
|
21
22
|
*/
|
|
22
|
-
async
|
|
23
|
-
|
|
23
|
+
async createPlatformTicketHistory(
|
|
24
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
25
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
26
|
+
) {
|
|
27
|
+
const {
|
|
28
|
+
error,
|
|
29
|
+
} = LeadPlatformValidator.createPlatformTicketHistory().validate(
|
|
24
30
|
{
|
|
25
31
|
id,
|
|
26
32
|
body,
|
|
@@ -32,7 +38,9 @@ class Lead {
|
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
// Showing warrnings if extra unknown parameters are found
|
|
35
|
-
const {
|
|
41
|
+
const {
|
|
42
|
+
error: warrning,
|
|
43
|
+
} = LeadPlatformValidator.createPlatformTicketHistory().validate(
|
|
36
44
|
{
|
|
37
45
|
id,
|
|
38
46
|
body,
|
|
@@ -42,7 +50,7 @@ class Lead {
|
|
|
42
50
|
if (warrning) {
|
|
43
51
|
Logger({
|
|
44
52
|
level: "WARN",
|
|
45
|
-
message: `Parameter Validation warrnings for platform > Lead >
|
|
53
|
+
message: `Parameter Validation warrnings for platform > Lead > createPlatformTicketHistory \n ${warrning}`,
|
|
46
54
|
});
|
|
47
55
|
}
|
|
48
56
|
|
|
@@ -56,12 +64,12 @@ class Lead {
|
|
|
56
64
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
|
|
57
65
|
query_params,
|
|
58
66
|
body,
|
|
59
|
-
xHeaders,
|
|
60
|
-
{
|
|
67
|
+
{ ...xHeaders, ...requestHeaders },
|
|
68
|
+
{ responseHeaders }
|
|
61
69
|
);
|
|
62
70
|
|
|
63
71
|
let responseData = response;
|
|
64
|
-
if (
|
|
72
|
+
if (responseHeaders) {
|
|
65
73
|
responseData = response[0];
|
|
66
74
|
}
|
|
67
75
|
|
|
@@ -75,7 +83,7 @@ class Lead {
|
|
|
75
83
|
if (res_error) {
|
|
76
84
|
Logger({
|
|
77
85
|
level: "WARN",
|
|
78
|
-
message: `Response Validation Warnnings for platform > Lead >
|
|
86
|
+
message: `Response Validation Warnnings for platform > Lead > createPlatformTicketHistory \n ${res_error}`,
|
|
79
87
|
});
|
|
80
88
|
}
|
|
81
89
|
|
|
@@ -84,13 +92,17 @@ class Lead {
|
|
|
84
92
|
|
|
85
93
|
/**
|
|
86
94
|
* @param {LeadPlatformValidator.CreateTicketParam} arg - Arg object
|
|
95
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
87
96
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
88
97
|
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
89
98
|
* @name createTicket
|
|
90
99
|
* @summary: Creates a company level ticket
|
|
91
100
|
* @description: Creates a company level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createTicket/).
|
|
92
101
|
*/
|
|
93
|
-
async createTicket(
|
|
102
|
+
async createTicket(
|
|
103
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
104
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
105
|
+
) {
|
|
94
106
|
const { error } = LeadPlatformValidator.createTicket().validate(
|
|
95
107
|
{
|
|
96
108
|
body,
|
|
@@ -125,12 +137,12 @@ class Lead {
|
|
|
125
137
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
|
|
126
138
|
query_params,
|
|
127
139
|
body,
|
|
128
|
-
xHeaders,
|
|
129
|
-
{
|
|
140
|
+
{ ...xHeaders, ...requestHeaders },
|
|
141
|
+
{ responseHeaders }
|
|
130
142
|
);
|
|
131
143
|
|
|
132
144
|
let responseData = response;
|
|
133
|
-
if (
|
|
145
|
+
if (responseHeaders) {
|
|
134
146
|
responseData = response[0];
|
|
135
147
|
}
|
|
136
148
|
|
|
@@ -152,15 +164,19 @@ class Lead {
|
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
/**
|
|
155
|
-
* @param {LeadPlatformValidator.
|
|
167
|
+
* @param {LeadPlatformValidator.EditPlatformTicketParam} arg - Arg object
|
|
168
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
156
169
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
157
170
|
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
158
|
-
* @name
|
|
171
|
+
* @name editPlatformTicket
|
|
159
172
|
* @summary: Edits ticket details of a company level ticket
|
|
160
|
-
* @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/
|
|
173
|
+
* @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editPlatformTicket/).
|
|
161
174
|
*/
|
|
162
|
-
async
|
|
163
|
-
|
|
175
|
+
async editPlatformTicket(
|
|
176
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
177
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
178
|
+
) {
|
|
179
|
+
const { error } = LeadPlatformValidator.editPlatformTicket().validate(
|
|
164
180
|
{
|
|
165
181
|
id,
|
|
166
182
|
body,
|
|
@@ -172,7 +188,9 @@ class Lead {
|
|
|
172
188
|
}
|
|
173
189
|
|
|
174
190
|
// Showing warrnings if extra unknown parameters are found
|
|
175
|
-
const {
|
|
191
|
+
const {
|
|
192
|
+
error: warrning,
|
|
193
|
+
} = LeadPlatformValidator.editPlatformTicket().validate(
|
|
176
194
|
{
|
|
177
195
|
id,
|
|
178
196
|
body,
|
|
@@ -182,7 +200,7 @@ class Lead {
|
|
|
182
200
|
if (warrning) {
|
|
183
201
|
Logger({
|
|
184
202
|
level: "WARN",
|
|
185
|
-
message: `Parameter Validation warrnings for platform > Lead >
|
|
203
|
+
message: `Parameter Validation warrnings for platform > Lead > editPlatformTicket \n ${warrning}`,
|
|
186
204
|
});
|
|
187
205
|
}
|
|
188
206
|
|
|
@@ -196,12 +214,12 @@ class Lead {
|
|
|
196
214
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
|
|
197
215
|
query_params,
|
|
198
216
|
body,
|
|
199
|
-
xHeaders,
|
|
200
|
-
{
|
|
217
|
+
{ ...xHeaders, ...requestHeaders },
|
|
218
|
+
{ responseHeaders }
|
|
201
219
|
);
|
|
202
220
|
|
|
203
221
|
let responseData = response;
|
|
204
|
-
if (
|
|
222
|
+
if (responseHeaders) {
|
|
205
223
|
responseData = response[0];
|
|
206
224
|
}
|
|
207
225
|
|
|
@@ -215,7 +233,7 @@ class Lead {
|
|
|
215
233
|
if (res_error) {
|
|
216
234
|
Logger({
|
|
217
235
|
level: "WARN",
|
|
218
|
-
message: `Response Validation Warnnings for platform > Lead >
|
|
236
|
+
message: `Response Validation Warnnings for platform > Lead > editPlatformTicket \n ${res_error}`,
|
|
219
237
|
});
|
|
220
238
|
}
|
|
221
239
|
|
|
@@ -224,13 +242,17 @@ class Lead {
|
|
|
224
242
|
|
|
225
243
|
/**
|
|
226
244
|
* @param {LeadPlatformValidator.GetFeedbacksParam} arg - Arg object
|
|
245
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
227
246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
228
247
|
* @returns {Promise<LeadPlatformModel.TicketFeedbackList>} - Success response
|
|
229
248
|
* @name getFeedbacks
|
|
230
249
|
* @summary: Gets a list of feedback submitted against that ticket
|
|
231
250
|
* @description: Gets a list of feedback submitted against that ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getFeedbacks/).
|
|
232
251
|
*/
|
|
233
|
-
async getFeedbacks(
|
|
252
|
+
async getFeedbacks(
|
|
253
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
254
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
255
|
+
) {
|
|
234
256
|
const { error } = LeadPlatformValidator.getFeedbacks().validate(
|
|
235
257
|
{
|
|
236
258
|
id,
|
|
@@ -265,12 +287,12 @@ class Lead {
|
|
|
265
287
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
|
|
266
288
|
query_params,
|
|
267
289
|
undefined,
|
|
268
|
-
xHeaders,
|
|
269
|
-
{
|
|
290
|
+
{ ...xHeaders, ...requestHeaders },
|
|
291
|
+
{ responseHeaders }
|
|
270
292
|
);
|
|
271
293
|
|
|
272
294
|
let responseData = response;
|
|
273
|
-
if (
|
|
295
|
+
if (responseHeaders) {
|
|
274
296
|
responseData = response[0];
|
|
275
297
|
}
|
|
276
298
|
|
|
@@ -293,13 +315,17 @@ class Lead {
|
|
|
293
315
|
|
|
294
316
|
/**
|
|
295
317
|
* @param {LeadPlatformValidator.GetGeneralConfigParam} arg - Arg object
|
|
318
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
296
319
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
297
320
|
* @returns {Promise<LeadPlatformModel.CloseVideoRoomResponse>} - Success response
|
|
298
321
|
* @name getGeneralConfig
|
|
299
322
|
* @summary: Get general support configuration.
|
|
300
323
|
* @description: Get general support configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getGeneralConfig/).
|
|
301
324
|
*/
|
|
302
|
-
async getGeneralConfig(
|
|
325
|
+
async getGeneralConfig(
|
|
326
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
327
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
328
|
+
) {
|
|
303
329
|
const { error } = LeadPlatformValidator.getGeneralConfig().validate(
|
|
304
330
|
{},
|
|
305
331
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -332,12 +358,12 @@ class Lead {
|
|
|
332
358
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/general-config`,
|
|
333
359
|
query_params,
|
|
334
360
|
undefined,
|
|
335
|
-
xHeaders,
|
|
336
|
-
{
|
|
361
|
+
{ ...xHeaders, ...requestHeaders },
|
|
362
|
+
{ responseHeaders }
|
|
337
363
|
);
|
|
338
364
|
|
|
339
365
|
let responseData = response;
|
|
340
|
-
if (
|
|
366
|
+
if (responseHeaders) {
|
|
341
367
|
responseData = response[0];
|
|
342
368
|
}
|
|
343
369
|
|
|
@@ -359,15 +385,19 @@ class Lead {
|
|
|
359
385
|
}
|
|
360
386
|
|
|
361
387
|
/**
|
|
362
|
-
* @param {LeadPlatformValidator.
|
|
388
|
+
* @param {LeadPlatformValidator.GetPlatformTicketParam} arg - Arg object
|
|
389
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
363
390
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
364
391
|
* @returns {Promise<LeadPlatformModel.Ticket>} - Success response
|
|
365
|
-
* @name
|
|
392
|
+
* @name getPlatformTicket
|
|
366
393
|
* @summary: Retreives ticket details of a company level ticket with ticket ID
|
|
367
|
-
* @description: Retreives ticket details of a company level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/
|
|
394
|
+
* @description: Retreives ticket details of a company level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getPlatformTicket/).
|
|
368
395
|
*/
|
|
369
|
-
async
|
|
370
|
-
|
|
396
|
+
async getPlatformTicket(
|
|
397
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
398
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
399
|
+
) {
|
|
400
|
+
const { error } = LeadPlatformValidator.getPlatformTicket().validate(
|
|
371
401
|
{
|
|
372
402
|
id,
|
|
373
403
|
},
|
|
@@ -378,7 +408,9 @@ class Lead {
|
|
|
378
408
|
}
|
|
379
409
|
|
|
380
410
|
// Showing warrnings if extra unknown parameters are found
|
|
381
|
-
const {
|
|
411
|
+
const {
|
|
412
|
+
error: warrning,
|
|
413
|
+
} = LeadPlatformValidator.getPlatformTicket().validate(
|
|
382
414
|
{
|
|
383
415
|
id,
|
|
384
416
|
},
|
|
@@ -387,7 +419,7 @@ class Lead {
|
|
|
387
419
|
if (warrning) {
|
|
388
420
|
Logger({
|
|
389
421
|
level: "WARN",
|
|
390
|
-
message: `Parameter Validation warrnings for platform > Lead >
|
|
422
|
+
message: `Parameter Validation warrnings for platform > Lead > getPlatformTicket \n ${warrning}`,
|
|
391
423
|
});
|
|
392
424
|
}
|
|
393
425
|
|
|
@@ -401,12 +433,12 @@ class Lead {
|
|
|
401
433
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}`,
|
|
402
434
|
query_params,
|
|
403
435
|
undefined,
|
|
404
|
-
xHeaders,
|
|
405
|
-
{
|
|
436
|
+
{ ...xHeaders, ...requestHeaders },
|
|
437
|
+
{ responseHeaders }
|
|
406
438
|
);
|
|
407
439
|
|
|
408
440
|
let responseData = response;
|
|
409
|
-
if (
|
|
441
|
+
if (responseHeaders) {
|
|
410
442
|
responseData = response[0];
|
|
411
443
|
}
|
|
412
444
|
|
|
@@ -420,7 +452,7 @@ class Lead {
|
|
|
420
452
|
if (res_error) {
|
|
421
453
|
Logger({
|
|
422
454
|
level: "WARN",
|
|
423
|
-
message: `Response Validation Warnnings for platform > Lead >
|
|
455
|
+
message: `Response Validation Warnnings for platform > Lead > getPlatformTicket \n ${res_error}`,
|
|
424
456
|
});
|
|
425
457
|
}
|
|
426
458
|
|
|
@@ -428,15 +460,19 @@ class Lead {
|
|
|
428
460
|
}
|
|
429
461
|
|
|
430
462
|
/**
|
|
431
|
-
* @param {LeadPlatformValidator.
|
|
463
|
+
* @param {LeadPlatformValidator.GetPlatformTicketHistoryParam} arg - Arg object
|
|
464
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
432
465
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
433
466
|
* @returns {Promise<LeadPlatformModel.TicketHistoryList>} - Success response
|
|
434
|
-
* @name
|
|
467
|
+
* @name getPlatformTicketHistory
|
|
435
468
|
* @summary: Gets history list for specific company level ticket
|
|
436
|
-
* @description: Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/
|
|
469
|
+
* @description: Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getPlatformTicketHistory/).
|
|
437
470
|
*/
|
|
438
|
-
async
|
|
439
|
-
|
|
471
|
+
async getPlatformTicketHistory(
|
|
472
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
473
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
474
|
+
) {
|
|
475
|
+
const { error } = LeadPlatformValidator.getPlatformTicketHistory().validate(
|
|
440
476
|
{
|
|
441
477
|
id,
|
|
442
478
|
},
|
|
@@ -449,7 +485,7 @@ class Lead {
|
|
|
449
485
|
// Showing warrnings if extra unknown parameters are found
|
|
450
486
|
const {
|
|
451
487
|
error: warrning,
|
|
452
|
-
} = LeadPlatformValidator.
|
|
488
|
+
} = LeadPlatformValidator.getPlatformTicketHistory().validate(
|
|
453
489
|
{
|
|
454
490
|
id,
|
|
455
491
|
},
|
|
@@ -458,7 +494,7 @@ class Lead {
|
|
|
458
494
|
if (warrning) {
|
|
459
495
|
Logger({
|
|
460
496
|
level: "WARN",
|
|
461
|
-
message: `Parameter Validation warrnings for platform > Lead >
|
|
497
|
+
message: `Parameter Validation warrnings for platform > Lead > getPlatformTicketHistory \n ${warrning}`,
|
|
462
498
|
});
|
|
463
499
|
}
|
|
464
500
|
|
|
@@ -472,12 +508,12 @@ class Lead {
|
|
|
472
508
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/history`,
|
|
473
509
|
query_params,
|
|
474
510
|
undefined,
|
|
475
|
-
xHeaders,
|
|
476
|
-
{
|
|
511
|
+
{ ...xHeaders, ...requestHeaders },
|
|
512
|
+
{ responseHeaders }
|
|
477
513
|
);
|
|
478
514
|
|
|
479
515
|
let responseData = response;
|
|
480
|
-
if (
|
|
516
|
+
if (responseHeaders) {
|
|
481
517
|
responseData = response[0];
|
|
482
518
|
}
|
|
483
519
|
|
|
@@ -491,7 +527,7 @@ class Lead {
|
|
|
491
527
|
if (res_error) {
|
|
492
528
|
Logger({
|
|
493
529
|
level: "WARN",
|
|
494
|
-
message: `Response Validation Warnnings for platform > Lead >
|
|
530
|
+
message: `Response Validation Warnnings for platform > Lead > getPlatformTicketHistory \n ${res_error}`,
|
|
495
531
|
});
|
|
496
532
|
}
|
|
497
533
|
|
|
@@ -499,18 +535,29 @@ class Lead {
|
|
|
499
535
|
}
|
|
500
536
|
|
|
501
537
|
/**
|
|
502
|
-
* @param {LeadPlatformValidator.
|
|
538
|
+
* @param {LeadPlatformValidator.GetPlatformTicketsParam} arg - Arg object
|
|
539
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
503
540
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
504
541
|
* @returns {Promise<LeadPlatformModel.TicketList>} - Success response
|
|
505
|
-
* @name
|
|
542
|
+
* @name getPlatformTickets
|
|
506
543
|
* @summary: Gets the list of company level tickets and/or ticket filters depending on query params
|
|
507
|
-
* @description: Gets the list of company level tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/
|
|
544
|
+
* @description: Gets the list of company level tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getPlatformTickets/).
|
|
508
545
|
*/
|
|
509
|
-
async
|
|
510
|
-
{
|
|
511
|
-
|
|
546
|
+
async getPlatformTickets(
|
|
547
|
+
{
|
|
548
|
+
items,
|
|
549
|
+
filters,
|
|
550
|
+
q,
|
|
551
|
+
status,
|
|
552
|
+
priority,
|
|
553
|
+
category,
|
|
554
|
+
pageNo,
|
|
555
|
+
pageSize,
|
|
556
|
+
requestHeaders,
|
|
557
|
+
} = { requestHeaders: {} },
|
|
558
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
512
559
|
) {
|
|
513
|
-
const { error } = LeadPlatformValidator.
|
|
560
|
+
const { error } = LeadPlatformValidator.getPlatformTickets().validate(
|
|
514
561
|
{
|
|
515
562
|
items,
|
|
516
563
|
filters,
|
|
@@ -528,7 +575,9 @@ class Lead {
|
|
|
528
575
|
}
|
|
529
576
|
|
|
530
577
|
// Showing warrnings if extra unknown parameters are found
|
|
531
|
-
const {
|
|
578
|
+
const {
|
|
579
|
+
error: warrning,
|
|
580
|
+
} = LeadPlatformValidator.getPlatformTickets().validate(
|
|
532
581
|
{
|
|
533
582
|
items,
|
|
534
583
|
filters,
|
|
@@ -544,7 +593,7 @@ class Lead {
|
|
|
544
593
|
if (warrning) {
|
|
545
594
|
Logger({
|
|
546
595
|
level: "WARN",
|
|
547
|
-
message: `Parameter Validation warrnings for platform > Lead >
|
|
596
|
+
message: `Parameter Validation warrnings for platform > Lead > getPlatformTickets \n ${warrning}`,
|
|
548
597
|
});
|
|
549
598
|
}
|
|
550
599
|
|
|
@@ -566,12 +615,12 @@ class Lead {
|
|
|
566
615
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket`,
|
|
567
616
|
query_params,
|
|
568
617
|
undefined,
|
|
569
|
-
xHeaders,
|
|
570
|
-
{
|
|
618
|
+
{ ...xHeaders, ...requestHeaders },
|
|
619
|
+
{ responseHeaders }
|
|
571
620
|
);
|
|
572
621
|
|
|
573
622
|
let responseData = response;
|
|
574
|
-
if (
|
|
623
|
+
if (responseHeaders) {
|
|
575
624
|
responseData = response[0];
|
|
576
625
|
}
|
|
577
626
|
|
|
@@ -585,7 +634,7 @@ class Lead {
|
|
|
585
634
|
if (res_error) {
|
|
586
635
|
Logger({
|
|
587
636
|
level: "WARN",
|
|
588
|
-
message: `Response Validation Warnnings for platform > Lead >
|
|
637
|
+
message: `Response Validation Warnnings for platform > Lead > getPlatformTickets \n ${res_error}`,
|
|
589
638
|
});
|
|
590
639
|
}
|
|
591
640
|
|
|
@@ -608,7 +657,7 @@ class Lead {
|
|
|
608
657
|
* @summary: Gets the list of company level tickets and/or ticket filters depending on query params
|
|
609
658
|
* @description: Gets the list of company level tickets and/or ticket filters
|
|
610
659
|
*/
|
|
611
|
-
|
|
660
|
+
getPlatformTicketsPaginator({
|
|
612
661
|
items,
|
|
613
662
|
filters,
|
|
614
663
|
q,
|
|
@@ -622,7 +671,7 @@ class Lead {
|
|
|
622
671
|
const pageId = paginator.nextId;
|
|
623
672
|
const pageNo = paginator.pageNo;
|
|
624
673
|
const pageType = "number";
|
|
625
|
-
const data = await this.
|
|
674
|
+
const data = await this.getPlatformTickets({
|
|
626
675
|
items: items,
|
|
627
676
|
filters: filters,
|
|
628
677
|
q: q,
|
|
@@ -643,19 +692,23 @@ class Lead {
|
|
|
643
692
|
}
|
|
644
693
|
|
|
645
694
|
/**
|
|
646
|
-
* @param {LeadPlatformValidator.
|
|
695
|
+
* @param {LeadPlatformValidator.GetPlatformVideoParticipantsParam} arg - Arg object
|
|
696
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
647
697
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
648
|
-
* @returns {Promise<LeadPlatformModel.
|
|
649
|
-
* Success response
|
|
650
|
-
*
|
|
651
|
-
* @
|
|
652
|
-
* @
|
|
698
|
+
* @returns {Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>}
|
|
699
|
+
* - Success response
|
|
700
|
+
*
|
|
701
|
+
* @name getPlatformVideoParticipants
|
|
702
|
+
* @summary: Get participants of a specific Video Room using it's unique name
|
|
703
|
+
* @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. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getPlatformVideoParticipants/).
|
|
653
704
|
*/
|
|
654
|
-
async
|
|
655
|
-
{ uniqueName } = {},
|
|
656
|
-
{
|
|
705
|
+
async getPlatformVideoParticipants(
|
|
706
|
+
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
707
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
657
708
|
) {
|
|
658
|
-
const {
|
|
709
|
+
const {
|
|
710
|
+
error,
|
|
711
|
+
} = LeadPlatformValidator.getPlatformVideoParticipants().validate(
|
|
659
712
|
{
|
|
660
713
|
uniqueName,
|
|
661
714
|
},
|
|
@@ -668,7 +721,7 @@ class Lead {
|
|
|
668
721
|
// Showing warrnings if extra unknown parameters are found
|
|
669
722
|
const {
|
|
670
723
|
error: warrning,
|
|
671
|
-
} = LeadPlatformValidator.
|
|
724
|
+
} = LeadPlatformValidator.getPlatformVideoParticipants().validate(
|
|
672
725
|
{
|
|
673
726
|
uniqueName,
|
|
674
727
|
},
|
|
@@ -677,7 +730,7 @@ class Lead {
|
|
|
677
730
|
if (warrning) {
|
|
678
731
|
Logger({
|
|
679
732
|
level: "WARN",
|
|
680
|
-
message: `Parameter Validation warrnings for platform > Lead >
|
|
733
|
+
message: `Parameter Validation warrnings for platform > Lead > getPlatformVideoParticipants \n ${warrning}`,
|
|
681
734
|
});
|
|
682
735
|
}
|
|
683
736
|
|
|
@@ -688,21 +741,21 @@ class Lead {
|
|
|
688
741
|
const response = await PlatformAPIClient.execute(
|
|
689
742
|
this.config,
|
|
690
743
|
"get",
|
|
691
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/
|
|
744
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/participants`,
|
|
692
745
|
query_params,
|
|
693
746
|
undefined,
|
|
694
|
-
xHeaders,
|
|
695
|
-
{
|
|
747
|
+
{ ...xHeaders, ...requestHeaders },
|
|
748
|
+
{ responseHeaders }
|
|
696
749
|
);
|
|
697
750
|
|
|
698
751
|
let responseData = response;
|
|
699
|
-
if (
|
|
752
|
+
if (responseHeaders) {
|
|
700
753
|
responseData = response[0];
|
|
701
754
|
}
|
|
702
755
|
|
|
703
756
|
const {
|
|
704
757
|
error: res_error,
|
|
705
|
-
} = LeadPlatformModel.
|
|
758
|
+
} = LeadPlatformModel.GetParticipantsInsideVideoRoomResponse().validate(
|
|
706
759
|
responseData,
|
|
707
760
|
{ abortEarly: false, allowUnknown: false }
|
|
708
761
|
);
|
|
@@ -710,7 +763,7 @@ class Lead {
|
|
|
710
763
|
if (res_error) {
|
|
711
764
|
Logger({
|
|
712
765
|
level: "WARN",
|
|
713
|
-
message: `Response Validation Warnnings for platform > Lead >
|
|
766
|
+
message: `Response Validation Warnnings for platform > Lead > getPlatformVideoParticipants \n ${res_error}`,
|
|
714
767
|
});
|
|
715
768
|
}
|
|
716
769
|
|
|
@@ -718,20 +771,22 @@ class Lead {
|
|
|
718
771
|
}
|
|
719
772
|
|
|
720
773
|
/**
|
|
721
|
-
* @param {LeadPlatformValidator.
|
|
774
|
+
* @param {LeadPlatformValidator.GetTokenForPlatformVideoRoomParam} arg - Arg object
|
|
775
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
722
776
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
723
|
-
* @returns {Promise<LeadPlatformModel.
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
* @name
|
|
727
|
-
* @
|
|
728
|
-
* @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. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getVideoParticipants/).
|
|
777
|
+
* @returns {Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>} -
|
|
778
|
+
* Success response
|
|
779
|
+
* @name getTokenForPlatformVideoRoom
|
|
780
|
+
* @summary: Get Token to join a specific Video Room using it's unqiue name
|
|
781
|
+
* @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. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTokenForPlatformVideoRoom/).
|
|
729
782
|
*/
|
|
730
|
-
async
|
|
731
|
-
{ uniqueName } = {},
|
|
732
|
-
{
|
|
783
|
+
async getTokenForPlatformVideoRoom(
|
|
784
|
+
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
785
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
733
786
|
) {
|
|
734
|
-
const {
|
|
787
|
+
const {
|
|
788
|
+
error,
|
|
789
|
+
} = LeadPlatformValidator.getTokenForPlatformVideoRoom().validate(
|
|
735
790
|
{
|
|
736
791
|
uniqueName,
|
|
737
792
|
},
|
|
@@ -744,7 +799,7 @@ class Lead {
|
|
|
744
799
|
// Showing warrnings if extra unknown parameters are found
|
|
745
800
|
const {
|
|
746
801
|
error: warrning,
|
|
747
|
-
} = LeadPlatformValidator.
|
|
802
|
+
} = LeadPlatformValidator.getTokenForPlatformVideoRoom().validate(
|
|
748
803
|
{
|
|
749
804
|
uniqueName,
|
|
750
805
|
},
|
|
@@ -753,7 +808,7 @@ class Lead {
|
|
|
753
808
|
if (warrning) {
|
|
754
809
|
Logger({
|
|
755
810
|
level: "WARN",
|
|
756
|
-
message: `Parameter Validation warrnings for platform > Lead >
|
|
811
|
+
message: `Parameter Validation warrnings for platform > Lead > getTokenForPlatformVideoRoom \n ${warrning}`,
|
|
757
812
|
});
|
|
758
813
|
}
|
|
759
814
|
|
|
@@ -764,21 +819,21 @@ class Lead {
|
|
|
764
819
|
const response = await PlatformAPIClient.execute(
|
|
765
820
|
this.config,
|
|
766
821
|
"get",
|
|
767
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/
|
|
822
|
+
`/service/platform/lead/v1.0/company/${this.config.companyId}/video/room/${uniqueName}/token`,
|
|
768
823
|
query_params,
|
|
769
824
|
undefined,
|
|
770
|
-
xHeaders,
|
|
771
|
-
{
|
|
825
|
+
{ ...xHeaders, ...requestHeaders },
|
|
826
|
+
{ responseHeaders }
|
|
772
827
|
);
|
|
773
828
|
|
|
774
829
|
let responseData = response;
|
|
775
|
-
if (
|
|
830
|
+
if (responseHeaders) {
|
|
776
831
|
responseData = response[0];
|
|
777
832
|
}
|
|
778
833
|
|
|
779
834
|
const {
|
|
780
835
|
error: res_error,
|
|
781
|
-
} = LeadPlatformModel.
|
|
836
|
+
} = LeadPlatformModel.GetTokenForVideoRoomResponse().validate(
|
|
782
837
|
responseData,
|
|
783
838
|
{ abortEarly: false, allowUnknown: false }
|
|
784
839
|
);
|
|
@@ -786,7 +841,7 @@ class Lead {
|
|
|
786
841
|
if (res_error) {
|
|
787
842
|
Logger({
|
|
788
843
|
level: "WARN",
|
|
789
|
-
message: `Response Validation Warnnings for platform > Lead >
|
|
844
|
+
message: `Response Validation Warnnings for platform > Lead > getTokenForPlatformVideoRoom \n ${res_error}`,
|
|
790
845
|
});
|
|
791
846
|
}
|
|
792
847
|
|
|
@@ -795,13 +850,17 @@ class Lead {
|
|
|
795
850
|
|
|
796
851
|
/**
|
|
797
852
|
* @param {LeadPlatformValidator.SubmitFeedbackParam} arg - Arg object
|
|
853
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
798
854
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
799
855
|
* @returns {Promise<LeadPlatformModel.TicketFeedback>} - Success response
|
|
800
856
|
* @name submitFeedback
|
|
801
857
|
* @summary: Submit a response for feeback form against that ticket
|
|
802
858
|
* @description: Submit a response for feeback form against that ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/submitFeedback/).
|
|
803
859
|
*/
|
|
804
|
-
async submitFeedback(
|
|
860
|
+
async submitFeedback(
|
|
861
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
862
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
863
|
+
) {
|
|
805
864
|
const { error } = LeadPlatformValidator.submitFeedback().validate(
|
|
806
865
|
{
|
|
807
866
|
id,
|
|
@@ -838,12 +897,12 @@ class Lead {
|
|
|
838
897
|
`/service/platform/lead/v1.0/company/${this.config.companyId}/ticket/${id}/feedback`,
|
|
839
898
|
query_params,
|
|
840
899
|
body,
|
|
841
|
-
xHeaders,
|
|
842
|
-
{
|
|
900
|
+
{ ...xHeaders, ...requestHeaders },
|
|
901
|
+
{ responseHeaders }
|
|
843
902
|
);
|
|
844
903
|
|
|
845
904
|
let responseData = response;
|
|
846
|
-
if (
|
|
905
|
+
if (responseHeaders) {
|
|
847
906
|
responseData = response[0];
|
|
848
907
|
}
|
|
849
908
|
|