@gofynd/fdk-client-javascript 1.3.6-beta.1 → 1.3.6-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 CHANGED
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
214
214
  The above code will log the curl command in the console
215
215
 
216
216
  ```bash
217
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.6-beta.1' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
217
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.6-beta.2' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
218
218
  Active Theme: Emerge
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.3.6-beta.1",
3
+ "version": "1.3.6-beta.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  "joi": "^17.7.0",
19
19
  "loglevel": "^1.8.1",
20
20
  "query-string": "^7.1.3",
21
- "@gofynd/fp-signature": "^0.0.2-alpha.1"
21
+ "@gofynd/fp-signature": "^1.0.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "axios-cookiejar-support": "^4.0.6",
@@ -73,10 +73,10 @@ function requestInterceptorFn() {
73
73
  body: transformedData,
74
74
  headers: headersToSign,
75
75
  };
76
- sign(signingOptions, "1234567");
76
+ const signature = sign(signingOptions);
77
77
 
78
- config.headers["x-fp-date"] = signingOptions.headers["x-fp-date"];
79
- config.headers["x-fp-signature"] = signingOptions.headers["x-fp-signature"];
78
+ config.headers["x-fp-date"] = signature["x-fp-date"];
79
+ config.headers["x-fp-signature"] = signature["x-fp-signature"];
80
80
  // config.headers["fp-sdk-version"] = version;
81
81
  return config;
82
82
  };
@@ -295,6 +295,16 @@ declare class Order {
295
295
  * @description: Get Role Based Actions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
296
296
  */
297
297
  getRoleBasedActions({ requestHeaders }?: any, { responseHeaders }?: object): Promise<OrderPlatformModel.GetActionsResponse>;
298
+ /**
299
+ * @param {OrderPlatformValidator.GetShipmentBagReasonsParam} arg - Arg object
300
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
301
+ * @param {import("../PlatformAPIClient").Options} - Options
302
+ * @returns {Promise<OrderPlatformModel.ShipmentBagReasons>} - Success response
303
+ * @name getShipmentBagReasons
304
+ * @summary: Get reasons behind full or partial cancellation of a shipment
305
+ * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/).
306
+ */
307
+ getShipmentBagReasons({ shipmentId, lineNumber, requestHeaders }?: OrderPlatformValidator.GetShipmentBagReasonsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentBagReasons>;
298
308
  /**
299
309
  * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
300
310
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -2092,6 +2092,83 @@ class Order {
2092
2092
  return response;
2093
2093
  }
2094
2094
 
2095
+ /**
2096
+ * @param {OrderPlatformValidator.GetShipmentBagReasonsParam} arg - Arg object
2097
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2098
+ * @param {import("../PlatformAPIClient").Options} - Options
2099
+ * @returns {Promise<OrderPlatformModel.ShipmentBagReasons>} - Success response
2100
+ * @name getShipmentBagReasons
2101
+ * @summary: Get reasons behind full or partial cancellation of a shipment
2102
+ * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/).
2103
+ */
2104
+ async getShipmentBagReasons(
2105
+ { shipmentId, lineNumber, requestHeaders } = { requestHeaders: {} },
2106
+ { responseHeaders } = { responseHeaders: false }
2107
+ ) {
2108
+ const { error } = OrderPlatformValidator.getShipmentBagReasons().validate(
2109
+ {
2110
+ shipmentId,
2111
+ lineNumber,
2112
+ },
2113
+ { abortEarly: false, allowUnknown: true }
2114
+ );
2115
+ if (error) {
2116
+ return Promise.reject(new FDKClientValidationError(error));
2117
+ }
2118
+
2119
+ // Showing warrnings if extra unknown parameters are found
2120
+ const {
2121
+ error: warrning,
2122
+ } = OrderPlatformValidator.getShipmentBagReasons().validate(
2123
+ {
2124
+ shipmentId,
2125
+ lineNumber,
2126
+ },
2127
+ { abortEarly: false, allowUnknown: false }
2128
+ );
2129
+ if (warrning) {
2130
+ Logger({
2131
+ level: "WARN",
2132
+ message: `Parameter Validation warrnings for platform > Order > getShipmentBagReasons \n ${warrning}`,
2133
+ });
2134
+ }
2135
+
2136
+ const query_params = {};
2137
+
2138
+ const xHeaders = {};
2139
+
2140
+ const response = await PlatformAPIClient.execute(
2141
+ this.config,
2142
+ "get",
2143
+ `/service/platform/order/v1.0/company/${this.config.companyId}/application/<application_id>/orders/shipments/<shipment_id>/line_number/<line_number>/reasons`,
2144
+ query_params,
2145
+ undefined,
2146
+ { ...xHeaders, ...requestHeaders },
2147
+ { responseHeaders }
2148
+ );
2149
+
2150
+ let responseData = response;
2151
+ if (responseHeaders) {
2152
+ responseData = response[0];
2153
+ }
2154
+
2155
+ const {
2156
+ error: res_error,
2157
+ } = OrderPlatformModel.ShipmentBagReasons().validate(responseData, {
2158
+ abortEarly: false,
2159
+ allowUnknown: false,
2160
+ });
2161
+
2162
+ if (res_error) {
2163
+ Logger({
2164
+ level: "WARN",
2165
+ message: `Response Validation Warnnings for platform > Order > getShipmentBagReasons \n ${res_error}`,
2166
+ });
2167
+ }
2168
+
2169
+ return response;
2170
+ }
2171
+
2095
2172
  /**
2096
2173
  * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
2097
2174
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -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} mobile
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
- mobile: string;
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} mobile
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
- mobile: Joi.string().allow("").required(),
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
  });
@@ -154,6 +154,12 @@ export = OrderPlatformValidator;
154
154
  * @property {string} [orderType]
155
155
  */
156
156
  /** @typedef GetRoleBasedActionsParam */
157
+ /**
158
+ * @typedef GetShipmentBagReasonsParam
159
+ * @property {string} shipmentId - ID of the bag. An order may contain multiple
160
+ * items and may get divided into one or more shipment, each having its own ID.
161
+ * @property {number} lineNumber - Line number of bag.
162
+ */
157
163
  /**
158
164
  * @typedef GetShipmentByIdParam
159
165
  * @property {string} [channelShipmentId] - App Shipment Id
@@ -333,6 +339,8 @@ declare class OrderPlatformValidator {
333
339
  static getOrders(): GetOrdersParam;
334
340
  /** @returns {GetRoleBasedActionsParam} */
335
341
  static getRoleBasedActions(): any;
342
+ /** @returns {GetShipmentBagReasonsParam} */
343
+ static getShipmentBagReasons(): GetShipmentBagReasonsParam;
336
344
  /** @returns {GetShipmentByIdParam} */
337
345
  static getShipmentById(): GetShipmentByIdParam;
338
346
  /** @returns {GetShipmentHistoryParam} */
@@ -377,7 +385,7 @@ declare class OrderPlatformValidator {
377
385
  static verifyMobileOTP(): VerifyMobileOTPParam;
378
386
  }
379
387
  declare namespace OrderPlatformValidator {
380
- export { AttachOrderUserParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetLaneConfigParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetfiltersParam, InvalidateShipmentCacheParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentParam, VerifyMobileOTPParam };
388
+ export { AttachOrderUserParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetLaneConfigParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentBagReasonsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetfiltersParam, InvalidateShipmentCacheParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentParam, VerifyMobileOTPParam };
381
389
  }
382
390
  type AttachOrderUserParam = {
383
391
  body: OrderPlatformModel.AttachOrderUser;
@@ -655,6 +663,17 @@ type GetOrdersParam = {
655
663
  customerId?: string;
656
664
  orderType?: string;
657
665
  };
666
+ type GetShipmentBagReasonsParam = {
667
+ /**
668
+ * - ID of the bag. An order may contain multiple
669
+ * items and may get divided into one or more shipment, each having its own ID.
670
+ */
671
+ shipmentId: string;
672
+ /**
673
+ * - Line number of bag.
674
+ */
675
+ lineNumber: number;
676
+ };
658
677
  type GetShipmentByIdParam = {
659
678
  /**
660
679
  * - App Shipment Id
@@ -180,6 +180,13 @@ const OrderPlatformModel = require("./OrderPlatformModel");
180
180
 
181
181
  /** @typedef GetRoleBasedActionsParam */
182
182
 
183
+ /**
184
+ * @typedef GetShipmentBagReasonsParam
185
+ * @property {string} shipmentId - ID of the bag. An order may contain multiple
186
+ * items and may get divided into one or more shipment, each having its own ID.
187
+ * @property {number} lineNumber - Line number of bag.
188
+ */
189
+
183
190
  /**
184
191
  * @typedef GetShipmentByIdParam
185
192
  * @property {string} [channelShipmentId] - App Shipment Id
@@ -553,6 +560,14 @@ class OrderPlatformValidator {
553
560
  return Joi.object({}).required();
554
561
  }
555
562
 
563
+ /** @returns {GetShipmentBagReasonsParam} */
564
+ static getShipmentBagReasons() {
565
+ return Joi.object({
566
+ shipmentId: Joi.string().allow("").required(),
567
+ lineNumber: Joi.number().required(),
568
+ }).required();
569
+ }
570
+
556
571
  /** @returns {GetShipmentByIdParam} */
557
572
  static getShipmentById() {
558
573
  return Joi.object({