@gofynd/fdk-client-javascript 1.4.15-beta.6 → 1.4.15-beta.8
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 +5 -5
- package/sdk/application/Cart/CartApplicationClient.js +26 -252
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
- package/sdk/application/Content/ContentApplicationClient.d.ts +8 -8
- package/sdk/application/Content/ContentApplicationClient.js +44 -206
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +5 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -30
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +5 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +32 -128
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
- package/sdk/application/Order/OrderApplicationClient.js +63 -142
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +6 -418
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +2 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -1
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +1 -1
- package/sdk/public/Content/ContentPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -107,6 +107,19 @@ export = ServiceabilityPlatformValidator;
|
|
|
107
107
|
* @typedef GetZoneByIdParam
|
|
108
108
|
* @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone.
|
|
109
109
|
*/
|
|
110
|
+
/**
|
|
111
|
+
* @typedef GetZonesParam
|
|
112
|
+
* @property {number} [pageNo] - Index of the item to start returning with
|
|
113
|
+
* @property {number} [pageSize] - Determines the items to be displayed in a page
|
|
114
|
+
* @property {boolean} [isActive] - Status of Zone (either active or inactive)
|
|
115
|
+
* @property {string} [applicationIds] - Zones filtered by applications
|
|
116
|
+
* @property {string} [q] - Search with name as a free text
|
|
117
|
+
* @property {string} [countryIsoCode] - ISO2 code of the country
|
|
118
|
+
* @property {string} [state] - State name
|
|
119
|
+
* @property {string} [city] - City name
|
|
120
|
+
* @property {string} [pincode] - Pincode value to search zones
|
|
121
|
+
* @property {string} [sector] - Sector value to search zones
|
|
122
|
+
*/
|
|
110
123
|
/**
|
|
111
124
|
* @typedef UpdateCompanyConfigurationParam
|
|
112
125
|
* @property {ServiceabilityPlatformModel.CompanyConfig} body
|
|
@@ -179,6 +192,8 @@ declare class ServiceabilityPlatformValidator {
|
|
|
179
192
|
static getServiceability(): GetServiceabilityParam;
|
|
180
193
|
/** @returns {GetZoneByIdParam} */
|
|
181
194
|
static getZoneById(): GetZoneByIdParam;
|
|
195
|
+
/** @returns {GetZonesParam} */
|
|
196
|
+
static getZones(): GetZonesParam;
|
|
182
197
|
/** @returns {UpdateCompanyConfigurationParam} */
|
|
183
198
|
static updateCompanyConfiguration(): UpdateCompanyConfigurationParam;
|
|
184
199
|
/** @returns {UpdateCourierPartnerAccountParam} */
|
|
@@ -193,7 +208,7 @@ declare class ServiceabilityPlatformValidator {
|
|
|
193
208
|
static updateZoneById(): UpdateZoneByIdParam;
|
|
194
209
|
}
|
|
195
210
|
declare namespace ServiceabilityPlatformValidator {
|
|
196
|
-
export { BulkServiceabilityParam, BulkTatParam, CreateCourierPartnerAccountParam, CreatePackageMaterialParam, CreatePackageMaterialRuleParam, CreateZoneParam, GetAllStoresParam, GetBulkServiceabilityParam, GetBulkTatParam, GetCompanyConfigurationParam, GetCourierPartnerAccountParam, GetCourierPartnerAccountsParam, GetOptimalLocationsParam, GetPackageMaterialListParam, GetPackageMaterialRuleParam, GetPackageMaterialRulesParam, GetPackageMaterialsParam, GetServiceabilityParam, GetZoneByIdParam, UpdateCompanyConfigurationParam, UpdateCourierPartnerAccountParam, UpdatePackageMaterialRuleParam, UpdatePackageMaterialsParam, UpdateServiceabilityParam, UpdateZoneByIdParam };
|
|
211
|
+
export { BulkServiceabilityParam, BulkTatParam, CreateCourierPartnerAccountParam, CreatePackageMaterialParam, CreatePackageMaterialRuleParam, CreateZoneParam, GetAllStoresParam, GetBulkServiceabilityParam, GetBulkTatParam, GetCompanyConfigurationParam, GetCourierPartnerAccountParam, GetCourierPartnerAccountsParam, GetOptimalLocationsParam, GetPackageMaterialListParam, GetPackageMaterialRuleParam, GetPackageMaterialRulesParam, GetPackageMaterialsParam, GetServiceabilityParam, GetZoneByIdParam, GetZonesParam, UpdateCompanyConfigurationParam, UpdateCourierPartnerAccountParam, UpdatePackageMaterialRuleParam, UpdatePackageMaterialsParam, UpdateServiceabilityParam, UpdateZoneByIdParam };
|
|
197
212
|
}
|
|
198
213
|
type BulkServiceabilityParam = {
|
|
199
214
|
/**
|
|
@@ -422,6 +437,48 @@ type GetZoneByIdParam = {
|
|
|
422
437
|
*/
|
|
423
438
|
zoneId: string;
|
|
424
439
|
};
|
|
440
|
+
type GetZonesParam = {
|
|
441
|
+
/**
|
|
442
|
+
* - Index of the item to start returning with
|
|
443
|
+
*/
|
|
444
|
+
pageNo?: number;
|
|
445
|
+
/**
|
|
446
|
+
* - Determines the items to be displayed in a page
|
|
447
|
+
*/
|
|
448
|
+
pageSize?: number;
|
|
449
|
+
/**
|
|
450
|
+
* - Status of Zone (either active or inactive)
|
|
451
|
+
*/
|
|
452
|
+
isActive?: boolean;
|
|
453
|
+
/**
|
|
454
|
+
* - Zones filtered by applications
|
|
455
|
+
*/
|
|
456
|
+
applicationIds?: string;
|
|
457
|
+
/**
|
|
458
|
+
* - Search with name as a free text
|
|
459
|
+
*/
|
|
460
|
+
q?: string;
|
|
461
|
+
/**
|
|
462
|
+
* - ISO2 code of the country
|
|
463
|
+
*/
|
|
464
|
+
countryIsoCode?: string;
|
|
465
|
+
/**
|
|
466
|
+
* - State name
|
|
467
|
+
*/
|
|
468
|
+
state?: string;
|
|
469
|
+
/**
|
|
470
|
+
* - City name
|
|
471
|
+
*/
|
|
472
|
+
city?: string;
|
|
473
|
+
/**
|
|
474
|
+
* - Pincode value to search zones
|
|
475
|
+
*/
|
|
476
|
+
pincode?: string;
|
|
477
|
+
/**
|
|
478
|
+
* - Sector value to search zones
|
|
479
|
+
*/
|
|
480
|
+
sector?: string;
|
|
481
|
+
};
|
|
425
482
|
type UpdateCompanyConfigurationParam = {
|
|
426
483
|
body: ServiceabilityPlatformModel.CompanyConfig;
|
|
427
484
|
};
|
|
@@ -129,6 +129,20 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel");
|
|
|
129
129
|
* @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone.
|
|
130
130
|
*/
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @typedef GetZonesParam
|
|
134
|
+
* @property {number} [pageNo] - Index of the item to start returning with
|
|
135
|
+
* @property {number} [pageSize] - Determines the items to be displayed in a page
|
|
136
|
+
* @property {boolean} [isActive] - Status of Zone (either active or inactive)
|
|
137
|
+
* @property {string} [applicationIds] - Zones filtered by applications
|
|
138
|
+
* @property {string} [q] - Search with name as a free text
|
|
139
|
+
* @property {string} [countryIsoCode] - ISO2 code of the country
|
|
140
|
+
* @property {string} [state] - State name
|
|
141
|
+
* @property {string} [city] - City name
|
|
142
|
+
* @property {string} [pincode] - Pincode value to search zones
|
|
143
|
+
* @property {string} [sector] - Sector value to search zones
|
|
144
|
+
*/
|
|
145
|
+
|
|
132
146
|
/**
|
|
133
147
|
* @typedef UpdateCompanyConfigurationParam
|
|
134
148
|
* @property {ServiceabilityPlatformModel.CompanyConfig} body
|
|
@@ -334,6 +348,22 @@ class ServiceabilityPlatformValidator {
|
|
|
334
348
|
}).required();
|
|
335
349
|
}
|
|
336
350
|
|
|
351
|
+
/** @returns {GetZonesParam} */
|
|
352
|
+
static getZones() {
|
|
353
|
+
return Joi.object({
|
|
354
|
+
pageNo: Joi.number(),
|
|
355
|
+
pageSize: Joi.number(),
|
|
356
|
+
isActive: Joi.boolean(),
|
|
357
|
+
applicationIds: Joi.string().allow(""),
|
|
358
|
+
q: Joi.string().allow(""),
|
|
359
|
+
countryIsoCode: Joi.string().allow(""),
|
|
360
|
+
state: Joi.string().allow(""),
|
|
361
|
+
city: Joi.string().allow(""),
|
|
362
|
+
pincode: Joi.string().allow(""),
|
|
363
|
+
sector: Joi.string().allow(""),
|
|
364
|
+
}).required();
|
|
365
|
+
}
|
|
366
|
+
|
|
337
367
|
/** @returns {UpdateCompanyConfigurationParam} */
|
|
338
368
|
static updateCompanyConfiguration() {
|
|
339
369
|
return Joi.object({
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const ConfigurationPublicValidator = require("./ConfigurationPublicValidator");
|
|
11
12
|
const ConfigurationPublicModel = require("./ConfigurationPublicModel");
|
|
@@ -49,14 +50,6 @@ class Configuration {
|
|
|
49
50
|
{ locationType, id, requestHeaders } = { requestHeaders: {} },
|
|
50
51
|
{ responseHeaders } = { responseHeaders: false }
|
|
51
52
|
) {
|
|
52
|
-
let invalidInput = [];
|
|
53
|
-
if (invalidInput.length) {
|
|
54
|
-
const error = new Error();
|
|
55
|
-
error.message = "Missing required field";
|
|
56
|
-
error.details = invalidInput;
|
|
57
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
53
|
const { error } = ConfigurationPublicValidator.getLocations().validate(
|
|
61
54
|
{ locationType, id },
|
|
62
55
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -137,14 +130,6 @@ class Configuration {
|
|
|
137
130
|
{ authorization, query, requestHeaders } = { requestHeaders: {} },
|
|
138
131
|
{ responseHeaders } = { responseHeaders: false }
|
|
139
132
|
) {
|
|
140
|
-
let invalidInput = [];
|
|
141
|
-
if (invalidInput.length) {
|
|
142
|
-
const error = new Error();
|
|
143
|
-
error.message = "Missing required field";
|
|
144
|
-
error.details = invalidInput;
|
|
145
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
146
|
-
}
|
|
147
|
-
|
|
148
133
|
const { error } = ConfigurationPublicValidator.searchApplication().validate(
|
|
149
134
|
{ authorization, query },
|
|
150
135
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -16,7 +16,7 @@ declare class Content {
|
|
|
16
16
|
* @summary: Get credentials to power chat support systems
|
|
17
17
|
* @description: Get credentials for support system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCredentialsByEntity/).
|
|
18
18
|
*/
|
|
19
|
-
getCredentialsByEntity({ entity, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object): Promise<ContentPublicModel.CredentialsSchema>;
|
|
19
|
+
getCredentialsByEntity({ entity, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.CredentialsSchema>;
|
|
20
20
|
}
|
|
21
21
|
import ContentPublicValidator = require("./ContentPublicValidator");
|
|
22
22
|
import ContentPublicModel = require("./ContentPublicModel");
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const ContentPublicValidator = require("./ContentPublicValidator");
|
|
11
12
|
const ContentPublicModel = require("./ContentPublicModel");
|
|
@@ -47,18 +48,12 @@ class Content {
|
|
|
47
48
|
{ entity, requestHeaders } = { requestHeaders: {} },
|
|
48
49
|
{ responseHeaders } = { responseHeaders: false }
|
|
49
50
|
) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
path: ["entity"],
|
|
51
|
+
const errors = validateRequiredParams(arguments[0], ["entity"]);
|
|
52
|
+
if (errors.length > 0) {
|
|
53
|
+
const error = new FDKClientValidationError({
|
|
54
|
+
message: "Missing required field",
|
|
55
|
+
details: errors,
|
|
56
56
|
});
|
|
57
|
-
}
|
|
58
|
-
if (invalidInput.length) {
|
|
59
|
-
const error = new Error();
|
|
60
|
-
error.message = "Missing required field";
|
|
61
|
-
error.details = invalidInput;
|
|
62
57
|
return Promise.reject(new FDKClientValidationError(error));
|
|
63
58
|
}
|
|
64
59
|
|
|
@@ -16,7 +16,7 @@ declare class Partner {
|
|
|
16
16
|
* @summary: Get panel extension details
|
|
17
17
|
* @description: Retrieve detailed information about panel extensions in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/partner/getPanelExtensionDetails/).
|
|
18
18
|
*/
|
|
19
|
-
getPanelExtensionDetails({ slug, requestHeaders }?: PartnerPublicValidator.GetPanelExtensionDetailsParam, { responseHeaders }?: object): Promise<PartnerPublicModel.ExtensionUsingSlug>;
|
|
19
|
+
getPanelExtensionDetails({ slug, requestHeaders }?: PartnerPublicValidator.GetPanelExtensionDetailsParam, { responseHeaders }?: object, ...args: any[]): Promise<PartnerPublicModel.ExtensionUsingSlug>;
|
|
20
20
|
}
|
|
21
21
|
import PartnerPublicValidator = require("./PartnerPublicValidator");
|
|
22
22
|
import PartnerPublicModel = require("./PartnerPublicModel");
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const PartnerPublicValidator = require("./PartnerPublicValidator");
|
|
11
12
|
const PartnerPublicModel = require("./PartnerPublicModel");
|
|
@@ -48,18 +49,12 @@ class Partner {
|
|
|
48
49
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
49
50
|
{ responseHeaders } = { responseHeaders: false }
|
|
50
51
|
) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
path: ["slug"],
|
|
52
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
53
|
+
if (errors.length > 0) {
|
|
54
|
+
const error = new FDKClientValidationError({
|
|
55
|
+
message: "Missing required field",
|
|
56
|
+
details: errors,
|
|
57
57
|
});
|
|
58
|
-
}
|
|
59
|
-
if (invalidInput.length) {
|
|
60
|
-
const error = new Error();
|
|
61
|
-
error.message = "Missing required field";
|
|
62
|
-
error.details = invalidInput;
|
|
63
58
|
return Promise.reject(new FDKClientValidationError(error));
|
|
64
59
|
}
|
|
65
60
|
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const WebhookPublicValidator = require("./WebhookPublicValidator");
|
|
11
12
|
const WebhookPublicModel = require("./WebhookPublicModel");
|
|
@@ -55,14 +56,6 @@ class Webhook {
|
|
|
55
56
|
{ requestHeaders } = { requestHeaders: {} },
|
|
56
57
|
{ responseHeaders } = { responseHeaders: false }
|
|
57
58
|
) {
|
|
58
|
-
let invalidInput = [];
|
|
59
|
-
if (invalidInput.length) {
|
|
60
|
-
const error = new Error();
|
|
61
|
-
error.message = "Missing required field";
|
|
62
|
-
error.details = invalidInput;
|
|
63
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
59
|
const { error } = WebhookPublicValidator.fetchAllWebhookEvents().validate(
|
|
67
60
|
{},
|
|
68
61
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -141,14 +134,6 @@ class Webhook {
|
|
|
141
134
|
{ requestHeaders } = { requestHeaders: {} },
|
|
142
135
|
{ responseHeaders } = { responseHeaders: false }
|
|
143
136
|
) {
|
|
144
|
-
let invalidInput = [];
|
|
145
|
-
if (invalidInput.length) {
|
|
146
|
-
const error = new Error();
|
|
147
|
-
error.message = "Missing required field";
|
|
148
|
-
error.details = invalidInput;
|
|
149
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
137
|
const { error } = WebhookPublicValidator.notifyDepricatedEvent().validate(
|
|
153
138
|
{},
|
|
154
139
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -227,14 +212,6 @@ class Webhook {
|
|
|
227
212
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
228
213
|
{ responseHeaders } = { responseHeaders: false }
|
|
229
214
|
) {
|
|
230
|
-
let invalidInput = [];
|
|
231
|
-
if (invalidInput.length) {
|
|
232
|
-
const error = new Error();
|
|
233
|
-
error.message = "Missing required field";
|
|
234
|
-
error.details = invalidInput;
|
|
235
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
236
|
-
}
|
|
237
|
-
|
|
238
215
|
const {
|
|
239
216
|
error,
|
|
240
217
|
} = WebhookPublicValidator.queryWebhookEventDetails().validate(
|
|
@@ -315,14 +292,6 @@ class Webhook {
|
|
|
315
292
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
316
293
|
{ responseHeaders } = { responseHeaders: false }
|
|
317
294
|
) {
|
|
318
|
-
let invalidInput = [];
|
|
319
|
-
if (invalidInput.length) {
|
|
320
|
-
const error = new Error();
|
|
321
|
-
error.message = "Missing required field";
|
|
322
|
-
error.details = invalidInput;
|
|
323
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
324
|
-
}
|
|
325
|
-
|
|
326
295
|
const {
|
|
327
296
|
error,
|
|
328
297
|
} = WebhookPublicValidator.testHandlerTransformation().validate(
|
|
@@ -403,14 +372,6 @@ class Webhook {
|
|
|
403
372
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
404
373
|
{ responseHeaders } = { responseHeaders: false }
|
|
405
374
|
) {
|
|
406
|
-
let invalidInput = [];
|
|
407
|
-
if (invalidInput.length) {
|
|
408
|
-
const error = new Error();
|
|
409
|
-
error.message = "Missing required field";
|
|
410
|
-
error.details = invalidInput;
|
|
411
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
412
|
-
}
|
|
413
|
-
|
|
414
375
|
const { error } = WebhookPublicValidator.validateSchema().validate(
|
|
415
376
|
{ body },
|
|
416
377
|
{ abortEarly: false, allowUnknown: true }
|