@gofynd/fdk-client-javascript 3.12.0 → 3.14.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/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +21 -8
- package/sdk/platform/Cart/CartPlatformModel.js +10 -4
- package/sdk/platform/Catalog/CatalogPlatformModel.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformClient.js +1 -1
- package/sdk/platform/Order/OrderPlatformModel.d.ts +241 -207
- package/sdk/platform/Order/OrderPlatformModel.js +117 -104
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +16 -4
- package/sdk/platform/Order/OrderPlatformValidator.js +8 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +85 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +16 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +861 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +534 -84
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +5 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +2 -0
|
@@ -266,7 +266,7 @@ const Joi = require("joi");
|
|
|
266
266
|
* bag, used to identify and reference a particular product in a list. This
|
|
267
267
|
* helps in pinpointing the exact item being updated or processed.
|
|
268
268
|
* @property {string} [identifier] - A unique string that serves as the
|
|
269
|
-
* product
|
|
269
|
+
* product's identifier, such as a SKU, barcode, or another distinct code.
|
|
270
270
|
* This ensures the product is correctly identified and distinguished from
|
|
271
271
|
* other items in the system.
|
|
272
272
|
* @property {number} [quantity] - The quantity of the product or item,
|
|
@@ -2473,7 +2473,7 @@ const Joi = require("joi");
|
|
|
2473
2473
|
* associated with a unique processing flow. For example:
|
|
2474
2474
|
*
|
|
2475
2475
|
* - "HomeDelivery": The order goes through all the steps needed for delivery,
|
|
2476
|
-
* from being packed to arriving at the customer
|
|
2476
|
+
* from being packed to arriving at the customer's address.
|
|
2477
2477
|
* - "PickAtStore": The order is prepared for pickup at the store, skipping
|
|
2478
2478
|
* shipping steps to make it ready faster for the customer to collect in person.
|
|
2479
2479
|
* - "Digital": This order type likely refers to orders that involve digital goods
|
|
@@ -2819,63 +2819,72 @@ const Joi = require("joi");
|
|
|
2819
2819
|
|
|
2820
2820
|
/**
|
|
2821
2821
|
* @typedef PaymentMethodGatewaySchema
|
|
2822
|
-
* @property {string} name - Payment
|
|
2822
|
+
* @property {string} name - Payment gateway name e.g., Razorpay, Stripe, etc.
|
|
2823
2823
|
* @property {string} [logo]
|
|
2824
2824
|
*/
|
|
2825
2825
|
|
|
2826
2826
|
/**
|
|
2827
2827
|
* @typedef SubModeOfPaymentSchema
|
|
2828
|
-
* @property {string} name - Name of the
|
|
2828
|
+
* @property {string} name - Name of the sub-mode of payment. For example, if
|
|
2829
|
+
* the payment mode is 'Paytm', a sub-mode could be 'Paytm Wallet'.
|
|
2829
2830
|
*/
|
|
2830
2831
|
|
|
2831
2832
|
/**
|
|
2832
2833
|
* @typedef PaymentMethodModeOfPaymentSchema
|
|
2833
|
-
* @property {string} name - Payment
|
|
2834
|
-
*
|
|
2834
|
+
* @property {string} name - Payment mode name e.g., Credit Card, Debit Card,
|
|
2835
|
+
* Net Banking, Wallet, etc.
|
|
2836
|
+
* @property {string} slug - Slug of the payment mode e.g., cc, dc, nb, wl, etc.
|
|
2835
2837
|
* @property {SubModeOfPaymentSchema} [sub_mode_of_payment]
|
|
2836
2838
|
*/
|
|
2837
2839
|
|
|
2838
2840
|
/**
|
|
2839
2841
|
* @typedef PaymentMethodTransactionPartySchema
|
|
2840
|
-
* @property {string} refund_bearer - Entity responsible for
|
|
2841
|
-
*
|
|
2842
|
-
*
|
|
2842
|
+
* @property {string} refund_bearer - Entity responsible for refunding the
|
|
2843
|
+
* amount paid by the customer
|
|
2844
|
+
* @property {string} collection_bearer - Entity responsible for collection of
|
|
2845
|
+
* amount paid by the customer
|
|
2843
2846
|
*/
|
|
2844
2847
|
|
|
2845
2848
|
/**
|
|
2846
2849
|
* @typedef LineItemPaymentMethodSchema
|
|
2847
2850
|
* @property {PaymentMethodGatewaySchema} [gateway]
|
|
2848
2851
|
* @property {PaymentMethodModeOfPaymentSchema} [mode_of_payment]
|
|
2849
|
-
* @property {number} [amount_paid] - Total
|
|
2852
|
+
* @property {number} [amount_paid] - Total amount paid by this payment method
|
|
2850
2853
|
* @property {string} [payment_identifier] - Transaction id
|
|
2851
2854
|
* @property {PaymentMethodTransactionPartySchema} [transaction_party]
|
|
2852
2855
|
*/
|
|
2853
2856
|
|
|
2854
2857
|
/**
|
|
2855
2858
|
* @typedef BundleDetailsSchema
|
|
2856
|
-
* @property {boolean} [is_base] -
|
|
2859
|
+
* @property {boolean} [is_base] - This serves as the base item, with all other
|
|
2860
|
+
* items acting as child elements within the bundle to display the hero
|
|
2861
|
+
* product prominently at the top.
|
|
2857
2862
|
* @property {string[]} [images] - An array of image URLs associated with the bundle.
|
|
2858
|
-
* @property {string} [group_id] - Unique group identifier for the bundle
|
|
2863
|
+
* @property {string} [group_id] - Unique group identifier for the bundle
|
|
2864
|
+
* generated by seller to club the articles
|
|
2859
2865
|
* @property {string} [name] - Name of the bundle.
|
|
2860
|
-
* @property {string} [item_type] - Type of the item
|
|
2861
|
-
* @property {number} [item_id] - Unique identifier
|
|
2866
|
+
* @property {string} [item_type] - Type of the bundle item
|
|
2867
|
+
* @property {number} [item_id] - Unique identifier of the item.
|
|
2862
2868
|
* @property {string} [item_code] - Item code for the item.
|
|
2863
2869
|
* @property {string} [item_name] - Name of the item.
|
|
2864
2870
|
* @property {string} [seller_identifier] - Identifier for the seller of the bundle.
|
|
2865
|
-
* @property {number} [bundle_article_quantity] -
|
|
2871
|
+
* @property {number} [bundle_article_quantity] - In orders with multiple
|
|
2872
|
+
* quantities of the same line item, the line item count remains constant, but
|
|
2873
|
+
* multiple bundles can exist. To distinguish between these bundles, the
|
|
2874
|
+
* article quantity must be used.
|
|
2866
2875
|
* @property {string} [brand_name] - Identifier for the brand name.
|
|
2867
2876
|
* @property {string} [size] - Size associated with the bundle item.
|
|
2868
2877
|
*/
|
|
2869
2878
|
|
|
2870
2879
|
/**
|
|
2871
2880
|
* @typedef LineItemMonetaryValuesSchema
|
|
2872
|
-
* @property {number} amount_paid - Amount
|
|
2881
|
+
* @property {number} amount_paid - Amount paid by the customer
|
|
2873
2882
|
* @property {number} price_effective - The final effective price after applying
|
|
2874
2883
|
* discounts, promotional offers, and adjustments.
|
|
2875
2884
|
* @property {number} [discount] - Discount amount apart from promo and coupon discount
|
|
2876
2885
|
* @property {number} price_marked - The original marked price of the item
|
|
2877
2886
|
* before any discounts or promotions.
|
|
2878
|
-
* @property {number} [coupon_discount] - Coupon
|
|
2887
|
+
* @property {number} [coupon_discount] - Coupon discount applied for this article
|
|
2879
2888
|
* @property {number} [cod_charges] - Cash on Delivery Charges Applied for this Article.
|
|
2880
2889
|
* @property {number} [promo_discount] - Promotion Discount
|
|
2881
2890
|
* @property {number} [gift_price] - Gift Price
|
|
@@ -2884,12 +2893,12 @@ const Joi = require("joi");
|
|
|
2884
2893
|
|
|
2885
2894
|
/**
|
|
2886
2895
|
* @typedef DimensionSchema
|
|
2887
|
-
* @property {number} height - Height of the
|
|
2896
|
+
* @property {number} height - Height of the product.
|
|
2888
2897
|
* @property {number} length - Length of the product.
|
|
2898
|
+
* @property {number} width - Width of the product
|
|
2889
2899
|
* @property {boolean} is_default - Not Modified, meaning these are same as
|
|
2890
2900
|
* product uploaded while loading catelogue.
|
|
2891
2901
|
* @property {string} unit - Unit of the measurement used.
|
|
2892
|
-
* @property {number} width - Width of the Product.
|
|
2893
2902
|
*/
|
|
2894
2903
|
|
|
2895
2904
|
/**
|
|
@@ -2921,14 +2930,20 @@ const Joi = require("joi");
|
|
|
2921
2930
|
|
|
2922
2931
|
/**
|
|
2923
2932
|
* @typedef CPOptionsSchema
|
|
2924
|
-
* @property {string} [extension_id]
|
|
2925
|
-
*
|
|
2933
|
+
* @property {string} [extension_id] - A string that uniquely identifies the
|
|
2934
|
+
* courier partner extension. Refer <a
|
|
2935
|
+
* href='/commerce/sdk/latest/platform/company/serviceability#getCourierPartnerAccount'>Get
|
|
2936
|
+
* courier partner account</a> to get the extension id.
|
|
2937
|
+
* @property {string} [scheme_id] - A string that specifies the unique
|
|
2938
|
+
* identifier for the scheme associated with the account. Refer <a
|
|
2939
|
+
* href='/commerce/sdk/latest/platform/company/serviceability#getCourierPartnerAccount'>Get
|
|
2940
|
+
* courier partner account</a> to get the scheme id.
|
|
2926
2941
|
* @property {CPAreaCodeSchema} [area_code]
|
|
2927
2942
|
* @property {boolean} [is_self_ship]
|
|
2928
2943
|
* @property {number} [max_reattempts_for_delivery_allowed]
|
|
2929
2944
|
* @property {string} [cp_sort_key] - A sorting key used for categorizing or
|
|
2930
2945
|
* sorting courier partners, often related to their performance, costs, or
|
|
2931
|
-
* some other factor.
|
|
2946
|
+
* some other factor, (example: E-17A-4, E-17A-6, etc.).
|
|
2932
2947
|
* @property {string} [name] - The name of the courier partner or the delivery
|
|
2933
2948
|
* agent handling the shipment.
|
|
2934
2949
|
* @property {CPRiderDetailsSchema} [rider_details]
|
|
@@ -2942,7 +2957,7 @@ const Joi = require("joi");
|
|
|
2942
2957
|
* @typedef CourierPartnerDetailsSchema
|
|
2943
2958
|
* @property {string} [cp_sort_key] - A sorting key used for categorizing or
|
|
2944
2959
|
* sorting courier partners, often related to their performance, costs, or
|
|
2945
|
-
* some other factor.
|
|
2960
|
+
* some other factor. (example: E-17A-4, E-17A-6, etc.).
|
|
2946
2961
|
* @property {CPOptionsSchema[]} [cp_options] - Other Available CP's
|
|
2947
2962
|
* @property {string} scheme_id
|
|
2948
2963
|
* @property {string} name - The name of the courier partner or the delivery
|
|
@@ -2954,7 +2969,7 @@ const Joi = require("joi");
|
|
|
2954
2969
|
* @property {boolean} using_own_creds - Specifies weather the Seller's Creds or
|
|
2955
2970
|
* Fynd's Creds are being used.
|
|
2956
2971
|
* @property {number} [max_reattempts_for_delivery_allowed] - Reattempts Allowed
|
|
2957
|
-
* (required for
|
|
2972
|
+
* (required for NDR)
|
|
2958
2973
|
* @property {CPTatToDeliverTheShipmentSchema} [tat_to_deliver_the_shipment]
|
|
2959
2974
|
* @property {boolean} [is_self_ship] - Is every logistic action handled by seller.
|
|
2960
2975
|
*/
|
|
@@ -2992,8 +3007,8 @@ const Joi = require("joi");
|
|
|
2992
3007
|
* can be dispatched (e.g., the earliest possible dispatch date).
|
|
2993
3008
|
* @property {string} [dispatch_by_date] - The latest date the order must be
|
|
2994
3009
|
* dispatched to meet delivery expectations.
|
|
2995
|
-
* @property {string} [confirm_by_date] - The deadline by which the
|
|
2996
|
-
*
|
|
3010
|
+
* @property {string} [confirm_by_date] - The deadline by which the seller must
|
|
3011
|
+
* confirm the order.
|
|
2997
3012
|
* @property {CustomerPickupSlotSchema} [customer_pickup_slot]
|
|
2998
3013
|
* @property {string} [pack_by_date] - The latest time the package should be
|
|
2999
3014
|
* packed and ready to dispatch.
|
|
@@ -3001,20 +3016,20 @@ const Joi = require("joi");
|
|
|
3001
3016
|
|
|
3002
3017
|
/**
|
|
3003
3018
|
* @typedef LineItemSchema
|
|
3004
|
-
* @property {string} [seller_identifier] - Identifier
|
|
3005
|
-
* @property {LineItemPaymentMethodSchema[]} payment_methods - Payment
|
|
3006
|
-
*
|
|
3019
|
+
* @property {string} [seller_identifier] - Identifier of the seller selling the item.
|
|
3020
|
+
* @property {LineItemPaymentMethodSchema[]} payment_methods - Payment methods
|
|
3021
|
+
* used to sell this order.
|
|
3007
3022
|
* @property {LineItemMonetaryValuesSchema} monetary_values
|
|
3008
3023
|
* @property {GiftDetailsSchema} [gift_details]
|
|
3009
|
-
* @property {string} [special_instructions] -
|
|
3010
|
-
*
|
|
3024
|
+
* @property {string} [special_instructions] - These instructions are added by
|
|
3025
|
+
* the customer at checkout for the seller's reference.
|
|
3011
3026
|
* @property {DimensionSchema} [dimension]
|
|
3012
3027
|
* @property {number} [quantity] - Quantity of the Line Item
|
|
3013
3028
|
* @property {string} [external_line_id] - Unique identifier for the LineItem as
|
|
3014
3029
|
* assigned by an external system. You can use this to map external id to
|
|
3015
3030
|
* Fynd's generated id
|
|
3016
3031
|
* @property {BundleDetailsSchema} [bundle_details]
|
|
3017
|
-
* @property {Object} [meta] -
|
|
3032
|
+
* @property {Object} [meta] - Contains metadata related to the shipment
|
|
3018
3033
|
*/
|
|
3019
3034
|
|
|
3020
3035
|
/**
|
|
@@ -3024,20 +3039,17 @@ const Joi = require("joi");
|
|
|
3024
3039
|
* after receiving an order creation request.
|
|
3025
3040
|
* @property {LifecycleMessageSchema[]} [shipment_lifecycle_messages] - List of
|
|
3026
3041
|
* general-purpose messages shown across different points in the shipment's
|
|
3027
|
-
* journey at Order Details
|
|
3042
|
+
* journey at Order Details screen.
|
|
3028
3043
|
* @property {string[]} [tags] - Tags that can be attached to the shipment for
|
|
3029
3044
|
* filtering and categorization.
|
|
3030
3045
|
* @property {string} [type] - The shipment type defining the fulfillment method
|
|
3031
3046
|
* and processing flow. Each type determines the specific journey a shipment
|
|
3032
3047
|
* will follow based on operational needs and customer preferences:
|
|
3033
|
-
*
|
|
3034
|
-
*
|
|
3035
|
-
*
|
|
3036
|
-
*
|
|
3037
|
-
*
|
|
3038
|
-
* - "Digital": Orders involving digital goods or services (e.g., software,
|
|
3039
|
-
* e-books, subscriptions) delivered electronically.
|
|
3040
|
-
*
|
|
3048
|
+
* "HomeDelivery": Standard delivery to the customer's address, undergoing all
|
|
3049
|
+
* typical state transitions from processing to final delivery. "PickAtStore":
|
|
3050
|
+
* Order prepared for in-store pickup, bypassing traditional shipping stages
|
|
3051
|
+
* for direct handover to the customer. "Digital": Orders involving digital
|
|
3052
|
+
* goods or services (e.g., software, e-books, subscriptions) delivered electronically.
|
|
3041
3053
|
* @property {FulfillmentOptionSchema} [fulfillment_option]
|
|
3042
3054
|
* @property {string} [external_shipment_id] - Unique identifier for the
|
|
3043
3055
|
* shipment as assigned by an external system. Use this to map the external ID
|
|
@@ -3060,9 +3072,10 @@ const Joi = require("joi");
|
|
|
3060
3072
|
|
|
3061
3073
|
/**
|
|
3062
3074
|
* @typedef OrderingCurrencySchema
|
|
3063
|
-
* @property {string} currency_code - The
|
|
3064
|
-
*
|
|
3065
|
-
*
|
|
3075
|
+
* @property {string} currency_code - The <a
|
|
3076
|
+
* href='https://www.iso.org/iso-4217-currency-codes.html'>ISO 4217</a>
|
|
3077
|
+
* currency code, such as 'INR' for Indian Rupee. This field represents the
|
|
3078
|
+
* standardized three-letter code of a currency.
|
|
3066
3079
|
* @property {string} currency_symbol - The symbol representing the currency,
|
|
3067
3080
|
* such as '₹' for Indian Rupee. This is used for display purposes alongside
|
|
3068
3081
|
* currency amounts.
|
|
@@ -3091,7 +3104,6 @@ const Joi = require("joi");
|
|
|
3091
3104
|
/**
|
|
3092
3105
|
* @typedef CouponOwnershipSchema
|
|
3093
3106
|
* @property {string} payable_category - Indicates who issued the coupon
|
|
3094
|
-
* (MARKETPLACE or SELLER).
|
|
3095
3107
|
*/
|
|
3096
3108
|
|
|
3097
3109
|
/**
|
|
@@ -3107,40 +3119,38 @@ const Joi = require("joi");
|
|
|
3107
3119
|
|
|
3108
3120
|
/**
|
|
3109
3121
|
* @typedef BillingDetailsSchema
|
|
3110
|
-
* @property {string} [first_name] - First
|
|
3122
|
+
* @property {string} [first_name] - First name of the customer
|
|
3111
3123
|
* @property {string} [phone_code] - Country phone code ex: +91
|
|
3112
|
-
* @property {string} [country] - Country of the
|
|
3113
|
-
* @property {string} [city] - City of the
|
|
3114
|
-
* @property {string} [pincode] - Pincode of the
|
|
3115
|
-
* @property {string} [last_name] - Last
|
|
3116
|
-
* @property {string} [mobile_number] - Primary
|
|
3117
|
-
* @property {string} [email] - Primary
|
|
3118
|
-
* @property {string} [state] - State of the
|
|
3119
|
-
* @property {string} [alternate_mobile_number] - Alternate
|
|
3120
|
-
* @property {string} [address] -
|
|
3121
|
-
* @property {string} [middle_name] -
|
|
3122
|
-
* @property {string} [title] -
|
|
3123
|
-
* @property {string} [house_no] -
|
|
3124
|
-
* number of the customer.
|
|
3124
|
+
* @property {string} [country] - Country of the customer
|
|
3125
|
+
* @property {string} [city] - City of the customer
|
|
3126
|
+
* @property {string} [pincode] - Pincode of the customer
|
|
3127
|
+
* @property {string} [last_name] - Last name of the customer
|
|
3128
|
+
* @property {string} [mobile_number] - Primary phone number of the customer
|
|
3129
|
+
* @property {string} [email] - Primary email of the customer
|
|
3130
|
+
* @property {string} [state] - State of the customer
|
|
3131
|
+
* @property {string} [alternate_mobile_number] - Alternate mobile number
|
|
3132
|
+
* @property {string} [address] - Billing address of the customer
|
|
3133
|
+
* @property {string} [middle_name] - Customer's middle name.
|
|
3134
|
+
* @property {string} [title] - Customer's title or prefix.
|
|
3135
|
+
* @property {string} [house_no] - House or apartment number of the customer.
|
|
3125
3136
|
* @property {GeoLocationSchema} [geo_location]
|
|
3126
|
-
* @property {string} [gender] - Gender of
|
|
3127
|
-
* @property {string} [landmark] -
|
|
3128
|
-
* point near the customer's location.
|
|
3129
|
-
* @property {string} [address_type] - A string representing the address type in
|
|
3130
|
-
* the seller's system.
|
|
3131
|
-
* @property {string} [state_code] - A string representing the state code of the
|
|
3132
|
-
* customer's location.
|
|
3133
|
-
* @property {string} [floor_no] - A string representing the floor number of the
|
|
3137
|
+
* @property {string} [gender] - Gender of customer
|
|
3138
|
+
* @property {string} [landmark] - Landmark or reference point near the
|
|
3134
3139
|
* customer's location.
|
|
3140
|
+
* @property {string} [address_type] - Address type in the seller's system.
|
|
3141
|
+
* @property {string} [state_code] - State code of the customer's location.
|
|
3142
|
+
* @property {string} [floor_no] - Floor number of the customer's location.
|
|
3135
3143
|
* @property {string} [alternate_email] - Alternate Email Address
|
|
3136
|
-
* @property {string} [address1] -
|
|
3137
|
-
* @property {string} [address2] -
|
|
3144
|
+
* @property {string} [address1] - First line of the address.
|
|
3145
|
+
* @property {string} [address2] - Second line of the address.
|
|
3138
3146
|
* @property {string} [country_iso_code] - Specifies the country's unique
|
|
3139
|
-
* identifier
|
|
3147
|
+
* identifier allowing the ISO 3166-1 alpha-2 standard. This two-letter code
|
|
3140
3148
|
* is crucial for distinguishing countries in international transactions, data
|
|
3141
3149
|
* processing, and shipping logistics.
|
|
3142
|
-
* @property {string} [user_id] - The unique identifier assigned to the
|
|
3143
|
-
*
|
|
3150
|
+
* @property {string} [user_id] - The unique identifier assigned to the
|
|
3151
|
+
* customer. Refer <a
|
|
3152
|
+
* href='/commerce/sdk/latest/platform/application/user#customer'>Customer</a>
|
|
3153
|
+
* to get more details.
|
|
3144
3154
|
* @property {string} [area_code] - Area Code
|
|
3145
3155
|
* @property {string} [area_code_slug]
|
|
3146
3156
|
* @property {string} [country_phone_code]
|
|
@@ -3153,40 +3163,39 @@ const Joi = require("joi");
|
|
|
3153
3163
|
|
|
3154
3164
|
/**
|
|
3155
3165
|
* @typedef ShippingDetailsSchema
|
|
3156
|
-
* @property {string} [first_name] - First
|
|
3166
|
+
* @property {string} [first_name] - First name of the customer
|
|
3157
3167
|
* @property {string} [phone_code] - Country phone code ex: +91
|
|
3158
|
-
* @property {string} [country] - Country of the
|
|
3159
|
-
* @property {string} [city] - City of the
|
|
3160
|
-
* @property {string} [pincode] - Pincode of the
|
|
3161
|
-
* @property {string} [last_name] - Last
|
|
3162
|
-
* @property {string} [mobile_number] - Primary
|
|
3163
|
-
* @property {string} [email] - Primary
|
|
3164
|
-
* @property {string} [state] - State of the
|
|
3165
|
-
* @property {string} [alternate_mobile_number] - Alternate
|
|
3166
|
-
* @property {string} [address] -
|
|
3167
|
-
* @property {string} [middle_name] -
|
|
3168
|
-
* @property {string} [title] -
|
|
3169
|
-
* @property {string} [house_no] -
|
|
3170
|
-
* number of the customer.
|
|
3168
|
+
* @property {string} [country] - Country of the customer
|
|
3169
|
+
* @property {string} [city] - City of the customer
|
|
3170
|
+
* @property {string} [pincode] - Pincode of the customer
|
|
3171
|
+
* @property {string} [last_name] - Last name of the customer
|
|
3172
|
+
* @property {string} [mobile_number] - Primary phone number of the customer
|
|
3173
|
+
* @property {string} [email] - Primary email of the customer
|
|
3174
|
+
* @property {string} [state] - State of the customer
|
|
3175
|
+
* @property {string} [alternate_mobile_number] - Alternate mobile number
|
|
3176
|
+
* @property {string} [address] - Shipping address of the customer
|
|
3177
|
+
* @property {string} [middle_name] - Customer's middle name.
|
|
3178
|
+
* @property {string} [title] - Customer's title or prefix.
|
|
3179
|
+
* @property {string} [house_no] - House or apartment number of the customer.
|
|
3171
3180
|
* @property {GeoLocationSchema} [geo_location]
|
|
3172
|
-
* @property {string} [gender] - Gender of
|
|
3173
|
-
* @property {string} [landmark] -
|
|
3174
|
-
*
|
|
3181
|
+
* @property {string} [gender] - Gender of customer
|
|
3182
|
+
* @property {string} [landmark] - Landmark or reference point near the
|
|
3183
|
+
* customer's location.
|
|
3175
3184
|
* @property {string} [address_type] - A string representing the address type in
|
|
3176
3185
|
* the seller's system.
|
|
3177
|
-
* @property {string} [state_code] -
|
|
3178
|
-
*
|
|
3179
|
-
* @property {string} [floor_no] - A string representing the floor number of the
|
|
3180
|
-
* customer's location.
|
|
3186
|
+
* @property {string} [state_code] - State code of the customer's location.
|
|
3187
|
+
* @property {string} [floor_no] - Floor number of the customer's location.
|
|
3181
3188
|
* @property {string} [alternate_email] - Alternate Email Address
|
|
3182
|
-
* @property {string} [address1] -
|
|
3183
|
-
* @property {string} [address2] -
|
|
3189
|
+
* @property {string} [address1] - First line of the address
|
|
3190
|
+
* @property {string} [address2] - Second line of the address
|
|
3184
3191
|
* @property {string} [country_iso_code] - Specifies the country's unique
|
|
3185
|
-
* identifier
|
|
3192
|
+
* identifier allowing the ISO 3166-1 alpha-2 standard. This two-letter code
|
|
3186
3193
|
* is crucial for distinguishing countries in international transactions, data
|
|
3187
3194
|
* processing, and shipping logistics.
|
|
3188
|
-
* @property {string} [user_id] - The unique identifier assigned to the
|
|
3189
|
-
*
|
|
3195
|
+
* @property {string} [user_id] - The unique identifier assigned to the
|
|
3196
|
+
* customer. Refer <a
|
|
3197
|
+
* href='/commerce/sdk/latest/platform/application/user#customer'>Customer</a>
|
|
3198
|
+
* in platform documentation to get more details. details.
|
|
3190
3199
|
* @property {string} [area_code] - Area Code
|
|
3191
3200
|
* @property {string} [area_code_slug]
|
|
3192
3201
|
* @property {string} [country_phone_code]
|
|
@@ -3194,9 +3203,9 @@ const Joi = require("joi");
|
|
|
3194
3203
|
|
|
3195
3204
|
/**
|
|
3196
3205
|
* @typedef UserDetailsSchema
|
|
3197
|
-
* @property {string} [gstin] - The
|
|
3206
|
+
* @property {string} [gstin] - The customer's GSTIN (Goods and Services Tax
|
|
3198
3207
|
* Identification Number).
|
|
3199
|
-
* @property {string} [pan_no] - The
|
|
3208
|
+
* @property {string} [pan_no] - The customer's PAN (Permanent Account Number).
|
|
3200
3209
|
*/
|
|
3201
3210
|
|
|
3202
3211
|
/**
|
|
@@ -3207,8 +3216,8 @@ const Joi = require("joi");
|
|
|
3207
3216
|
* message bar.
|
|
3208
3217
|
* @property {string[]} states - List of OMS states at which the message should
|
|
3209
3218
|
* be visible.
|
|
3210
|
-
* @property {number} priority - Determines the message display sequence, with
|
|
3211
|
-
* being the highest priority.
|
|
3219
|
+
* @property {number} priority - Determines the message display sequence, with
|
|
3220
|
+
* '1' being the highest priority.
|
|
3212
3221
|
*/
|
|
3213
3222
|
|
|
3214
3223
|
/**
|
|
@@ -3235,7 +3244,7 @@ const Joi = require("joi");
|
|
|
3235
3244
|
* order by an external system or service.
|
|
3236
3245
|
* @property {UserDetailsSchema} [user_details]
|
|
3237
3246
|
* @property {LifecycleMessageSchema[]} [order_lifecycle_messages] - List of
|
|
3238
|
-
* order lifecycle messages to be displayed to the
|
|
3247
|
+
* order lifecycle messages to be displayed to the seller at Order Details.
|
|
3239
3248
|
* @property {string} [channel_application_id] - Identifies the application from
|
|
3240
3249
|
* which the order was created. Pass this when it differs from the fulfilling
|
|
3241
3250
|
* company's application.
|
|
@@ -3245,6 +3254,9 @@ const Joi = require("joi");
|
|
|
3245
3254
|
* placed. Required when the order is placed from one company but fulfilled by another.
|
|
3246
3255
|
* @property {boolean} [is_draft] - Indicates whether the order is a draft.
|
|
3247
3256
|
* Draft orders will be moved to upcoming state instead of placed status.
|
|
3257
|
+
* @property {Object} [meta] - Metadata related to the order may include
|
|
3258
|
+
* additional, dynamic information that provides further context about the
|
|
3259
|
+
* order. This information can also be viewed on the Order or Shipment Details page.
|
|
3248
3260
|
*/
|
|
3249
3261
|
|
|
3250
3262
|
/**
|
|
@@ -8604,9 +8616,9 @@ class OrderPlatformModel {
|
|
|
8604
8616
|
return Joi.object({
|
|
8605
8617
|
height: Joi.number().required(),
|
|
8606
8618
|
length: Joi.number().required(),
|
|
8619
|
+
width: Joi.number().required(),
|
|
8607
8620
|
is_default: Joi.boolean().required(),
|
|
8608
8621
|
unit: Joi.string().allow("").required(),
|
|
8609
|
-
width: Joi.number().required(),
|
|
8610
8622
|
});
|
|
8611
8623
|
}
|
|
8612
8624
|
|
|
@@ -8923,6 +8935,7 @@ class OrderPlatformModel {
|
|
|
8923
8935
|
b2b_gstin_number: Joi.string().allow(""),
|
|
8924
8936
|
channel_company_id: Joi.string().allow(""),
|
|
8925
8937
|
is_draft: Joi.boolean(),
|
|
8938
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
8926
8939
|
});
|
|
8927
8940
|
}
|
|
8928
8941
|
|
|
@@ -39,8 +39,14 @@ export = OrderPlatformValidator;
|
|
|
39
39
|
* @typedef CreateOrderParam
|
|
40
40
|
* @property {string} xOrderingSource - To uniquely identify the source through
|
|
41
41
|
* which order has been placed.
|
|
42
|
-
* @property {string} [xApplicationId] - Application
|
|
43
|
-
*
|
|
42
|
+
* @property {string} [xApplicationId] - The Application ID is a unique
|
|
43
|
+
* identifier assigned to a storefront that typically follows a 24-character
|
|
44
|
+
* hexadecimal string. Either `x-application-id` or `x-extension-id` header is
|
|
45
|
+
* mandatory. At least one of them must be provided.
|
|
46
|
+
* @property {string} [xExtensionId] - The Extension ID is a unique identifier
|
|
47
|
+
* assigned to an extension that typically follows a 24-character hexadecimal
|
|
48
|
+
* string. Either `x-application-id` or `x-extension-id` header is mandatory.
|
|
49
|
+
* At least one of them must be provided.
|
|
44
50
|
* @property {OrderPlatformModel.CreateOrderRequestSchema} body
|
|
45
51
|
*/
|
|
46
52
|
/**
|
|
@@ -700,11 +706,17 @@ type CreateOrderParam = {
|
|
|
700
706
|
*/
|
|
701
707
|
xOrderingSource: string;
|
|
702
708
|
/**
|
|
703
|
-
* - Application
|
|
709
|
+
* - The Application ID is a unique
|
|
710
|
+
* identifier assigned to a storefront that typically follows a 24-character
|
|
711
|
+
* hexadecimal string. Either `x-application-id` or `x-extension-id` header is
|
|
712
|
+
* mandatory. At least one of them must be provided.
|
|
704
713
|
*/
|
|
705
714
|
xApplicationId?: string;
|
|
706
715
|
/**
|
|
707
|
-
* - Extension
|
|
716
|
+
* - The Extension ID is a unique identifier
|
|
717
|
+
* assigned to an extension that typically follows a 24-character hexadecimal
|
|
718
|
+
* string. Either `x-application-id` or `x-extension-id` header is mandatory.
|
|
719
|
+
* At least one of them must be provided.
|
|
708
720
|
*/
|
|
709
721
|
xExtensionId?: string;
|
|
710
722
|
body: OrderPlatformModel.CreateOrderRequestSchema;
|
|
@@ -49,8 +49,14 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
49
49
|
* @typedef CreateOrderParam
|
|
50
50
|
* @property {string} xOrderingSource - To uniquely identify the source through
|
|
51
51
|
* which order has been placed.
|
|
52
|
-
* @property {string} [xApplicationId] - Application
|
|
53
|
-
*
|
|
52
|
+
* @property {string} [xApplicationId] - The Application ID is a unique
|
|
53
|
+
* identifier assigned to a storefront that typically follows a 24-character
|
|
54
|
+
* hexadecimal string. Either `x-application-id` or `x-extension-id` header is
|
|
55
|
+
* mandatory. At least one of them must be provided.
|
|
56
|
+
* @property {string} [xExtensionId] - The Extension ID is a unique identifier
|
|
57
|
+
* assigned to an extension that typically follows a 24-character hexadecimal
|
|
58
|
+
* string. Either `x-application-id` or `x-extension-id` header is mandatory.
|
|
59
|
+
* At least one of them must be provided.
|
|
54
60
|
* @property {OrderPlatformModel.CreateOrderRequestSchema} body
|
|
55
61
|
*/
|
|
56
62
|
|
|
@@ -82,6 +82,20 @@ declare class Serviceability {
|
|
|
82
82
|
* @description: Create the job for exporting the regions in Geoarea in CSV format. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createGeoAreaExportJob/).
|
|
83
83
|
*/
|
|
84
84
|
createGeoAreaExportJob({ geoareaId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateGeoAreaExportJobParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.GeoAreaBulkCreationResult>;
|
|
85
|
+
/**
|
|
86
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateShipmentsParam} arg
|
|
87
|
+
* - Arg object
|
|
88
|
+
*
|
|
89
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
90
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
91
|
+
* @returns {Promise<ServiceabilityPlatformModel.PlatformShipmentsResponseSchema>}
|
|
92
|
+
* - Success response
|
|
93
|
+
*
|
|
94
|
+
* @name createShipments
|
|
95
|
+
* @summary: Create and return shipments
|
|
96
|
+
* @description: Create and return shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createShipments/).
|
|
97
|
+
*/
|
|
98
|
+
createShipments({ body, xOrderingSource, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateShipmentsParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.PlatformShipmentsResponseSchema>;
|
|
85
99
|
/**
|
|
86
100
|
* @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg
|
|
87
101
|
* - Arg object
|
|
@@ -508,6 +508,91 @@ class Serviceability {
|
|
|
508
508
|
return response;
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
/**
|
|
512
|
+
* @param {ServiceabilityPlatformApplicationValidator.CreateShipmentsParam} arg
|
|
513
|
+
* - Arg object
|
|
514
|
+
*
|
|
515
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
516
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
517
|
+
* @returns {Promise<ServiceabilityPlatformModel.PlatformShipmentsResponseSchema>}
|
|
518
|
+
* - Success response
|
|
519
|
+
*
|
|
520
|
+
* @name createShipments
|
|
521
|
+
* @summary: Create and return shipments
|
|
522
|
+
* @description: Create and return shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createShipments/).
|
|
523
|
+
*/
|
|
524
|
+
async createShipments(
|
|
525
|
+
{ body, xOrderingSource, requestHeaders } = { requestHeaders: {} },
|
|
526
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
527
|
+
) {
|
|
528
|
+
const {
|
|
529
|
+
error,
|
|
530
|
+
} = ServiceabilityPlatformApplicationValidator.createShipments().validate(
|
|
531
|
+
{
|
|
532
|
+
body,
|
|
533
|
+
xOrderingSource,
|
|
534
|
+
},
|
|
535
|
+
{ abortEarly: false, allowUnknown: true }
|
|
536
|
+
);
|
|
537
|
+
if (error) {
|
|
538
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// Showing warrnings if extra unknown parameters are found
|
|
542
|
+
const {
|
|
543
|
+
error: warrning,
|
|
544
|
+
} = ServiceabilityPlatformApplicationValidator.createShipments().validate(
|
|
545
|
+
{
|
|
546
|
+
body,
|
|
547
|
+
xOrderingSource,
|
|
548
|
+
},
|
|
549
|
+
{ abortEarly: false, allowUnknown: false }
|
|
550
|
+
);
|
|
551
|
+
if (warrning) {
|
|
552
|
+
Logger({
|
|
553
|
+
level: "WARN",
|
|
554
|
+
message: `Parameter Validation warrnings for platform > Serviceability > createShipments \n ${warrning}`,
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
const query_params = {};
|
|
559
|
+
|
|
560
|
+
const response = await PlatformAPIClient.execute(
|
|
561
|
+
this.config,
|
|
562
|
+
"post",
|
|
563
|
+
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments`,
|
|
564
|
+
query_params,
|
|
565
|
+
body,
|
|
566
|
+
requestHeaders,
|
|
567
|
+
{ responseHeaders }
|
|
568
|
+
);
|
|
569
|
+
|
|
570
|
+
let responseData = response;
|
|
571
|
+
if (responseHeaders) {
|
|
572
|
+
responseData = response[0];
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
const {
|
|
576
|
+
error: res_error,
|
|
577
|
+
} = ServiceabilityPlatformModel.PlatformShipmentsResponseSchema().validate(
|
|
578
|
+
responseData,
|
|
579
|
+
{ abortEarly: false, allowUnknown: true }
|
|
580
|
+
);
|
|
581
|
+
|
|
582
|
+
if (res_error) {
|
|
583
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
584
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
585
|
+
} else {
|
|
586
|
+
Logger({
|
|
587
|
+
level: "WARN",
|
|
588
|
+
message: `Response Validation Warnings for platform > Serviceability > createShipments \n ${res_error}`,
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
return response;
|
|
594
|
+
}
|
|
595
|
+
|
|
511
596
|
/**
|
|
512
597
|
* @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg
|
|
513
598
|
* - Arg object
|