@gofynd/fdk-client-javascript 1.4.8-beta.3 → 1.4.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 +26 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +8 -0
- package/sdk/application/ApplicationClient.js +14 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +20 -20
- package/sdk/application/Cart/CartApplicationClient.js +20 -20
- package/sdk/application/Cart/CartApplicationModel.d.ts +2446 -664
- package/sdk/application/Cart/CartApplicationModel.js +783 -552
- package/sdk/application/Cart/CartApplicationValidator.d.ts +268 -194
- package/sdk/application/Cart/CartApplicationValidator.js +100 -114
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +53 -53
- package/sdk/application/Catalog/CatalogApplicationClient.js +53 -53
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2012 -503
- package/sdk/application/Catalog/CatalogApplicationModel.js +603 -453
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +64 -64
- package/sdk/application/Catalog/CatalogApplicationValidator.js +32 -32
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +2 -2
- package/sdk/application/Common/CommonApplicationModel.d.ts +170 -90
- package/sdk/application/Common/CommonApplicationModel.js +59 -58
- package/sdk/application/Common/CommonApplicationValidator.d.ts +8 -5
- package/sdk/application/Common/CommonApplicationValidator.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +2 -2
- package/sdk/application/Communication/CommunicationApplicationClient.js +2 -2
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +170 -35
- package/sdk/application/Communication/CommunicationApplicationModel.js +54 -33
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +624 -443
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +259 -248
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +32 -24
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +14 -13
- package/sdk/application/Content/ContentApplicationClient.d.ts +16 -16
- package/sdk/application/Content/ContentApplicationClient.js +16 -16
- package/sdk/application/Content/ContentApplicationModel.d.ts +1205 -282
- package/sdk/application/Content/ContentApplicationModel.js +341 -277
- package/sdk/application/Content/ContentApplicationValidator.d.ts +28 -17
- package/sdk/application/Content/ContentApplicationValidator.js +11 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +146 -37
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +38 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +195 -134
- package/sdk/application/Lead/LeadApplicationModel.js +110 -67
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +8 -8
- package/sdk/application/Lead/LeadApplicationValidator.js +4 -4
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -10
- package/sdk/application/Logistic/LogisticApplicationClient.js +10 -10
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +1039 -221
- package/sdk/application/Logistic/LogisticApplicationModel.js +342 -199
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +76 -82
- package/sdk/application/Logistic/LogisticApplicationValidator.js +38 -41
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
- package/sdk/application/Order/OrderApplicationClient.js +10 -10
- package/sdk/application/Order/OrderApplicationModel.d.ts +1400 -325
- package/sdk/application/Order/OrderApplicationModel.js +391 -317
- package/sdk/application/Order/OrderApplicationValidator.d.ts +32 -30
- package/sdk/application/Order/OrderApplicationValidator.js +15 -14
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +43 -43
- package/sdk/application/Payment/PaymentApplicationClient.js +43 -43
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1111 -1022
- package/sdk/application/Payment/PaymentApplicationModel.js +537 -521
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +82 -49
- package/sdk/application/Payment/PaymentApplicationValidator.js +30 -30
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +28 -7
- package/sdk/application/Rewards/RewardsApplicationModel.js +7 -7
- package/sdk/application/Share/ShareApplicationModel.d.ts +178 -38
- package/sdk/application/Share/ShareApplicationModel.js +53 -37
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -2
- package/sdk/application/Share/ShareApplicationValidator.js +2 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +14 -8
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +528 -287
- package/sdk/application/Theme/ThemeApplicationModel.js +208 -172
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +17 -12
- package/sdk/application/Theme/ThemeApplicationValidator.js +8 -6
- package/sdk/application/User/UserApplicationClient.d.ts +36 -36
- package/sdk/application/User/UserApplicationClient.js +36 -36
- package/sdk/application/User/UserApplicationModel.d.ts +1062 -255
- package/sdk/application/User/UserApplicationModel.js +298 -244
- package/sdk/application/User/UserApplicationValidator.d.ts +80 -80
- package/sdk/application/User/UserApplicationValidator.js +40 -40
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +1 -1
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -1
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +20 -5
- package/sdk/application/Webhook/WebhookApplicationModel.js +5 -5
- package/sdk/common/Clickstream.js +95 -15
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/common/Utility.js +19 -0
- package/sdk/common/utils.js +8 -1
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +28 -7
- package/sdk/partner/Lead/LeadPartnerModel.js +7 -7
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +28 -7
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +7 -7
- package/sdk/partner/PartnerClient.d.ts +8 -0
- package/sdk/partner/PartnerClient.js +14 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +158 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +45 -6
- package/sdk/partner/Theme/ThemePartnerModel.js +33 -4
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +28 -7
- package/sdk/partner/Webhook/WebhookPartnerModel.js +7 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +28 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +7 -7
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +21 -10
- package/sdk/platform/Billing/BillingPlatformClient.js +167 -83
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +2849 -565
- package/sdk/platform/Billing/BillingPlatformModel.js +935 -556
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +30 -14
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -16
- package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -7
- package/sdk/platform/Cart/CartPlatformModel.js +8 -8
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +12 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +41 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +46 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +14 -11
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +17 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +28 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +7 -7
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -97
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +77 -782
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +24 -701
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +7 -539
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -183
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +0 -134
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -79
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -15
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -13
- package/sdk/platform/Content/ContentPlatformModel.d.ts +58 -17
- package/sdk/platform/Content/ContentPlatformModel.js +28 -15
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +28 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +7 -7
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +127 -25
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +37 -25
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1583 -347
- package/sdk/platform/Finance/FinancePlatformModel.js +463 -351
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +28 -7
- package/sdk/platform/Lead/LeadPlatformModel.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -0
- package/sdk/platform/Order/OrderPlatformClient.js +165 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +613 -39
- package/sdk/platform/Order/OrderPlatformModel.js +359 -41
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +30 -9
- package/sdk/platform/Payment/PaymentPlatformModel.js +9 -9
- package/sdk/platform/PlatformClient.d.ts +8 -0
- package/sdk/platform/PlatformClient.js +14 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +28 -7
- package/sdk/platform/Rewards/RewardsPlatformModel.js +7 -7
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +120 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +76 -21
- package/sdk/platform/Share/SharePlatformModel.d.ts +28 -7
- package/sdk/platform/Share/SharePlatformModel.js +7 -7
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +18 -5
- package/sdk/platform/Theme/ThemePlatformModel.js +7 -4
- package/sdk/platform/User/UserPlatformModel.d.ts +18 -18
- package/sdk/platform/User/UserPlatformModel.js +9 -9
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +28 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +7 -7
- package/sdk/public/Billing/BillingPublicClient.d.ts +11 -0
- package/sdk/public/Billing/BillingPublicClient.js +80 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +584 -99
- package/sdk/public/Billing/BillingPublicModel.js +252 -87
- package/sdk/public/Billing/BillingPublicValidator.d.ts +10 -1
- package/sdk/public/Billing/BillingPublicValidator.js +12 -0
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +0 -87
- package/sdk/public/Inventory/InventoryPublicClient.js +0 -529
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +0 -393
- package/sdk/public/Inventory/InventoryPublicModel.js +0 -448
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +0 -91
- package/sdk/public/Inventory/InventoryPublicValidator.js +0 -85
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export = AnalyticsPlatformModel;
|
|
2
2
|
/**
|
|
3
3
|
* @typedef Page
|
|
4
|
-
* @property {number} [item_total]
|
|
5
|
-
* @property {string} [next_id]
|
|
6
|
-
* @property {boolean} [has_previous]
|
|
7
|
-
* @property {boolean} [has_next]
|
|
8
|
-
* @property {number} [current]
|
|
9
|
-
* @property {string} type
|
|
10
|
-
* @property {number} [size]
|
|
4
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
5
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
6
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
7
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
8
|
+
* @property {number} [current] - The current page number.
|
|
9
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
10
|
+
* @property {number} [size] - The number of items per page.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* @typedef FileDownloadRequestBody
|
|
@@ -28,12 +28,33 @@ declare namespace AnalyticsPlatformModel {
|
|
|
28
28
|
/** @returns {Page} */
|
|
29
29
|
declare function Page(): Page;
|
|
30
30
|
type Page = {
|
|
31
|
+
/**
|
|
32
|
+
* - The total number of items on the page.
|
|
33
|
+
*/
|
|
31
34
|
item_total?: number;
|
|
35
|
+
/**
|
|
36
|
+
* - The identifier for the next page.
|
|
37
|
+
*/
|
|
32
38
|
next_id?: string;
|
|
39
|
+
/**
|
|
40
|
+
* - Indicates whether there is a previous page.
|
|
41
|
+
*/
|
|
33
42
|
has_previous?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* - Indicates whether there is a next page.
|
|
45
|
+
*/
|
|
34
46
|
has_next?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* - The current page number.
|
|
49
|
+
*/
|
|
35
50
|
current?: number;
|
|
51
|
+
/**
|
|
52
|
+
* - The type of the page, such as 'PageType'.
|
|
53
|
+
*/
|
|
36
54
|
type: string;
|
|
55
|
+
/**
|
|
56
|
+
* - The number of items per page.
|
|
57
|
+
*/
|
|
37
58
|
size?: number;
|
|
38
59
|
};
|
|
39
60
|
/** @returns {FileDownloadRequestBody} */
|
|
@@ -2,13 +2,13 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef Page
|
|
5
|
-
* @property {number} [item_total]
|
|
6
|
-
* @property {string} [next_id]
|
|
7
|
-
* @property {boolean} [has_previous]
|
|
8
|
-
* @property {boolean} [has_next]
|
|
9
|
-
* @property {number} [current]
|
|
10
|
-
* @property {string} type
|
|
11
|
-
* @property {number} [size]
|
|
5
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
6
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
7
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
8
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
9
|
+
* @property {number} [current] - The current page number.
|
|
10
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
11
|
+
* @property {number} [size] - The number of items per page.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -63,6 +63,17 @@ declare class Billing {
|
|
|
63
63
|
* @description: Generate a one-time charge for specific services or products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createOneTimeCharge/).
|
|
64
64
|
*/
|
|
65
65
|
createOneTimeCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateOneTimeChargeParam, { responseHeaders }?: object): Promise<BillingPlatformModel.CreateOneTimeChargeResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* @param {BillingPlatformValidator.CreateSubscriptionChargeParam} arg - Arg object
|
|
68
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
69
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
70
|
+
* @returns {Promise<BillingPlatformModel.CreateSubscriptionResponse>} -
|
|
71
|
+
* Success response
|
|
72
|
+
* @name createSubscriptionCharge
|
|
73
|
+
* @summary: Initiate subscription billing
|
|
74
|
+
* @description: Register a subscription charge for a seller using your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/).
|
|
75
|
+
*/
|
|
76
|
+
createSubscriptionCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateSubscriptionChargeParam, { responseHeaders }?: object): Promise<BillingPlatformModel.CreateSubscriptionResponse>;
|
|
66
77
|
/**
|
|
67
78
|
* @param {BillingPlatformValidator.CreditTransactionParam} arg - Arg object
|
|
68
79
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -84,6 +95,16 @@ declare class Billing {
|
|
|
84
95
|
* @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/currentAppLimit/).
|
|
85
96
|
*/
|
|
86
97
|
currentAppLimit({ productSuite, type, requestHeaders }?: BillingPlatformValidator.CurrentAppLimitParam, { responseHeaders }?: object): Promise<BillingPlatformModel.SubscriptionLimit>;
|
|
98
|
+
/**
|
|
99
|
+
* @param {BillingPlatformValidator.CurrentLimitParam} arg - Arg object
|
|
100
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
101
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
102
|
+
* @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
|
|
103
|
+
* @name currentLimit
|
|
104
|
+
* @summary: Obtain feature limit configurations.
|
|
105
|
+
* @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/currentLimit/).
|
|
106
|
+
*/
|
|
107
|
+
currentLimit({ productSuite, type, requestHeaders }?: BillingPlatformValidator.CurrentLimitParam, { responseHeaders }?: object): Promise<BillingPlatformModel.SubscriptionLimit>;
|
|
87
108
|
/**
|
|
88
109
|
* @param {BillingPlatformValidator.GetBankListParam} arg - Arg object
|
|
89
110
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -124,16 +145,6 @@ declare class Billing {
|
|
|
124
145
|
* @description: Retrieve available enterprise-level subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getEnterprisePlans/).
|
|
125
146
|
*/
|
|
126
147
|
getEnterprisePlans({ requestHeaders }?: any, { responseHeaders }?: object): Promise<BillingPlatformModel.Plan[]>;
|
|
127
|
-
/**
|
|
128
|
-
* @param {BillingPlatformValidator.GetFeatureLimitConfigParam} arg - Arg object
|
|
129
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
130
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
131
|
-
* @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
|
|
132
|
-
* @name getFeatureLimitConfig
|
|
133
|
-
* @summary: Obtain feature limit configurations.
|
|
134
|
-
* @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/).
|
|
135
|
-
*/
|
|
136
|
-
getFeatureLimitConfig({ productSuite, type, requestHeaders }?: BillingPlatformValidator.GetFeatureLimitConfigParam, { responseHeaders }?: object): Promise<BillingPlatformModel.SubscriptionLimit>;
|
|
137
148
|
/**
|
|
138
149
|
* @param {BillingPlatformValidator.GetInvoiceByIdParam} arg - Arg object
|
|
139
150
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -501,6 +501,90 @@ class Billing {
|
|
|
501
501
|
return response;
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
+
/**
|
|
505
|
+
* @param {BillingPlatformValidator.CreateSubscriptionChargeParam} arg - Arg object
|
|
506
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
507
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
508
|
+
* @returns {Promise<BillingPlatformModel.CreateSubscriptionResponse>} -
|
|
509
|
+
* Success response
|
|
510
|
+
* @name createSubscriptionCharge
|
|
511
|
+
* @summary: Initiate subscription billing
|
|
512
|
+
* @description: Register a subscription charge for a seller using your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/).
|
|
513
|
+
*/
|
|
514
|
+
async createSubscriptionCharge(
|
|
515
|
+
{ extensionId, body, requestHeaders } = { requestHeaders: {} },
|
|
516
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
517
|
+
) {
|
|
518
|
+
const {
|
|
519
|
+
error,
|
|
520
|
+
} = BillingPlatformValidator.createSubscriptionCharge().validate(
|
|
521
|
+
{
|
|
522
|
+
extensionId,
|
|
523
|
+
body,
|
|
524
|
+
},
|
|
525
|
+
{ abortEarly: false, allowUnknown: true }
|
|
526
|
+
);
|
|
527
|
+
if (error) {
|
|
528
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// Showing warrnings if extra unknown parameters are found
|
|
532
|
+
const {
|
|
533
|
+
error: warrning,
|
|
534
|
+
} = BillingPlatformValidator.createSubscriptionCharge().validate(
|
|
535
|
+
{
|
|
536
|
+
extensionId,
|
|
537
|
+
body,
|
|
538
|
+
},
|
|
539
|
+
{ abortEarly: false, allowUnknown: false }
|
|
540
|
+
);
|
|
541
|
+
if (warrning) {
|
|
542
|
+
Logger({
|
|
543
|
+
level: "WARN",
|
|
544
|
+
message: `Parameter Validation warrnings for platform > Billing > createSubscriptionCharge \n ${warrning}`,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const query_params = {};
|
|
549
|
+
|
|
550
|
+
const xHeaders = {};
|
|
551
|
+
|
|
552
|
+
const response = await PlatformAPIClient.execute(
|
|
553
|
+
this.config,
|
|
554
|
+
"post",
|
|
555
|
+
`/service/platform/billing/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscription`,
|
|
556
|
+
query_params,
|
|
557
|
+
body,
|
|
558
|
+
{ ...xHeaders, ...requestHeaders },
|
|
559
|
+
{ responseHeaders }
|
|
560
|
+
);
|
|
561
|
+
|
|
562
|
+
let responseData = response;
|
|
563
|
+
if (responseHeaders) {
|
|
564
|
+
responseData = response[0];
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
const {
|
|
568
|
+
error: res_error,
|
|
569
|
+
} = BillingPlatformModel.CreateSubscriptionResponse().validate(
|
|
570
|
+
responseData,
|
|
571
|
+
{ abortEarly: false, allowUnknown: true }
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
if (res_error) {
|
|
575
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
576
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
577
|
+
} else {
|
|
578
|
+
Logger({
|
|
579
|
+
level: "WARN",
|
|
580
|
+
message: `Response Validation Warnings for platform > Billing > createSubscriptionCharge \n ${res_error}`,
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
return response;
|
|
586
|
+
}
|
|
587
|
+
|
|
504
588
|
/**
|
|
505
589
|
* @param {BillingPlatformValidator.CreditTransactionParam} arg - Arg object
|
|
506
590
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -700,6 +784,89 @@ class Billing {
|
|
|
700
784
|
return response;
|
|
701
785
|
}
|
|
702
786
|
|
|
787
|
+
/**
|
|
788
|
+
* @param {BillingPlatformValidator.CurrentLimitParam} arg - Arg object
|
|
789
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
790
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
791
|
+
* @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
|
|
792
|
+
* @name currentLimit
|
|
793
|
+
* @summary: Obtain feature limit configurations.
|
|
794
|
+
* @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/currentLimit/).
|
|
795
|
+
*/
|
|
796
|
+
async currentLimit(
|
|
797
|
+
{ productSuite, type, requestHeaders } = { requestHeaders: {} },
|
|
798
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
799
|
+
) {
|
|
800
|
+
const { error } = BillingPlatformValidator.currentLimit().validate(
|
|
801
|
+
{
|
|
802
|
+
productSuite,
|
|
803
|
+
type,
|
|
804
|
+
},
|
|
805
|
+
{ abortEarly: false, allowUnknown: true }
|
|
806
|
+
);
|
|
807
|
+
if (error) {
|
|
808
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
// Showing warrnings if extra unknown parameters are found
|
|
812
|
+
const {
|
|
813
|
+
error: warrning,
|
|
814
|
+
} = BillingPlatformValidator.currentLimit().validate(
|
|
815
|
+
{
|
|
816
|
+
productSuite,
|
|
817
|
+
type,
|
|
818
|
+
},
|
|
819
|
+
{ abortEarly: false, allowUnknown: false }
|
|
820
|
+
);
|
|
821
|
+
if (warrning) {
|
|
822
|
+
Logger({
|
|
823
|
+
level: "WARN",
|
|
824
|
+
message: `Parameter Validation warrnings for platform > Billing > currentLimit \n ${warrning}`,
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
const query_params = {};
|
|
829
|
+
query_params["product_suite"] = productSuite;
|
|
830
|
+
query_params["type"] = type;
|
|
831
|
+
|
|
832
|
+
const xHeaders = {};
|
|
833
|
+
|
|
834
|
+
const response = await PlatformAPIClient.execute(
|
|
835
|
+
this.config,
|
|
836
|
+
"get",
|
|
837
|
+
`/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/current-limit`,
|
|
838
|
+
query_params,
|
|
839
|
+
undefined,
|
|
840
|
+
{ ...xHeaders, ...requestHeaders },
|
|
841
|
+
{ responseHeaders }
|
|
842
|
+
);
|
|
843
|
+
|
|
844
|
+
let responseData = response;
|
|
845
|
+
if (responseHeaders) {
|
|
846
|
+
responseData = response[0];
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
const {
|
|
850
|
+
error: res_error,
|
|
851
|
+
} = BillingPlatformModel.SubscriptionLimit().validate(responseData, {
|
|
852
|
+
abortEarly: false,
|
|
853
|
+
allowUnknown: true,
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
if (res_error) {
|
|
857
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
858
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
859
|
+
} else {
|
|
860
|
+
Logger({
|
|
861
|
+
level: "WARN",
|
|
862
|
+
message: `Response Validation Warnings for platform > Billing > currentLimit \n ${res_error}`,
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
return response;
|
|
868
|
+
}
|
|
869
|
+
|
|
703
870
|
/**
|
|
704
871
|
* @param {BillingPlatformValidator.GetBankListParam} arg - Arg object
|
|
705
872
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -998,89 +1165,6 @@ class Billing {
|
|
|
998
1165
|
return response;
|
|
999
1166
|
}
|
|
1000
1167
|
|
|
1001
|
-
/**
|
|
1002
|
-
* @param {BillingPlatformValidator.GetFeatureLimitConfigParam} arg - Arg object
|
|
1003
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1004
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1005
|
-
* @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
|
|
1006
|
-
* @name getFeatureLimitConfig
|
|
1007
|
-
* @summary: Obtain feature limit configurations.
|
|
1008
|
-
* @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/).
|
|
1009
|
-
*/
|
|
1010
|
-
async getFeatureLimitConfig(
|
|
1011
|
-
{ productSuite, type, requestHeaders } = { requestHeaders: {} },
|
|
1012
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1013
|
-
) {
|
|
1014
|
-
const { error } = BillingPlatformValidator.getFeatureLimitConfig().validate(
|
|
1015
|
-
{
|
|
1016
|
-
productSuite,
|
|
1017
|
-
type,
|
|
1018
|
-
},
|
|
1019
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1020
|
-
);
|
|
1021
|
-
if (error) {
|
|
1022
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1026
|
-
const {
|
|
1027
|
-
error: warrning,
|
|
1028
|
-
} = BillingPlatformValidator.getFeatureLimitConfig().validate(
|
|
1029
|
-
{
|
|
1030
|
-
productSuite,
|
|
1031
|
-
type,
|
|
1032
|
-
},
|
|
1033
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1034
|
-
);
|
|
1035
|
-
if (warrning) {
|
|
1036
|
-
Logger({
|
|
1037
|
-
level: "WARN",
|
|
1038
|
-
message: `Parameter Validation warrnings for platform > Billing > getFeatureLimitConfig \n ${warrning}`,
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
const query_params = {};
|
|
1043
|
-
query_params["product_suite"] = productSuite;
|
|
1044
|
-
query_params["type"] = type;
|
|
1045
|
-
|
|
1046
|
-
const xHeaders = {};
|
|
1047
|
-
|
|
1048
|
-
const response = await PlatformAPIClient.execute(
|
|
1049
|
-
this.config,
|
|
1050
|
-
"get",
|
|
1051
|
-
`/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/current-limit`,
|
|
1052
|
-
query_params,
|
|
1053
|
-
undefined,
|
|
1054
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1055
|
-
{ responseHeaders }
|
|
1056
|
-
);
|
|
1057
|
-
|
|
1058
|
-
let responseData = response;
|
|
1059
|
-
if (responseHeaders) {
|
|
1060
|
-
responseData = response[0];
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
const {
|
|
1064
|
-
error: res_error,
|
|
1065
|
-
} = BillingPlatformModel.SubscriptionLimit().validate(responseData, {
|
|
1066
|
-
abortEarly: false,
|
|
1067
|
-
allowUnknown: true,
|
|
1068
|
-
});
|
|
1069
|
-
|
|
1070
|
-
if (res_error) {
|
|
1071
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1072
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1073
|
-
} else {
|
|
1074
|
-
Logger({
|
|
1075
|
-
level: "WARN",
|
|
1076
|
-
message: `Response Validation Warnings for platform > Billing > getFeatureLimitConfig \n ${res_error}`,
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
return response;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
1168
|
/**
|
|
1085
1169
|
* @param {BillingPlatformValidator.GetInvoiceByIdParam} arg - Arg object
|
|
1086
1170
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|