@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
|
@@ -46,6 +46,14 @@ declare class PlatformClient {
|
|
|
46
46
|
* @throws {FDKClientValidationError} When the provided header is not an object.
|
|
47
47
|
*/
|
|
48
48
|
setExtraHeaders(header: object): void;
|
|
49
|
+
request({ method, url, query, body, headers, responseHeaders, }: {
|
|
50
|
+
method: any;
|
|
51
|
+
url: any;
|
|
52
|
+
query: any;
|
|
53
|
+
body: any;
|
|
54
|
+
headers: any;
|
|
55
|
+
responseHeaders?: boolean;
|
|
56
|
+
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
49
57
|
}
|
|
50
58
|
import AuditTrail = require("./AuditTrail/AuditTrailPlatformClient");
|
|
51
59
|
import Billing = require("./Billing/BillingPlatformClient");
|
|
@@ -34,6 +34,7 @@ const Webhook = require("./Webhook/WebhookPlatformClient");
|
|
|
34
34
|
|
|
35
35
|
const PlatformApplicationClient = require("./PlatformApplicationClient");
|
|
36
36
|
const { FDKClientValidationError } = require("../common/FDKError");
|
|
37
|
+
const { execute } = require("./PlatformAPIClient");
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* Represents the client for the platform.
|
|
@@ -115,6 +116,19 @@ class PlatformClient {
|
|
|
115
116
|
throw new FDKClientValidationError("Context value should be an object");
|
|
116
117
|
}
|
|
117
118
|
}
|
|
119
|
+
|
|
120
|
+
async request({
|
|
121
|
+
method,
|
|
122
|
+
url,
|
|
123
|
+
query,
|
|
124
|
+
body,
|
|
125
|
+
headers,
|
|
126
|
+
responseHeaders = false,
|
|
127
|
+
}) {
|
|
128
|
+
return await execute(this.config, method, url, query, body, headers, {
|
|
129
|
+
responseHeaders,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
118
132
|
}
|
|
119
133
|
|
|
120
134
|
module.exports = PlatformClient;
|
|
@@ -50,13 +50,13 @@ export = RewardsPlatformModel;
|
|
|
50
50
|
*/
|
|
51
51
|
/**
|
|
52
52
|
* @typedef Page
|
|
53
|
-
* @property {number} [item_total]
|
|
54
|
-
* @property {string} [next_id]
|
|
55
|
-
* @property {boolean} [has_previous]
|
|
56
|
-
* @property {boolean} [has_next]
|
|
57
|
-
* @property {number} [current]
|
|
58
|
-
* @property {string} type
|
|
59
|
-
* @property {number} [size]
|
|
53
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
54
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
55
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
56
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
57
|
+
* @property {number} [current] - The current page number.
|
|
58
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
59
|
+
* @property {number} [size] - The number of items per page.
|
|
60
60
|
*/
|
|
61
61
|
/**
|
|
62
62
|
* @typedef Offer
|
|
@@ -226,12 +226,33 @@ type RewardsRule = {
|
|
|
226
226
|
/** @returns {Page} */
|
|
227
227
|
declare function Page(): Page;
|
|
228
228
|
type Page = {
|
|
229
|
+
/**
|
|
230
|
+
* - The total number of items on the page.
|
|
231
|
+
*/
|
|
229
232
|
item_total?: number;
|
|
233
|
+
/**
|
|
234
|
+
* - The identifier for the next page.
|
|
235
|
+
*/
|
|
230
236
|
next_id?: string;
|
|
237
|
+
/**
|
|
238
|
+
* - Indicates whether there is a previous page.
|
|
239
|
+
*/
|
|
231
240
|
has_previous?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* - Indicates whether there is a next page.
|
|
243
|
+
*/
|
|
232
244
|
has_next?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* - The current page number.
|
|
247
|
+
*/
|
|
233
248
|
current?: number;
|
|
249
|
+
/**
|
|
250
|
+
* - The type of the page, such as 'PageType'.
|
|
251
|
+
*/
|
|
234
252
|
type: string;
|
|
253
|
+
/**
|
|
254
|
+
* - The number of items per page.
|
|
255
|
+
*/
|
|
235
256
|
size?: number;
|
|
236
257
|
};
|
|
237
258
|
/** @returns {Offer} */
|
|
@@ -58,13 +58,13 @@ const Joi = require("joi");
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* @typedef Page
|
|
61
|
-
* @property {number} [item_total]
|
|
62
|
-
* @property {string} [next_id]
|
|
63
|
-
* @property {boolean} [has_previous]
|
|
64
|
-
* @property {boolean} [has_next]
|
|
65
|
-
* @property {number} [current]
|
|
66
|
-
* @property {string} type
|
|
67
|
-
* @property {number} [size]
|
|
61
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
62
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
63
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
64
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
65
|
+
* @property {number} [current] - The current page number.
|
|
66
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
67
|
+
* @property {number} [size] - The number of items per page.
|
|
68
68
|
*/
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -9,13 +9,14 @@ declare class Serviceability {
|
|
|
9
9
|
*
|
|
10
10
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
11
11
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
12
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
13
|
-
* Success response
|
|
12
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>}
|
|
13
|
+
* - Success response
|
|
14
|
+
*
|
|
14
15
|
* @name createCourierPartnerRule
|
|
15
16
|
* @summary: Create rourier rule
|
|
16
17
|
* @description: Creates a rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerRule/).
|
|
17
18
|
*/
|
|
18
|
-
createCourierPartnerRule({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.
|
|
19
|
+
createCourierPartnerRule({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>;
|
|
19
20
|
/**
|
|
20
21
|
* @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg
|
|
21
22
|
* - Arg object
|
|
@@ -76,13 +77,14 @@ declare class Serviceability {
|
|
|
76
77
|
*
|
|
77
78
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
78
79
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
79
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
80
|
-
* Success response
|
|
80
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>}
|
|
81
|
+
* - Success response
|
|
82
|
+
*
|
|
81
83
|
* @name getCourierPartnerRule
|
|
82
84
|
* @summary: Get courier rule
|
|
83
85
|
* @description: Retrieves a single rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRule/).
|
|
84
86
|
*/
|
|
85
|
-
getCourierPartnerRule({ ruleId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRuleParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.
|
|
87
|
+
getCourierPartnerRule({ ruleId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRuleParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>;
|
|
86
88
|
/**
|
|
87
89
|
* @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam} arg
|
|
88
90
|
* - Arg object
|
|
@@ -183,13 +185,14 @@ declare class Serviceability {
|
|
|
183
185
|
*
|
|
184
186
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
185
187
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
186
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
187
|
-
* Success response
|
|
188
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>}
|
|
189
|
+
* - Success response
|
|
190
|
+
*
|
|
188
191
|
* @name updateCourierRule
|
|
189
192
|
* @summary: Update courier rule
|
|
190
193
|
* @description: Updates an existing rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierRule/).
|
|
191
194
|
*/
|
|
192
|
-
updateCourierRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.
|
|
195
|
+
updateCourierRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>;
|
|
193
196
|
/**
|
|
194
197
|
* @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeAuditHistoryParam} arg
|
|
195
198
|
* - Arg object
|
|
@@ -21,8 +21,9 @@ class Serviceability {
|
|
|
21
21
|
*
|
|
22
22
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
23
23
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
24
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
25
|
-
* Success response
|
|
24
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>}
|
|
25
|
+
* - Success response
|
|
26
|
+
*
|
|
26
27
|
* @name createCourierPartnerRule
|
|
27
28
|
* @summary: Create rourier rule
|
|
28
29
|
* @description: Creates a rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerRule/).
|
|
@@ -78,7 +79,7 @@ class Serviceability {
|
|
|
78
79
|
|
|
79
80
|
const {
|
|
80
81
|
error: res_error,
|
|
81
|
-
} = ServiceabilityPlatformModel.
|
|
82
|
+
} = ServiceabilityPlatformModel.CourierPartnerRuleResponse().validate(
|
|
82
83
|
responseData,
|
|
83
84
|
{ abortEarly: false, allowUnknown: true }
|
|
84
85
|
);
|
|
@@ -421,8 +422,9 @@ class Serviceability {
|
|
|
421
422
|
*
|
|
422
423
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
423
424
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
424
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
425
|
-
* Success response
|
|
425
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>}
|
|
426
|
+
* - Success response
|
|
427
|
+
*
|
|
426
428
|
* @name getCourierPartnerRule
|
|
427
429
|
* @summary: Get courier rule
|
|
428
430
|
* @description: Retrieves a single rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRule/).
|
|
@@ -478,7 +480,7 @@ class Serviceability {
|
|
|
478
480
|
|
|
479
481
|
const {
|
|
480
482
|
error: res_error,
|
|
481
|
-
} = ServiceabilityPlatformModel.
|
|
483
|
+
} = ServiceabilityPlatformModel.CourierPartnerRuleResponse().validate(
|
|
482
484
|
responseData,
|
|
483
485
|
{ abortEarly: false, allowUnknown: true }
|
|
484
486
|
);
|
|
@@ -1094,8 +1096,9 @@ class Serviceability {
|
|
|
1094
1096
|
*
|
|
1095
1097
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1096
1098
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1097
|
-
* @returns {Promise<ServiceabilityPlatformModel.
|
|
1098
|
-
* Success response
|
|
1099
|
+
* @returns {Promise<ServiceabilityPlatformModel.CourierPartnerRuleResponse>}
|
|
1100
|
+
* - Success response
|
|
1101
|
+
*
|
|
1099
1102
|
* @name updateCourierRule
|
|
1100
1103
|
* @summary: Update courier rule
|
|
1101
1104
|
* @description: Updates an existing rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierRule/).
|
|
@@ -1153,7 +1156,7 @@ class Serviceability {
|
|
|
1153
1156
|
|
|
1154
1157
|
const {
|
|
1155
1158
|
error: res_error,
|
|
1156
|
-
} = ServiceabilityPlatformModel.
|
|
1159
|
+
} = ServiceabilityPlatformModel.CourierPartnerRuleResponse().validate(
|
|
1157
1160
|
responseData,
|
|
1158
1161
|
{ abortEarly: false, allowUnknown: true }
|
|
1159
1162
|
);
|
|
@@ -92,14 +92,18 @@ export = ServiceabilityPlatformModel;
|
|
|
92
92
|
*/
|
|
93
93
|
/**
|
|
94
94
|
* @typedef ListViewItems
|
|
95
|
-
* @property {string} zone_id
|
|
96
|
-
* @property {string} name
|
|
97
|
-
* @property {string} slug
|
|
98
|
-
*
|
|
99
|
-
* @property {
|
|
100
|
-
* @property {
|
|
101
|
-
* @property {number}
|
|
102
|
-
* @property {
|
|
95
|
+
* @property {string} zone_id - The unique identifier for the zone.
|
|
96
|
+
* @property {string} name - The name of the zone.
|
|
97
|
+
* @property {string} slug - A human-readable and unique identifier for the
|
|
98
|
+
* zone, derived from the name.
|
|
99
|
+
* @property {number} stores_count - The number of stores within the zone.
|
|
100
|
+
* @property {boolean} is_active - A flag indicating whether the zone is active.
|
|
101
|
+
* @property {number} regions_count - The number of regions within the zone.
|
|
102
|
+
* @property {number} company_id - The unique identifier for the company to
|
|
103
|
+
* which the zone belongs.
|
|
104
|
+
* @property {number[]} [store_ids] - A list of store identifiers associated
|
|
105
|
+
* with the zone.
|
|
106
|
+
* @property {ListViewChannels[]} channels - The name of the zone.
|
|
103
107
|
*/
|
|
104
108
|
/**
|
|
105
109
|
* @typedef ListViewResponse
|
|
@@ -543,20 +547,40 @@ export = ServiceabilityPlatformModel;
|
|
|
543
547
|
*/
|
|
544
548
|
/**
|
|
545
549
|
* @typedef Page
|
|
546
|
-
* @property {number} [item_total]
|
|
547
|
-
* @property {string} [next_id]
|
|
548
|
-
* @property {boolean} [has_previous]
|
|
549
|
-
* @property {boolean} [has_next]
|
|
550
|
-
* @property {number} [current]
|
|
551
|
-
* @property {string} type
|
|
552
|
-
* @property {number} [size]
|
|
550
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
551
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
552
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
553
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
554
|
+
* @property {number} [current] - The current page number.
|
|
555
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
556
|
+
* @property {number} [size] - The number of items per page.
|
|
557
|
+
*/
|
|
558
|
+
/**
|
|
559
|
+
* @typedef CourierPartnerRuleCPListResponse
|
|
560
|
+
* @property {string} [account_id]
|
|
561
|
+
* @property {string} [extension_id]
|
|
562
|
+
* @property {boolean} [is_self_ship]
|
|
563
|
+
* @property {Object} [scheme_rules]
|
|
564
|
+
*/
|
|
565
|
+
/**
|
|
566
|
+
* @typedef CourierPartnerRuleResponse
|
|
567
|
+
* @property {boolean} [is_active]
|
|
568
|
+
* @property {string} [application_id]
|
|
569
|
+
* @property {number} [company_id]
|
|
570
|
+
* @property {CourierPartnerRuleConditions} [conditions]
|
|
571
|
+
* @property {string[]} [sort]
|
|
572
|
+
* @property {Object} [created_by]
|
|
573
|
+
* @property {string} [id]
|
|
574
|
+
* @property {Object} [modified_by]
|
|
575
|
+
* @property {string} [modified_on]
|
|
576
|
+
* @property {string} [name]
|
|
577
|
+
* @property {string} [type]
|
|
578
|
+
* @property {CourierPartnerRuleCPListResponse[]} [cp_list]
|
|
553
579
|
*/
|
|
554
580
|
/**
|
|
555
581
|
* @typedef CourierPartnerList
|
|
556
582
|
* @property {string} extension_id
|
|
557
583
|
* @property {string} account_id
|
|
558
|
-
* @property {string} name
|
|
559
|
-
* @property {boolean} is_self_ship
|
|
560
584
|
*/
|
|
561
585
|
/**
|
|
562
586
|
* @typedef LocationRuleValues
|
|
@@ -614,7 +638,7 @@ export = ServiceabilityPlatformModel;
|
|
|
614
638
|
*/
|
|
615
639
|
/**
|
|
616
640
|
* @typedef CourierPartnerRulesListResponse
|
|
617
|
-
* @property {
|
|
641
|
+
* @property {CourierPartnerRuleResponse[]} items
|
|
618
642
|
* @property {Page} page
|
|
619
643
|
*/
|
|
620
644
|
/**
|
|
@@ -1003,7 +1027,7 @@ export = ServiceabilityPlatformModel;
|
|
|
1003
1027
|
declare class ServiceabilityPlatformModel {
|
|
1004
1028
|
}
|
|
1005
1029
|
declare namespace ServiceabilityPlatformModel {
|
|
1006
|
-
export { UpdateZoneConfigRequest, ServiceabilityErrorResponse, ApplicationServiceabilityConfig, ApplicationServiceabilityConfigResponse, EntityRegionView_Request, EntityRegionView_Error, EntityRegionView_page, getAppRegionZonesResponse, PageSchema, EntityRegionView_Items, EntityRegionView_Response, ListViewSummary, ZoneDataItem, ListViewProduct, ListViewChannels, ListViewItems, ListViewResponse, CompanyStoreView_PageItems, CompanyStoreView_Response, GetZoneDataViewChannels, ZoneProductTypes, ZoneMappingType, UpdateZoneData, ZoneUpdateRequest, ZoneSuccessResponse, GetZoneDataViewItems, GetSingleZoneDataViewResponse, GetZoneByIdSchema, CreateZoneData, ZoneResponse, GetZoneFromPincodeViewRequest, Zone, GetZoneFromPincodeViewResponse, GetZoneFromApplicationIdViewResponse, ServiceabilityPageResponse, MobileNo, ManagerResponse, ModifiedByResponse, IntegrationTypeResponse, ProductReturnConfigResponse, ContactNumberResponse, AddressResponse, CreatedByResponse, EwayBillResponse, EinvoiceResponse, GstCredentialsResponse, WarningsResponse, OpeningClosing, TimmingResponse, DocumentsResponse, Dp, LogisticsResponse, ItemResponse, GetStoresViewResponse, PincodeMopData, PincodeMopUpdateResponse, PincodeMOPresponse, CommonError, PincodeMopBulkData, PincodeBulkViewResponse, PincodeCodStatusListingRequest, PincodeCodStatusListingResponse, Error, PincodeCodStatusListingPage, PincodeCodStatusListingSummary, PincodeMopUpdateAuditHistoryRequest, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryResponse, PincodeMopUpdateAuditHistoryResponseData, ArithmeticOperations, SchemeRulesFeatures, SchemeRules, CourierAccount, CourierAccountRequestBody, ErrorResponse, CourierPartnerAccountFailureResponse, Page, CourierPartnerList, LocationRuleValues, LocationRule, StringComparisonOperations, IntComparisonOperations, CourierPartnerRuleConditions, CourierPartnerRule, FailureResponse, CourierPartnerRulesListResponse, CompanyConfig, ZoneConfig, ApplicationConfig, BulkRegionJobSerializer, BulkRegionResponseItemData, BulkRegionResponse, SelfShipResponse, ApplicationSelfShipConfig, ApplicationSelfShipConfigResponse, StoreRuleConfigData, CustomerRadiusSchema, StoreRuleConditionSchema, StoreRuleDataSchema, StorePrioritySchema, GetStoreRulesApiResponse, CreateStoreRuleRequestSchema, StoreRuleResponseSchema, StoreRuleUpdateResponseSchema, ServiceabilityModel, CourierPartnerSchemeFeatures, CourierPartnerSchemeModel, CourierAccountResponse, CompanyCourierPartnerAccountListResponse, PackageMaterial, PackageMaterialResponse, PackageMaterialRule, PackageRule, PackageRuleResponse, Channel, PackageMaterialRuleList, PackageMaterialList, PackageRuleProduct, PackageRuleProductTag, PackageRuleCategory, PackageMaterialRuleQuantity, RulePriorityRequest, RulePriorityResponse, ArticleAssignment, ServiceabilityLocation, LocationDetailsServiceability, OptimalLocationsArticles, OptimlLocationsRequestSchema, OptimalLocationArticlesResponse, OptimalLocationAssignedStoresResponse, OptimalLocationsResponse };
|
|
1030
|
+
export { UpdateZoneConfigRequest, ServiceabilityErrorResponse, ApplicationServiceabilityConfig, ApplicationServiceabilityConfigResponse, EntityRegionView_Request, EntityRegionView_Error, EntityRegionView_page, getAppRegionZonesResponse, PageSchema, EntityRegionView_Items, EntityRegionView_Response, ListViewSummary, ZoneDataItem, ListViewProduct, ListViewChannels, ListViewItems, ListViewResponse, CompanyStoreView_PageItems, CompanyStoreView_Response, GetZoneDataViewChannels, ZoneProductTypes, ZoneMappingType, UpdateZoneData, ZoneUpdateRequest, ZoneSuccessResponse, GetZoneDataViewItems, GetSingleZoneDataViewResponse, GetZoneByIdSchema, CreateZoneData, ZoneResponse, GetZoneFromPincodeViewRequest, Zone, GetZoneFromPincodeViewResponse, GetZoneFromApplicationIdViewResponse, ServiceabilityPageResponse, MobileNo, ManagerResponse, ModifiedByResponse, IntegrationTypeResponse, ProductReturnConfigResponse, ContactNumberResponse, AddressResponse, CreatedByResponse, EwayBillResponse, EinvoiceResponse, GstCredentialsResponse, WarningsResponse, OpeningClosing, TimmingResponse, DocumentsResponse, Dp, LogisticsResponse, ItemResponse, GetStoresViewResponse, PincodeMopData, PincodeMopUpdateResponse, PincodeMOPresponse, CommonError, PincodeMopBulkData, PincodeBulkViewResponse, PincodeCodStatusListingRequest, PincodeCodStatusListingResponse, Error, PincodeCodStatusListingPage, PincodeCodStatusListingSummary, PincodeMopUpdateAuditHistoryRequest, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryResponse, PincodeMopUpdateAuditHistoryResponseData, ArithmeticOperations, SchemeRulesFeatures, SchemeRules, CourierAccount, CourierAccountRequestBody, ErrorResponse, CourierPartnerAccountFailureResponse, Page, CourierPartnerRuleCPListResponse, CourierPartnerRuleResponse, CourierPartnerList, LocationRuleValues, LocationRule, StringComparisonOperations, IntComparisonOperations, CourierPartnerRuleConditions, CourierPartnerRule, FailureResponse, CourierPartnerRulesListResponse, CompanyConfig, ZoneConfig, ApplicationConfig, BulkRegionJobSerializer, BulkRegionResponseItemData, BulkRegionResponse, SelfShipResponse, ApplicationSelfShipConfig, ApplicationSelfShipConfigResponse, StoreRuleConfigData, CustomerRadiusSchema, StoreRuleConditionSchema, StoreRuleDataSchema, StorePrioritySchema, GetStoreRulesApiResponse, CreateStoreRuleRequestSchema, StoreRuleResponseSchema, StoreRuleUpdateResponseSchema, ServiceabilityModel, CourierPartnerSchemeFeatures, CourierPartnerSchemeModel, CourierAccountResponse, CompanyCourierPartnerAccountListResponse, PackageMaterial, PackageMaterialResponse, PackageMaterialRule, PackageRule, PackageRuleResponse, Channel, PackageMaterialRuleList, PackageMaterialList, PackageRuleProduct, PackageRuleProductTag, PackageRuleCategory, PackageMaterialRuleQuantity, RulePriorityRequest, RulePriorityResponse, ArticleAssignment, ServiceabilityLocation, LocationDetailsServiceability, OptimalLocationsArticles, OptimlLocationsRequestSchema, OptimalLocationArticlesResponse, OptimalLocationAssignedStoresResponse, OptimalLocationsResponse };
|
|
1007
1031
|
}
|
|
1008
1032
|
/** @returns {UpdateZoneConfigRequest} */
|
|
1009
1033
|
declare function UpdateZoneConfigRequest(): UpdateZoneConfigRequest;
|
|
@@ -1114,13 +1138,44 @@ type ListViewChannels = {
|
|
|
1114
1138
|
/** @returns {ListViewItems} */
|
|
1115
1139
|
declare function ListViewItems(): ListViewItems;
|
|
1116
1140
|
type ListViewItems = {
|
|
1141
|
+
/**
|
|
1142
|
+
* - The unique identifier for the zone.
|
|
1143
|
+
*/
|
|
1117
1144
|
zone_id: string;
|
|
1145
|
+
/**
|
|
1146
|
+
* - The name of the zone.
|
|
1147
|
+
*/
|
|
1118
1148
|
name: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* - A human-readable and unique identifier for the
|
|
1151
|
+
* zone, derived from the name.
|
|
1152
|
+
*/
|
|
1119
1153
|
slug: string;
|
|
1154
|
+
/**
|
|
1155
|
+
* - The number of stores within the zone.
|
|
1156
|
+
*/
|
|
1120
1157
|
stores_count: number;
|
|
1158
|
+
/**
|
|
1159
|
+
* - A flag indicating whether the zone is active.
|
|
1160
|
+
*/
|
|
1121
1161
|
is_active: boolean;
|
|
1162
|
+
/**
|
|
1163
|
+
* - The number of regions within the zone.
|
|
1164
|
+
*/
|
|
1122
1165
|
regions_count: number;
|
|
1166
|
+
/**
|
|
1167
|
+
* - The unique identifier for the company to
|
|
1168
|
+
* which the zone belongs.
|
|
1169
|
+
*/
|
|
1123
1170
|
company_id: number;
|
|
1171
|
+
/**
|
|
1172
|
+
* - A list of store identifiers associated
|
|
1173
|
+
* with the zone.
|
|
1174
|
+
*/
|
|
1175
|
+
store_ids?: number[];
|
|
1176
|
+
/**
|
|
1177
|
+
* - The name of the zone.
|
|
1178
|
+
*/
|
|
1124
1179
|
channels: ListViewChannels[];
|
|
1125
1180
|
};
|
|
1126
1181
|
/** @returns {ListViewResponse} */
|
|
@@ -1626,21 +1681,64 @@ type CourierPartnerAccountFailureResponse = {
|
|
|
1626
1681
|
/** @returns {Page} */
|
|
1627
1682
|
declare function Page(): Page;
|
|
1628
1683
|
type Page = {
|
|
1684
|
+
/**
|
|
1685
|
+
* - The total number of items on the page.
|
|
1686
|
+
*/
|
|
1629
1687
|
item_total?: number;
|
|
1688
|
+
/**
|
|
1689
|
+
* - The identifier for the next page.
|
|
1690
|
+
*/
|
|
1630
1691
|
next_id?: string;
|
|
1692
|
+
/**
|
|
1693
|
+
* - Indicates whether there is a previous page.
|
|
1694
|
+
*/
|
|
1631
1695
|
has_previous?: boolean;
|
|
1696
|
+
/**
|
|
1697
|
+
* - Indicates whether there is a next page.
|
|
1698
|
+
*/
|
|
1632
1699
|
has_next?: boolean;
|
|
1700
|
+
/**
|
|
1701
|
+
* - The current page number.
|
|
1702
|
+
*/
|
|
1633
1703
|
current?: number;
|
|
1704
|
+
/**
|
|
1705
|
+
* - The type of the page, such as 'PageType'.
|
|
1706
|
+
*/
|
|
1634
1707
|
type: string;
|
|
1708
|
+
/**
|
|
1709
|
+
* - The number of items per page.
|
|
1710
|
+
*/
|
|
1635
1711
|
size?: number;
|
|
1636
1712
|
};
|
|
1713
|
+
/** @returns {CourierPartnerRuleCPListResponse} */
|
|
1714
|
+
declare function CourierPartnerRuleCPListResponse(): CourierPartnerRuleCPListResponse;
|
|
1715
|
+
type CourierPartnerRuleCPListResponse = {
|
|
1716
|
+
account_id?: string;
|
|
1717
|
+
extension_id?: string;
|
|
1718
|
+
is_self_ship?: boolean;
|
|
1719
|
+
scheme_rules?: any;
|
|
1720
|
+
};
|
|
1721
|
+
/** @returns {CourierPartnerRuleResponse} */
|
|
1722
|
+
declare function CourierPartnerRuleResponse(): CourierPartnerRuleResponse;
|
|
1723
|
+
type CourierPartnerRuleResponse = {
|
|
1724
|
+
is_active?: boolean;
|
|
1725
|
+
application_id?: string;
|
|
1726
|
+
company_id?: number;
|
|
1727
|
+
conditions?: CourierPartnerRuleConditions;
|
|
1728
|
+
sort?: string[];
|
|
1729
|
+
created_by?: any;
|
|
1730
|
+
id?: string;
|
|
1731
|
+
modified_by?: any;
|
|
1732
|
+
modified_on?: string;
|
|
1733
|
+
name?: string;
|
|
1734
|
+
type?: string;
|
|
1735
|
+
cp_list?: CourierPartnerRuleCPListResponse[];
|
|
1736
|
+
};
|
|
1637
1737
|
/** @returns {CourierPartnerList} */
|
|
1638
1738
|
declare function CourierPartnerList(): CourierPartnerList;
|
|
1639
1739
|
type CourierPartnerList = {
|
|
1640
1740
|
extension_id: string;
|
|
1641
1741
|
account_id: string;
|
|
1642
|
-
name: string;
|
|
1643
|
-
is_self_ship: boolean;
|
|
1644
1742
|
};
|
|
1645
1743
|
/** @returns {LocationRuleValues} */
|
|
1646
1744
|
declare function LocationRuleValues(): LocationRuleValues;
|
|
@@ -1706,7 +1804,7 @@ type FailureResponse = {
|
|
|
1706
1804
|
/** @returns {CourierPartnerRulesListResponse} */
|
|
1707
1805
|
declare function CourierPartnerRulesListResponse(): CourierPartnerRulesListResponse;
|
|
1708
1806
|
type CourierPartnerRulesListResponse = {
|
|
1709
|
-
items:
|
|
1807
|
+
items: CourierPartnerRuleResponse[];
|
|
1710
1808
|
page: Page;
|
|
1711
1809
|
};
|
|
1712
1810
|
/** @returns {CompanyConfig} */
|
|
@@ -108,14 +108,18 @@ const Joi = require("joi");
|
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* @typedef ListViewItems
|
|
111
|
-
* @property {string} zone_id
|
|
112
|
-
* @property {string} name
|
|
113
|
-
* @property {string} slug
|
|
114
|
-
*
|
|
115
|
-
* @property {
|
|
116
|
-
* @property {
|
|
117
|
-
* @property {number}
|
|
118
|
-
* @property {
|
|
111
|
+
* @property {string} zone_id - The unique identifier for the zone.
|
|
112
|
+
* @property {string} name - The name of the zone.
|
|
113
|
+
* @property {string} slug - A human-readable and unique identifier for the
|
|
114
|
+
* zone, derived from the name.
|
|
115
|
+
* @property {number} stores_count - The number of stores within the zone.
|
|
116
|
+
* @property {boolean} is_active - A flag indicating whether the zone is active.
|
|
117
|
+
* @property {number} regions_count - The number of regions within the zone.
|
|
118
|
+
* @property {number} company_id - The unique identifier for the company to
|
|
119
|
+
* which the zone belongs.
|
|
120
|
+
* @property {number[]} [store_ids] - A list of store identifiers associated
|
|
121
|
+
* with the zone.
|
|
122
|
+
* @property {ListViewChannels[]} channels - The name of the zone.
|
|
119
123
|
*/
|
|
120
124
|
|
|
121
125
|
/**
|
|
@@ -620,21 +624,43 @@ const Joi = require("joi");
|
|
|
620
624
|
|
|
621
625
|
/**
|
|
622
626
|
* @typedef Page
|
|
623
|
-
* @property {number} [item_total]
|
|
624
|
-
* @property {string} [next_id]
|
|
625
|
-
* @property {boolean} [has_previous]
|
|
626
|
-
* @property {boolean} [has_next]
|
|
627
|
-
* @property {number} [current]
|
|
628
|
-
* @property {string} type
|
|
629
|
-
* @property {number} [size]
|
|
627
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
628
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
629
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
630
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
631
|
+
* @property {number} [current] - The current page number.
|
|
632
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
633
|
+
* @property {number} [size] - The number of items per page.
|
|
634
|
+
*/
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* @typedef CourierPartnerRuleCPListResponse
|
|
638
|
+
* @property {string} [account_id]
|
|
639
|
+
* @property {string} [extension_id]
|
|
640
|
+
* @property {boolean} [is_self_ship]
|
|
641
|
+
* @property {Object} [scheme_rules]
|
|
642
|
+
*/
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @typedef CourierPartnerRuleResponse
|
|
646
|
+
* @property {boolean} [is_active]
|
|
647
|
+
* @property {string} [application_id]
|
|
648
|
+
* @property {number} [company_id]
|
|
649
|
+
* @property {CourierPartnerRuleConditions} [conditions]
|
|
650
|
+
* @property {string[]} [sort]
|
|
651
|
+
* @property {Object} [created_by]
|
|
652
|
+
* @property {string} [id]
|
|
653
|
+
* @property {Object} [modified_by]
|
|
654
|
+
* @property {string} [modified_on]
|
|
655
|
+
* @property {string} [name]
|
|
656
|
+
* @property {string} [type]
|
|
657
|
+
* @property {CourierPartnerRuleCPListResponse[]} [cp_list]
|
|
630
658
|
*/
|
|
631
659
|
|
|
632
660
|
/**
|
|
633
661
|
* @typedef CourierPartnerList
|
|
634
662
|
* @property {string} extension_id
|
|
635
663
|
* @property {string} account_id
|
|
636
|
-
* @property {string} name
|
|
637
|
-
* @property {boolean} is_self_ship
|
|
638
664
|
*/
|
|
639
665
|
|
|
640
666
|
/**
|
|
@@ -700,7 +726,7 @@ const Joi = require("joi");
|
|
|
700
726
|
|
|
701
727
|
/**
|
|
702
728
|
* @typedef CourierPartnerRulesListResponse
|
|
703
|
-
* @property {
|
|
729
|
+
* @property {CourierPartnerRuleResponse[]} items
|
|
704
730
|
* @property {Page} page
|
|
705
731
|
*/
|
|
706
732
|
|
|
@@ -1285,6 +1311,7 @@ class ServiceabilityPlatformModel {
|
|
|
1285
1311
|
is_active: Joi.boolean().required(),
|
|
1286
1312
|
regions_count: Joi.number().required(),
|
|
1287
1313
|
company_id: Joi.number().required(),
|
|
1314
|
+
store_ids: Joi.array().items(Joi.number()),
|
|
1288
1315
|
channels: Joi.array()
|
|
1289
1316
|
.items(ServiceabilityPlatformModel.ListViewChannels())
|
|
1290
1317
|
.required(),
|
|
@@ -1962,13 +1989,41 @@ class ServiceabilityPlatformModel {
|
|
|
1962
1989
|
});
|
|
1963
1990
|
}
|
|
1964
1991
|
|
|
1992
|
+
/** @returns {CourierPartnerRuleCPListResponse} */
|
|
1993
|
+
static CourierPartnerRuleCPListResponse() {
|
|
1994
|
+
return Joi.object({
|
|
1995
|
+
account_id: Joi.string().allow(""),
|
|
1996
|
+
extension_id: Joi.string().allow(""),
|
|
1997
|
+
is_self_ship: Joi.boolean(),
|
|
1998
|
+
scheme_rules: Joi.any(),
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
/** @returns {CourierPartnerRuleResponse} */
|
|
2003
|
+
static CourierPartnerRuleResponse() {
|
|
2004
|
+
return Joi.object({
|
|
2005
|
+
is_active: Joi.boolean(),
|
|
2006
|
+
application_id: Joi.string().allow(""),
|
|
2007
|
+
company_id: Joi.number(),
|
|
2008
|
+
conditions: ServiceabilityPlatformModel.CourierPartnerRuleConditions(),
|
|
2009
|
+
sort: Joi.array().items(Joi.string().allow("")),
|
|
2010
|
+
created_by: Joi.any().allow(null),
|
|
2011
|
+
id: Joi.string().allow(""),
|
|
2012
|
+
modified_by: Joi.any().allow(null),
|
|
2013
|
+
modified_on: Joi.string().allow("").allow(null),
|
|
2014
|
+
name: Joi.string().allow(""),
|
|
2015
|
+
type: Joi.string().allow(""),
|
|
2016
|
+
cp_list: Joi.array().items(
|
|
2017
|
+
ServiceabilityPlatformModel.CourierPartnerRuleCPListResponse()
|
|
2018
|
+
),
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
|
|
1965
2022
|
/** @returns {CourierPartnerList} */
|
|
1966
2023
|
static CourierPartnerList() {
|
|
1967
2024
|
return Joi.object({
|
|
1968
2025
|
extension_id: Joi.string().allow("").required(),
|
|
1969
2026
|
account_id: Joi.string().allow("").required(),
|
|
1970
|
-
name: Joi.string().allow("").required(),
|
|
1971
|
-
is_self_ship: Joi.boolean().required(),
|
|
1972
2027
|
});
|
|
1973
2028
|
}
|
|
1974
2029
|
|
|
@@ -2057,7 +2112,7 @@ class ServiceabilityPlatformModel {
|
|
|
2057
2112
|
static CourierPartnerRulesListResponse() {
|
|
2058
2113
|
return Joi.object({
|
|
2059
2114
|
items: Joi.array()
|
|
2060
|
-
.items(ServiceabilityPlatformModel.
|
|
2115
|
+
.items(ServiceabilityPlatformModel.CourierPartnerRuleResponse())
|
|
2061
2116
|
.required(),
|
|
2062
2117
|
page: ServiceabilityPlatformModel.Page().required(),
|
|
2063
2118
|
});
|
|
@@ -87,13 +87,13 @@ export = SharePlatformModel;
|
|
|
87
87
|
*/
|
|
88
88
|
/**
|
|
89
89
|
* @typedef Page
|
|
90
|
-
* @property {number} [item_total]
|
|
91
|
-
* @property {string} [next_id]
|
|
92
|
-
* @property {boolean} [has_previous]
|
|
93
|
-
* @property {boolean} [has_next]
|
|
94
|
-
* @property {number} [current]
|
|
95
|
-
* @property {string} type
|
|
96
|
-
* @property {number} [size]
|
|
90
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
91
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
92
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
93
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
94
|
+
* @property {number} [current] - The current page number.
|
|
95
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
96
|
+
* @property {number} [size] - The number of items per page.
|
|
97
97
|
*/
|
|
98
98
|
/**
|
|
99
99
|
* @typedef ShortLinkList
|
|
@@ -230,12 +230,33 @@ type ShortLinkRes = {
|
|
|
230
230
|
/** @returns {Page} */
|
|
231
231
|
declare function Page(): Page;
|
|
232
232
|
type Page = {
|
|
233
|
+
/**
|
|
234
|
+
* - The total number of items on the page.
|
|
235
|
+
*/
|
|
233
236
|
item_total?: number;
|
|
237
|
+
/**
|
|
238
|
+
* - The identifier for the next page.
|
|
239
|
+
*/
|
|
234
240
|
next_id?: string;
|
|
241
|
+
/**
|
|
242
|
+
* - Indicates whether there is a previous page.
|
|
243
|
+
*/
|
|
235
244
|
has_previous?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* - Indicates whether there is a next page.
|
|
247
|
+
*/
|
|
236
248
|
has_next?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* - The current page number.
|
|
251
|
+
*/
|
|
237
252
|
current?: number;
|
|
253
|
+
/**
|
|
254
|
+
* - The type of the page, such as 'PageType'.
|
|
255
|
+
*/
|
|
238
256
|
type: string;
|
|
257
|
+
/**
|
|
258
|
+
* - The number of items per page.
|
|
259
|
+
*/
|
|
239
260
|
size?: number;
|
|
240
261
|
};
|
|
241
262
|
/** @returns {ShortLinkList} */
|