@gofynd/fdk-client-javascript 1.1.3 → 1.1.5
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 -0
- package/index.d.ts +4 -1
- package/index.js +7 -0
- package/package.json +1 -1
- package/partner.d.ts +4 -0
- package/partner.js +7 -0
- package/sdk/application/Common/CommonApplicationModel.js +4 -0
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +5 -5
- package/sdk/application/Lead/LeadApplicationModel.js +4 -1
- package/sdk/partner/OAuthClient.d.ts +14 -0
- package/sdk/partner/OAuthClient.js +112 -0
- package/sdk/partner/PartnerAPIClient.d.ts +12 -0
- package/sdk/partner/PartnerAPIClient.js +42 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +30 -0
- package/sdk/partner/PartnerConfig.js +39 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +5 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +32 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +184 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +19 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6 -0
- package/sdk/platform/Cart/CartPlatformModel.js +72 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2 -2
- package/sdk/platform/Common/CommonPlatformModel.js +4 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +8 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +3 -1
- package/sdk/platform/Order/OrderPlatformClient.js +5 -0
- package/sdk/platform/Order/OrderPlatformModel.js +1 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +4 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +42 -7
- package/sdk/platform/PlatformApplicationClient.d.ts +103 -2
- package/sdk/platform/PlatformApplicationClient.js +109 -0
- package/sdk/platform/PlatformClient.d.ts +642 -36
- package/sdk/platform/PlatformClient.js +773 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +134 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +852 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +16 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +81 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +223 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1296 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +97 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +776 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +21 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +130 -0
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicModel.js +5 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export = ServiceabilityValidator;
|
|
2
|
+
declare class ServiceabilityValidator {
|
|
3
|
+
static addAppDp(): any;
|
|
4
|
+
static deleteAppDp(): any;
|
|
5
|
+
static getApplicationServiceability(): any;
|
|
6
|
+
static getApplicationServiceabilitySelfShipment(): any;
|
|
7
|
+
static getDpApplicationRules(): any;
|
|
8
|
+
static getZoneFromPincodeView(): any;
|
|
9
|
+
static getZonesFromApplicationIdView(): any;
|
|
10
|
+
static patchApplicationServiceabilitySelfShipment(): any;
|
|
11
|
+
static updatePincodeAuditHistory(): any;
|
|
12
|
+
static updatePincodeBulkView(): any;
|
|
13
|
+
static updatePincodeCoDListing(): any;
|
|
14
|
+
static updatePincodeMopView(): any;
|
|
15
|
+
static upsertDpApplicationRules(): any;
|
|
16
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
const ServiceabilityModel = require("./ServiceabilityPlatformModel");
|
|
4
|
+
class ServiceabilityValidator {
|
|
5
|
+
static addAppDp() {
|
|
6
|
+
return Joi.object({
|
|
7
|
+
body: ServiceabilityModel.ApplicationCompanyDpViewRequest().required(),
|
|
8
|
+
}).required();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static deleteAppDp() {
|
|
12
|
+
return Joi.object({
|
|
13
|
+
courierPartnerId: Joi.number().required(),
|
|
14
|
+
}).required();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static getApplicationServiceability() {
|
|
18
|
+
return Joi.object({}).required();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static getApplicationServiceabilitySelfShipment() {
|
|
22
|
+
return Joi.object({}).required();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static getDpApplicationRules() {
|
|
26
|
+
return Joi.object({}).required();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static getZoneFromPincodeView() {
|
|
30
|
+
return Joi.object({
|
|
31
|
+
body: ServiceabilityModel.GetZoneFromPincodeViewRequest().required(),
|
|
32
|
+
}).required();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getZonesFromApplicationIdView() {
|
|
36
|
+
return Joi.object({
|
|
37
|
+
pageNo: Joi.number(),
|
|
38
|
+
pageSize: Joi.number(),
|
|
39
|
+
zoneId: Joi.array().items(Joi.string().allow("")),
|
|
40
|
+
q: Joi.string().allow(""),
|
|
41
|
+
}).required();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static patchApplicationServiceabilitySelfShipment() {
|
|
45
|
+
return Joi.object({
|
|
46
|
+
body: ServiceabilityModel.SelfShipResponse().required(),
|
|
47
|
+
}).required();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static updatePincodeAuditHistory() {
|
|
51
|
+
return Joi.object({
|
|
52
|
+
body: ServiceabilityModel.PincodeMopUpdateAuditHistoryRequest().required(),
|
|
53
|
+
}).required();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static updatePincodeBulkView() {
|
|
57
|
+
return Joi.object({
|
|
58
|
+
body: ServiceabilityModel.PincodeMopBulkData().required(),
|
|
59
|
+
}).required();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static updatePincodeCoDListing() {
|
|
63
|
+
return Joi.object({
|
|
64
|
+
body: ServiceabilityModel.PincodeCodStatusListingRequest().required(),
|
|
65
|
+
}).required();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static updatePincodeMopView() {
|
|
69
|
+
return Joi.object({
|
|
70
|
+
body: ServiceabilityModel.PincodeMopData().required(),
|
|
71
|
+
}).required();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static upsertDpApplicationRules() {
|
|
75
|
+
return Joi.object({
|
|
76
|
+
body: ServiceabilityModel.DPApplicationRuleRequest().required(),
|
|
77
|
+
}).required();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
module.exports = ServiceabilityValidator;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
export = Serviceability;
|
|
2
|
+
declare class Serviceability {
|
|
3
|
+
constructor(config: any);
|
|
4
|
+
config: any;
|
|
5
|
+
/**
|
|
6
|
+
* @param {Object} arg - Arg object.
|
|
7
|
+
* @param {ZoneRequest} arg.body
|
|
8
|
+
* @returns {Promise<ZoneResponse>} - Success response
|
|
9
|
+
* @summary: Creation of a new zone
|
|
10
|
+
* @description: This API allows you to create a new zone with the specified information. A zone enables serviceability based on given pincodes or regions. By creating a zone and including specific pincodes or regions, you can ensure that the stores associated with the zone are serviceable for those added pincodes or regions. This functionality is particularly useful when you need to ensure serviceability for multiple pincodes or regions by grouping them into a single zone.
|
|
11
|
+
*/
|
|
12
|
+
createZone({ body }?: {
|
|
13
|
+
body: ZoneRequest;
|
|
14
|
+
}): Promise<ZoneResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* @param {Object} arg - Arg object.
|
|
17
|
+
* @returns {Promise<GetStoresViewResponse>} - Success response
|
|
18
|
+
* @summary: GET stores data
|
|
19
|
+
* @description: This API returns stores data.
|
|
20
|
+
*/
|
|
21
|
+
getAllStores({}?: any): Promise<GetStoresViewResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* @param {Object} arg - Arg object.
|
|
24
|
+
* @param {number} [arg.pageNumber] - Index of the item to start returning with
|
|
25
|
+
* @param {number} [arg.pageSize] - Determines the items to be displayed in a page
|
|
26
|
+
* @returns {Promise<CompanyStoreView_Response>} - Success response
|
|
27
|
+
* @summary: Company Store View of application.
|
|
28
|
+
* @description: This API returns Company Store View of the application.
|
|
29
|
+
*/
|
|
30
|
+
getCompanyStoreView({ pageNumber, pageSize }?: {
|
|
31
|
+
pageNumber?: number;
|
|
32
|
+
pageSize?: number;
|
|
33
|
+
}): Promise<CompanyStoreView_Response>;
|
|
34
|
+
/**
|
|
35
|
+
* @param {Object} arg - Arg object.
|
|
36
|
+
* @param {number} [arg.pageNumber] - Index of the item to start returning with
|
|
37
|
+
* @param {number} [arg.pageSize] - Determines the items to be displayed in a page
|
|
38
|
+
* @param {string} [arg.stage] - Stage of the account. enabled/disabled
|
|
39
|
+
* @param {string} [arg.paymentMode] - Filters dp accounts based on payment mode
|
|
40
|
+
* @param {string} [arg.transportType] - Filters dp accounts based on transport_type
|
|
41
|
+
* @returns {Promise<CompanyDpAccountListResponse>} - Success response
|
|
42
|
+
* @summary: Getting DpAccount of a company from database.
|
|
43
|
+
* @description: This API returns response DpAccount of a company from mongo database.
|
|
44
|
+
*/
|
|
45
|
+
getDpAccount({ pageNumber, pageSize, stage, paymentMode, transportType, }?: {
|
|
46
|
+
pageNumber?: number;
|
|
47
|
+
pageSize?: number;
|
|
48
|
+
stage?: string;
|
|
49
|
+
paymentMode?: string;
|
|
50
|
+
transportType?: string;
|
|
51
|
+
}): Promise<CompanyDpAccountListResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* @param {Object} arg - Arg object.
|
|
54
|
+
* @returns {Promise<DPCompanyRuleResponse>} - Success response
|
|
55
|
+
* @summary: Get All DpCompanyRules applied to company from database.
|
|
56
|
+
* @description: This API returns response of all DpCompanyRules from mongo database.
|
|
57
|
+
*/
|
|
58
|
+
getDpCompanyRules({}?: any): Promise<DPCompanyRuleResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* @param {Object} arg - Arg object.
|
|
61
|
+
* @param {number} [arg.pageNumber] - Index of the item to start returning with
|
|
62
|
+
* @param {number} [arg.pageSize] - Determines the items to be displayed in a page
|
|
63
|
+
* @returns {Promise<DpMultipleRuleSuccessResponse>} - Success response
|
|
64
|
+
* @summary: Fetching of DpRules from database.
|
|
65
|
+
* @description: This API returns response of DpRules from mongo database.
|
|
66
|
+
*/
|
|
67
|
+
getDpRuleInsert({ pageNumber, pageSize }?: {
|
|
68
|
+
pageNumber?: number;
|
|
69
|
+
pageSize?: number;
|
|
70
|
+
}): Promise<DpMultipleRuleSuccessResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* @param {Object} arg - Arg object.
|
|
73
|
+
* @param {string} arg.ruleUid - A `rule_uid` is a unique identifier for a
|
|
74
|
+
* particular Dp.
|
|
75
|
+
* @returns {Promise<DpRuleSuccessResponse>} - Success response
|
|
76
|
+
* @summary: Fetching of DpRules from database.
|
|
77
|
+
* @description: This API returns response of DpRules from mongo database.
|
|
78
|
+
*/
|
|
79
|
+
getDpRules({ ruleUid }?: {
|
|
80
|
+
ruleUid: string;
|
|
81
|
+
}): Promise<DpRuleSuccessResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* @param {Object} arg - Arg object.
|
|
84
|
+
* @param {EntityRegionView_Request} arg.body
|
|
85
|
+
* @returns {Promise<EntityRegionView_Response>} - Success response
|
|
86
|
+
* @summary: Get country and state list
|
|
87
|
+
* @description: This API returns response for Entity Region View.
|
|
88
|
+
*/
|
|
89
|
+
getEntityRegionView({ body }?: {
|
|
90
|
+
body: EntityRegionView_Request;
|
|
91
|
+
}): Promise<EntityRegionView_Response>;
|
|
92
|
+
/**
|
|
93
|
+
* @param {Object} arg - Arg object.
|
|
94
|
+
* @param {number} [arg.pageNumber] - Index of the item to start returning with
|
|
95
|
+
* @param {number} [arg.pageSize] - Determines the items to be displayed in a page
|
|
96
|
+
* @param {string} [arg.name] - Name of particular zone in the seller account
|
|
97
|
+
* @param {boolean} [arg.isActive] - Status of zone whether active or inactive
|
|
98
|
+
* @param {string} [arg.channelIds] - Zones associated with the given channel ids'
|
|
99
|
+
* @param {string} [arg.q] - Search with name as a free text
|
|
100
|
+
* @returns {Promise<ListViewResponse>} - Success response
|
|
101
|
+
* @summary: Zone List of application.
|
|
102
|
+
* @description: This API returns Zone List View of the application.
|
|
103
|
+
*/
|
|
104
|
+
getListView({ pageNumber, pageSize, name, isActive, channelIds, q, }?: {
|
|
105
|
+
pageNumber?: number;
|
|
106
|
+
pageSize?: number;
|
|
107
|
+
name?: string;
|
|
108
|
+
isActive?: boolean;
|
|
109
|
+
channelIds?: string;
|
|
110
|
+
q?: string;
|
|
111
|
+
}): Promise<ListViewResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* @param {Object} arg - Arg object.
|
|
114
|
+
* @param {ReAssignStoreRequest} arg.body
|
|
115
|
+
* @returns {Promise<ReAssignStoreResponse>} - Success response
|
|
116
|
+
* @summary: Get serviceable store of the item
|
|
117
|
+
* @description: This API returns serviceable store of the item.
|
|
118
|
+
*/
|
|
119
|
+
getOptimalLocations({ body }?: {
|
|
120
|
+
body: ReAssignStoreRequest;
|
|
121
|
+
}): Promise<ReAssignStoreResponse>;
|
|
122
|
+
/**
|
|
123
|
+
* @param {Object} arg - Arg object.
|
|
124
|
+
* @param {number} arg.storeUid - A `store_uid` contains a specific ID of a store.
|
|
125
|
+
* @returns {Promise<GetStoresViewResponse>} - Success response
|
|
126
|
+
* @summary: GET stores data
|
|
127
|
+
* @description: This API returns stores data.
|
|
128
|
+
*/
|
|
129
|
+
getStore({ storeUid }?: {
|
|
130
|
+
storeUid: number;
|
|
131
|
+
}): Promise<GetStoresViewResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* @param {Object} arg - Arg object.
|
|
134
|
+
* @param {string} arg.zoneId - A `zone_id` is a unique identifier for a
|
|
135
|
+
* particular zone.
|
|
136
|
+
* @returns {Promise<GetSingleZoneDataViewResponse>} - Success response
|
|
137
|
+
* @summary: Zone Data View of application.
|
|
138
|
+
* @description: This API returns Zone Data View of the application.
|
|
139
|
+
*/
|
|
140
|
+
getZoneDataView({ zoneId }?: {
|
|
141
|
+
zoneId: string;
|
|
142
|
+
}): Promise<GetSingleZoneDataViewResponse>;
|
|
143
|
+
/**
|
|
144
|
+
* @param {Object} arg - Arg object.
|
|
145
|
+
* @param {number} [arg.pageNumber] - Index of the item to start returning with
|
|
146
|
+
* @param {number} [arg.pageNo] - Index of the item to start returning with
|
|
147
|
+
* @param {number} [arg.pageSize] - Determines the items to be displayed in a page
|
|
148
|
+
* @param {string} [arg.name] - Name of particular zone in the seller account
|
|
149
|
+
* @param {boolean} [arg.isActive] - Status of zone whether active or inactive
|
|
150
|
+
* @param {string} [arg.channelIds] - Zones associated with the given channel ids'
|
|
151
|
+
* @param {string} [arg.q] - Search with name as a free text
|
|
152
|
+
* @param {string[]} [arg.zoneId] - List of zones to query for
|
|
153
|
+
* @returns {Promise<ListViewResponse>} - Success response
|
|
154
|
+
* @summary: Zone List of application.
|
|
155
|
+
* @description: This API returns Zone List View of the application.
|
|
156
|
+
*/
|
|
157
|
+
getZoneListView({ pageNumber, pageNo, pageSize, name, isActive, channelIds, q, zoneId, }?: {
|
|
158
|
+
pageNumber?: number;
|
|
159
|
+
pageNo?: number;
|
|
160
|
+
pageSize?: number;
|
|
161
|
+
name?: string;
|
|
162
|
+
isActive?: boolean;
|
|
163
|
+
channelIds?: string;
|
|
164
|
+
q?: string;
|
|
165
|
+
zoneId?: string[];
|
|
166
|
+
}): Promise<ListViewResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* @param {Object} arg - Arg object.
|
|
169
|
+
* @param {string} arg.ruleUid - A `rule_uid` is a unique identifier for a
|
|
170
|
+
* particular Dp.
|
|
171
|
+
* @param {DpRulesUpdateRequest} arg.body
|
|
172
|
+
* @returns {Promise<DpRuleUpdateSuccessResponse>} - Success response
|
|
173
|
+
* @summary: Updating of DpRules from database.
|
|
174
|
+
* @description: This API updates and returns response of DpRules from mongo database.
|
|
175
|
+
*/
|
|
176
|
+
updateDpRule({ ruleUid, body }?: {
|
|
177
|
+
ruleUid: string;
|
|
178
|
+
body: DpRulesUpdateRequest;
|
|
179
|
+
}): Promise<DpRuleUpdateSuccessResponse>;
|
|
180
|
+
/**
|
|
181
|
+
* @param {Object} arg - Arg object.
|
|
182
|
+
* @param {string} arg.zoneId - A `zone_id` is a unique identifier for a
|
|
183
|
+
* particular zone.
|
|
184
|
+
* @param {ZoneUpdateRequest} arg.body
|
|
185
|
+
* @returns {Promise<ZoneSuccessResponse>} - Success response
|
|
186
|
+
* @summary: Updation of zone collections in database.
|
|
187
|
+
* @description: This API returns response of updation of zone in mongo database.
|
|
188
|
+
*/
|
|
189
|
+
updateZoneControllerView({ zoneId, body, }?: {
|
|
190
|
+
zoneId: string;
|
|
191
|
+
body: ZoneUpdateRequest;
|
|
192
|
+
}): Promise<ZoneSuccessResponse>;
|
|
193
|
+
/**
|
|
194
|
+
* @param {Object} arg - Arg object.
|
|
195
|
+
* @param {CompanyDpAccountRequest} arg.body
|
|
196
|
+
* @returns {Promise<CompanyDpAccountResponse>} - Success response
|
|
197
|
+
* @summary: Upsertion of DpAccount in database.
|
|
198
|
+
* @description: This API returns response of upsertion of DpAccount in mongo database.
|
|
199
|
+
*/
|
|
200
|
+
upsertDpAccount({ body }?: {
|
|
201
|
+
body: CompanyDpAccountRequest;
|
|
202
|
+
}): Promise<CompanyDpAccountResponse>;
|
|
203
|
+
/**
|
|
204
|
+
* @param {Object} arg - Arg object.
|
|
205
|
+
* @param {DPCompanyRuleRequest} arg.body
|
|
206
|
+
* @returns {Promise<DPCompanyRuleResponse>} - Success response
|
|
207
|
+
* @summary: Upsert of DpCompanyRules in database.
|
|
208
|
+
* @description: This API returns response of upsert of DpCompanyRules in mongo database.
|
|
209
|
+
*/
|
|
210
|
+
upsertDpCompanyRules({ body }?: {
|
|
211
|
+
body: DPCompanyRuleRequest;
|
|
212
|
+
}): Promise<DPCompanyRuleResponse>;
|
|
213
|
+
/**
|
|
214
|
+
* @param {Object} arg - Arg object.
|
|
215
|
+
* @param {DpRuleRequest} arg.body
|
|
216
|
+
* @returns {Promise<DpRuleSuccessResponse>} - Success response
|
|
217
|
+
* @summary: Upsert of DpRules in database.
|
|
218
|
+
* @description: This API returns response of upsert of DpRules in mongo database.
|
|
219
|
+
*/
|
|
220
|
+
upsertDpRules({ body }?: {
|
|
221
|
+
body: DpRuleRequest;
|
|
222
|
+
}): Promise<DpRuleSuccessResponse>;
|
|
223
|
+
}
|