@gofynd/fdk-client-javascript 1.3.11-beta.7 → 1.3.11-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 +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +5 -3
- package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
- package/sdk/application/Cart/CartApplicationModel.js +74 -0
- package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
- package/sdk/application/Cart/CartApplicationValidator.js +4 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
- package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
- package/sdk/application/Content/ContentApplicationClient.js +246 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
- package/sdk/application/Content/ContentApplicationModel.js +252 -0
- package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
- package/sdk/application/Content/ContentApplicationValidator.js +41 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
- package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +32 -8
- package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
- package/sdk/application/Order/OrderApplicationModel.js +6 -0
- package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
- package/sdk/application/Order/OrderApplicationValidator.js +8 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
- package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
- package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
- package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
- package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
- package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
- package/sdk/application/User/UserApplicationClient.d.ts +33 -0
- package/sdk/application/User/UserApplicationClient.js +239 -0
- package/sdk/application/User/UserApplicationModel.d.ts +28 -13
- package/sdk/application/User/UserApplicationModel.js +36 -12
- package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
- package/sdk/application/User/UserApplicationValidator.js +36 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
- package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
- package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
- package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
- package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
- package/sdk/platform/Cart/CartPlatformModel.js +71 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
- package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3630 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +342 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +401 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2000 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1094 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1356 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +238 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +310 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -5
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +18 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
- package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
- package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1032 -470
- package/sdk/platform/Order/OrderPlatformModel.js +1187 -534
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
- package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
- package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +4 -2
- package/sdk/platform/PlatformClient.js +8 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
- package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
- package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
- package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
- package/sdk/platform/User/UserPlatformModel.js +256 -5
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
- package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
- package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
- package/sdk/public/Billing/BillingPublicClient.js +116 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
- package/sdk/public/Billing/BillingPublicModel.js +96 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
- package/sdk/public/Billing/BillingPublicValidator.js +19 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +114 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
- package/sdk/public/Content/ContentPublicModel.js +60 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +4 -0
- package/sdk/public/PublicClient.js +8 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
- package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export = ContentPublicModel;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef ContentAPIError
|
|
4
|
+
* @property {string} [code]
|
|
5
|
+
* @property {string} [exception]
|
|
6
|
+
* @property {string} [info]
|
|
7
|
+
* @property {string} [message]
|
|
8
|
+
* @property {Object} [meta]
|
|
9
|
+
* @property {string} [request_id]
|
|
10
|
+
* @property {string} [stack_trace]
|
|
11
|
+
* @property {number} [status]
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @typedef CredentialSchema
|
|
15
|
+
* @property {Object} [configuration]
|
|
16
|
+
* @property {string} [entity_type]
|
|
17
|
+
* @property {boolean} [is_enable]
|
|
18
|
+
* @property {string} [type]
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* @typedef CredentialsSchema
|
|
22
|
+
* @property {CredentialSchema[]} [items]
|
|
23
|
+
*/
|
|
24
|
+
declare class ContentPublicModel {
|
|
25
|
+
}
|
|
26
|
+
declare namespace ContentPublicModel {
|
|
27
|
+
export { ContentAPIError, CredentialSchema, CredentialsSchema };
|
|
28
|
+
}
|
|
29
|
+
/** @returns {ContentAPIError} */
|
|
30
|
+
declare function ContentAPIError(): ContentAPIError;
|
|
31
|
+
type ContentAPIError = {
|
|
32
|
+
code?: string;
|
|
33
|
+
exception?: string;
|
|
34
|
+
info?: string;
|
|
35
|
+
message?: string;
|
|
36
|
+
meta?: any;
|
|
37
|
+
request_id?: string;
|
|
38
|
+
stack_trace?: string;
|
|
39
|
+
status?: number;
|
|
40
|
+
};
|
|
41
|
+
/** @returns {CredentialSchema} */
|
|
42
|
+
declare function CredentialSchema(): CredentialSchema;
|
|
43
|
+
type CredentialSchema = {
|
|
44
|
+
configuration?: any;
|
|
45
|
+
entity_type?: string;
|
|
46
|
+
is_enable?: boolean;
|
|
47
|
+
type?: string;
|
|
48
|
+
};
|
|
49
|
+
/** @returns {CredentialsSchema} */
|
|
50
|
+
declare function CredentialsSchema(): CredentialsSchema;
|
|
51
|
+
type CredentialsSchema = {
|
|
52
|
+
items?: CredentialSchema[];
|
|
53
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef ContentAPIError
|
|
5
|
+
* @property {string} [code]
|
|
6
|
+
* @property {string} [exception]
|
|
7
|
+
* @property {string} [info]
|
|
8
|
+
* @property {string} [message]
|
|
9
|
+
* @property {Object} [meta]
|
|
10
|
+
* @property {string} [request_id]
|
|
11
|
+
* @property {string} [stack_trace]
|
|
12
|
+
* @property {number} [status]
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef CredentialSchema
|
|
17
|
+
* @property {Object} [configuration]
|
|
18
|
+
* @property {string} [entity_type]
|
|
19
|
+
* @property {boolean} [is_enable]
|
|
20
|
+
* @property {string} [type]
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @typedef CredentialsSchema
|
|
25
|
+
* @property {CredentialSchema[]} [items]
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
class ContentPublicModel {
|
|
29
|
+
/** @returns {ContentAPIError} */
|
|
30
|
+
static ContentAPIError() {
|
|
31
|
+
return Joi.object({
|
|
32
|
+
code: Joi.string().allow(""),
|
|
33
|
+
exception: Joi.string().allow(""),
|
|
34
|
+
info: Joi.string().allow(""),
|
|
35
|
+
message: Joi.string().allow(""),
|
|
36
|
+
meta: Joi.any(),
|
|
37
|
+
request_id: Joi.string().allow(""),
|
|
38
|
+
stack_trace: Joi.string().allow(""),
|
|
39
|
+
status: Joi.number(),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** @returns {CredentialSchema} */
|
|
44
|
+
static CredentialSchema() {
|
|
45
|
+
return Joi.object({
|
|
46
|
+
configuration: Joi.any(),
|
|
47
|
+
entity_type: Joi.string().allow(""),
|
|
48
|
+
is_enable: Joi.boolean(),
|
|
49
|
+
type: Joi.string().allow(""),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @returns {CredentialsSchema} */
|
|
54
|
+
static CredentialsSchema() {
|
|
55
|
+
return Joi.object({
|
|
56
|
+
items: Joi.array().items(ContentPublicModel.CredentialSchema()),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
module.exports = ContentPublicModel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export = ContentPublicValidator;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef GetCredentialsByEntityParam
|
|
4
|
+
* @property {string} [entity] - Server Type
|
|
5
|
+
*/
|
|
6
|
+
declare class ContentPublicValidator {
|
|
7
|
+
/** @returns {GetCredentialsByEntityParam} */
|
|
8
|
+
static getCredentialsByEntity(): GetCredentialsByEntityParam;
|
|
9
|
+
}
|
|
10
|
+
declare namespace ContentPublicValidator {
|
|
11
|
+
export { GetCredentialsByEntityParam };
|
|
12
|
+
}
|
|
13
|
+
type GetCredentialsByEntityParam = {
|
|
14
|
+
/**
|
|
15
|
+
* - Server Type
|
|
16
|
+
*/
|
|
17
|
+
entity?: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
const ContentPublicModel = require("./ContentPublicModel");
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef GetCredentialsByEntityParam
|
|
7
|
+
* @property {string} [entity] - Server Type
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
class ContentPublicValidator {
|
|
11
|
+
/** @returns {GetCredentialsByEntityParam} */
|
|
12
|
+
static getCredentialsByEntity() {
|
|
13
|
+
return Joi.object({
|
|
14
|
+
entity: Joi.string().allow(""),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = ContentPublicValidator;
|
|
@@ -12,7 +12,9 @@ declare class PublicClient {
|
|
|
12
12
|
*/
|
|
13
13
|
constructor(config: import("./PublicConfig"));
|
|
14
14
|
config: import("./PublicConfig");
|
|
15
|
+
billing: Billing;
|
|
15
16
|
configuration: Configuration;
|
|
17
|
+
content: Content;
|
|
16
18
|
inventory: Inventory;
|
|
17
19
|
partner: Partner;
|
|
18
20
|
webhook: Webhook;
|
|
@@ -24,7 +26,9 @@ declare class PublicClient {
|
|
|
24
26
|
*/
|
|
25
27
|
setExtraHeaders(header: object): void;
|
|
26
28
|
}
|
|
29
|
+
import Billing = require("./Billing/BillingPublicClient");
|
|
27
30
|
import Configuration = require("./Configuration/ConfigurationPublicClient");
|
|
31
|
+
import Content = require("./Content/ContentPublicClient");
|
|
28
32
|
import Inventory = require("./Inventory/InventoryPublicClient");
|
|
29
33
|
import Partner = require("./Partner/PartnerPublicClient");
|
|
30
34
|
import Webhook = require("./Webhook/WebhookPublicClient");
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
const Billing = require("./Billing/BillingPublicClient");
|
|
2
|
+
|
|
1
3
|
const Configuration = require("./Configuration/ConfigurationPublicClient");
|
|
2
4
|
|
|
5
|
+
const Content = require("./Content/ContentPublicClient");
|
|
6
|
+
|
|
3
7
|
const Inventory = require("./Inventory/InventoryPublicClient");
|
|
4
8
|
|
|
5
9
|
const Partner = require("./Partner/PartnerPublicClient");
|
|
@@ -22,8 +26,12 @@ class PublicClient {
|
|
|
22
26
|
constructor(config) {
|
|
23
27
|
this.config = config;
|
|
24
28
|
|
|
29
|
+
this.billing = new Billing(config);
|
|
30
|
+
|
|
25
31
|
this.configuration = new Configuration(config);
|
|
26
32
|
|
|
33
|
+
this.content = new Content(config);
|
|
34
|
+
|
|
27
35
|
this.inventory = new Inventory(config);
|
|
28
36
|
|
|
29
37
|
this.partner = new Partner(config);
|
|
@@ -4,7 +4,10 @@ declare class Webhook {
|
|
|
4
4
|
_conf: any;
|
|
5
5
|
_relativeUrls: {
|
|
6
6
|
fetchAllWebhookEvents: string;
|
|
7
|
+
notifyDepricatedEvent: string;
|
|
7
8
|
queryWebhookEventDetails: string;
|
|
9
|
+
testHandlerTransformation: string;
|
|
10
|
+
validateSchema: string;
|
|
8
11
|
};
|
|
9
12
|
_urls: {};
|
|
10
13
|
updateUrls(urls: any): void;
|
|
@@ -18,6 +21,16 @@ declare class Webhook {
|
|
|
18
21
|
* @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/).
|
|
19
22
|
*/
|
|
20
23
|
fetchAllWebhookEvents({ requestHeaders }?: any, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* @param {WebhookPublicValidator.NotifyDepricatedEventParam} arg - Arg object.
|
|
26
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
27
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
28
|
+
* @returns {Promise<WebhookPublicModel.EventNotifier>} - Success response
|
|
29
|
+
* @name notifyDepricatedEvent
|
|
30
|
+
* @summary: Notifies all the events that are going to depricate
|
|
31
|
+
* @description: Notifies all the events that are subscribed and are going to deprecate or new version is available for those events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/notifyDepricatedEvent/).
|
|
32
|
+
*/
|
|
33
|
+
notifyDepricatedEvent({ requestHeaders }?: any, { responseHeaders }?: object): Promise<WebhookPublicModel.EventNotifier>;
|
|
21
34
|
/**
|
|
22
35
|
* @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object.
|
|
23
36
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -28,6 +41,26 @@ declare class Webhook {
|
|
|
28
41
|
* @description: Get Webhook Event Details for provided events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/).
|
|
29
42
|
*/
|
|
30
43
|
queryWebhookEventDetails({ body, requestHeaders }?: WebhookPublicValidator.QueryWebhookEventDetailsParam, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* @param {WebhookPublicValidator.TestHandlerTransformationParam} arg - Arg object.
|
|
46
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
47
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
48
|
+
* @returns {Promise<WebhookPublicModel.TransformEventResponse>} - Success response
|
|
49
|
+
* @name testHandlerTransformation
|
|
50
|
+
* @summary: Test transformation of handler
|
|
51
|
+
* @description: Test transformation of handler - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/testHandlerTransformation/).
|
|
52
|
+
*/
|
|
53
|
+
testHandlerTransformation({ body, requestHeaders }?: WebhookPublicValidator.TestHandlerTransformationParam, { responseHeaders }?: object): Promise<WebhookPublicModel.TransformEventResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* @param {WebhookPublicValidator.ValidateSchemaParam} arg - Arg object.
|
|
56
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
57
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
58
|
+
* @returns {Promise<WebhookPublicModel.ValidateSchemaResponse>} - Success response
|
|
59
|
+
* @name validateSchema
|
|
60
|
+
* @summary: Validate Schema for an event
|
|
61
|
+
* @description: Validate Schema for an event - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/validateSchema/).
|
|
62
|
+
*/
|
|
63
|
+
validateSchema({ body, requestHeaders }?: WebhookPublicValidator.ValidateSchemaParam, { responseHeaders }?: object): Promise<WebhookPublicModel.ValidateSchemaResponse>;
|
|
31
64
|
}
|
|
32
65
|
import WebhookPublicModel = require("./WebhookPublicModel");
|
|
33
66
|
import WebhookPublicValidator = require("./WebhookPublicValidator");
|
|
@@ -15,8 +15,14 @@ class Webhook {
|
|
|
15
15
|
this._conf = _conf;
|
|
16
16
|
this._relativeUrls = {
|
|
17
17
|
fetchAllWebhookEvents: "/service/common/webhook/v1.0/events",
|
|
18
|
+
notifyDepricatedEvent:
|
|
19
|
+
"/service/common/webhook/v1.0/events/depricated-event-notifier",
|
|
18
20
|
queryWebhookEventDetails:
|
|
19
21
|
"/service/common/webhook/v1.0/events/query-event-details",
|
|
22
|
+
testHandlerTransformation:
|
|
23
|
+
"/service/common/webhook/v1.0/events/transform-event",
|
|
24
|
+
validateSchema:
|
|
25
|
+
"/service/common/webhook/v1.0/events/validate-event-schema",
|
|
20
26
|
};
|
|
21
27
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
22
28
|
(urls, [method, relativeUrl]) => {
|
|
@@ -112,6 +118,84 @@ class Webhook {
|
|
|
112
118
|
return response;
|
|
113
119
|
}
|
|
114
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @param {WebhookPublicValidator.NotifyDepricatedEventParam} arg - Arg object.
|
|
123
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
124
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
125
|
+
* @returns {Promise<WebhookPublicModel.EventNotifier>} - Success response
|
|
126
|
+
* @name notifyDepricatedEvent
|
|
127
|
+
* @summary: Notifies all the events that are going to depricate
|
|
128
|
+
* @description: Notifies all the events that are subscribed and are going to deprecate or new version is available for those events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/notifyDepricatedEvent/).
|
|
129
|
+
*/
|
|
130
|
+
async notifyDepricatedEvent(
|
|
131
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
132
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
133
|
+
) {
|
|
134
|
+
const { error } = WebhookPublicValidator.notifyDepricatedEvent().validate(
|
|
135
|
+
{},
|
|
136
|
+
{ abortEarly: false, allowUnknown: true }
|
|
137
|
+
);
|
|
138
|
+
if (error) {
|
|
139
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Showing warrnings if extra unknown parameters are found
|
|
143
|
+
const {
|
|
144
|
+
error: warrning,
|
|
145
|
+
} = WebhookPublicValidator.notifyDepricatedEvent().validate(
|
|
146
|
+
{},
|
|
147
|
+
{ abortEarly: false, allowUnknown: false }
|
|
148
|
+
);
|
|
149
|
+
if (warrning) {
|
|
150
|
+
Logger({
|
|
151
|
+
level: "WARN",
|
|
152
|
+
message: `Parameter Validation warrnings for public > Webhook > notifyDepricatedEvent \n ${warrning}`,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const query_params = {};
|
|
157
|
+
|
|
158
|
+
const xHeaders = {};
|
|
159
|
+
|
|
160
|
+
const response = await PublicAPIClient.execute(
|
|
161
|
+
this._conf,
|
|
162
|
+
"get",
|
|
163
|
+
constructUrl({
|
|
164
|
+
url: this._urls["notifyDepricatedEvent"],
|
|
165
|
+
params: {},
|
|
166
|
+
}),
|
|
167
|
+
query_params,
|
|
168
|
+
undefined,
|
|
169
|
+
{ ...xHeaders, ...requestHeaders },
|
|
170
|
+
{ responseHeaders }
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
let responseData = response;
|
|
174
|
+
if (responseHeaders) {
|
|
175
|
+
responseData = response[0];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const {
|
|
179
|
+
error: res_error,
|
|
180
|
+
} = WebhookPublicModel.EventNotifier().validate(responseData, {
|
|
181
|
+
abortEarly: false,
|
|
182
|
+
allowUnknown: true,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
if (res_error) {
|
|
186
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
187
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
188
|
+
} else {
|
|
189
|
+
Logger({
|
|
190
|
+
level: "WARN",
|
|
191
|
+
message: `Response Validation Warnings for public > Webhook > notifyDepricatedEvent \n ${res_error}`,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return response;
|
|
197
|
+
}
|
|
198
|
+
|
|
115
199
|
/**
|
|
116
200
|
* @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object.
|
|
117
201
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -191,6 +275,164 @@ class Webhook {
|
|
|
191
275
|
|
|
192
276
|
return response;
|
|
193
277
|
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @param {WebhookPublicValidator.TestHandlerTransformationParam} arg - Arg object.
|
|
281
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
282
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
283
|
+
* @returns {Promise<WebhookPublicModel.TransformEventResponse>} - Success response
|
|
284
|
+
* @name testHandlerTransformation
|
|
285
|
+
* @summary: Test transformation of handler
|
|
286
|
+
* @description: Test transformation of handler - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/testHandlerTransformation/).
|
|
287
|
+
*/
|
|
288
|
+
async testHandlerTransformation(
|
|
289
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
290
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
291
|
+
) {
|
|
292
|
+
const {
|
|
293
|
+
error,
|
|
294
|
+
} = WebhookPublicValidator.testHandlerTransformation().validate(
|
|
295
|
+
{ body },
|
|
296
|
+
{ abortEarly: false, allowUnknown: true }
|
|
297
|
+
);
|
|
298
|
+
if (error) {
|
|
299
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Showing warrnings if extra unknown parameters are found
|
|
303
|
+
const {
|
|
304
|
+
error: warrning,
|
|
305
|
+
} = WebhookPublicValidator.testHandlerTransformation().validate(
|
|
306
|
+
{ body },
|
|
307
|
+
{ abortEarly: false, allowUnknown: false }
|
|
308
|
+
);
|
|
309
|
+
if (warrning) {
|
|
310
|
+
Logger({
|
|
311
|
+
level: "WARN",
|
|
312
|
+
message: `Parameter Validation warrnings for public > Webhook > testHandlerTransformation \n ${warrning}`,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const query_params = {};
|
|
317
|
+
|
|
318
|
+
const xHeaders = {};
|
|
319
|
+
|
|
320
|
+
const response = await PublicAPIClient.execute(
|
|
321
|
+
this._conf,
|
|
322
|
+
"post",
|
|
323
|
+
constructUrl({
|
|
324
|
+
url: this._urls["testHandlerTransformation"],
|
|
325
|
+
params: {},
|
|
326
|
+
}),
|
|
327
|
+
query_params,
|
|
328
|
+
body,
|
|
329
|
+
{ ...xHeaders, ...requestHeaders },
|
|
330
|
+
{ responseHeaders }
|
|
331
|
+
);
|
|
332
|
+
|
|
333
|
+
let responseData = response;
|
|
334
|
+
if (responseHeaders) {
|
|
335
|
+
responseData = response[0];
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const {
|
|
339
|
+
error: res_error,
|
|
340
|
+
} = WebhookPublicModel.TransformEventResponse().validate(responseData, {
|
|
341
|
+
abortEarly: false,
|
|
342
|
+
allowUnknown: true,
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
if (res_error) {
|
|
346
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
347
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
348
|
+
} else {
|
|
349
|
+
Logger({
|
|
350
|
+
level: "WARN",
|
|
351
|
+
message: `Response Validation Warnings for public > Webhook > testHandlerTransformation \n ${res_error}`,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return response;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* @param {WebhookPublicValidator.ValidateSchemaParam} arg - Arg object.
|
|
361
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
362
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
363
|
+
* @returns {Promise<WebhookPublicModel.ValidateSchemaResponse>} - Success response
|
|
364
|
+
* @name validateSchema
|
|
365
|
+
* @summary: Validate Schema for an event
|
|
366
|
+
* @description: Validate Schema for an event - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/validateSchema/).
|
|
367
|
+
*/
|
|
368
|
+
async validateSchema(
|
|
369
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
370
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
371
|
+
) {
|
|
372
|
+
const { error } = WebhookPublicValidator.validateSchema().validate(
|
|
373
|
+
{ body },
|
|
374
|
+
{ abortEarly: false, allowUnknown: true }
|
|
375
|
+
);
|
|
376
|
+
if (error) {
|
|
377
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// Showing warrnings if extra unknown parameters are found
|
|
381
|
+
const {
|
|
382
|
+
error: warrning,
|
|
383
|
+
} = WebhookPublicValidator.validateSchema().validate(
|
|
384
|
+
{ body },
|
|
385
|
+
{ abortEarly: false, allowUnknown: false }
|
|
386
|
+
);
|
|
387
|
+
if (warrning) {
|
|
388
|
+
Logger({
|
|
389
|
+
level: "WARN",
|
|
390
|
+
message: `Parameter Validation warrnings for public > Webhook > validateSchema \n ${warrning}`,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const query_params = {};
|
|
395
|
+
|
|
396
|
+
const xHeaders = {};
|
|
397
|
+
|
|
398
|
+
const response = await PublicAPIClient.execute(
|
|
399
|
+
this._conf,
|
|
400
|
+
"post",
|
|
401
|
+
constructUrl({
|
|
402
|
+
url: this._urls["validateSchema"],
|
|
403
|
+
params: {},
|
|
404
|
+
}),
|
|
405
|
+
query_params,
|
|
406
|
+
body,
|
|
407
|
+
{ ...xHeaders, ...requestHeaders },
|
|
408
|
+
{ responseHeaders }
|
|
409
|
+
);
|
|
410
|
+
|
|
411
|
+
let responseData = response;
|
|
412
|
+
if (responseHeaders) {
|
|
413
|
+
responseData = response[0];
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const {
|
|
417
|
+
error: res_error,
|
|
418
|
+
} = WebhookPublicModel.ValidateSchemaResponse().validate(responseData, {
|
|
419
|
+
abortEarly: false,
|
|
420
|
+
allowUnknown: true,
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
if (res_error) {
|
|
424
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
425
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
426
|
+
} else {
|
|
427
|
+
Logger({
|
|
428
|
+
level: "WARN",
|
|
429
|
+
message: `Response Validation Warnings for public > Webhook > validateSchema \n ${res_error}`,
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
return response;
|
|
435
|
+
}
|
|
194
436
|
}
|
|
195
437
|
|
|
196
438
|
module.exports = Webhook;
|
|
@@ -6,8 +6,10 @@ export = WebhookPublicModel;
|
|
|
6
6
|
* @property {string} [display_name]
|
|
7
7
|
* @property {string} [event_category]
|
|
8
8
|
* @property {string} [event_name]
|
|
9
|
+
* @property {Object} [event_schema]
|
|
9
10
|
* @property {string} [event_type]
|
|
10
11
|
* @property {number} [id]
|
|
12
|
+
* @property {string} [updated_on]
|
|
11
13
|
* @property {string} [version]
|
|
12
14
|
*/
|
|
13
15
|
/**
|
|
@@ -21,10 +23,76 @@ export = WebhookPublicModel;
|
|
|
21
23
|
* @typedef EventConfigResponse
|
|
22
24
|
* @property {EventConfig[]} [event_configs]
|
|
23
25
|
*/
|
|
26
|
+
/**
|
|
27
|
+
* @typedef EventNotifier
|
|
28
|
+
* @property {string[]} [emails]
|
|
29
|
+
* @property {string} [message]
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* @typedef EventSchema
|
|
33
|
+
* @property {Object} [meta]
|
|
34
|
+
* @property {Object} [payload]
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* @typedef InternalTransformEvent
|
|
38
|
+
* @property {number} [created_timestamp]
|
|
39
|
+
* @property {string} [name]
|
|
40
|
+
* @property {string[]} [trace_id]
|
|
41
|
+
* @property {string} [type]
|
|
42
|
+
* @property {string} [version]
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* @typedef TransformEventAssociation
|
|
46
|
+
* @property {number} [company_id]
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* @typedef TransformEventData
|
|
50
|
+
* @property {number} [company_id]
|
|
51
|
+
* @property {string[]} [contains]
|
|
52
|
+
* @property {InternalTransformEvent} [event]
|
|
53
|
+
* @property {Object} [payload]
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* @typedef TransformEventRequest
|
|
57
|
+
* @property {EventSchema} [event]
|
|
58
|
+
* @property {string} [event_category]
|
|
59
|
+
* @property {string} [event_name]
|
|
60
|
+
* @property {string} [event_type]
|
|
61
|
+
* @property {string} [event_version]
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* @typedef TransformEventResponse
|
|
65
|
+
* @property {TransformEventAssociation} [association]
|
|
66
|
+
* @property {TransformEventData} [data]
|
|
67
|
+
* @property {string} [event_name]
|
|
68
|
+
* @property {string[]} [event_trace_id]
|
|
69
|
+
* @property {string} [event_type]
|
|
70
|
+
* @property {TransformEventServiceMeta} [service_meta]
|
|
71
|
+
* @property {boolean} [status]
|
|
72
|
+
* @property {string} [version]
|
|
73
|
+
*/
|
|
74
|
+
/**
|
|
75
|
+
* @typedef TransformEventServiceMeta
|
|
76
|
+
* @property {string} [name]
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* @typedef ValidateSchemaRequest
|
|
80
|
+
* @property {EventSchema} [event]
|
|
81
|
+
* @property {string} [event_category]
|
|
82
|
+
* @property {string} [event_name]
|
|
83
|
+
* @property {Object} [event_schema]
|
|
84
|
+
* @property {string} [event_type]
|
|
85
|
+
* @property {string} [event_version]
|
|
86
|
+
*/
|
|
87
|
+
/**
|
|
88
|
+
* @typedef ValidateSchemaResponse
|
|
89
|
+
* @property {string} [message]
|
|
90
|
+
* @property {boolean} [status]
|
|
91
|
+
*/
|
|
24
92
|
declare class WebhookPublicModel {
|
|
25
93
|
}
|
|
26
94
|
declare namespace WebhookPublicModel {
|
|
27
|
-
export { EventConfig, EventConfigBase, EventConfigResponse };
|
|
95
|
+
export { EventConfig, EventConfigBase, EventConfigResponse, EventNotifier, EventSchema, InternalTransformEvent, TransformEventAssociation, TransformEventData, TransformEventRequest, TransformEventResponse, TransformEventServiceMeta, ValidateSchemaRequest, ValidateSchemaResponse };
|
|
28
96
|
}
|
|
29
97
|
/** @returns {EventConfig} */
|
|
30
98
|
declare function EventConfig(): EventConfig;
|
|
@@ -34,8 +102,10 @@ type EventConfig = {
|
|
|
34
102
|
display_name?: string;
|
|
35
103
|
event_category?: string;
|
|
36
104
|
event_name?: string;
|
|
105
|
+
event_schema?: any;
|
|
37
106
|
event_type?: string;
|
|
38
107
|
id?: number;
|
|
108
|
+
updated_on?: string;
|
|
39
109
|
version?: string;
|
|
40
110
|
};
|
|
41
111
|
/** @returns {EventConfigBase} */
|
|
@@ -51,3 +121,79 @@ declare function EventConfigResponse(): EventConfigResponse;
|
|
|
51
121
|
type EventConfigResponse = {
|
|
52
122
|
event_configs?: EventConfig[];
|
|
53
123
|
};
|
|
124
|
+
/** @returns {EventNotifier} */
|
|
125
|
+
declare function EventNotifier(): EventNotifier;
|
|
126
|
+
type EventNotifier = {
|
|
127
|
+
emails?: string[];
|
|
128
|
+
message?: string;
|
|
129
|
+
};
|
|
130
|
+
/** @returns {EventSchema} */
|
|
131
|
+
declare function EventSchema(): EventSchema;
|
|
132
|
+
type EventSchema = {
|
|
133
|
+
meta?: any;
|
|
134
|
+
payload?: any;
|
|
135
|
+
};
|
|
136
|
+
/** @returns {InternalTransformEvent} */
|
|
137
|
+
declare function InternalTransformEvent(): InternalTransformEvent;
|
|
138
|
+
type InternalTransformEvent = {
|
|
139
|
+
created_timestamp?: number;
|
|
140
|
+
name?: string;
|
|
141
|
+
trace_id?: string[];
|
|
142
|
+
type?: string;
|
|
143
|
+
version?: string;
|
|
144
|
+
};
|
|
145
|
+
/** @returns {TransformEventAssociation} */
|
|
146
|
+
declare function TransformEventAssociation(): TransformEventAssociation;
|
|
147
|
+
type TransformEventAssociation = {
|
|
148
|
+
company_id?: number;
|
|
149
|
+
};
|
|
150
|
+
/** @returns {TransformEventData} */
|
|
151
|
+
declare function TransformEventData(): TransformEventData;
|
|
152
|
+
type TransformEventData = {
|
|
153
|
+
company_id?: number;
|
|
154
|
+
contains?: string[];
|
|
155
|
+
event?: InternalTransformEvent;
|
|
156
|
+
payload?: any;
|
|
157
|
+
};
|
|
158
|
+
/** @returns {TransformEventRequest} */
|
|
159
|
+
declare function TransformEventRequest(): TransformEventRequest;
|
|
160
|
+
type TransformEventRequest = {
|
|
161
|
+
event?: EventSchema;
|
|
162
|
+
event_category?: string;
|
|
163
|
+
event_name?: string;
|
|
164
|
+
event_type?: string;
|
|
165
|
+
event_version?: string;
|
|
166
|
+
};
|
|
167
|
+
/** @returns {TransformEventResponse} */
|
|
168
|
+
declare function TransformEventResponse(): TransformEventResponse;
|
|
169
|
+
type TransformEventResponse = {
|
|
170
|
+
association?: TransformEventAssociation;
|
|
171
|
+
data?: TransformEventData;
|
|
172
|
+
event_name?: string;
|
|
173
|
+
event_trace_id?: string[];
|
|
174
|
+
event_type?: string;
|
|
175
|
+
service_meta?: TransformEventServiceMeta;
|
|
176
|
+
status?: boolean;
|
|
177
|
+
version?: string;
|
|
178
|
+
};
|
|
179
|
+
/** @returns {TransformEventServiceMeta} */
|
|
180
|
+
declare function TransformEventServiceMeta(): TransformEventServiceMeta;
|
|
181
|
+
type TransformEventServiceMeta = {
|
|
182
|
+
name?: string;
|
|
183
|
+
};
|
|
184
|
+
/** @returns {ValidateSchemaRequest} */
|
|
185
|
+
declare function ValidateSchemaRequest(): ValidateSchemaRequest;
|
|
186
|
+
type ValidateSchemaRequest = {
|
|
187
|
+
event?: EventSchema;
|
|
188
|
+
event_category?: string;
|
|
189
|
+
event_name?: string;
|
|
190
|
+
event_schema?: any;
|
|
191
|
+
event_type?: string;
|
|
192
|
+
event_version?: string;
|
|
193
|
+
};
|
|
194
|
+
/** @returns {ValidateSchemaResponse} */
|
|
195
|
+
declare function ValidateSchemaResponse(): ValidateSchemaResponse;
|
|
196
|
+
type ValidateSchemaResponse = {
|
|
197
|
+
message?: string;
|
|
198
|
+
status?: boolean;
|
|
199
|
+
};
|