@gofynd/fdk-client-javascript 1.4.16-beta.1 → 1.4.16-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
- package/sdk/application/Cart/CartApplicationClient.js +26 -268
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
- package/sdk/application/Content/ContentApplicationClient.d.ts +40 -8
- package/sdk/application/Content/ContentApplicationClient.js +174 -211
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.js +40 -153
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +6 -437
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -0
- package/sdk/platform/Cart/CartPlatformModel.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +80 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +571 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +75 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +88 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +131 -5
- package/sdk/platform/Content/ContentPlatformModel.js +110 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +10 -2
- package/sdk/platform/Share/SharePlatformModel.js +4 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
- package/sdk/public/Content/ContentPublicClient.js +16 -104
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -842,124 +842,6 @@ class Serviceability {
|
|
|
842
842
|
return response;
|
|
843
843
|
}
|
|
844
844
|
|
|
845
|
-
/**
|
|
846
|
-
* @param {ServiceabilityPlatformApplicationValidator.GetZonesParam} arg - Arg object
|
|
847
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
848
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
849
|
-
* @returns {Promise<ServiceabilityPlatformModel.ListViewResult>} - Success response
|
|
850
|
-
* @name getZones
|
|
851
|
-
* @summary: Get zones
|
|
852
|
-
* @description: Retrieves a list of delivery zones. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/).
|
|
853
|
-
*/
|
|
854
|
-
async getZones(
|
|
855
|
-
{
|
|
856
|
-
pageNo,
|
|
857
|
-
pageSize,
|
|
858
|
-
isActive,
|
|
859
|
-
q,
|
|
860
|
-
countryIsoCode,
|
|
861
|
-
state,
|
|
862
|
-
city,
|
|
863
|
-
pincode,
|
|
864
|
-
sector,
|
|
865
|
-
requestHeaders,
|
|
866
|
-
} = { requestHeaders: {} },
|
|
867
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
868
|
-
) {
|
|
869
|
-
const {
|
|
870
|
-
error,
|
|
871
|
-
} = ServiceabilityPlatformApplicationValidator.getZones().validate(
|
|
872
|
-
{
|
|
873
|
-
pageNo,
|
|
874
|
-
pageSize,
|
|
875
|
-
isActive,
|
|
876
|
-
|
|
877
|
-
q,
|
|
878
|
-
countryIsoCode,
|
|
879
|
-
state,
|
|
880
|
-
city,
|
|
881
|
-
pincode,
|
|
882
|
-
sector,
|
|
883
|
-
},
|
|
884
|
-
{ abortEarly: false, allowUnknown: true }
|
|
885
|
-
);
|
|
886
|
-
if (error) {
|
|
887
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
// Showing warrnings if extra unknown parameters are found
|
|
891
|
-
const {
|
|
892
|
-
error: warrning,
|
|
893
|
-
} = ServiceabilityPlatformApplicationValidator.getZones().validate(
|
|
894
|
-
{
|
|
895
|
-
pageNo,
|
|
896
|
-
pageSize,
|
|
897
|
-
isActive,
|
|
898
|
-
|
|
899
|
-
q,
|
|
900
|
-
countryIsoCode,
|
|
901
|
-
state,
|
|
902
|
-
city,
|
|
903
|
-
pincode,
|
|
904
|
-
sector,
|
|
905
|
-
},
|
|
906
|
-
{ abortEarly: false, allowUnknown: false }
|
|
907
|
-
);
|
|
908
|
-
if (warrning) {
|
|
909
|
-
Logger({
|
|
910
|
-
level: "WARN",
|
|
911
|
-
message: `Parameter Validation warrnings for platform > Serviceability > getZones \n ${warrning}`,
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
const query_params = {};
|
|
916
|
-
query_params["page_no"] = pageNo;
|
|
917
|
-
query_params["page_size"] = pageSize;
|
|
918
|
-
query_params["is_active"] = isActive;
|
|
919
|
-
query_params["application_id"] = applicationId;
|
|
920
|
-
query_params["q"] = q;
|
|
921
|
-
query_params["country_iso_code"] = countryIsoCode;
|
|
922
|
-
query_params["state"] = state;
|
|
923
|
-
query_params["city"] = city;
|
|
924
|
-
query_params["pincode"] = pincode;
|
|
925
|
-
query_params["sector"] = sector;
|
|
926
|
-
|
|
927
|
-
const response = await PlatformAPIClient.execute(
|
|
928
|
-
this.config,
|
|
929
|
-
"get",
|
|
930
|
-
`/service/platform/logistics/v2.0/company/${this.config.companyId}/zones`,
|
|
931
|
-
query_params,
|
|
932
|
-
undefined,
|
|
933
|
-
requestHeaders,
|
|
934
|
-
{ responseHeaders }
|
|
935
|
-
);
|
|
936
|
-
|
|
937
|
-
let responseData = response;
|
|
938
|
-
if (responseHeaders) {
|
|
939
|
-
responseData = response[0];
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
const {
|
|
943
|
-
error: res_error,
|
|
944
|
-
} = ServiceabilityPlatformModel.ListViewResult().validate(responseData, {
|
|
945
|
-
abortEarly: false,
|
|
946
|
-
allowUnknown: true,
|
|
947
|
-
});
|
|
948
|
-
|
|
949
|
-
if (res_error) {
|
|
950
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
951
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
952
|
-
} else {
|
|
953
|
-
Logger({
|
|
954
|
-
level: "WARN",
|
|
955
|
-
message: `Response Validation Warnings for platform > Serviceability > getZones \n ${res_error}`,
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
return response;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
845
|
/**
|
|
964
846
|
* @param {ServiceabilityPlatformApplicationValidator.InsertApplicationConfigParam} arg
|
|
965
847
|
* - Arg object
|
|
@@ -35,18 +35,6 @@ export = ServiceabilityPlatformApplicationValidator;
|
|
|
35
35
|
* @property {number} [pageSize]
|
|
36
36
|
* @property {string} [status]
|
|
37
37
|
*/
|
|
38
|
-
/**
|
|
39
|
-
* @typedef GetZonesParam
|
|
40
|
-
* @property {number} [pageNo] - Index of the item to start returning with
|
|
41
|
-
* @property {number} [pageSize] - Determines the items to be displayed in a page
|
|
42
|
-
* @property {boolean} [isActive] - Status of Zone (either active or inactive)
|
|
43
|
-
* @property {string} [q] - Search with name as a free text
|
|
44
|
-
* @property {string} [countryIsoCode] - ISO2 code of the country
|
|
45
|
-
* @property {string} [state] - State name
|
|
46
|
-
* @property {string} [city] - City name
|
|
47
|
-
* @property {string} [pincode] - Pincode value to search zones
|
|
48
|
-
* @property {string} [sector] - Sector value to search zones
|
|
49
|
-
*/
|
|
50
38
|
/**
|
|
51
39
|
* @typedef InsertApplicationConfigParam
|
|
52
40
|
* @property {ServiceabilityPlatformModel.StoreRuleConfigData} body
|
|
@@ -119,8 +107,6 @@ declare class ServiceabilityPlatformApplicationValidator {
|
|
|
119
107
|
static getStoreRule(): GetStoreRuleParam;
|
|
120
108
|
/** @returns {GetStoreRulesParam} */
|
|
121
109
|
static getStoreRules(): GetStoreRulesParam;
|
|
122
|
-
/** @returns {GetZonesParam} */
|
|
123
|
-
static getZones(): GetZonesParam;
|
|
124
110
|
/** @returns {InsertApplicationConfigParam} */
|
|
125
111
|
static insertApplicationConfig(): InsertApplicationConfigParam;
|
|
126
112
|
/** @returns {PatchApplicationServiceabilitySelfShipmentParam} */
|
|
@@ -145,7 +131,7 @@ declare class ServiceabilityPlatformApplicationValidator {
|
|
|
145
131
|
static updateStoreRulesConfig(): UpdateStoreRulesConfigParam;
|
|
146
132
|
}
|
|
147
133
|
declare namespace ServiceabilityPlatformApplicationValidator {
|
|
148
|
-
export { CreateCourierPartnerRuleParam, CreateStoreRulesParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetApplicationServiceabilitySelfShipmentParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetCourierPartnersParam, GetStoreRuleParam, GetStoreRulesParam,
|
|
134
|
+
export { CreateCourierPartnerRuleParam, CreateStoreRulesParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetApplicationServiceabilitySelfShipmentParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetCourierPartnersParam, GetStoreRuleParam, GetStoreRulesParam, InsertApplicationConfigParam, PatchApplicationServiceabilitySelfShipmentParam, UpdateApplicationConfigurationParam, UpdateCourierPartnerRulePriorityParam, UpdateCourierRuleParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdateStoreRulesParam, UpdateStoreRulesConfigParam };
|
|
149
135
|
}
|
|
150
136
|
type CreateCourierPartnerRuleParam = {
|
|
151
137
|
body: ServiceabilityPlatformModel.CourierPartnerRule;
|
|
@@ -188,44 +174,6 @@ type GetStoreRulesParam = {
|
|
|
188
174
|
pageSize?: number;
|
|
189
175
|
status?: string;
|
|
190
176
|
};
|
|
191
|
-
type GetZonesParam = {
|
|
192
|
-
/**
|
|
193
|
-
* - Index of the item to start returning with
|
|
194
|
-
*/
|
|
195
|
-
pageNo?: number;
|
|
196
|
-
/**
|
|
197
|
-
* - Determines the items to be displayed in a page
|
|
198
|
-
*/
|
|
199
|
-
pageSize?: number;
|
|
200
|
-
/**
|
|
201
|
-
* - Status of Zone (either active or inactive)
|
|
202
|
-
*/
|
|
203
|
-
isActive?: boolean;
|
|
204
|
-
/**
|
|
205
|
-
* - Search with name as a free text
|
|
206
|
-
*/
|
|
207
|
-
q?: string;
|
|
208
|
-
/**
|
|
209
|
-
* - ISO2 code of the country
|
|
210
|
-
*/
|
|
211
|
-
countryIsoCode?: string;
|
|
212
|
-
/**
|
|
213
|
-
* - State name
|
|
214
|
-
*/
|
|
215
|
-
state?: string;
|
|
216
|
-
/**
|
|
217
|
-
* - City name
|
|
218
|
-
*/
|
|
219
|
-
city?: string;
|
|
220
|
-
/**
|
|
221
|
-
* - Pincode value to search zones
|
|
222
|
-
*/
|
|
223
|
-
pincode?: string;
|
|
224
|
-
/**
|
|
225
|
-
* - Sector value to search zones
|
|
226
|
-
*/
|
|
227
|
-
sector?: string;
|
|
228
|
-
};
|
|
229
177
|
type InsertApplicationConfigParam = {
|
|
230
178
|
body: ServiceabilityPlatformModel.StoreRuleConfigData;
|
|
231
179
|
};
|
|
@@ -48,19 +48,6 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel");
|
|
|
48
48
|
* @property {string} [status]
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* @typedef GetZonesParam
|
|
53
|
-
* @property {number} [pageNo] - Index of the item to start returning with
|
|
54
|
-
* @property {number} [pageSize] - Determines the items to be displayed in a page
|
|
55
|
-
* @property {boolean} [isActive] - Status of Zone (either active or inactive)
|
|
56
|
-
* @property {string} [q] - Search with name as a free text
|
|
57
|
-
* @property {string} [countryIsoCode] - ISO2 code of the country
|
|
58
|
-
* @property {string} [state] - State name
|
|
59
|
-
* @property {string} [city] - City name
|
|
60
|
-
* @property {string} [pincode] - Pincode value to search zones
|
|
61
|
-
* @property {string} [sector] - Sector value to search zones
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
51
|
/**
|
|
65
52
|
* @typedef InsertApplicationConfigParam
|
|
66
53
|
* @property {ServiceabilityPlatformModel.StoreRuleConfigData} body
|
|
@@ -192,22 +179,6 @@ class ServiceabilityPlatformApplicationValidator {
|
|
|
192
179
|
}).required();
|
|
193
180
|
}
|
|
194
181
|
|
|
195
|
-
/** @returns {GetZonesParam} */
|
|
196
|
-
static getZones() {
|
|
197
|
-
return Joi.object({
|
|
198
|
-
pageNo: Joi.number(),
|
|
199
|
-
pageSize: Joi.number(),
|
|
200
|
-
isActive: Joi.boolean(),
|
|
201
|
-
|
|
202
|
-
q: Joi.string().allow(""),
|
|
203
|
-
countryIsoCode: Joi.string().allow(""),
|
|
204
|
-
state: Joi.string().allow(""),
|
|
205
|
-
city: Joi.string().allow(""),
|
|
206
|
-
pincode: Joi.string().allow(""),
|
|
207
|
-
sector: Joi.string().allow(""),
|
|
208
|
-
}).required();
|
|
209
|
-
}
|
|
210
|
-
|
|
211
182
|
/** @returns {InsertApplicationConfigParam} */
|
|
212
183
|
static insertApplicationConfig() {
|
|
213
184
|
return Joi.object({
|
|
@@ -231,6 +231,16 @@ declare class Serviceability {
|
|
|
231
231
|
* @description: Retrieves a single delivery zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneById/).
|
|
232
232
|
*/
|
|
233
233
|
getZoneById({ zoneId, requestHeaders }?: ServiceabilityPlatformValidator.GetZoneByIdParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.GetZoneByIdSchema>;
|
|
234
|
+
/**
|
|
235
|
+
* @param {ServiceabilityPlatformValidator.GetZonesParam} arg - Arg object
|
|
236
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
237
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
238
|
+
* @returns {Promise<ServiceabilityPlatformModel.ListViewResult>} - Success response
|
|
239
|
+
* @name getZones
|
|
240
|
+
* @summary: Get zones
|
|
241
|
+
* @description: Retrieves a list of delivery zones. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/).
|
|
242
|
+
*/
|
|
243
|
+
getZones({ pageNo, pageSize, isActive, applicationId, q, countryIsoCode, state, city, pincode, sector, requestHeaders, }?: ServiceabilityPlatformValidator.GetZonesParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.ListViewResult>;
|
|
234
244
|
/**
|
|
235
245
|
* @param {ServiceabilityPlatformValidator.UpdateCompanyConfigurationParam} arg
|
|
236
246
|
* - Arg object
|
|
@@ -1709,6 +1709,125 @@ class Serviceability {
|
|
|
1709
1709
|
return response;
|
|
1710
1710
|
}
|
|
1711
1711
|
|
|
1712
|
+
/**
|
|
1713
|
+
* @param {ServiceabilityPlatformValidator.GetZonesParam} arg - Arg object
|
|
1714
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1715
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1716
|
+
* @returns {Promise<ServiceabilityPlatformModel.ListViewResult>} - Success response
|
|
1717
|
+
* @name getZones
|
|
1718
|
+
* @summary: Get zones
|
|
1719
|
+
* @description: Retrieves a list of delivery zones. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/).
|
|
1720
|
+
*/
|
|
1721
|
+
async getZones(
|
|
1722
|
+
{
|
|
1723
|
+
pageNo,
|
|
1724
|
+
pageSize,
|
|
1725
|
+
isActive,
|
|
1726
|
+
applicationId,
|
|
1727
|
+
q,
|
|
1728
|
+
countryIsoCode,
|
|
1729
|
+
state,
|
|
1730
|
+
city,
|
|
1731
|
+
pincode,
|
|
1732
|
+
sector,
|
|
1733
|
+
requestHeaders,
|
|
1734
|
+
} = { requestHeaders: {} },
|
|
1735
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1736
|
+
) {
|
|
1737
|
+
const { error } = ServiceabilityPlatformValidator.getZones().validate(
|
|
1738
|
+
{
|
|
1739
|
+
pageNo,
|
|
1740
|
+
pageSize,
|
|
1741
|
+
isActive,
|
|
1742
|
+
applicationId,
|
|
1743
|
+
q,
|
|
1744
|
+
countryIsoCode,
|
|
1745
|
+
state,
|
|
1746
|
+
city,
|
|
1747
|
+
pincode,
|
|
1748
|
+
sector,
|
|
1749
|
+
},
|
|
1750
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1751
|
+
);
|
|
1752
|
+
if (error) {
|
|
1753
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1757
|
+
const {
|
|
1758
|
+
error: warrning,
|
|
1759
|
+
} = ServiceabilityPlatformValidator.getZones().validate(
|
|
1760
|
+
{
|
|
1761
|
+
pageNo,
|
|
1762
|
+
pageSize,
|
|
1763
|
+
isActive,
|
|
1764
|
+
applicationId,
|
|
1765
|
+
q,
|
|
1766
|
+
countryIsoCode,
|
|
1767
|
+
state,
|
|
1768
|
+
city,
|
|
1769
|
+
pincode,
|
|
1770
|
+
sector,
|
|
1771
|
+
},
|
|
1772
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1773
|
+
);
|
|
1774
|
+
if (warrning) {
|
|
1775
|
+
Logger({
|
|
1776
|
+
level: "WARN",
|
|
1777
|
+
message: `Parameter Validation warrnings for platform > Serviceability > getZones \n ${warrning}`,
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
const query_params = {};
|
|
1782
|
+
query_params["page_no"] = pageNo;
|
|
1783
|
+
query_params["page_size"] = pageSize;
|
|
1784
|
+
query_params["is_active"] = isActive;
|
|
1785
|
+
query_params["application_id"] = applicationId;
|
|
1786
|
+
query_params["q"] = q;
|
|
1787
|
+
query_params["country_iso_code"] = countryIsoCode;
|
|
1788
|
+
query_params["state"] = state;
|
|
1789
|
+
query_params["city"] = city;
|
|
1790
|
+
query_params["pincode"] = pincode;
|
|
1791
|
+
query_params["sector"] = sector;
|
|
1792
|
+
|
|
1793
|
+
const xHeaders = {};
|
|
1794
|
+
|
|
1795
|
+
const response = await PlatformAPIClient.execute(
|
|
1796
|
+
this.config,
|
|
1797
|
+
"get",
|
|
1798
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/zones`,
|
|
1799
|
+
query_params,
|
|
1800
|
+
undefined,
|
|
1801
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1802
|
+
{ responseHeaders }
|
|
1803
|
+
);
|
|
1804
|
+
|
|
1805
|
+
let responseData = response;
|
|
1806
|
+
if (responseHeaders) {
|
|
1807
|
+
responseData = response[0];
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
const {
|
|
1811
|
+
error: res_error,
|
|
1812
|
+
} = ServiceabilityPlatformModel.ListViewResult().validate(responseData, {
|
|
1813
|
+
abortEarly: false,
|
|
1814
|
+
allowUnknown: true,
|
|
1815
|
+
});
|
|
1816
|
+
|
|
1817
|
+
if (res_error) {
|
|
1818
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1819
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1820
|
+
} else {
|
|
1821
|
+
Logger({
|
|
1822
|
+
level: "WARN",
|
|
1823
|
+
message: `Response Validation Warnings for platform > Serviceability > getZones \n ${res_error}`,
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
return response;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1712
1831
|
/**
|
|
1713
1832
|
* @param {ServiceabilityPlatformValidator.UpdateCompanyConfigurationParam} arg
|
|
1714
1833
|
* - Arg object
|
|
@@ -106,6 +106,19 @@ export = ServiceabilityPlatformValidator;
|
|
|
106
106
|
* @typedef GetZoneByIdParam
|
|
107
107
|
* @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone.
|
|
108
108
|
*/
|
|
109
|
+
/**
|
|
110
|
+
* @typedef GetZonesParam
|
|
111
|
+
* @property {number} [pageNo] - Index of the item to start returning with
|
|
112
|
+
* @property {number} [pageSize] - Determines the items to be displayed in a page
|
|
113
|
+
* @property {boolean} [isActive] - Status of Zone (either active or inactive)
|
|
114
|
+
* @property {string} [applicationId] - Zones filtered by an application
|
|
115
|
+
* @property {string} [q] - Search with name as a free text
|
|
116
|
+
* @property {string} [countryIsoCode] - ISO2 code of the country
|
|
117
|
+
* @property {string} [state] - State name
|
|
118
|
+
* @property {string} [city] - City name
|
|
119
|
+
* @property {string} [pincode] - Pincode value to search zones
|
|
120
|
+
* @property {string} [sector] - Sector value to search zones
|
|
121
|
+
*/
|
|
109
122
|
/**
|
|
110
123
|
* @typedef UpdateCompanyConfigurationParam
|
|
111
124
|
* @property {ServiceabilityPlatformModel.CompanyConfig} body
|
|
@@ -177,6 +190,8 @@ declare class ServiceabilityPlatformValidator {
|
|
|
177
190
|
static getServiceability(): GetServiceabilityParam;
|
|
178
191
|
/** @returns {GetZoneByIdParam} */
|
|
179
192
|
static getZoneById(): GetZoneByIdParam;
|
|
193
|
+
/** @returns {GetZonesParam} */
|
|
194
|
+
static getZones(): GetZonesParam;
|
|
180
195
|
/** @returns {UpdateCompanyConfigurationParam} */
|
|
181
196
|
static updateCompanyConfiguration(): UpdateCompanyConfigurationParam;
|
|
182
197
|
/** @returns {UpdateCourierPartnerAccountParam} */
|
|
@@ -191,7 +206,7 @@ declare class ServiceabilityPlatformValidator {
|
|
|
191
206
|
static updateZoneById(): UpdateZoneByIdParam;
|
|
192
207
|
}
|
|
193
208
|
declare namespace ServiceabilityPlatformValidator {
|
|
194
|
-
export { BulkServiceabilityParam, BulkTatParam, CreateCourierPartnerAccountParam, CreatePackageMaterialParam, CreatePackageMaterialRuleParam, CreateZoneParam, GetAllStoresParam, GetBulkServiceabilityParam, GetBulkTatParam, GetCompanyConfigurationParam, GetCourierPartnerAccountParam, GetCourierPartnerAccountsParam, GetOptimalLocationsParam, GetPackageMaterialListParam, GetPackageMaterialRuleParam, GetPackageMaterialRulesParam, GetPackageMaterialsParam, GetServiceabilityParam, GetZoneByIdParam, UpdateCompanyConfigurationParam, UpdateCourierPartnerAccountParam, UpdatePackageMaterialRuleParam, UpdatePackageMaterialsParam, UpdateServiceabilityParam, UpdateZoneByIdParam };
|
|
209
|
+
export { BulkServiceabilityParam, BulkTatParam, CreateCourierPartnerAccountParam, CreatePackageMaterialParam, CreatePackageMaterialRuleParam, CreateZoneParam, GetAllStoresParam, GetBulkServiceabilityParam, GetBulkTatParam, GetCompanyConfigurationParam, GetCourierPartnerAccountParam, GetCourierPartnerAccountsParam, GetOptimalLocationsParam, GetPackageMaterialListParam, GetPackageMaterialRuleParam, GetPackageMaterialRulesParam, GetPackageMaterialsParam, GetServiceabilityParam, GetZoneByIdParam, GetZonesParam, UpdateCompanyConfigurationParam, UpdateCourierPartnerAccountParam, UpdatePackageMaterialRuleParam, UpdatePackageMaterialsParam, UpdateServiceabilityParam, UpdateZoneByIdParam };
|
|
195
210
|
}
|
|
196
211
|
type BulkServiceabilityParam = {
|
|
197
212
|
/**
|
|
@@ -419,6 +434,48 @@ type GetZoneByIdParam = {
|
|
|
419
434
|
*/
|
|
420
435
|
zoneId: string;
|
|
421
436
|
};
|
|
437
|
+
type GetZonesParam = {
|
|
438
|
+
/**
|
|
439
|
+
* - Index of the item to start returning with
|
|
440
|
+
*/
|
|
441
|
+
pageNo?: number;
|
|
442
|
+
/**
|
|
443
|
+
* - Determines the items to be displayed in a page
|
|
444
|
+
*/
|
|
445
|
+
pageSize?: number;
|
|
446
|
+
/**
|
|
447
|
+
* - Status of Zone (either active or inactive)
|
|
448
|
+
*/
|
|
449
|
+
isActive?: boolean;
|
|
450
|
+
/**
|
|
451
|
+
* - Zones filtered by an application
|
|
452
|
+
*/
|
|
453
|
+
applicationId?: string;
|
|
454
|
+
/**
|
|
455
|
+
* - Search with name as a free text
|
|
456
|
+
*/
|
|
457
|
+
q?: string;
|
|
458
|
+
/**
|
|
459
|
+
* - ISO2 code of the country
|
|
460
|
+
*/
|
|
461
|
+
countryIsoCode?: string;
|
|
462
|
+
/**
|
|
463
|
+
* - State name
|
|
464
|
+
*/
|
|
465
|
+
state?: string;
|
|
466
|
+
/**
|
|
467
|
+
* - City name
|
|
468
|
+
*/
|
|
469
|
+
city?: string;
|
|
470
|
+
/**
|
|
471
|
+
* - Pincode value to search zones
|
|
472
|
+
*/
|
|
473
|
+
pincode?: string;
|
|
474
|
+
/**
|
|
475
|
+
* - Sector value to search zones
|
|
476
|
+
*/
|
|
477
|
+
sector?: string;
|
|
478
|
+
};
|
|
422
479
|
type UpdateCompanyConfigurationParam = {
|
|
423
480
|
body: ServiceabilityPlatformModel.CompanyConfig;
|
|
424
481
|
};
|
|
@@ -128,6 +128,20 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel");
|
|
|
128
128
|
* @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone.
|
|
129
129
|
*/
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* @typedef GetZonesParam
|
|
133
|
+
* @property {number} [pageNo] - Index of the item to start returning with
|
|
134
|
+
* @property {number} [pageSize] - Determines the items to be displayed in a page
|
|
135
|
+
* @property {boolean} [isActive] - Status of Zone (either active or inactive)
|
|
136
|
+
* @property {string} [applicationId] - Zones filtered by an application
|
|
137
|
+
* @property {string} [q] - Search with name as a free text
|
|
138
|
+
* @property {string} [countryIsoCode] - ISO2 code of the country
|
|
139
|
+
* @property {string} [state] - State name
|
|
140
|
+
* @property {string} [city] - City name
|
|
141
|
+
* @property {string} [pincode] - Pincode value to search zones
|
|
142
|
+
* @property {string} [sector] - Sector value to search zones
|
|
143
|
+
*/
|
|
144
|
+
|
|
131
145
|
/**
|
|
132
146
|
* @typedef UpdateCompanyConfigurationParam
|
|
133
147
|
* @property {ServiceabilityPlatformModel.CompanyConfig} body
|
|
@@ -332,6 +346,22 @@ class ServiceabilityPlatformValidator {
|
|
|
332
346
|
}).required();
|
|
333
347
|
}
|
|
334
348
|
|
|
349
|
+
/** @returns {GetZonesParam} */
|
|
350
|
+
static getZones() {
|
|
351
|
+
return Joi.object({
|
|
352
|
+
pageNo: Joi.number(),
|
|
353
|
+
pageSize: Joi.number(),
|
|
354
|
+
isActive: Joi.boolean(),
|
|
355
|
+
applicationId: Joi.string().allow(""),
|
|
356
|
+
q: Joi.string().allow(""),
|
|
357
|
+
countryIsoCode: Joi.string().allow(""),
|
|
358
|
+
state: Joi.string().allow(""),
|
|
359
|
+
city: Joi.string().allow(""),
|
|
360
|
+
pincode: Joi.string().allow(""),
|
|
361
|
+
sector: Joi.string().allow(""),
|
|
362
|
+
}).required();
|
|
363
|
+
}
|
|
364
|
+
|
|
335
365
|
/** @returns {UpdateCompanyConfigurationParam} */
|
|
336
366
|
static updateCompanyConfiguration() {
|
|
337
367
|
return Joi.object({
|
|
@@ -9,7 +9,7 @@ declare class Share {
|
|
|
9
9
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
10
10
|
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
11
11
|
* @name createShortLink
|
|
12
|
-
* @summary: Create short link
|
|
12
|
+
* @summary: Create short link.
|
|
13
13
|
* @description: Generate a shortened URL link for sharing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/createShortLink/).
|
|
14
14
|
*/
|
|
15
15
|
createShortLink({ body, requestHeaders }?: SharePlatformApplicationValidator.CreateShortLinkParam, { responseHeaders }?: object): Promise<SharePlatformModel.ShortLinkRes>;
|
|
@@ -19,7 +19,7 @@ declare class Share {
|
|
|
19
19
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
20
20
|
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
21
21
|
* @name getShortLinkByHash
|
|
22
|
-
* @summary: Get short link by hash
|
|
22
|
+
* @summary: Get short link by hash.
|
|
23
23
|
* @description: Retrieve a specific short link by its unique hash. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/getShortLinkByHash/).
|
|
24
24
|
*/
|
|
25
25
|
getShortLinkByHash({ hash, requestHeaders }?: SharePlatformApplicationValidator.GetShortLinkByHashParam, { responseHeaders }?: object): Promise<SharePlatformModel.ShortLinkRes>;
|
|
@@ -53,7 +53,7 @@ declare class Share {
|
|
|
53
53
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
54
54
|
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
55
55
|
* @name updateShortLinkById
|
|
56
|
-
* @summary: Update short link
|
|
56
|
+
* @summary: Update short link by ID.
|
|
57
57
|
* @description: Update details of a specific short link by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/updateShortLinkById/).
|
|
58
58
|
*/
|
|
59
59
|
updateShortLinkById({ id, body, requestHeaders }?: SharePlatformApplicationValidator.UpdateShortLinkByIdParam, { responseHeaders }?: object): Promise<SharePlatformModel.ShortLinkRes>;
|
|
@@ -21,7 +21,7 @@ class Share {
|
|
|
21
21
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
22
22
|
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
23
23
|
* @name createShortLink
|
|
24
|
-
* @summary: Create short link
|
|
24
|
+
* @summary: Create short link.
|
|
25
25
|
* @description: Generate a shortened URL link for sharing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/createShortLink/).
|
|
26
26
|
*/
|
|
27
27
|
async createShortLink(
|
|
@@ -61,7 +61,7 @@ class Share {
|
|
|
61
61
|
const response = await PlatformAPIClient.execute(
|
|
62
62
|
this.config,
|
|
63
63
|
"post",
|
|
64
|
-
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link
|
|
64
|
+
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link`,
|
|
65
65
|
query_params,
|
|
66
66
|
body,
|
|
67
67
|
requestHeaders,
|
|
@@ -100,7 +100,7 @@ class Share {
|
|
|
100
100
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
101
101
|
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
102
102
|
* @name getShortLinkByHash
|
|
103
|
-
* @summary: Get short link by hash
|
|
103
|
+
* @summary: Get short link by hash.
|
|
104
104
|
* @description: Retrieve a specific short link by its unique hash. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/getShortLinkByHash/).
|
|
105
105
|
*/
|
|
106
106
|
async getShortLinkByHash(
|
|
@@ -140,7 +140,7 @@ class Share {
|
|
|
140
140
|
const response = await PlatformAPIClient.execute(
|
|
141
141
|
this.config,
|
|
142
142
|
"get",
|
|
143
|
-
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${hash}
|
|
143
|
+
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${hash}`,
|
|
144
144
|
query_params,
|
|
145
145
|
undefined,
|
|
146
146
|
requestHeaders,
|
|
@@ -325,7 +325,7 @@ class Share {
|
|
|
325
325
|
const response = await PlatformAPIClient.execute(
|
|
326
326
|
this.config,
|
|
327
327
|
"get",
|
|
328
|
-
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link
|
|
328
|
+
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link`,
|
|
329
329
|
query_params,
|
|
330
330
|
undefined,
|
|
331
331
|
requestHeaders,
|
|
@@ -366,7 +366,7 @@ class Share {
|
|
|
366
366
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
367
367
|
* @returns {Promise<SharePlatformModel.ShortLinkRes>} - Success response
|
|
368
368
|
* @name updateShortLinkById
|
|
369
|
-
* @summary: Update short link
|
|
369
|
+
* @summary: Update short link by ID.
|
|
370
370
|
* @description: Update details of a specific short link by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/updateShortLinkById/).
|
|
371
371
|
*/
|
|
372
372
|
async updateShortLinkById(
|
|
@@ -408,7 +408,7 @@ class Share {
|
|
|
408
408
|
const response = await PlatformAPIClient.execute(
|
|
409
409
|
this.config,
|
|
410
410
|
"patch",
|
|
411
|
-
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${id}
|
|
411
|
+
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${id}`,
|
|
412
412
|
query_params,
|
|
413
413
|
body,
|
|
414
414
|
requestHeaders,
|
|
@@ -5,7 +5,7 @@ export = SharePlatformApplicationValidator;
|
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* @typedef GetShortLinkByHashParam
|
|
8
|
-
* @property {string} hash
|
|
8
|
+
* @property {string} hash
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @typedef GetShortLinkClickStatsParam
|
|
@@ -24,7 +24,7 @@ export = SharePlatformApplicationValidator;
|
|
|
24
24
|
*/
|
|
25
25
|
/**
|
|
26
26
|
* @typedef UpdateShortLinkByIdParam
|
|
27
|
-
* @property {string} id -
|
|
27
|
+
* @property {string} id - Document Id
|
|
28
28
|
* @property {SharePlatformModel.ShortLinkReq} body
|
|
29
29
|
*/
|
|
30
30
|
declare class SharePlatformApplicationValidator {
|
|
@@ -46,9 +46,6 @@ type CreateShortLinkParam = {
|
|
|
46
46
|
body: SharePlatformModel.ShortLinkReq;
|
|
47
47
|
};
|
|
48
48
|
type GetShortLinkByHashParam = {
|
|
49
|
-
/**
|
|
50
|
-
* - Hash of short url
|
|
51
|
-
*/
|
|
52
49
|
hash: string;
|
|
53
50
|
};
|
|
54
51
|
type GetShortLinkClickStatsParam = {
|
|
@@ -90,7 +87,7 @@ type GetShortLinksParam = {
|
|
|
90
87
|
};
|
|
91
88
|
type UpdateShortLinkByIdParam = {
|
|
92
89
|
/**
|
|
93
|
-
* -
|
|
90
|
+
* - Document Id
|
|
94
91
|
*/
|
|
95
92
|
id: string;
|
|
96
93
|
body: SharePlatformModel.ShortLinkReq;
|
|
@@ -9,7 +9,7 @@ const SharePlatformModel = require("./SharePlatformModel");
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @typedef GetShortLinkByHashParam
|
|
12
|
-
* @property {string} hash
|
|
12
|
+
* @property {string} hash
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -31,7 +31,7 @@ const SharePlatformModel = require("./SharePlatformModel");
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @typedef UpdateShortLinkByIdParam
|
|
34
|
-
* @property {string} id -
|
|
34
|
+
* @property {string} id - Document Id
|
|
35
35
|
* @property {SharePlatformModel.ShortLinkReq} body
|
|
36
36
|
*/
|
|
37
37
|
|