@gofynd/fdk-client-javascript 3.27.0 → 3.28.0
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/Configuration/ConfigurationApplicationClient.d.ts +4 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +5 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +11 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +50 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +61 -1
- package/sdk/platform/Cart/CartPlatformModel.js +40 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +175 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +83 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +27 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +52 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +20 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +41 -0
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +30 -1
- package/sdk/platform/Lead/LeadPlatformModel.js +19 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +163 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +27 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +26 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +106 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +79 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +83 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +10 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +121 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +112 -0
|
@@ -975,6 +975,24 @@ const Joi = require("joi");
|
|
|
975
975
|
* @property {AppliedOffer[]} [applied_offers] - List of offers applied on the order.
|
|
976
976
|
*/
|
|
977
977
|
|
|
978
|
+
/**
|
|
979
|
+
* @typedef OrderMetaUpdate
|
|
980
|
+
* @property {string} pan_no - Valid Indian PAN (Permanent Account Number).
|
|
981
|
+
* Format: 5 letters, 4 digits, 1 letter (e.g. AAAAA9999A). Case-insensitive;
|
|
982
|
+
* stored in uppercase.
|
|
983
|
+
*/
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* @typedef OrderMetaResult
|
|
987
|
+
* @property {string} [message] - Success message indicating order meta was updated.
|
|
988
|
+
*/
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* @typedef OrderMetaErrorResult
|
|
992
|
+
* @property {boolean} [success] - Indicates whether the request was successful.
|
|
993
|
+
* @property {string} [message] - Error message describing the failure.
|
|
994
|
+
*/
|
|
995
|
+
|
|
978
996
|
/**
|
|
979
997
|
* @typedef AddressDetail
|
|
980
998
|
* @property {Object} [google_map_point] - Google map point of location
|
|
@@ -1403,6 +1421,25 @@ const Joi = require("joi");
|
|
|
1403
1421
|
* @property {CreditAccountSummary} [account]
|
|
1404
1422
|
*/
|
|
1405
1423
|
|
|
1424
|
+
/**
|
|
1425
|
+
* @typedef OrderTransactionList
|
|
1426
|
+
* @property {boolean} [success] - Whether the request was successful.
|
|
1427
|
+
* @property {OrderTransactionItem[]} [items] - List of transactions ordered by
|
|
1428
|
+
* created_on ascending.
|
|
1429
|
+
*/
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* @typedef OrderTransactionItem
|
|
1433
|
+
* @property {string} [transaction_id] - Merchant transaction ID.
|
|
1434
|
+
* @property {string} [payment_mode] - Payment mode name (e.g. UPI, Card, COD).
|
|
1435
|
+
* @property {string} [logo] - Payment mode logo URL. Returns the small logo if
|
|
1436
|
+
* available, falls back to large logo. Null if no logo is configured.
|
|
1437
|
+
* @property {number} [amount] - Transaction amount.
|
|
1438
|
+
* @property {string} [status] - Latest transaction status (e.g. complete,
|
|
1439
|
+
* pending, failed, cancelled).
|
|
1440
|
+
* @property {string} [created_on] - Transaction creation timestamp (ISO 8601).
|
|
1441
|
+
*/
|
|
1442
|
+
|
|
1406
1443
|
/**
|
|
1407
1444
|
* @typedef OperationResponseSchema
|
|
1408
1445
|
* @property {boolean} success - Indicates if the operation was successful
|
|
@@ -2571,6 +2608,28 @@ class PaymentPlatformModel {
|
|
|
2571
2608
|
});
|
|
2572
2609
|
}
|
|
2573
2610
|
|
|
2611
|
+
/** @returns {OrderMetaUpdate} */
|
|
2612
|
+
static OrderMetaUpdate() {
|
|
2613
|
+
return Joi.object({
|
|
2614
|
+
pan_no: Joi.string().allow("").required(),
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
/** @returns {OrderMetaResult} */
|
|
2619
|
+
static OrderMetaResult() {
|
|
2620
|
+
return Joi.object({
|
|
2621
|
+
message: Joi.string().allow(""),
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
/** @returns {OrderMetaErrorResult} */
|
|
2626
|
+
static OrderMetaErrorResult() {
|
|
2627
|
+
return Joi.object({
|
|
2628
|
+
success: Joi.boolean(),
|
|
2629
|
+
message: Joi.string().allow(""),
|
|
2630
|
+
});
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2574
2633
|
/** @returns {AddressDetail} */
|
|
2575
2634
|
static AddressDetail() {
|
|
2576
2635
|
return Joi.object({
|
|
@@ -3053,6 +3112,26 @@ class PaymentPlatformModel {
|
|
|
3053
3112
|
});
|
|
3054
3113
|
}
|
|
3055
3114
|
|
|
3115
|
+
/** @returns {OrderTransactionList} */
|
|
3116
|
+
static OrderTransactionList() {
|
|
3117
|
+
return Joi.object({
|
|
3118
|
+
success: Joi.boolean(),
|
|
3119
|
+
items: Joi.array().items(PaymentPlatformModel.OrderTransactionItem()),
|
|
3120
|
+
});
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
/** @returns {OrderTransactionItem} */
|
|
3124
|
+
static OrderTransactionItem() {
|
|
3125
|
+
return Joi.object({
|
|
3126
|
+
transaction_id: Joi.string().allow(""),
|
|
3127
|
+
payment_mode: Joi.string().allow("").allow(null),
|
|
3128
|
+
logo: Joi.string().allow("").allow(null),
|
|
3129
|
+
amount: Joi.number().allow(null),
|
|
3130
|
+
status: Joi.string().allow("").allow(null),
|
|
3131
|
+
created_on: Joi.string().allow(""),
|
|
3132
|
+
});
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3056
3135
|
/** @returns {OperationResponseSchema} */
|
|
3057
3136
|
static OperationResponseSchema() {
|
|
3058
3137
|
return Joi.object({
|
|
@@ -517,6 +517,20 @@ declare class Serviceability {
|
|
|
517
517
|
* @description: Apply configs to application. Supports patching for buybox rule config and promise config. For reference, refer to examples - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/patchApplicationConfiguration/).
|
|
518
518
|
*/
|
|
519
519
|
patchApplicationConfiguration({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.PatchApplicationConfigurationParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.ApplicationConfigPatchResult>;
|
|
520
|
+
/**
|
|
521
|
+
* @param {ServiceabilityPlatformApplicationValidator.PatchZoneProductsAtomicParam} arg
|
|
522
|
+
* - Arg object
|
|
523
|
+
*
|
|
524
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
525
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
526
|
+
* @returns {Promise<ServiceabilityPlatformModel.ZoneProductsAtomicPatchResult>}
|
|
527
|
+
* - Success response
|
|
528
|
+
*
|
|
529
|
+
* @name patchZoneProductsAtomic
|
|
530
|
+
* @summary: Atomically add or remove products on zones (concurrency-safe)
|
|
531
|
+
* @description: Synchronously adds or removes products on one or more zones. Each item is applied with an atomic MongoDB array operator (`$addToSet` for add, `$pull` for remove) rather than a read-modify-write of the whole product list, so concurrent writes to the same zone never lose each other's changes. `product_type` must match the existing zone's product type. Product ids are not validated against the catalog (this is a synchronous API; callers send already-known ids). Returns a per-item status and a summary; per-item failures (e.g. zone not found, product type mismatch) do not fail the whole request. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/patchZoneProductsAtomic/).
|
|
532
|
+
*/
|
|
533
|
+
patchZoneProductsAtomic({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.PatchZoneProductsAtomicParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.ZoneProductsAtomicPatchResult>;
|
|
520
534
|
/**
|
|
521
535
|
* @param {ServiceabilityPlatformApplicationValidator.PutFulfillmentOptionParam} arg
|
|
522
536
|
* - Arg object
|
|
@@ -3324,6 +3324,89 @@ class Serviceability {
|
|
|
3324
3324
|
return response;
|
|
3325
3325
|
}
|
|
3326
3326
|
|
|
3327
|
+
/**
|
|
3328
|
+
* @param {ServiceabilityPlatformApplicationValidator.PatchZoneProductsAtomicParam} arg
|
|
3329
|
+
* - Arg object
|
|
3330
|
+
*
|
|
3331
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3332
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3333
|
+
* @returns {Promise<ServiceabilityPlatformModel.ZoneProductsAtomicPatchResult>}
|
|
3334
|
+
* - Success response
|
|
3335
|
+
*
|
|
3336
|
+
* @name patchZoneProductsAtomic
|
|
3337
|
+
* @summary: Atomically add or remove products on zones (concurrency-safe)
|
|
3338
|
+
* @description: Synchronously adds or removes products on one or more zones. Each item is applied with an atomic MongoDB array operator (`$addToSet` for add, `$pull` for remove) rather than a read-modify-write of the whole product list, so concurrent writes to the same zone never lose each other's changes. `product_type` must match the existing zone's product type. Product ids are not validated against the catalog (this is a synchronous API; callers send already-known ids). Returns a per-item status and a summary; per-item failures (e.g. zone not found, product type mismatch) do not fail the whole request. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/patchZoneProductsAtomic/).
|
|
3339
|
+
*/
|
|
3340
|
+
async patchZoneProductsAtomic(
|
|
3341
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3342
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3343
|
+
) {
|
|
3344
|
+
const {
|
|
3345
|
+
error,
|
|
3346
|
+
} = ServiceabilityPlatformApplicationValidator.patchZoneProductsAtomic().validate(
|
|
3347
|
+
{
|
|
3348
|
+
body,
|
|
3349
|
+
},
|
|
3350
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3351
|
+
);
|
|
3352
|
+
if (error) {
|
|
3353
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3357
|
+
const {
|
|
3358
|
+
error: warrning,
|
|
3359
|
+
} = ServiceabilityPlatformApplicationValidator.patchZoneProductsAtomic().validate(
|
|
3360
|
+
{
|
|
3361
|
+
body,
|
|
3362
|
+
},
|
|
3363
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3364
|
+
);
|
|
3365
|
+
if (warrning) {
|
|
3366
|
+
Logger({
|
|
3367
|
+
level: "WARN",
|
|
3368
|
+
message: `Parameter Validation warrnings for platform > Serviceability > patchZoneProductsAtomic \n ${warrning}`,
|
|
3369
|
+
});
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
const query_params = {};
|
|
3373
|
+
|
|
3374
|
+
const response = await PlatformAPIClient.execute(
|
|
3375
|
+
this.config,
|
|
3376
|
+
"post",
|
|
3377
|
+
`/service/platform/logistics/v2.0/company/${this.config.companyId}/application/${this.applicationId}/zones/bulk/products/patch`,
|
|
3378
|
+
query_params,
|
|
3379
|
+
body,
|
|
3380
|
+
requestHeaders,
|
|
3381
|
+
{ responseHeaders }
|
|
3382
|
+
);
|
|
3383
|
+
|
|
3384
|
+
let responseData = response;
|
|
3385
|
+
if (responseHeaders) {
|
|
3386
|
+
responseData = response[0];
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
const {
|
|
3390
|
+
error: res_error,
|
|
3391
|
+
} = ServiceabilityPlatformModel.ZoneProductsAtomicPatchResult().validate(
|
|
3392
|
+
responseData,
|
|
3393
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3394
|
+
);
|
|
3395
|
+
|
|
3396
|
+
if (res_error) {
|
|
3397
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3398
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3399
|
+
} else {
|
|
3400
|
+
Logger({
|
|
3401
|
+
level: "WARN",
|
|
3402
|
+
message: `Response Validation Warnings for platform > Serviceability > patchZoneProductsAtomic \n ${res_error}`,
|
|
3403
|
+
});
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
return response;
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3327
3410
|
/**
|
|
3328
3411
|
* @param {ServiceabilityPlatformApplicationValidator.PutFulfillmentOptionParam} arg
|
|
3329
3412
|
* - Arg object
|
|
@@ -181,6 +181,10 @@ export = ServiceabilityPlatformApplicationValidator;
|
|
|
181
181
|
* @typedef PatchApplicationConfigurationParam
|
|
182
182
|
* @property {ServiceabilityPlatformModel.ApplicationConfigPatch} body
|
|
183
183
|
*/
|
|
184
|
+
/**
|
|
185
|
+
* @typedef PatchZoneProductsAtomicParam
|
|
186
|
+
* @property {ServiceabilityPlatformModel.ZoneProductsAtomicPatchDetails} body
|
|
187
|
+
*/
|
|
184
188
|
/**
|
|
185
189
|
* @typedef PutFulfillmentOptionParam
|
|
186
190
|
* @property {string} slug - Slug of the fulfillment option for retrieving details.
|
|
@@ -336,6 +340,8 @@ declare class ServiceabilityPlatformApplicationValidator {
|
|
|
336
340
|
static insertApplicationConfig(): InsertApplicationConfigParam;
|
|
337
341
|
/** @returns {PatchApplicationConfigurationParam} */
|
|
338
342
|
static patchApplicationConfiguration(): PatchApplicationConfigurationParam;
|
|
343
|
+
/** @returns {PatchZoneProductsAtomicParam} */
|
|
344
|
+
static patchZoneProductsAtomic(): PatchZoneProductsAtomicParam;
|
|
339
345
|
/** @returns {PutFulfillmentOptionParam} */
|
|
340
346
|
static putFulfillmentOption(): PutFulfillmentOptionParam;
|
|
341
347
|
/** @returns {UpdateBulkGeoAreaParam} */
|
|
@@ -370,7 +376,7 @@ declare class ServiceabilityPlatformApplicationValidator {
|
|
|
370
376
|
static validateBulkFulfillmentOptions(): ValidateBulkFulfillmentOptionsParam;
|
|
371
377
|
}
|
|
372
378
|
declare namespace ServiceabilityPlatformApplicationValidator {
|
|
373
|
-
export { CreateBulkExportParam, CreateBulkGeoAreaParam, CreateCourierPartnerRuleParam, CreateFulfillmentOptionParam, CreateGeoAreaParam, CreateGeoAreaExportJobParam, CreatePolygonParam, CreateShipmentsParam, CreateStoreRulesParam, CreateZoneParam, CreateZoneProductsBulkPatchJobParam, DeleteFulfillmentOptionsParam, DeleteZoneParam, DownloadGeoareaSampleFileParam, DownloadZoneProductsBulkSampleFileParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetApplicationCourierPartnersListParam, GetBulkExportParam, GetBulkFulfillmentValidationStatusParam, GetBulkGeoAreaParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetCourierPartnersParam, GetFulfillmentOptionProductsParam, GetFulfillmentOptionStoresParam, GetFulfillmentOptionsParam, GetFulfillmentOptionsListParam, GetGeoAreaParam, GetGeoAreaExportJobStatusParam, GetGeoAreasParam, GetPolygonParam, GetStoreRuleParam, GetStoreRulesParam, GetZoneParam, GetZoneProductsBulkPatchJobStatusParam, GetZonesParam, InsertApplicationConfigParam, PatchApplicationConfigurationParam, PutFulfillmentOptionParam, UpdateBulkGeoAreaParam, UpdateCourierPartnerRulePriorityParam, UpdateCourierRuleParam, UpdateGeoAreaParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdatePolygonParam, UpdateStoreRulePriorityParam, UpdateStoreRulesParam, UpdateStoreRulesConfigParam, UpdateZoneParam, UploadBulkFulfillmentOptionsParam, ValidateBulkFulfillmentOptionsParam };
|
|
379
|
+
export { CreateBulkExportParam, CreateBulkGeoAreaParam, CreateCourierPartnerRuleParam, CreateFulfillmentOptionParam, CreateGeoAreaParam, CreateGeoAreaExportJobParam, CreatePolygonParam, CreateShipmentsParam, CreateStoreRulesParam, CreateZoneParam, CreateZoneProductsBulkPatchJobParam, DeleteFulfillmentOptionsParam, DeleteZoneParam, DownloadGeoareaSampleFileParam, DownloadZoneProductsBulkSampleFileParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetApplicationCourierPartnersListParam, GetBulkExportParam, GetBulkFulfillmentValidationStatusParam, GetBulkGeoAreaParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetCourierPartnersParam, GetFulfillmentOptionProductsParam, GetFulfillmentOptionStoresParam, GetFulfillmentOptionsParam, GetFulfillmentOptionsListParam, GetGeoAreaParam, GetGeoAreaExportJobStatusParam, GetGeoAreasParam, GetPolygonParam, GetStoreRuleParam, GetStoreRulesParam, GetZoneParam, GetZoneProductsBulkPatchJobStatusParam, GetZonesParam, InsertApplicationConfigParam, PatchApplicationConfigurationParam, PatchZoneProductsAtomicParam, PutFulfillmentOptionParam, UpdateBulkGeoAreaParam, UpdateCourierPartnerRulePriorityParam, UpdateCourierRuleParam, UpdateGeoAreaParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdatePolygonParam, UpdateStoreRulePriorityParam, UpdateStoreRulesParam, UpdateStoreRulesConfigParam, UpdateZoneParam, UploadBulkFulfillmentOptionsParam, ValidateBulkFulfillmentOptionsParam };
|
|
374
380
|
}
|
|
375
381
|
type CreateBulkExportParam = {
|
|
376
382
|
body: ServiceabilityPlatformModel.BulkCreateZoneExport;
|
|
@@ -674,6 +680,9 @@ type InsertApplicationConfigParam = {
|
|
|
674
680
|
type PatchApplicationConfigurationParam = {
|
|
675
681
|
body: ServiceabilityPlatformModel.ApplicationConfigPatch;
|
|
676
682
|
};
|
|
683
|
+
type PatchZoneProductsAtomicParam = {
|
|
684
|
+
body: ServiceabilityPlatformModel.ZoneProductsAtomicPatchDetails;
|
|
685
|
+
};
|
|
677
686
|
type PutFulfillmentOptionParam = {
|
|
678
687
|
/**
|
|
679
688
|
* - Slug of the fulfillment option for retrieving details.
|
|
@@ -223,6 +223,11 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel");
|
|
|
223
223
|
* @property {ServiceabilityPlatformModel.ApplicationConfigPatch} body
|
|
224
224
|
*/
|
|
225
225
|
|
|
226
|
+
/**
|
|
227
|
+
* @typedef PatchZoneProductsAtomicParam
|
|
228
|
+
* @property {ServiceabilityPlatformModel.ZoneProductsAtomicPatchDetails} body
|
|
229
|
+
*/
|
|
230
|
+
|
|
226
231
|
/**
|
|
227
232
|
* @typedef PutFulfillmentOptionParam
|
|
228
233
|
* @property {string} slug - Slug of the fulfillment option for retrieving details.
|
|
@@ -614,6 +619,13 @@ class ServiceabilityPlatformApplicationValidator {
|
|
|
614
619
|
}).required();
|
|
615
620
|
}
|
|
616
621
|
|
|
622
|
+
/** @returns {PatchZoneProductsAtomicParam} */
|
|
623
|
+
static patchZoneProductsAtomic() {
|
|
624
|
+
return Joi.object({
|
|
625
|
+
body: ServiceabilityPlatformModel.ZoneProductsAtomicPatchDetails().required(),
|
|
626
|
+
}).required();
|
|
627
|
+
}
|
|
628
|
+
|
|
617
629
|
/** @returns {PutFulfillmentOptionParam} */
|
|
618
630
|
static putFulfillmentOption() {
|
|
619
631
|
return Joi.object({
|
|
@@ -1269,6 +1269,39 @@ export = ServiceabilityPlatformModel;
|
|
|
1269
1269
|
* @property {string} [result_file_url] - URL to the result file after
|
|
1270
1270
|
* processing is complete.
|
|
1271
1271
|
*/
|
|
1272
|
+
/**
|
|
1273
|
+
* @typedef ZoneProductsAtomicPatchItem
|
|
1274
|
+
* @property {string} zone_id - The unique identifier of the zone to patch.
|
|
1275
|
+
* @property {string} product_type - The type the zone's product list is made
|
|
1276
|
+
* of. Must match the existing zone product type. Product ids are not
|
|
1277
|
+
* validated against the catalog for any type.
|
|
1278
|
+
* @property {Object[]} values - Product identifiers to add or remove - uids for
|
|
1279
|
+
* item_id/product/department/category (integers) or tag strings.
|
|
1280
|
+
* @property {string} action - Whether to add the values to, or remove them
|
|
1281
|
+
* from, the zone product list.
|
|
1282
|
+
*/
|
|
1283
|
+
/**
|
|
1284
|
+
* @typedef ZoneProductsAtomicPatchDetails
|
|
1285
|
+
* @property {ZoneProductsAtomicPatchItem[]} items - List of per-zone product
|
|
1286
|
+
* patch operations.
|
|
1287
|
+
*/
|
|
1288
|
+
/**
|
|
1289
|
+
* @typedef ZoneProductsAtomicPatchResultItem
|
|
1290
|
+
* @property {string} zone_id
|
|
1291
|
+
* @property {string} product_type - The type the zone's product list is made
|
|
1292
|
+
* of. Mirrors the product_type sent in the patch request.
|
|
1293
|
+
* @property {string} action
|
|
1294
|
+
* @property {string} status
|
|
1295
|
+
* @property {number} [values_count] - Number of products in the zone's product
|
|
1296
|
+
* list after a successful patch.
|
|
1297
|
+
* @property {ZoneProductsAtomicPatchItemError[]} [error] - Present when status
|
|
1298
|
+
* is `failed`.
|
|
1299
|
+
*/
|
|
1300
|
+
/**
|
|
1301
|
+
* @typedef ZoneProductsAtomicPatchResult
|
|
1302
|
+
* @property {ZoneProductsAtomicPatchResultItem[]} items
|
|
1303
|
+
* @property {ZoneProductsAtomicPatchSummary} summary
|
|
1304
|
+
*/
|
|
1272
1305
|
/**
|
|
1273
1306
|
* @typedef CourierPartnerToServiceability
|
|
1274
1307
|
* @property {ServiceabilityLocation} [location]
|
|
@@ -2897,10 +2930,22 @@ export = ServiceabilityPlatformModel;
|
|
|
2897
2930
|
* @property {boolean} has_next - Indicates whether more pages are available.
|
|
2898
2931
|
* @property {number} total_records - Total number of records matching the criteria.
|
|
2899
2932
|
*/
|
|
2933
|
+
/**
|
|
2934
|
+
* @typedef ZoneProductsAtomicPatchItemError
|
|
2935
|
+
* @property {string} [type]
|
|
2936
|
+
* @property {string} [value]
|
|
2937
|
+
* @property {string} [message]
|
|
2938
|
+
*/
|
|
2939
|
+
/**
|
|
2940
|
+
* @typedef ZoneProductsAtomicPatchSummary
|
|
2941
|
+
* @property {number} total
|
|
2942
|
+
* @property {number} success
|
|
2943
|
+
* @property {number} failed
|
|
2944
|
+
*/
|
|
2900
2945
|
declare class ServiceabilityPlatformModel {
|
|
2901
2946
|
}
|
|
2902
2947
|
declare namespace ServiceabilityPlatformModel {
|
|
2903
|
-
export { GenerateShipmentsAndCourierPartnerResult, CourierPartnerDetails, PlatformShipmentsRequestSchema, PlatformShipmentsResponseSchema, ShipmentsErrorResult, FulfillmentOption, FulfillmentOptionsList, FulfillmentOptionProducts, FulfillmentOptionStores, FulfillmentOptionBulkValidate, FulfillmentOptionBulkValidateData, FulfillmentOptionBulk, FulfillmentOptionBulkData, OperationResponseSchema, SelfshipSchema, ServiceabilityErrorResult, UpdateZoneData, ZoneUpdateSuccessResult, ServiceabilityDeleteErrorResult, ZoneDeleteSuccessResult, ListViewSchema, GetZoneByIdSchema, CommonErrorResult, CreateZoneDataSchema, ZoneBulkExport, GetZoneBulkExport, CreateBulkZoneData, ZoneSchema, CreateBulkZoneResult, BulkCreateZoneExport, PincodeMopData, PincodeMOPResult, PincodeMopUpdateAuditError, PincodeMopBulkError, CommonError, PincodeMopBulkData, PincodeBulkViewResult, PincodeCodStatusListingDetails, PincodeCodStatusListingResult, PincodeMopUpdateAuditHistoryDetails, PincodeMopUpdateAuditHistoryResultData, BulkGeoAreaDetails, BulkGeoAreaResult, BulkGeoAreaGetResult, GeoAreaBulkCreationResult, GeoAreaBulkExportResult, GeoAreaRequestBody, GeoAreaErrorResult, GeoAreaResponseBody, GeoAreaPutResponseBody, GeoAreaGetResponseBody, GeoAreaDetails, Error, CourierAccountDetailsBody, CourierPartnerRuleResult, CourierPartnerRule, BulkFailureResult, FailureResult, CourierPartnerRulesListResult, ShipmentCourierPartnerDetails, ShipmentCourierPartnerResult, CompanyConfig, ApplicationConfigPatch, ApplicationConfigPatchResult, BulkRegionJobDetails, BulkRegionResultItemData, BulkRegionResult, StoreRuleConfigData, StoreRuleDataSchema, GetStoreRulesApiResult, CreateStoreRuleDetailsSchema, StoreRuleResultSchema, StoreRuleUpdateResultSchema, CourierAccountResult, CompanyCourierPartnerAccountListResult, PackageMaterial, PackageMaterialNotFound, PackageMaterialsErrorResult, PackageMaterialResult, PackageRule, PackageRuleResult, PackagesListResult, PackageItem, RulePriorityDetails, RulePriorityResult, OptimalLocationsResult, OptimlLocationsRequestSchema, ValidationError, StandardError, CourierPartnerSchemeDetailsModel, CourierPartnerSchemeModelSchema, CourierPartnerSchemeUpdateDetailsSchema, CourierPartnerSchemeList, BulkRegionServiceabilityTatDetails, BulkRegionServiceabilityTatResultItemData, BulkRegionServiceabilityTatResult, GetCountries, GetLocalities, GetCountry, BulkImportLocalitiesDetails, BulkImportLocalitiesResult, BulkErrorResult, LocalitiesBulkExport, LocalitiesBulkExportFetch, LocalitiesErrorResult, GetLocality, ValidateAddress, ErrorResult, ApplicationConfigPut, ApplicationConfigPutDetail, ApplicationConfigGetResult, InstallCourierPartnerResponseSchema, GetLocalitiesBulkHistory, CompanyConfigurationSchema, StorePolygonServiceabilityRequestBody, StorePolygonServiceabilityResult, StorePolygonServiceabilityGetResult, ZoneProductsBulkPatchDetails, GetZoneProductsBulkPatchResult, CourierPartnerToServiceability, ServiceabilityLocation, CourierPartnerShipments, PromiseObject, PromiseData, PromiseMeta, CourierPartnerPromiseData, DeliveryTat, DeliveryTatSchema, CourierPartnerShipmentsMeta, ShipmentCourierPartnersResult, AreaCode, TAT, LocationDetailsServiceability, CourierPartnerShipmentsArticles, CourierPartnerArticlesPromise, CourierPartnerArticlesReturnReasons, CourierPartnerArticlesReturnReasonsMeta, ArticleWeight, ArticleAttributes, ArticleDimension, PlatformLocationArticles, PlatformLocationArticle, ParentItemIdentifiers, PlatformShipmentsToServiceability, PlatformShipmentsSchema, Packaging, Dimension, FulfillmentOptionItem, ShipmentsPromise, CustomerPromise, ShipmentPromiseMeta, SellerPromise, CourierPartnerPromise, CourierPartnerAttributes, CourierPartnerTAT, CustomerInitialPromise, ShipmentsArticle, ShipmentDimension, ShipmentsMeta, ShipmentsCourierPartner, FulfillmentOptionDefaultFor, BusinessUnit, FulfillmentStores, FulfillmentProducts, CourierPartnerSchemes, CourierPartnerScheme, FulfillmentOptionProduct, NetQuantity, Trader, ProductPublish, TaxIdentifier, ReturnConfig, CustomOrder, Size, Identifier, Page, FulfillmentOptionStore, Address, LatLong, StoreDistance, StoreTimingDetails, StoreTiming, Time, FulfillmentOptionValidate, ProductSchema, StoresSchema, CreatedBy, ModifiedBy, ListViewItems, GeoArea, ListViewProduct, Summary, RegionSchema, FoDetails, ZoneStores, ZoneProduct, ZoneBulkItem, PincodeMopUpdateResult, PincodeCodStatusItem, PincodeCodStatusListingSummary, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryResult, Area, GeoAreaResponseDetail, GeoAreaItemResult, AreaExpanded, Country, Region, Page2, CourierPartnerRuleConditions, LocationRule, LocationRuleValues, StringComparisonOperations, IntComparisonOperations, DateOperations, ArithmeticOperations, CourierPartnerRuleCPListResult, CourierPartnerSchemeDefaultTat, CourierPartnerSchemeTat, CourierPartnerSchemeFeatures, CourierPartnerList, ShipmentsCourierPartnersServiceability, CPShipments, ShipmentsArticles, ArticleSet, ArticleSizeDistribution, SetSize, ArticleDeliverySlots, ArticleReturnReason, CourierPartners, ShipmentCourierPartners, CourierPartnerConfig, BuyboxRuleConfig, PromiseConfig, StorePromiseAttributeConfig, DeliveryServiceAttributeConfig, BufferField, StorePrioritySchema, StoreRuleConditionSchema, CustomerRadiusSchema, CourierPartnerSchemeModel, PackageMaterialRule, PackageMaterialRuleQuantity, Channel, PackageRuleCategory, PackageRuleProduct, PackageRuleProductTag, PackageRuleDepartmentId, PackageRuleProductAttributes, PackageChannel, StoreFilter, PackageRuleSchema, Quantity, PackagePageInfo, OptimalLocationAssignedStoresResult, OptimalLocationArticlesResult, ArticleAssignment, OptimalLocationsArticles, GetCountriesItems, HierarchyItems, CurrencyObject, Localities, PincodeLatLongData, LocalityParent, CountryMetaFields, ApplicationFields, GetCountryFieldsAddress, FieldValidation, FieldValidationRegex, LengthValidation, GetCountryFieldsAddressValues, GetOneOrAll, GetOneOrAllParams, GetOneOrAllPath, GetOneOrAllQuery, GetCountryFieldsAddressTemplateApplication, CountryHierarchy, GetCountryFields, GetCountryFieldsAddressTemplate, LocalityParents, ZoneConfig, PromiseType, InstallCourierPartnerItemsSchema, HistoryObject, StorePolygonServiceabilityRequestData, StorePolygonServiceabilityStore, StorePolygonServiceabilityStoreCoordinates, StorePolygonServiceabilityConfig, StorePolygonServiceabilityPolygon, StorePolygonServiceabilityFeature, StorePolygonServiceabilityGeometry, StorePolygonServiceabilityAttributes, StorePolygonServiceabilityReferenceCoordinates, StorePolygonServiceabilityStoreSummary, StorePolygonServiceabilityError, StorePolygonServiceabilityPagination };
|
|
2948
|
+
export { GenerateShipmentsAndCourierPartnerResult, CourierPartnerDetails, PlatformShipmentsRequestSchema, PlatformShipmentsResponseSchema, ShipmentsErrorResult, FulfillmentOption, FulfillmentOptionsList, FulfillmentOptionProducts, FulfillmentOptionStores, FulfillmentOptionBulkValidate, FulfillmentOptionBulkValidateData, FulfillmentOptionBulk, FulfillmentOptionBulkData, OperationResponseSchema, SelfshipSchema, ServiceabilityErrorResult, UpdateZoneData, ZoneUpdateSuccessResult, ServiceabilityDeleteErrorResult, ZoneDeleteSuccessResult, ListViewSchema, GetZoneByIdSchema, CommonErrorResult, CreateZoneDataSchema, ZoneBulkExport, GetZoneBulkExport, CreateBulkZoneData, ZoneSchema, CreateBulkZoneResult, BulkCreateZoneExport, PincodeMopData, PincodeMOPResult, PincodeMopUpdateAuditError, PincodeMopBulkError, CommonError, PincodeMopBulkData, PincodeBulkViewResult, PincodeCodStatusListingDetails, PincodeCodStatusListingResult, PincodeMopUpdateAuditHistoryDetails, PincodeMopUpdateAuditHistoryResultData, BulkGeoAreaDetails, BulkGeoAreaResult, BulkGeoAreaGetResult, GeoAreaBulkCreationResult, GeoAreaBulkExportResult, GeoAreaRequestBody, GeoAreaErrorResult, GeoAreaResponseBody, GeoAreaPutResponseBody, GeoAreaGetResponseBody, GeoAreaDetails, Error, CourierAccountDetailsBody, CourierPartnerRuleResult, CourierPartnerRule, BulkFailureResult, FailureResult, CourierPartnerRulesListResult, ShipmentCourierPartnerDetails, ShipmentCourierPartnerResult, CompanyConfig, ApplicationConfigPatch, ApplicationConfigPatchResult, BulkRegionJobDetails, BulkRegionResultItemData, BulkRegionResult, StoreRuleConfigData, StoreRuleDataSchema, GetStoreRulesApiResult, CreateStoreRuleDetailsSchema, StoreRuleResultSchema, StoreRuleUpdateResultSchema, CourierAccountResult, CompanyCourierPartnerAccountListResult, PackageMaterial, PackageMaterialNotFound, PackageMaterialsErrorResult, PackageMaterialResult, PackageRule, PackageRuleResult, PackagesListResult, PackageItem, RulePriorityDetails, RulePriorityResult, OptimalLocationsResult, OptimlLocationsRequestSchema, ValidationError, StandardError, CourierPartnerSchemeDetailsModel, CourierPartnerSchemeModelSchema, CourierPartnerSchemeUpdateDetailsSchema, CourierPartnerSchemeList, BulkRegionServiceabilityTatDetails, BulkRegionServiceabilityTatResultItemData, BulkRegionServiceabilityTatResult, GetCountries, GetLocalities, GetCountry, BulkImportLocalitiesDetails, BulkImportLocalitiesResult, BulkErrorResult, LocalitiesBulkExport, LocalitiesBulkExportFetch, LocalitiesErrorResult, GetLocality, ValidateAddress, ErrorResult, ApplicationConfigPut, ApplicationConfigPutDetail, ApplicationConfigGetResult, InstallCourierPartnerResponseSchema, GetLocalitiesBulkHistory, CompanyConfigurationSchema, StorePolygonServiceabilityRequestBody, StorePolygonServiceabilityResult, StorePolygonServiceabilityGetResult, ZoneProductsBulkPatchDetails, GetZoneProductsBulkPatchResult, ZoneProductsAtomicPatchItem, ZoneProductsAtomicPatchDetails, ZoneProductsAtomicPatchResultItem, ZoneProductsAtomicPatchResult, CourierPartnerToServiceability, ServiceabilityLocation, CourierPartnerShipments, PromiseObject, PromiseData, PromiseMeta, CourierPartnerPromiseData, DeliveryTat, DeliveryTatSchema, CourierPartnerShipmentsMeta, ShipmentCourierPartnersResult, AreaCode, TAT, LocationDetailsServiceability, CourierPartnerShipmentsArticles, CourierPartnerArticlesPromise, CourierPartnerArticlesReturnReasons, CourierPartnerArticlesReturnReasonsMeta, ArticleWeight, ArticleAttributes, ArticleDimension, PlatformLocationArticles, PlatformLocationArticle, ParentItemIdentifiers, PlatformShipmentsToServiceability, PlatformShipmentsSchema, Packaging, Dimension, FulfillmentOptionItem, ShipmentsPromise, CustomerPromise, ShipmentPromiseMeta, SellerPromise, CourierPartnerPromise, CourierPartnerAttributes, CourierPartnerTAT, CustomerInitialPromise, ShipmentsArticle, ShipmentDimension, ShipmentsMeta, ShipmentsCourierPartner, FulfillmentOptionDefaultFor, BusinessUnit, FulfillmentStores, FulfillmentProducts, CourierPartnerSchemes, CourierPartnerScheme, FulfillmentOptionProduct, NetQuantity, Trader, ProductPublish, TaxIdentifier, ReturnConfig, CustomOrder, Size, Identifier, Page, FulfillmentOptionStore, Address, LatLong, StoreDistance, StoreTimingDetails, StoreTiming, Time, FulfillmentOptionValidate, ProductSchema, StoresSchema, CreatedBy, ModifiedBy, ListViewItems, GeoArea, ListViewProduct, Summary, RegionSchema, FoDetails, ZoneStores, ZoneProduct, ZoneBulkItem, PincodeMopUpdateResult, PincodeCodStatusItem, PincodeCodStatusListingSummary, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryResult, Area, GeoAreaResponseDetail, GeoAreaItemResult, AreaExpanded, Country, Region, Page2, CourierPartnerRuleConditions, LocationRule, LocationRuleValues, StringComparisonOperations, IntComparisonOperations, DateOperations, ArithmeticOperations, CourierPartnerRuleCPListResult, CourierPartnerSchemeDefaultTat, CourierPartnerSchemeTat, CourierPartnerSchemeFeatures, CourierPartnerList, ShipmentsCourierPartnersServiceability, CPShipments, ShipmentsArticles, ArticleSet, ArticleSizeDistribution, SetSize, ArticleDeliverySlots, ArticleReturnReason, CourierPartners, ShipmentCourierPartners, CourierPartnerConfig, BuyboxRuleConfig, PromiseConfig, StorePromiseAttributeConfig, DeliveryServiceAttributeConfig, BufferField, StorePrioritySchema, StoreRuleConditionSchema, CustomerRadiusSchema, CourierPartnerSchemeModel, PackageMaterialRule, PackageMaterialRuleQuantity, Channel, PackageRuleCategory, PackageRuleProduct, PackageRuleProductTag, PackageRuleDepartmentId, PackageRuleProductAttributes, PackageChannel, StoreFilter, PackageRuleSchema, Quantity, PackagePageInfo, OptimalLocationAssignedStoresResult, OptimalLocationArticlesResult, ArticleAssignment, OptimalLocationsArticles, GetCountriesItems, HierarchyItems, CurrencyObject, Localities, PincodeLatLongData, LocalityParent, CountryMetaFields, ApplicationFields, GetCountryFieldsAddress, FieldValidation, FieldValidationRegex, LengthValidation, GetCountryFieldsAddressValues, GetOneOrAll, GetOneOrAllParams, GetOneOrAllPath, GetOneOrAllQuery, GetCountryFieldsAddressTemplateApplication, CountryHierarchy, GetCountryFields, GetCountryFieldsAddressTemplate, LocalityParents, ZoneConfig, PromiseType, InstallCourierPartnerItemsSchema, HistoryObject, StorePolygonServiceabilityRequestData, StorePolygonServiceabilityStore, StorePolygonServiceabilityStoreCoordinates, StorePolygonServiceabilityConfig, StorePolygonServiceabilityPolygon, StorePolygonServiceabilityFeature, StorePolygonServiceabilityGeometry, StorePolygonServiceabilityAttributes, StorePolygonServiceabilityReferenceCoordinates, StorePolygonServiceabilityStoreSummary, StorePolygonServiceabilityError, StorePolygonServiceabilityPagination, ZoneProductsAtomicPatchItemError, ZoneProductsAtomicPatchSummary };
|
|
2904
2949
|
}
|
|
2905
2950
|
/** @returns {GenerateShipmentsAndCourierPartnerResult} */
|
|
2906
2951
|
declare function GenerateShipmentsAndCourierPartnerResult(): GenerateShipmentsAndCourierPartnerResult;
|
|
@@ -6043,6 +6088,67 @@ type GetZoneProductsBulkPatchResult = {
|
|
|
6043
6088
|
*/
|
|
6044
6089
|
result_file_url?: string;
|
|
6045
6090
|
};
|
|
6091
|
+
/** @returns {ZoneProductsAtomicPatchItem} */
|
|
6092
|
+
declare function ZoneProductsAtomicPatchItem(): ZoneProductsAtomicPatchItem;
|
|
6093
|
+
type ZoneProductsAtomicPatchItem = {
|
|
6094
|
+
/**
|
|
6095
|
+
* - The unique identifier of the zone to patch.
|
|
6096
|
+
*/
|
|
6097
|
+
zone_id: string;
|
|
6098
|
+
/**
|
|
6099
|
+
* - The type the zone's product list is made
|
|
6100
|
+
* of. Must match the existing zone product type. Product ids are not
|
|
6101
|
+
* validated against the catalog for any type.
|
|
6102
|
+
*/
|
|
6103
|
+
product_type: string;
|
|
6104
|
+
/**
|
|
6105
|
+
* - Product identifiers to add or remove - uids for
|
|
6106
|
+
* item_id/product/department/category (integers) or tag strings.
|
|
6107
|
+
*/
|
|
6108
|
+
values: any[];
|
|
6109
|
+
/**
|
|
6110
|
+
* - Whether to add the values to, or remove them
|
|
6111
|
+
* from, the zone product list.
|
|
6112
|
+
*/
|
|
6113
|
+
action: string;
|
|
6114
|
+
};
|
|
6115
|
+
/** @returns {ZoneProductsAtomicPatchDetails} */
|
|
6116
|
+
declare function ZoneProductsAtomicPatchDetails(): ZoneProductsAtomicPatchDetails;
|
|
6117
|
+
type ZoneProductsAtomicPatchDetails = {
|
|
6118
|
+
/**
|
|
6119
|
+
* - List of per-zone product
|
|
6120
|
+
* patch operations.
|
|
6121
|
+
*/
|
|
6122
|
+
items: ZoneProductsAtomicPatchItem[];
|
|
6123
|
+
};
|
|
6124
|
+
/** @returns {ZoneProductsAtomicPatchResultItem} */
|
|
6125
|
+
declare function ZoneProductsAtomicPatchResultItem(): ZoneProductsAtomicPatchResultItem;
|
|
6126
|
+
type ZoneProductsAtomicPatchResultItem = {
|
|
6127
|
+
zone_id: string;
|
|
6128
|
+
/**
|
|
6129
|
+
* - The type the zone's product list is made
|
|
6130
|
+
* of. Mirrors the product_type sent in the patch request.
|
|
6131
|
+
*/
|
|
6132
|
+
product_type: string;
|
|
6133
|
+
action: string;
|
|
6134
|
+
status: string;
|
|
6135
|
+
/**
|
|
6136
|
+
* - Number of products in the zone's product
|
|
6137
|
+
* list after a successful patch.
|
|
6138
|
+
*/
|
|
6139
|
+
values_count?: number;
|
|
6140
|
+
/**
|
|
6141
|
+
* - Present when status
|
|
6142
|
+
* is `failed`.
|
|
6143
|
+
*/
|
|
6144
|
+
error?: ZoneProductsAtomicPatchItemError[];
|
|
6145
|
+
};
|
|
6146
|
+
/** @returns {ZoneProductsAtomicPatchResult} */
|
|
6147
|
+
declare function ZoneProductsAtomicPatchResult(): ZoneProductsAtomicPatchResult;
|
|
6148
|
+
type ZoneProductsAtomicPatchResult = {
|
|
6149
|
+
items: ZoneProductsAtomicPatchResultItem[];
|
|
6150
|
+
summary: ZoneProductsAtomicPatchSummary;
|
|
6151
|
+
};
|
|
6046
6152
|
/** @returns {CourierPartnerToServiceability} */
|
|
6047
6153
|
declare function CourierPartnerToServiceability(): CourierPartnerToServiceability;
|
|
6048
6154
|
type CourierPartnerToServiceability = {
|
|
@@ -10080,3 +10186,17 @@ type StorePolygonServiceabilityPagination = {
|
|
|
10080
10186
|
*/
|
|
10081
10187
|
total_records: number;
|
|
10082
10188
|
};
|
|
10189
|
+
/** @returns {ZoneProductsAtomicPatchItemError} */
|
|
10190
|
+
declare function ZoneProductsAtomicPatchItemError(): ZoneProductsAtomicPatchItemError;
|
|
10191
|
+
type ZoneProductsAtomicPatchItemError = {
|
|
10192
|
+
type?: string;
|
|
10193
|
+
value?: string;
|
|
10194
|
+
message?: string;
|
|
10195
|
+
};
|
|
10196
|
+
/** @returns {ZoneProductsAtomicPatchSummary} */
|
|
10197
|
+
declare function ZoneProductsAtomicPatchSummary(): ZoneProductsAtomicPatchSummary;
|
|
10198
|
+
type ZoneProductsAtomicPatchSummary = {
|
|
10199
|
+
total: number;
|
|
10200
|
+
success: number;
|
|
10201
|
+
failed: number;
|
|
10202
|
+
};
|
|
@@ -1389,6 +1389,43 @@ const Joi = require("joi");
|
|
|
1389
1389
|
* processing is complete.
|
|
1390
1390
|
*/
|
|
1391
1391
|
|
|
1392
|
+
/**
|
|
1393
|
+
* @typedef ZoneProductsAtomicPatchItem
|
|
1394
|
+
* @property {string} zone_id - The unique identifier of the zone to patch.
|
|
1395
|
+
* @property {string} product_type - The type the zone's product list is made
|
|
1396
|
+
* of. Must match the existing zone product type. Product ids are not
|
|
1397
|
+
* validated against the catalog for any type.
|
|
1398
|
+
* @property {Object[]} values - Product identifiers to add or remove - uids for
|
|
1399
|
+
* item_id/product/department/category (integers) or tag strings.
|
|
1400
|
+
* @property {string} action - Whether to add the values to, or remove them
|
|
1401
|
+
* from, the zone product list.
|
|
1402
|
+
*/
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* @typedef ZoneProductsAtomicPatchDetails
|
|
1406
|
+
* @property {ZoneProductsAtomicPatchItem[]} items - List of per-zone product
|
|
1407
|
+
* patch operations.
|
|
1408
|
+
*/
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* @typedef ZoneProductsAtomicPatchResultItem
|
|
1412
|
+
* @property {string} zone_id
|
|
1413
|
+
* @property {string} product_type - The type the zone's product list is made
|
|
1414
|
+
* of. Mirrors the product_type sent in the patch request.
|
|
1415
|
+
* @property {string} action
|
|
1416
|
+
* @property {string} status
|
|
1417
|
+
* @property {number} [values_count] - Number of products in the zone's product
|
|
1418
|
+
* list after a successful patch.
|
|
1419
|
+
* @property {ZoneProductsAtomicPatchItemError[]} [error] - Present when status
|
|
1420
|
+
* is `failed`.
|
|
1421
|
+
*/
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* @typedef ZoneProductsAtomicPatchResult
|
|
1425
|
+
* @property {ZoneProductsAtomicPatchResultItem[]} items
|
|
1426
|
+
* @property {ZoneProductsAtomicPatchSummary} summary
|
|
1427
|
+
*/
|
|
1428
|
+
|
|
1392
1429
|
/**
|
|
1393
1430
|
* @typedef CourierPartnerToServiceability
|
|
1394
1431
|
* @property {ServiceabilityLocation} [location]
|
|
@@ -3194,6 +3231,20 @@ const Joi = require("joi");
|
|
|
3194
3231
|
* @property {number} total_records - Total number of records matching the criteria.
|
|
3195
3232
|
*/
|
|
3196
3233
|
|
|
3234
|
+
/**
|
|
3235
|
+
* @typedef ZoneProductsAtomicPatchItemError
|
|
3236
|
+
* @property {string} [type]
|
|
3237
|
+
* @property {string} [value]
|
|
3238
|
+
* @property {string} [message]
|
|
3239
|
+
*/
|
|
3240
|
+
|
|
3241
|
+
/**
|
|
3242
|
+
* @typedef ZoneProductsAtomicPatchSummary
|
|
3243
|
+
* @property {number} total
|
|
3244
|
+
* @property {number} success
|
|
3245
|
+
* @property {number} failed
|
|
3246
|
+
*/
|
|
3247
|
+
|
|
3197
3248
|
class ServiceabilityPlatformModel {
|
|
3198
3249
|
/** @returns {GenerateShipmentsAndCourierPartnerResult} */
|
|
3199
3250
|
static GenerateShipmentsAndCourierPartnerResult() {
|
|
@@ -4689,6 +4740,49 @@ class ServiceabilityPlatformModel {
|
|
|
4689
4740
|
});
|
|
4690
4741
|
}
|
|
4691
4742
|
|
|
4743
|
+
/** @returns {ZoneProductsAtomicPatchItem} */
|
|
4744
|
+
static ZoneProductsAtomicPatchItem() {
|
|
4745
|
+
return Joi.object({
|
|
4746
|
+
zone_id: Joi.string().allow("").required(),
|
|
4747
|
+
product_type: Joi.string().allow("").required(),
|
|
4748
|
+
values: Joi.array().items(Joi.any()).required(),
|
|
4749
|
+
action: Joi.string().allow("").required(),
|
|
4750
|
+
});
|
|
4751
|
+
}
|
|
4752
|
+
|
|
4753
|
+
/** @returns {ZoneProductsAtomicPatchDetails} */
|
|
4754
|
+
static ZoneProductsAtomicPatchDetails() {
|
|
4755
|
+
return Joi.object({
|
|
4756
|
+
items: Joi.array()
|
|
4757
|
+
.items(ServiceabilityPlatformModel.ZoneProductsAtomicPatchItem())
|
|
4758
|
+
.required(),
|
|
4759
|
+
});
|
|
4760
|
+
}
|
|
4761
|
+
|
|
4762
|
+
/** @returns {ZoneProductsAtomicPatchResultItem} */
|
|
4763
|
+
static ZoneProductsAtomicPatchResultItem() {
|
|
4764
|
+
return Joi.object({
|
|
4765
|
+
zone_id: Joi.string().allow("").required(),
|
|
4766
|
+
product_type: Joi.string().allow("").required(),
|
|
4767
|
+
action: Joi.string().allow("").required(),
|
|
4768
|
+
status: Joi.string().allow("").required(),
|
|
4769
|
+
values_count: Joi.number(),
|
|
4770
|
+
error: Joi.array()
|
|
4771
|
+
.items(ServiceabilityPlatformModel.ZoneProductsAtomicPatchItemError())
|
|
4772
|
+
.allow(null, ""),
|
|
4773
|
+
});
|
|
4774
|
+
}
|
|
4775
|
+
|
|
4776
|
+
/** @returns {ZoneProductsAtomicPatchResult} */
|
|
4777
|
+
static ZoneProductsAtomicPatchResult() {
|
|
4778
|
+
return Joi.object({
|
|
4779
|
+
items: Joi.array()
|
|
4780
|
+
.items(ServiceabilityPlatformModel.ZoneProductsAtomicPatchResultItem())
|
|
4781
|
+
.required(),
|
|
4782
|
+
summary: ServiceabilityPlatformModel.ZoneProductsAtomicPatchSummary().required(),
|
|
4783
|
+
});
|
|
4784
|
+
}
|
|
4785
|
+
|
|
4692
4786
|
/** @returns {CourierPartnerToServiceability} */
|
|
4693
4787
|
static CourierPartnerToServiceability() {
|
|
4694
4788
|
return Joi.object({
|
|
@@ -6670,5 +6764,23 @@ class ServiceabilityPlatformModel {
|
|
|
6670
6764
|
total_records: Joi.number().required(),
|
|
6671
6765
|
});
|
|
6672
6766
|
}
|
|
6767
|
+
|
|
6768
|
+
/** @returns {ZoneProductsAtomicPatchItemError} */
|
|
6769
|
+
static ZoneProductsAtomicPatchItemError() {
|
|
6770
|
+
return Joi.object({
|
|
6771
|
+
type: Joi.string().allow(""),
|
|
6772
|
+
value: Joi.string().allow(""),
|
|
6773
|
+
message: Joi.string().allow(""),
|
|
6774
|
+
});
|
|
6775
|
+
}
|
|
6776
|
+
|
|
6777
|
+
/** @returns {ZoneProductsAtomicPatchSummary} */
|
|
6778
|
+
static ZoneProductsAtomicPatchSummary() {
|
|
6779
|
+
return Joi.object({
|
|
6780
|
+
total: Joi.number().required(),
|
|
6781
|
+
success: Joi.number().required(),
|
|
6782
|
+
failed: Joi.number().required(),
|
|
6783
|
+
});
|
|
6784
|
+
}
|
|
6673
6785
|
}
|
|
6674
6786
|
module.exports = ServiceabilityPlatformModel;
|