@gofynd/fdk-client-javascript 1.3.6-beta.1 → 1.3.6
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 +2 -2
- package/sdk/application/ApplicationConfig.d.ts +11 -3
- package/sdk/application/ApplicationConfig.js +21 -3
- package/sdk/application/Cart/CartApplicationClient.js +228 -113
- package/sdk/application/Catalog/CatalogApplicationClient.js +244 -121
- package/sdk/application/Common/CommonApplicationClient.js +20 -9
- package/sdk/application/Communication/CommunicationApplicationClient.js +28 -13
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +132 -65
- package/sdk/application/Content/ContentApplicationClient.js +156 -77
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +28 -13
- package/sdk/application/Lead/LeadApplicationClient.js +60 -29
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -21
- package/sdk/application/Order/OrderApplicationClient.js +100 -49
- package/sdk/application/Payment/PaymentApplicationClient.js +340 -169
- package/sdk/application/PosCart/PosCartApplicationClient.js +220 -109
- package/sdk/application/Rewards/RewardsApplicationClient.js +60 -29
- package/sdk/application/Share/ShareApplicationClient.js +60 -29
- package/sdk/application/Theme/ThemeApplicationClient.js +36 -17
- package/sdk/application/User/UserApplicationClient.js +324 -161
- package/sdk/common/AxiosHelper.js +3 -3
- package/sdk/common/FDKError.d.ts +4 -0
- package/sdk/common/FDKError.js +9 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +16 -40
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +160 -38
- package/sdk/partner/PartnerConfig.d.ts +10 -0
- package/sdk/partner/PartnerConfig.js +10 -1
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +96 -199
- package/sdk/partner/Theme/ThemePartnerClient.js +935 -170
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +36 -17
- package/sdk/platform/Billing/BillingPlatformClient.js +140 -69
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +456 -228
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +512 -256
- package/sdk/platform/Catalog/CatalogPlatformClient.js +620 -309
- package/sdk/platform/Common/CommonPlatformClient.js +20 -9
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +472 -236
- package/sdk/platform/Communication/CommunicationPlatformClient.js +12 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +14 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +16 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +116 -57
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +256 -128
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +148 -73
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +552 -276
- package/sdk/platform/Discount/DiscountPlatformClient.js +92 -45
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +88 -44
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +52 -25
- package/sdk/platform/Finance/FinancePlatformClient.js +196 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +100 -49
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +104 -52
- package/sdk/platform/Lead/LeadPlatformClient.js +92 -45
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +239 -5
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +57 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +55 -0
- package/sdk/platform/Order/OrderPlatformClient.js +356 -177
- package/sdk/platform/Order/OrderPlatformModel.d.ts +44 -5
- package/sdk/platform/Order/OrderPlatformModel.js +52 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +16 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +336 -168
- package/sdk/platform/Payment/PaymentPlatformClient.js +84 -41
- package/sdk/platform/PlatformConfig.d.ts +10 -0
- package/sdk/platform/PlatformConfig.js +10 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +96 -48
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +112 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +148 -73
- package/sdk/platform/Share/SharePlatformApplicationClient.js +40 -20
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +224 -112
- package/sdk/platform/Theme/ThemePlatformClient.js +28 -13
- package/sdk/platform/User/UserPlatformApplicationClient.js +144 -72
- package/sdk/platform/Webhook/WebhookPlatformClient.js +132 -65
- package/sdk/public/Configuration/ConfigurationPublicClient.js +20 -9
- package/sdk/public/Inventory/InventoryPublicClient.js +52 -25
- package/sdk/public/Partner/PartnerPublicClient.js +12 -5
- package/sdk/public/PublicConfig.d.ts +11 -1
- package/sdk/public/PublicConfig.js +10 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +20 -9
|
@@ -355,6 +355,19 @@ export = OrderPlatformModel;
|
|
|
355
355
|
* @property {number} [amount]
|
|
356
356
|
* @property {string} [mode]
|
|
357
357
|
*/
|
|
358
|
+
/**
|
|
359
|
+
* @typedef BagReasonMeta
|
|
360
|
+
* @property {boolean} [show_text_area]
|
|
361
|
+
*/
|
|
362
|
+
/**
|
|
363
|
+
* @typedef BagReasons
|
|
364
|
+
* @property {string} [display_name]
|
|
365
|
+
* @property {number} [id]
|
|
366
|
+
* @property {BagReasonMeta} [meta]
|
|
367
|
+
* @property {string[]} [qc_type]
|
|
368
|
+
* @property {QuestionSet[]} [question_set]
|
|
369
|
+
* @property {BagReasons[]} [reasons]
|
|
370
|
+
*/
|
|
358
371
|
/**
|
|
359
372
|
* @typedef BagReturnableCancelableStatus
|
|
360
373
|
* @property {boolean} can_be_cancelled
|
|
@@ -1767,6 +1780,11 @@ export = OrderPlatformModel;
|
|
|
1767
1780
|
* @property {number} [priority]
|
|
1768
1781
|
* @property {ProcessingDates} [processing_dates]
|
|
1769
1782
|
*/
|
|
1783
|
+
/**
|
|
1784
|
+
* @typedef ShipmentBagReasons
|
|
1785
|
+
* @property {BagReasons[]} [reasons]
|
|
1786
|
+
* @property {boolean} [success]
|
|
1787
|
+
*/
|
|
1770
1788
|
/**
|
|
1771
1789
|
* @typedef ShipmentConfig
|
|
1772
1790
|
* @property {string} action
|
|
@@ -2334,11 +2352,11 @@ export = OrderPlatformModel;
|
|
|
2334
2352
|
*/
|
|
2335
2353
|
/**
|
|
2336
2354
|
* @typedef UserInfo
|
|
2337
|
-
* @property {string} email
|
|
2338
2355
|
* @property {string} first_name
|
|
2339
2356
|
* @property {string} [gender]
|
|
2340
2357
|
* @property {string} [last_name]
|
|
2341
|
-
* @property {string}
|
|
2358
|
+
* @property {string} primary_email
|
|
2359
|
+
* @property {string} primary_mobile_number
|
|
2342
2360
|
* @property {string} [user_id]
|
|
2343
2361
|
* @property {string} [user_type]
|
|
2344
2362
|
*/
|
|
@@ -2376,7 +2394,7 @@ export = OrderPlatformModel;
|
|
|
2376
2394
|
declare class OrderPlatformModel {
|
|
2377
2395
|
}
|
|
2378
2396
|
declare namespace OrderPlatformModel {
|
|
2379
|
-
export { ActionInfo, AdvanceFilterInfo, Affiliate, AffiliateAppConfig, AffiliateAppConfigMeta, AffiliateBag, AffiliateBagDetails, AffiliateBagsDetails, AffiliateConfig, AffiliateDetails, AffiliateInventoryArticleAssignmentConfig, AffiliateInventoryConfig, AffiliateInventoryLogisticsConfig, AffiliateInventoryOrderConfig, AffiliateInventoryPaymentConfig, AffiliateInventoryStoreConfig, AffiliateMeta, AffiliateStoreIdMapping, AnnouncementResponse, AnnouncementsResponse, AppliedPromos, Article, ArticleDetails, AttachOrderUser, AttachOrderUserResponse, AttachUserInfo, AttachUserOtpData, Attributes, B2BPODetails, BagConfigs, BagDetailsPlatformResponse, BagGST, BagGSTDetails, BagMeta, BagPaymentMethods, BagReturnableCancelableStatus, BagReturnableCancelableStatus1, Bags, BagsPage, BagStateMapper, BagStateTransitionMap, BagStatusHistory, BagUnit, BaseResponse, BillingInfo, BillingStaffDetails, Brand, BulkActionTemplate, BulkActionTemplateResponse, BulkReportsDownloadFailedResponse, BulkReportsDownloadRequest, BulkReportsDownloadResponse, BuyerDetails, BuyRules, Charge, CheckResponse, Click2CallResponse, CompanyDetails, ContactDetails, CourierPartnerTrackingDetails, CourierPartnerTrackingResponse, CreateChannelConfig, CreateChannelConfigData, CreateChannelConfigResponse, CreateChannelConifgErrorResponse, CreateChannelPaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, CreateOrderPayload, CreateOrderResponse, CreditBalanceInfo, CurrentStatus, DataUpdates, Dates, DebugInfo, Dimension, Dimensions, DiscountRules, DispatchManifest, Document, DpConfiguration, DPDetailsData, EinvoiceInfo, EInvoicePortalDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponse, EInvoiceRetryShipmentData, Entities, EntitiesDataUpdates, EntitiesReasons, EntityReasonData, Error, ErrorDetail, ErrorResponse, FetchCreditBalanceRequestPayload, FetchCreditBalanceResponsePayload, FileResponse, FilterInfoOption, FiltersInfo, FiltersResponse, FinancialBreakup, Formatted, FulfillingStore, FyndOrderIdList, GeneratePosOrderReceiptResponse, GetActionsResponse, GetBagsPlatformResponse, GiftCard, GSTDetailsData, HistoryDict, HistoryMeta, HistoryReason, Identifier, InvalidateShipmentCacheNestedResponse, InvalidateShipmentCachePayload, InvalidateShipmentCacheResponse, InvoiceInfo, Item, ItemCriterias, LaneConfigResponse, LineItem, LocationDetails, LockData, MarketPlacePdf, Meta, OrderBagArticle, OrderBags, OrderBrandName, OrderConfig, OrderData, OrderDetails, OrderDetailsData, OrderDetailsResponse, OrderInfo, OrderingStoreDetails, OrderItemDataUpdates, OrderListingResponse, OrderMeta, OrderPriority, OrderStatus, OrderStatusData, OrderStatusResult, OrderUser, OriginalFilter, Page, PageDetails, PaymentInfo, PaymentMethod, PaymentMethods, PDFLinks, PhoneDetails, PlatformArticleAttributes, PlatformBreakupValues, PlatformChannel, PlatformDeliveryAddress, PlatformItem, PlatformOrderItems, PlatformOrderUpdate, PlatformShipment, PlatformShipmentReasonsResponse, PlatformShipmentTrack, PlatformTrack, PlatformUserDetails, PointBlankOtpData, PostActivityHistory, PostHistoryData, PostHistoryDict, PostHistoryFilters, PostShipmentHistory, Prices, ProcessingDates, Products, ProductsDataUpdates, ProductsDataUpdatesFilters, ProductsReasons, ProductsReasonsData, ProductsReasonsFilters, QuestionSet, Reason, ReasonsData, RefundModeConfigRequestPayload, RefundModeConfigResponsePayload, RefundModeInfo, RefundOption, ReplacementDetails, ResponseDetail, ReturnConfig, ReturnConfig1, RoleBaseStateTransitionMapping, SendSmsPayload, SendUserMobileOTP, SendUserMobileOtpResponse, Shipment, ShipmentConfig, ShipmentData, ShipmentDetail, ShipmentDetails, ShipmentHistoryResponse, ShipmentInfoResponse, ShipmentInternalPlatformViewResponse, ShipmentItem, ShipmentItemFulFillingStore, ShipmentItemMeta, ShipmentListingBrand, ShipmentListingChannel, ShipmentMeta, ShipmentPayments, ShipmentReasonsResponse, ShipmentResponseReasons, ShipmentsRequest, ShipmentsResponse, ShipmentStatus, ShipmentStatusData, ShipmentTags, ShipmentTimeStamp, ShippingInfo, SmsDataPayload, StatuesRequest, StatuesResponse, Store, StoreAddress, StoreDocuments, StoreEinvoice, StoreEwaybill, StoreGstCredentials, StoreMeta, StoreReassign, StoreReassignResponse, SubLane, SuccessResponse, SuperLane, Tax, TaxDetails, TaxInfo, TrackingList, TransactionData, UpdatePackagingDimensionsPayload, UpdatePackagingDimensionsResponse, UpdateShipmentLockPayload, UpdateShipmentLockResponse, UpdateShipmentStatusRequest, UpdateShipmentStatusResponseBody, UploadConsent, URL, UserData, UserDataInfo, UserDetailsData, UserInfo, VerifyMobileOTP, VerifyOtpData, VerifyOtpResponse, VerifyOtpResponseData, Weight };
|
|
2397
|
+
export { ActionInfo, AdvanceFilterInfo, Affiliate, AffiliateAppConfig, AffiliateAppConfigMeta, AffiliateBag, AffiliateBagDetails, AffiliateBagsDetails, AffiliateConfig, AffiliateDetails, AffiliateInventoryArticleAssignmentConfig, AffiliateInventoryConfig, AffiliateInventoryLogisticsConfig, AffiliateInventoryOrderConfig, AffiliateInventoryPaymentConfig, AffiliateInventoryStoreConfig, AffiliateMeta, AffiliateStoreIdMapping, AnnouncementResponse, AnnouncementsResponse, AppliedPromos, Article, ArticleDetails, AttachOrderUser, AttachOrderUserResponse, AttachUserInfo, AttachUserOtpData, Attributes, B2BPODetails, BagConfigs, BagDetailsPlatformResponse, BagGST, BagGSTDetails, BagMeta, BagPaymentMethods, BagReasonMeta, BagReasons, BagReturnableCancelableStatus, BagReturnableCancelableStatus1, Bags, BagsPage, BagStateMapper, BagStateTransitionMap, BagStatusHistory, BagUnit, BaseResponse, BillingInfo, BillingStaffDetails, Brand, BulkActionTemplate, BulkActionTemplateResponse, BulkReportsDownloadFailedResponse, BulkReportsDownloadRequest, BulkReportsDownloadResponse, BuyerDetails, BuyRules, Charge, CheckResponse, Click2CallResponse, CompanyDetails, ContactDetails, CourierPartnerTrackingDetails, CourierPartnerTrackingResponse, CreateChannelConfig, CreateChannelConfigData, CreateChannelConfigResponse, CreateChannelConifgErrorResponse, CreateChannelPaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, CreateOrderPayload, CreateOrderResponse, CreditBalanceInfo, CurrentStatus, DataUpdates, Dates, DebugInfo, Dimension, Dimensions, DiscountRules, DispatchManifest, Document, DpConfiguration, DPDetailsData, EinvoiceInfo, EInvoicePortalDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponse, EInvoiceRetryShipmentData, Entities, EntitiesDataUpdates, EntitiesReasons, EntityReasonData, Error, ErrorDetail, ErrorResponse, FetchCreditBalanceRequestPayload, FetchCreditBalanceResponsePayload, FileResponse, FilterInfoOption, FiltersInfo, FiltersResponse, FinancialBreakup, Formatted, FulfillingStore, FyndOrderIdList, GeneratePosOrderReceiptResponse, GetActionsResponse, GetBagsPlatformResponse, GiftCard, GSTDetailsData, HistoryDict, HistoryMeta, HistoryReason, Identifier, InvalidateShipmentCacheNestedResponse, InvalidateShipmentCachePayload, InvalidateShipmentCacheResponse, InvoiceInfo, Item, ItemCriterias, LaneConfigResponse, LineItem, LocationDetails, LockData, MarketPlacePdf, Meta, OrderBagArticle, OrderBags, OrderBrandName, OrderConfig, OrderData, OrderDetails, OrderDetailsData, OrderDetailsResponse, OrderInfo, OrderingStoreDetails, OrderItemDataUpdates, OrderListingResponse, OrderMeta, OrderPriority, OrderStatus, OrderStatusData, OrderStatusResult, OrderUser, OriginalFilter, Page, PageDetails, PaymentInfo, PaymentMethod, PaymentMethods, PDFLinks, PhoneDetails, PlatformArticleAttributes, PlatformBreakupValues, PlatformChannel, PlatformDeliveryAddress, PlatformItem, PlatformOrderItems, PlatformOrderUpdate, PlatformShipment, PlatformShipmentReasonsResponse, PlatformShipmentTrack, PlatformTrack, PlatformUserDetails, PointBlankOtpData, PostActivityHistory, PostHistoryData, PostHistoryDict, PostHistoryFilters, PostShipmentHistory, Prices, ProcessingDates, Products, ProductsDataUpdates, ProductsDataUpdatesFilters, ProductsReasons, ProductsReasonsData, ProductsReasonsFilters, QuestionSet, Reason, ReasonsData, RefundModeConfigRequestPayload, RefundModeConfigResponsePayload, RefundModeInfo, RefundOption, ReplacementDetails, ResponseDetail, ReturnConfig, ReturnConfig1, RoleBaseStateTransitionMapping, SendSmsPayload, SendUserMobileOTP, SendUserMobileOtpResponse, Shipment, ShipmentBagReasons, ShipmentConfig, ShipmentData, ShipmentDetail, ShipmentDetails, ShipmentHistoryResponse, ShipmentInfoResponse, ShipmentInternalPlatformViewResponse, ShipmentItem, ShipmentItemFulFillingStore, ShipmentItemMeta, ShipmentListingBrand, ShipmentListingChannel, ShipmentMeta, ShipmentPayments, ShipmentReasonsResponse, ShipmentResponseReasons, ShipmentsRequest, ShipmentsResponse, ShipmentStatus, ShipmentStatusData, ShipmentTags, ShipmentTimeStamp, ShippingInfo, SmsDataPayload, StatuesRequest, StatuesResponse, Store, StoreAddress, StoreDocuments, StoreEinvoice, StoreEwaybill, StoreGstCredentials, StoreMeta, StoreReassign, StoreReassignResponse, SubLane, SuccessResponse, SuperLane, Tax, TaxDetails, TaxInfo, TrackingList, TransactionData, UpdatePackagingDimensionsPayload, UpdatePackagingDimensionsResponse, UpdateShipmentLockPayload, UpdateShipmentLockResponse, UpdateShipmentStatusRequest, UpdateShipmentStatusResponseBody, UploadConsent, URL, UserData, UserDataInfo, UserDetailsData, UserInfo, VerifyMobileOTP, VerifyOtpData, VerifyOtpResponse, VerifyOtpResponseData, Weight };
|
|
2380
2398
|
}
|
|
2381
2399
|
/** @returns {ActionInfo} */
|
|
2382
2400
|
declare function ActionInfo(): ActionInfo;
|
|
@@ -2769,6 +2787,21 @@ type BagPaymentMethods = {
|
|
|
2769
2787
|
amount?: number;
|
|
2770
2788
|
mode?: string;
|
|
2771
2789
|
};
|
|
2790
|
+
/** @returns {BagReasonMeta} */
|
|
2791
|
+
declare function BagReasonMeta(): BagReasonMeta;
|
|
2792
|
+
type BagReasonMeta = {
|
|
2793
|
+
show_text_area?: boolean;
|
|
2794
|
+
};
|
|
2795
|
+
/** @returns {BagReasons} */
|
|
2796
|
+
declare function BagReasons(): BagReasons;
|
|
2797
|
+
type BagReasons = {
|
|
2798
|
+
display_name?: string;
|
|
2799
|
+
id?: number;
|
|
2800
|
+
meta?: BagReasonMeta;
|
|
2801
|
+
qc_type?: string[];
|
|
2802
|
+
question_set?: QuestionSet[];
|
|
2803
|
+
reasons?: BagReasons[];
|
|
2804
|
+
};
|
|
2772
2805
|
/** @returns {BagReturnableCancelableStatus} */
|
|
2773
2806
|
declare function BagReturnableCancelableStatus(): BagReturnableCancelableStatus;
|
|
2774
2807
|
type BagReturnableCancelableStatus = {
|
|
@@ -4559,6 +4592,12 @@ type Shipment = {
|
|
|
4559
4592
|
priority?: number;
|
|
4560
4593
|
processing_dates?: ProcessingDates;
|
|
4561
4594
|
};
|
|
4595
|
+
/** @returns {ShipmentBagReasons} */
|
|
4596
|
+
declare function ShipmentBagReasons(): ShipmentBagReasons;
|
|
4597
|
+
type ShipmentBagReasons = {
|
|
4598
|
+
reasons?: BagReasons[];
|
|
4599
|
+
success?: boolean;
|
|
4600
|
+
};
|
|
4562
4601
|
/** @returns {ShipmentConfig} */
|
|
4563
4602
|
declare function ShipmentConfig(): ShipmentConfig;
|
|
4564
4603
|
type ShipmentConfig = {
|
|
@@ -5247,11 +5286,11 @@ type UserDetailsData = {
|
|
|
5247
5286
|
/** @returns {UserInfo} */
|
|
5248
5287
|
declare function UserInfo(): UserInfo;
|
|
5249
5288
|
type UserInfo = {
|
|
5250
|
-
email: string;
|
|
5251
5289
|
first_name: string;
|
|
5252
5290
|
gender?: string;
|
|
5253
5291
|
last_name?: string;
|
|
5254
|
-
|
|
5292
|
+
primary_email: string;
|
|
5293
|
+
primary_mobile_number: string;
|
|
5255
5294
|
user_id?: string;
|
|
5256
5295
|
user_type?: string;
|
|
5257
5296
|
};
|
|
@@ -391,6 +391,21 @@ const Joi = require("joi");
|
|
|
391
391
|
* @property {string} [mode]
|
|
392
392
|
*/
|
|
393
393
|
|
|
394
|
+
/**
|
|
395
|
+
* @typedef BagReasonMeta
|
|
396
|
+
* @property {boolean} [show_text_area]
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* @typedef BagReasons
|
|
401
|
+
* @property {string} [display_name]
|
|
402
|
+
* @property {number} [id]
|
|
403
|
+
* @property {BagReasonMeta} [meta]
|
|
404
|
+
* @property {string[]} [qc_type]
|
|
405
|
+
* @property {QuestionSet[]} [question_set]
|
|
406
|
+
* @property {BagReasons[]} [reasons]
|
|
407
|
+
*/
|
|
408
|
+
|
|
394
409
|
/**
|
|
395
410
|
* @typedef BagReturnableCancelableStatus
|
|
396
411
|
* @property {boolean} can_be_cancelled
|
|
@@ -1962,6 +1977,12 @@ const Joi = require("joi");
|
|
|
1962
1977
|
* @property {ProcessingDates} [processing_dates]
|
|
1963
1978
|
*/
|
|
1964
1979
|
|
|
1980
|
+
/**
|
|
1981
|
+
* @typedef ShipmentBagReasons
|
|
1982
|
+
* @property {BagReasons[]} [reasons]
|
|
1983
|
+
* @property {boolean} [success]
|
|
1984
|
+
*/
|
|
1985
|
+
|
|
1965
1986
|
/**
|
|
1966
1987
|
* @typedef ShipmentConfig
|
|
1967
1988
|
* @property {string} action
|
|
@@ -2583,11 +2604,11 @@ const Joi = require("joi");
|
|
|
2583
2604
|
|
|
2584
2605
|
/**
|
|
2585
2606
|
* @typedef UserInfo
|
|
2586
|
-
* @property {string} email
|
|
2587
2607
|
* @property {string} first_name
|
|
2588
2608
|
* @property {string} [gender]
|
|
2589
2609
|
* @property {string} [last_name]
|
|
2590
|
-
* @property {string}
|
|
2610
|
+
* @property {string} primary_email
|
|
2611
|
+
* @property {string} primary_mobile_number
|
|
2591
2612
|
* @property {string} [user_id]
|
|
2592
2613
|
* @property {string} [user_type]
|
|
2593
2614
|
*/
|
|
@@ -3094,6 +3115,25 @@ class OrderPlatformModel {
|
|
|
3094
3115
|
});
|
|
3095
3116
|
}
|
|
3096
3117
|
|
|
3118
|
+
/** @returns {BagReasonMeta} */
|
|
3119
|
+
static BagReasonMeta() {
|
|
3120
|
+
return Joi.object({
|
|
3121
|
+
show_text_area: Joi.boolean(),
|
|
3122
|
+
});
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
/** @returns {BagReasons} */
|
|
3126
|
+
static BagReasons() {
|
|
3127
|
+
return Joi.object({
|
|
3128
|
+
display_name: Joi.string().allow(""),
|
|
3129
|
+
id: Joi.number(),
|
|
3130
|
+
meta: OrderPlatformModel.BagReasonMeta(),
|
|
3131
|
+
qc_type: Joi.array().items(Joi.string().allow("")),
|
|
3132
|
+
question_set: Joi.array().items(OrderPlatformModel.QuestionSet()),
|
|
3133
|
+
reasons: Joi.array().items(Joi.link("#BagReasons")),
|
|
3134
|
+
}).id("BagReasons");
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3097
3137
|
/** @returns {BagReturnableCancelableStatus} */
|
|
3098
3138
|
static BagReturnableCancelableStatus() {
|
|
3099
3139
|
return Joi.object({
|
|
@@ -4994,6 +5034,14 @@ class OrderPlatformModel {
|
|
|
4994
5034
|
});
|
|
4995
5035
|
}
|
|
4996
5036
|
|
|
5037
|
+
/** @returns {ShipmentBagReasons} */
|
|
5038
|
+
static ShipmentBagReasons() {
|
|
5039
|
+
return Joi.object({
|
|
5040
|
+
reasons: Joi.array().items(OrderPlatformModel.BagReasons()),
|
|
5041
|
+
success: Joi.boolean(),
|
|
5042
|
+
});
|
|
5043
|
+
}
|
|
5044
|
+
|
|
4997
5045
|
/** @returns {ShipmentConfig} */
|
|
4998
5046
|
static ShipmentConfig() {
|
|
4999
5047
|
return Joi.object({
|
|
@@ -5728,11 +5776,11 @@ class OrderPlatformModel {
|
|
|
5728
5776
|
/** @returns {UserInfo} */
|
|
5729
5777
|
static UserInfo() {
|
|
5730
5778
|
return Joi.object({
|
|
5731
|
-
email: Joi.string().allow("").required(),
|
|
5732
5779
|
first_name: Joi.string().allow("").required(),
|
|
5733
5780
|
gender: Joi.string().allow(""),
|
|
5734
5781
|
last_name: Joi.string().allow(""),
|
|
5735
|
-
|
|
5782
|
+
primary_email: Joi.string().allow("").required(),
|
|
5783
|
+
primary_mobile_number: Joi.string().allow("").required(),
|
|
5736
5784
|
user_id: Joi.string().allow(""),
|
|
5737
5785
|
user_type: Joi.string().allow(""),
|
|
5738
5786
|
});
|
|
@@ -80,10 +80,14 @@ class Partner {
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
if (res_error) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
84
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
85
|
+
} else {
|
|
86
|
+
Logger({
|
|
87
|
+
level: "WARN",
|
|
88
|
+
message: `Response Validation Warnings for platform > Partner > addProxyPath \n ${res_error}`,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
return response;
|
|
@@ -157,10 +161,14 @@ class Partner {
|
|
|
157
161
|
});
|
|
158
162
|
|
|
159
163
|
if (res_error) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
165
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
166
|
+
} else {
|
|
167
|
+
Logger({
|
|
168
|
+
level: "WARN",
|
|
169
|
+
message: `Response Validation Warnings for platform > Partner > removeProxyPath \n ${res_error}`,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
164
172
|
}
|
|
165
173
|
|
|
166
174
|
return response;
|