@gofynd/fdk-client-javascript 1.4.7 → 1.4.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
- package/sdk/application/Cart/CartApplicationClient.js +118 -13
- package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
- package/sdk/application/Cart/CartApplicationModel.js +98 -26
- package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
- package/sdk/application/Cart/CartApplicationValidator.js +26 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +4 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +4 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
- package/sdk/application/Content/ContentApplicationClient.js +5 -3
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -18
- package/sdk/application/Content/ContentApplicationModel.js +4 -20
- package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationValidator.js +4 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
- package/sdk/application/Lead/LeadApplicationClient.js +0 -167
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
- package/sdk/application/Lead/LeadApplicationModel.js +0 -126
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
- package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +2 -0
- package/sdk/application/Order/OrderApplicationModel.js +2 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +9 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +5 -2
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
- package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
- package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +4 -4
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
- package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
- package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
- package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +28 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +198 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +81 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +214 -40
- package/sdk/platform/Cart/CartPlatformModel.js +164 -24
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +28 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +12 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +6 -4
- package/sdk/platform/Content/ContentPlatformModel.js +6 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +350 -127
- package/sdk/platform/Finance/FinancePlatformModel.js +378 -108
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
- package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
- package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
- package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
- package/sdk/platform/Order/OrderPlatformModel.d.ts +108 -15
- package/sdk/platform/Order/OrderPlatformModel.js +47 -14
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +5 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
- package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +0 -40
- package/sdk/platform/Webhook/WebhookPlatformClient.js +0 -307
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +112 -164
- package/sdk/platform/Webhook/WebhookPlatformModel.js +118 -169
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +9 -35
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +8 -46
- package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
- package/sdk/public/Billing/BillingPublicClient.js +156 -3
- package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
- package/sdk/public/Billing/BillingPublicModel.js +317 -18
- package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
- package/sdk/public/Billing/BillingPublicValidator.js +22 -3
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +22 -22
- package/sdk/public/Webhook/WebhookPublicModel.js +22 -22
|
@@ -15,85 +15,6 @@ class Lead {
|
|
|
15
15
|
this.applicationId = applicationId;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* @param {LeadPlatformApplicationValidator.CloseVideoRoomParam} arg - Arg object
|
|
20
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
21
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
22
|
-
* @returns {Promise<LeadPlatformModel.CloseVideoRoomResponse>} - Success response
|
|
23
|
-
* @name closeVideoRoom
|
|
24
|
-
* @summary: Close video room
|
|
25
|
-
* @description: Terminate and close an active video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/closeVideoRoom/).
|
|
26
|
-
*/
|
|
27
|
-
async closeVideoRoom(
|
|
28
|
-
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
29
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
30
|
-
) {
|
|
31
|
-
const {
|
|
32
|
-
error,
|
|
33
|
-
} = LeadPlatformApplicationValidator.closeVideoRoom().validate(
|
|
34
|
-
{
|
|
35
|
-
uniqueName,
|
|
36
|
-
},
|
|
37
|
-
{ abortEarly: false, allowUnknown: true }
|
|
38
|
-
);
|
|
39
|
-
if (error) {
|
|
40
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Showing warrnings if extra unknown parameters are found
|
|
44
|
-
const {
|
|
45
|
-
error: warrning,
|
|
46
|
-
} = LeadPlatformApplicationValidator.closeVideoRoom().validate(
|
|
47
|
-
{
|
|
48
|
-
uniqueName,
|
|
49
|
-
},
|
|
50
|
-
{ abortEarly: false, allowUnknown: false }
|
|
51
|
-
);
|
|
52
|
-
if (warrning) {
|
|
53
|
-
Logger({
|
|
54
|
-
level: "WARN",
|
|
55
|
-
message: `Parameter Validation warrnings for platform > Lead > closeVideoRoom \n ${warrning}`,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const query_params = {};
|
|
60
|
-
|
|
61
|
-
const response = await PlatformAPIClient.execute(
|
|
62
|
-
this.config,
|
|
63
|
-
"delete",
|
|
64
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}`,
|
|
65
|
-
query_params,
|
|
66
|
-
undefined,
|
|
67
|
-
requestHeaders,
|
|
68
|
-
{ responseHeaders }
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
let responseData = response;
|
|
72
|
-
if (responseHeaders) {
|
|
73
|
-
responseData = response[0];
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const {
|
|
77
|
-
error: res_error,
|
|
78
|
-
} = LeadPlatformModel.CloseVideoRoomResponse().validate(responseData, {
|
|
79
|
-
abortEarly: false,
|
|
80
|
-
allowUnknown: true,
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
if (res_error) {
|
|
84
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
85
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
86
|
-
} else {
|
|
87
|
-
Logger({
|
|
88
|
-
level: "WARN",
|
|
89
|
-
message: `Response Validation Warnings for platform > Lead > closeVideoRoom \n ${res_error}`,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return response;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
18
|
/**
|
|
98
19
|
* @param {LeadPlatformApplicationValidator.CreateCustomFormParam} arg - Arg object
|
|
99
20
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -895,248 +816,6 @@ class Lead {
|
|
|
895
816
|
|
|
896
817
|
return response;
|
|
897
818
|
}
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* @param {LeadPlatformApplicationValidator.GetNewTokenForVideoRoomParam} arg
|
|
901
|
-
* - Arg object
|
|
902
|
-
*
|
|
903
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
904
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
905
|
-
* @returns {Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>} -
|
|
906
|
-
* Success response
|
|
907
|
-
* @name getNewTokenForVideoRoom
|
|
908
|
-
* @summary: Get video Room Token
|
|
909
|
-
* @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/getNewTokenForVideoRoom/).
|
|
910
|
-
*/
|
|
911
|
-
async getNewTokenForVideoRoom(
|
|
912
|
-
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
913
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
914
|
-
) {
|
|
915
|
-
const {
|
|
916
|
-
error,
|
|
917
|
-
} = LeadPlatformApplicationValidator.getNewTokenForVideoRoom().validate(
|
|
918
|
-
{
|
|
919
|
-
uniqueName,
|
|
920
|
-
},
|
|
921
|
-
{ abortEarly: false, allowUnknown: true }
|
|
922
|
-
);
|
|
923
|
-
if (error) {
|
|
924
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
// Showing warrnings if extra unknown parameters are found
|
|
928
|
-
const {
|
|
929
|
-
error: warrning,
|
|
930
|
-
} = LeadPlatformApplicationValidator.getNewTokenForVideoRoom().validate(
|
|
931
|
-
{
|
|
932
|
-
uniqueName,
|
|
933
|
-
},
|
|
934
|
-
{ abortEarly: false, allowUnknown: false }
|
|
935
|
-
);
|
|
936
|
-
if (warrning) {
|
|
937
|
-
Logger({
|
|
938
|
-
level: "WARN",
|
|
939
|
-
message: `Parameter Validation warrnings for platform > Lead > getNewTokenForVideoRoom \n ${warrning}`,
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
const query_params = {};
|
|
944
|
-
|
|
945
|
-
const response = await PlatformAPIClient.execute(
|
|
946
|
-
this.config,
|
|
947
|
-
"get",
|
|
948
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/token`,
|
|
949
|
-
query_params,
|
|
950
|
-
undefined,
|
|
951
|
-
requestHeaders,
|
|
952
|
-
{ responseHeaders }
|
|
953
|
-
);
|
|
954
|
-
|
|
955
|
-
let responseData = response;
|
|
956
|
-
if (responseHeaders) {
|
|
957
|
-
responseData = response[0];
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
const {
|
|
961
|
-
error: res_error,
|
|
962
|
-
} = LeadPlatformModel.GetTokenForVideoRoomResponse().validate(
|
|
963
|
-
responseData,
|
|
964
|
-
{ abortEarly: false, allowUnknown: true }
|
|
965
|
-
);
|
|
966
|
-
|
|
967
|
-
if (res_error) {
|
|
968
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
969
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
970
|
-
} else {
|
|
971
|
-
Logger({
|
|
972
|
-
level: "WARN",
|
|
973
|
-
message: `Response Validation Warnings for platform > Lead > getNewTokenForVideoRoom \n ${res_error}`,
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
return response;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* @param {LeadPlatformApplicationValidator.GetNewVideoParticipantsParam} arg
|
|
983
|
-
* - Arg object
|
|
984
|
-
*
|
|
985
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
986
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
987
|
-
* @returns {Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>}
|
|
988
|
-
* - Success response
|
|
989
|
-
*
|
|
990
|
-
* @name getNewVideoParticipants
|
|
991
|
-
* @summary: List video Room Participants
|
|
992
|
-
* @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/getNewVideoParticipants/).
|
|
993
|
-
*/
|
|
994
|
-
async getNewVideoParticipants(
|
|
995
|
-
{ uniqueName, requestHeaders } = { requestHeaders: {} },
|
|
996
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
997
|
-
) {
|
|
998
|
-
const {
|
|
999
|
-
error,
|
|
1000
|
-
} = LeadPlatformApplicationValidator.getNewVideoParticipants().validate(
|
|
1001
|
-
{
|
|
1002
|
-
uniqueName,
|
|
1003
|
-
},
|
|
1004
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1005
|
-
);
|
|
1006
|
-
if (error) {
|
|
1007
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1011
|
-
const {
|
|
1012
|
-
error: warrning,
|
|
1013
|
-
} = LeadPlatformApplicationValidator.getNewVideoParticipants().validate(
|
|
1014
|
-
{
|
|
1015
|
-
uniqueName,
|
|
1016
|
-
},
|
|
1017
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1018
|
-
);
|
|
1019
|
-
if (warrning) {
|
|
1020
|
-
Logger({
|
|
1021
|
-
level: "WARN",
|
|
1022
|
-
message: `Parameter Validation warrnings for platform > Lead > getNewVideoParticipants \n ${warrning}`,
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
const query_params = {};
|
|
1027
|
-
|
|
1028
|
-
const response = await PlatformAPIClient.execute(
|
|
1029
|
-
this.config,
|
|
1030
|
-
"get",
|
|
1031
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room/${uniqueName}/participants`,
|
|
1032
|
-
query_params,
|
|
1033
|
-
undefined,
|
|
1034
|
-
requestHeaders,
|
|
1035
|
-
{ responseHeaders }
|
|
1036
|
-
);
|
|
1037
|
-
|
|
1038
|
-
let responseData = response;
|
|
1039
|
-
if (responseHeaders) {
|
|
1040
|
-
responseData = response[0];
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
const {
|
|
1044
|
-
error: res_error,
|
|
1045
|
-
} = LeadPlatformModel.GetParticipantsInsideVideoRoomResponse().validate(
|
|
1046
|
-
responseData,
|
|
1047
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1048
|
-
);
|
|
1049
|
-
|
|
1050
|
-
if (res_error) {
|
|
1051
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1052
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1053
|
-
} else {
|
|
1054
|
-
Logger({
|
|
1055
|
-
level: "WARN",
|
|
1056
|
-
message: `Response Validation Warnings for platform > Lead > getNewVideoParticipants \n ${res_error}`,
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
return response;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* @param {LeadPlatformApplicationValidator.OpenVideoRoomParam} arg - Arg object
|
|
1066
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1067
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1068
|
-
* @returns {Promise<LeadPlatformModel.CreateVideoRoomResponse>} - Success response
|
|
1069
|
-
* @name openVideoRoom
|
|
1070
|
-
* @summary: Open video room
|
|
1071
|
-
* @description: Initiate and open a video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/openVideoRoom/).
|
|
1072
|
-
*/
|
|
1073
|
-
async openVideoRoom(
|
|
1074
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1075
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1076
|
-
) {
|
|
1077
|
-
const { error } = LeadPlatformApplicationValidator.openVideoRoom().validate(
|
|
1078
|
-
{
|
|
1079
|
-
body,
|
|
1080
|
-
},
|
|
1081
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1082
|
-
);
|
|
1083
|
-
if (error) {
|
|
1084
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1088
|
-
const {
|
|
1089
|
-
error: warrning,
|
|
1090
|
-
} = LeadPlatformApplicationValidator.openVideoRoom().validate(
|
|
1091
|
-
{
|
|
1092
|
-
body,
|
|
1093
|
-
},
|
|
1094
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1095
|
-
);
|
|
1096
|
-
if (warrning) {
|
|
1097
|
-
Logger({
|
|
1098
|
-
level: "WARN",
|
|
1099
|
-
message: `Parameter Validation warrnings for platform > Lead > openVideoRoom \n ${warrning}`,
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
const query_params = {};
|
|
1104
|
-
|
|
1105
|
-
const response = await PlatformAPIClient.execute(
|
|
1106
|
-
this.config,
|
|
1107
|
-
"post",
|
|
1108
|
-
`/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/video/room`,
|
|
1109
|
-
query_params,
|
|
1110
|
-
body,
|
|
1111
|
-
requestHeaders,
|
|
1112
|
-
{ responseHeaders }
|
|
1113
|
-
);
|
|
1114
|
-
|
|
1115
|
-
let responseData = response;
|
|
1116
|
-
if (responseHeaders) {
|
|
1117
|
-
responseData = response[0];
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
const {
|
|
1121
|
-
error: res_error,
|
|
1122
|
-
} = LeadPlatformModel.CreateVideoRoomResponse().validate(responseData, {
|
|
1123
|
-
abortEarly: false,
|
|
1124
|
-
allowUnknown: true,
|
|
1125
|
-
});
|
|
1126
|
-
|
|
1127
|
-
if (res_error) {
|
|
1128
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1129
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1130
|
-
} else {
|
|
1131
|
-
Logger({
|
|
1132
|
-
level: "WARN",
|
|
1133
|
-
message: `Response Validation Warnings for platform > Lead > openVideoRoom \n ${res_error}`,
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
return response;
|
|
1139
|
-
}
|
|
1140
819
|
}
|
|
1141
820
|
|
|
1142
821
|
module.exports = Lead;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
export = LeadPlatformApplicationValidator;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef CloseVideoRoomParam
|
|
4
|
-
* @property {string} uniqueName - Unique name of Video Room
|
|
5
|
-
*/
|
|
6
2
|
/**
|
|
7
3
|
* @typedef CreateCustomFormParam
|
|
8
4
|
* @property {LeadPlatformModel.CreateCustomFormPayload} body
|
|
@@ -49,21 +45,7 @@ export = LeadPlatformApplicationValidator;
|
|
|
49
45
|
* @property {LeadPlatformModel.PriorityEnum} [priority] - Filter tickets on priority
|
|
50
46
|
* @property {string} [category] - Filter tickets on category
|
|
51
47
|
*/
|
|
52
|
-
/**
|
|
53
|
-
* @typedef GetNewTokenForVideoRoomParam
|
|
54
|
-
* @property {string} uniqueName - Unique name of video room
|
|
55
|
-
*/
|
|
56
|
-
/**
|
|
57
|
-
* @typedef GetNewVideoParticipantsParam
|
|
58
|
-
* @property {string} uniqueName - Unique name of Video Room
|
|
59
|
-
*/
|
|
60
|
-
/**
|
|
61
|
-
* @typedef OpenVideoRoomParam
|
|
62
|
-
* @property {LeadPlatformModel.CreateVideoRoomPayload} body
|
|
63
|
-
*/
|
|
64
48
|
declare class LeadPlatformApplicationValidator {
|
|
65
|
-
/** @returns {CloseVideoRoomParam} */
|
|
66
|
-
static closeVideoRoom(): CloseVideoRoomParam;
|
|
67
49
|
/** @returns {CreateCustomFormParam} */
|
|
68
50
|
static createCustomForm(): CreateCustomFormParam;
|
|
69
51
|
/** @returns {CreateNewHistoryParam} */
|
|
@@ -84,22 +66,10 @@ declare class LeadPlatformApplicationValidator {
|
|
|
84
66
|
static getNewTicketHistory(): GetNewTicketHistoryParam;
|
|
85
67
|
/** @returns {GetNewTicketsParam} */
|
|
86
68
|
static getNewTickets(): GetNewTicketsParam;
|
|
87
|
-
/** @returns {GetNewTokenForVideoRoomParam} */
|
|
88
|
-
static getNewTokenForVideoRoom(): GetNewTokenForVideoRoomParam;
|
|
89
|
-
/** @returns {GetNewVideoParticipantsParam} */
|
|
90
|
-
static getNewVideoParticipants(): GetNewVideoParticipantsParam;
|
|
91
|
-
/** @returns {OpenVideoRoomParam} */
|
|
92
|
-
static openVideoRoom(): OpenVideoRoomParam;
|
|
93
69
|
}
|
|
94
70
|
declare namespace LeadPlatformApplicationValidator {
|
|
95
|
-
export {
|
|
71
|
+
export { CreateCustomFormParam, CreateNewHistoryParam, DeleteCustomFormParam, EditCustomFormParam, EditNewTicketParam, GetCustomFormParam, GetCustomFormsParam, GetNewTicketParam, GetNewTicketHistoryParam, GetNewTicketsParam };
|
|
96
72
|
}
|
|
97
|
-
type CloseVideoRoomParam = {
|
|
98
|
-
/**
|
|
99
|
-
* - Unique name of Video Room
|
|
100
|
-
*/
|
|
101
|
-
uniqueName: string;
|
|
102
|
-
};
|
|
103
73
|
type CreateCustomFormParam = {
|
|
104
74
|
body: LeadPlatformModel.CreateCustomFormPayload;
|
|
105
75
|
};
|
|
@@ -175,20 +145,5 @@ type GetNewTicketsParam = {
|
|
|
175
145
|
*/
|
|
176
146
|
category?: string;
|
|
177
147
|
};
|
|
178
|
-
type GetNewTokenForVideoRoomParam = {
|
|
179
|
-
/**
|
|
180
|
-
* - Unique name of video room
|
|
181
|
-
*/
|
|
182
|
-
uniqueName: string;
|
|
183
|
-
};
|
|
184
|
-
type GetNewVideoParticipantsParam = {
|
|
185
|
-
/**
|
|
186
|
-
* - Unique name of Video Room
|
|
187
|
-
*/
|
|
188
|
-
uniqueName: string;
|
|
189
|
-
};
|
|
190
|
-
type OpenVideoRoomParam = {
|
|
191
|
-
body: LeadPlatformModel.CreateVideoRoomPayload;
|
|
192
|
-
};
|
|
193
148
|
type GetCustomFormsParam = any;
|
|
194
149
|
import LeadPlatformModel = require("./LeadPlatformModel");
|
|
@@ -2,11 +2,6 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
const LeadPlatformModel = require("./LeadPlatformModel");
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @typedef CloseVideoRoomParam
|
|
7
|
-
* @property {string} uniqueName - Unique name of Video Room
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
5
|
/**
|
|
11
6
|
* @typedef CreateCustomFormParam
|
|
12
7
|
* @property {LeadPlatformModel.CreateCustomFormPayload} body
|
|
@@ -63,29 +58,7 @@ const LeadPlatformModel = require("./LeadPlatformModel");
|
|
|
63
58
|
* @property {string} [category] - Filter tickets on category
|
|
64
59
|
*/
|
|
65
60
|
|
|
66
|
-
/**
|
|
67
|
-
* @typedef GetNewTokenForVideoRoomParam
|
|
68
|
-
* @property {string} uniqueName - Unique name of video room
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @typedef GetNewVideoParticipantsParam
|
|
73
|
-
* @property {string} uniqueName - Unique name of Video Room
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @typedef OpenVideoRoomParam
|
|
78
|
-
* @property {LeadPlatformModel.CreateVideoRoomPayload} body
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
61
|
class LeadPlatformApplicationValidator {
|
|
82
|
-
/** @returns {CloseVideoRoomParam} */
|
|
83
|
-
static closeVideoRoom() {
|
|
84
|
-
return Joi.object({
|
|
85
|
-
uniqueName: Joi.string().allow("").required(),
|
|
86
|
-
}).required();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
62
|
/** @returns {CreateCustomFormParam} */
|
|
90
63
|
static createCustomForm() {
|
|
91
64
|
return Joi.object({
|
|
@@ -161,27 +134,6 @@ class LeadPlatformApplicationValidator {
|
|
|
161
134
|
category: Joi.string().allow(""),
|
|
162
135
|
}).required();
|
|
163
136
|
}
|
|
164
|
-
|
|
165
|
-
/** @returns {GetNewTokenForVideoRoomParam} */
|
|
166
|
-
static getNewTokenForVideoRoom() {
|
|
167
|
-
return Joi.object({
|
|
168
|
-
uniqueName: Joi.string().allow("").required(),
|
|
169
|
-
}).required();
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/** @returns {GetNewVideoParticipantsParam} */
|
|
173
|
-
static getNewVideoParticipants() {
|
|
174
|
-
return Joi.object({
|
|
175
|
-
uniqueName: Joi.string().allow("").required(),
|
|
176
|
-
}).required();
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/** @returns {OpenVideoRoomParam} */
|
|
180
|
-
static openVideoRoom() {
|
|
181
|
-
return Joi.object({
|
|
182
|
-
body: LeadPlatformModel.CreateVideoRoomPayload().required(),
|
|
183
|
-
}).required();
|
|
184
|
-
}
|
|
185
137
|
}
|
|
186
138
|
|
|
187
139
|
module.exports = LeadPlatformApplicationValidator;
|
|
@@ -46,12 +46,12 @@ declare class Lead {
|
|
|
46
46
|
* @param {LeadPlatformValidator.GetGeneralConfigParam} arg - Arg object
|
|
47
47
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
48
48
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
49
|
-
* @returns {Promise<LeadPlatformModel.
|
|
49
|
+
* @returns {Promise<LeadPlatformModel.GeneralConfigResponse>} - Success response
|
|
50
50
|
* @name getGeneralConfig
|
|
51
51
|
* @summary: Get general configuration
|
|
52
52
|
* @description: Get general configuration settings related to support system for company tickets - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getGeneralConfig/).
|
|
53
53
|
*/
|
|
54
|
-
getGeneralConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise<LeadPlatformModel.
|
|
54
|
+
getGeneralConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise<LeadPlatformModel.GeneralConfigResponse>;
|
|
55
55
|
/**
|
|
56
56
|
* @param {LeadPlatformValidator.GetPlatformTicketParam} arg - Arg object
|
|
57
57
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -82,29 +82,6 @@ declare class Lead {
|
|
|
82
82
|
* @description: List all tickets created within the platform at company level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getPlatformTickets/).
|
|
83
83
|
*/
|
|
84
84
|
getPlatformTickets({ items, filters, q, status, priority, category, pageNo, pageSize, requestHeaders, }?: LeadPlatformValidator.GetPlatformTicketsParam, { responseHeaders }?: object): Promise<LeadPlatformModel.TicketList>;
|
|
85
|
-
/**
|
|
86
|
-
* @param {LeadPlatformValidator.GetPlatformVideoParticipantsParam} arg - Arg object
|
|
87
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
88
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
89
|
-
* @returns {Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>}
|
|
90
|
-
* - Success response
|
|
91
|
-
*
|
|
92
|
-
* @name getPlatformVideoParticipants
|
|
93
|
-
* @summary: List video Room Participants
|
|
94
|
-
* @description: Get a list of participants in a platform video room - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getPlatformVideoParticipants/).
|
|
95
|
-
*/
|
|
96
|
-
getPlatformVideoParticipants({ uniqueName, requestHeaders }?: LeadPlatformValidator.GetPlatformVideoParticipantsParam, { responseHeaders }?: object): Promise<LeadPlatformModel.GetParticipantsInsideVideoRoomResponse>;
|
|
97
|
-
/**
|
|
98
|
-
* @param {LeadPlatformValidator.GetTokenForPlatformVideoRoomParam} arg - Arg object
|
|
99
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
100
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
101
|
-
* @returns {Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>} -
|
|
102
|
-
* Success response
|
|
103
|
-
* @name getTokenForPlatformVideoRoom
|
|
104
|
-
* @summary: Get video Room Token
|
|
105
|
-
* @description: Get an access token for a platform video room. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTokenForPlatformVideoRoom/).
|
|
106
|
-
*/
|
|
107
|
-
getTokenForPlatformVideoRoom({ uniqueName, requestHeaders }?: LeadPlatformValidator.GetTokenForPlatformVideoRoomParam, { responseHeaders }?: object): Promise<LeadPlatformModel.GetTokenForVideoRoomResponse>;
|
|
108
85
|
/**
|
|
109
86
|
* @param {LeadPlatformValidator.SubmitFeedbackParam} arg - Arg object
|
|
110
87
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|