@gofynd/fdk-client-javascript 0.1.36 → 0.1.37

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.
Files changed (36) hide show
  1. package/documentation/application/CART.md +291 -285
  2. package/documentation/application/CATALOG.md +411 -411
  3. package/documentation/application/LOGISTIC.md +423 -101
  4. package/documentation/application/ORDER.md +287 -287
  5. package/documentation/application/POSCART.md +319 -313
  6. package/documentation/application/README.md +1 -1
  7. package/documentation/platform/AUDITTRAIL.md +2 -2
  8. package/documentation/platform/CART.md +488 -488
  9. package/documentation/platform/CATALOG.md +1656 -1439
  10. package/documentation/platform/COMPANYPROFILE.md +250 -229
  11. package/documentation/platform/ORDER.md +1183 -1183
  12. package/package.json +2 -2
  13. package/sdk/application/ApplicationAPIClient.js +3 -0
  14. package/sdk/application/ApplicationClient.d.ts +1 -0
  15. package/sdk/application/ApplicationClient.js +11 -1
  16. package/sdk/application/ApplicationConfig.d.ts +1 -0
  17. package/sdk/application/ApplicationConfig.js +1 -0
  18. package/sdk/application/ApplicationModels.d.ts +83 -78
  19. package/sdk/application/ApplicationModels.js +1445 -1354
  20. package/sdk/application/client/LogisticApplicationClient.d.ts +32 -21
  21. package/sdk/application/client/LogisticApplicationClient.js +62 -27
  22. package/sdk/application/models/LogisticValidator.d.ts +2 -1
  23. package/sdk/application/models/LogisticValidator.js +11 -6
  24. package/sdk/common/AxiosHelper.js +1 -1
  25. package/sdk/platform/PlatformApplicationClient.d.ts +5328 -5185
  26. package/sdk/platform/PlatformApplicationClient.js +2877 -2795
  27. package/sdk/platform/PlatformApplicationModels.d.ts +5 -5
  28. package/sdk/platform/PlatformApplicationModels.js +3707 -3571
  29. package/sdk/platform/PlatformClient.d.ts +2577 -2509
  30. package/sdk/platform/PlatformClient.js +2770 -2688
  31. package/sdk/platform/PlatformModels.d.ts +146 -139
  32. package/sdk/platform/PlatformModels.js +3718 -3582
  33. package/sdk/platform/client/CatalogPlatformClient.d.ts +21 -12
  34. package/sdk/platform/client/CatalogPlatformClient.js +48 -17
  35. package/sdk/platform/models/CatalogValidator.d.ts +2 -1
  36. package/sdk/platform/models/CatalogValidator.js +11 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "axios": "^0.21.1",
23
23
  "crypto-js": "^4.0.0",
24
- "joi": "^17.4.0",
24
+ "joi": "17.4.0",
25
25
  "query-string": "^6.14.1",
26
26
  "loglevel": "^1.8.0",
27
27
  "camelcase": "^6.2.0"
@@ -25,6 +25,9 @@ class APIClient {
25
25
  "x-location-detail": JSON.stringify(conf.locationDetails),
26
26
  };
27
27
  }
28
+ if (conf.currencyCode) {
29
+ headers = { ...headers, "x-currency-code": conf.currencyCode };
30
+ }
28
31
  const extraHeaders = conf.extraHeaders.reduce((acc, curr) => {
29
32
  acc = { ...acc, ...curr };
30
33
  return acc;
@@ -20,6 +20,7 @@ declare class ApplicationClient {
20
20
  logistic: Logistic;
21
21
  setCookie(cookie: any): void;
22
22
  setLocationDetails(locationDetails: any): void;
23
+ setCurrencyCode(currencyCode: any): void;
23
24
  setExtraHeaders(header: any): void;
24
25
  }
25
26
  import Catalog = require("./client/CatalogApplicationClient");
@@ -69,7 +69,17 @@ class ApplicationClient {
69
69
  if (error) {
70
70
  throw new FDKClientValidationError(error);
71
71
  }
72
- this.config.locationDetails = locationDetails;
72
+ this.config.locationDetails = {
73
+ ...this.config.locationDetails,
74
+ ...locationDetails,
75
+ };
76
+ }
77
+
78
+ setCurrencyCode(currencyCode) {
79
+ if (typeof currencyCode !== "string") {
80
+ throw new FDKClientValidationError("Currency code should be string only");
81
+ }
82
+ this.config.currencyCode = currencyCode;
73
83
  }
74
84
 
75
85
  setExtraHeaders(header) {
@@ -12,6 +12,7 @@ declare class ApplicationConfig {
12
12
  logLevel: any;
13
13
  extraHeaders: any[];
14
14
  locationDetails: any;
15
+ currencyCode: any;
15
16
  setLogLevel(level: any): void;
16
17
  setCookie(cookie: any): void;
17
18
  cookie: any;
@@ -18,6 +18,7 @@ class ApplicationConfig {
18
18
  this.setLogLevel(this.logLevel);
19
19
  this.extraHeaders = [];
20
20
  this.locationDetails = _conf.locationDetails;
21
+ this.currencyCode = _conf.currencyCode || "INR";
21
22
  this.validate();
22
23
  }
23
24
 
@@ -2,22 +2,21 @@ export class LocationValidator {
2
2
  static validateLocationObj(): any;
3
3
  }
4
4
  export class Validator {
5
- static ApplicationItemSEO(): any;
6
- static NetQuantity(): any;
7
- static ProductDetailAttribute(): any;
8
- static ProductDetailGroupedAttribute(): any;
9
- static CustomMetaFields(): any;
10
- static Meta(): any;
11
- static Media(): any;
5
+ static Price(): any;
6
+ static ProductListingPrice(): any;
12
7
  static ProductListingActionPage(): any;
13
8
  static ProductListingAction(): any;
9
+ static Meta(): any;
10
+ static Media(): any;
14
11
  static ProductBrand(): any;
15
- static Price(): any;
16
- static ProductListingPrice(): any;
12
+ static ProductDetailAttribute(): any;
13
+ static ProductDetailGroupedAttribute(): any;
14
+ static CustomMetaFields(): any;
17
15
  static ApplicationItemMOQ(): any;
16
+ static ApplicationItemSEO(): any;
17
+ static NetQuantity(): any;
18
18
  static ProductDetail(): any;
19
19
  static ErrorResponse(): any;
20
- static ProductSizeStores(): any;
21
20
  static Dimension(): any;
22
21
  static Weight(): any;
23
22
  static ProductSize(): any;
@@ -25,6 +24,7 @@ export class Validator {
25
24
  static ColumnHeader(): any;
26
25
  static ColumnHeaders(): any;
27
26
  static SizeChart(): any;
27
+ static ProductSizeStores(): any;
28
28
  static ProductSizes(): any;
29
29
  static AttributeDetail(): any;
30
30
  static AttributeMetadata(): any;
@@ -34,15 +34,15 @@ export class Validator {
34
34
  static ProductVariantItemResponse(): any;
35
35
  static ProductVariantResponse(): any;
36
36
  static ProductVariantsResponse(): any;
37
+ static CompanyDetail(): any;
37
38
  static ProductStockPrice(): any;
38
39
  static StoreDetail(): any;
39
40
  static Seller(): any;
40
- static CompanyDetail(): any;
41
41
  static ProductStockStatusItem(): any;
42
42
  static ProductStockStatusResponse(): any;
43
43
  static ProductStockPolling(): any;
44
- static ProductFiltersKey(): any;
45
44
  static ProductFiltersValue(): any;
45
+ static ProductFiltersKey(): any;
46
46
  static ProductFilters(): any;
47
47
  static ProductVariantListingResponse(): any;
48
48
  static ProductListingDetail(): any;
@@ -53,10 +53,10 @@ export class Validator {
53
53
  static BrandListingResponse(): any;
54
54
  static BrandDetailResponse(): any;
55
55
  static DepartmentIdentifier(): any;
56
- static CategoryBanner(): any;
57
56
  static ThirdLevelChild(): any;
58
57
  static SecondLevelChild(): any;
59
58
  static Child(): any;
59
+ static CategoryBanner(): any;
60
60
  static CategoryItems(): any;
61
61
  static DepartmentCategoryTree(): any;
62
62
  static CategoryListingResponse(): any;
@@ -66,8 +66,8 @@ export class Validator {
66
66
  static DepartmentResponse(): any;
67
67
  static AutocompleteItem(): any;
68
68
  static AutoCompleteResponse(): any;
69
- static CollectionListingFilterTag(): any;
70
69
  static CollectionListingFilterType(): any;
70
+ static CollectionListingFilterTag(): any;
71
71
  static CollectionListingFilter(): any;
72
72
  static CollectionQuery(): any;
73
73
  static GetCollectionDetailNest(): any;
@@ -84,62 +84,62 @@ export class Validator {
84
84
  static StoreDepartments(): any;
85
85
  static SellerPhoneNumber(): any;
86
86
  static StoreManagerSerializer(): any;
87
- static StoreAddressSerializer(): any;
88
87
  static CompanyStore(): any;
88
+ static StoreAddressSerializer(): any;
89
89
  static AppStore(): any;
90
90
  static ApplicationStoreListing(): any;
91
91
  static Time(): any;
92
92
  static StoreTiming(): any;
93
93
  static StoreDetails(): any;
94
94
  static UserDetail(): any;
95
+ static Size(): any;
95
96
  static ProductGroupPrice(): any;
96
97
  static ProductDetails(): any;
97
- static Size(): any;
98
98
  static ProductInGroup(): any;
99
99
  static ProductGroupingModel(): any;
100
100
  static ProductBundle(): any;
101
- static StrategyWiseListingSchemaV2(): any;
102
- static ArticleAssignmentV2(): any;
101
+ static ProductStockPriceV2(): any;
103
102
  static DetailsSchemaV2(): any;
104
103
  static SellerGroupAttributes(): any;
105
- static ProductSetDistributionSizeV2(): any;
106
- static ProductSetDistributionV2(): any;
107
- static ProductSetV2(): any;
108
- static ReturnConfigSchemaV2(): any;
109
104
  static MarketPlaceSttributesSchemaV2(): any;
110
105
  static ProductStockUnitPriceV2(): any;
111
- static ProductStockPriceV2(): any;
112
- static SellerV2(): any;
106
+ static ReturnConfigSchemaV2(): any;
113
107
  static StoreV2(): any;
108
+ static SellerV2(): any;
109
+ static ProductSetDistributionSizeV2(): any;
110
+ static ProductSetDistributionV2(): any;
111
+ static ProductSetV2(): any;
112
+ static ArticleAssignmentV2(): any;
113
+ static StrategyWiseListingSchemaV2(): any;
114
114
  static ProductSizePriceResponseV2(): any;
115
115
  static ProductSizeSellerFilterSchemaV2(): any;
116
116
  static ProductSizeSellersResponseV2(): any;
117
- static DisplayBreakup(): any;
117
+ static CartCurrency(): any;
118
+ static PaymentSelectionLock(): any;
119
+ static PromiseTimestamp(): any;
120
+ static PromiseFormatted(): any;
121
+ static ShipmentPromise(): any;
118
122
  static CouponBreakup(): any;
119
- static RawBreakup(): any;
120
123
  static LoyaltyPoints(): any;
124
+ static DisplayBreakup(): any;
125
+ static RawBreakup(): any;
121
126
  static CartBreakup(): any;
122
- static PromiseFormatted(): any;
123
- static PromiseTimestamp(): any;
124
- static ShipmentPromise(): any;
125
- static CartCurrency(): any;
126
- static PaymentSelectionLock(): any;
127
127
  static BaseInfo(): any;
128
128
  static BasePrice(): any;
129
129
  static ArticlePriceInfo(): any;
130
130
  static ProductArticle(): any;
131
- static PromoMeta(): any;
132
- static CartProductIdentifer(): any;
133
- static ProductPrice(): any;
134
- static ProductPriceInfo(): any;
135
- static ProductAvailability(): any;
136
- static Ownership(): any;
137
- static AppliedPromotion(): any;
138
131
  static CategoryInfo(): any;
139
132
  static ProductImage(): any;
140
133
  static ActionQuery(): any;
141
134
  static ProductAction(): any;
142
135
  static CartProduct(): any;
136
+ static ProductPrice(): any;
137
+ static ProductPriceInfo(): any;
138
+ static Ownership(): any;
139
+ static AppliedPromotion(): any;
140
+ static ProductAvailability(): any;
141
+ static CartProductIdentifer(): any;
142
+ static PromoMeta(): any;
143
143
  static CartProductInfo(): any;
144
144
  static CartDetailResponse(): any;
145
145
  static AddProductCart(): any;
@@ -186,10 +186,10 @@ export class Validator {
186
186
  static PromotionOffer(): any;
187
187
  static PromotionOffersResponse(): any;
188
188
  static OperationErrorResponse(): any;
189
- static CurrencyInfo(): any;
190
189
  static LadderPrice(): any;
191
190
  static LadderOfferItem(): any;
192
191
  static LadderPriceOffer(): any;
192
+ static CurrencyInfo(): any;
193
193
  static LadderPriceOffers(): any;
194
194
  static ApplicationResponse(): any;
195
195
  static Currency(): any;
@@ -721,36 +721,36 @@ export class Validator {
721
721
  static CustomerOnboardingRequest(): any;
722
722
  static OnboardSummary(): any;
723
723
  static CustomerOnboardingResponse(): any;
724
- static BreakupValues(): any;
725
- static UserInfo(): any;
726
724
  static BagsForReorderArticleAssignment(): any;
727
725
  static BagsForReorder(): any;
728
- static FulfillingCompany(): any;
729
- static FulfillingStore(): any;
726
+ static BreakupValues(): any;
730
727
  static Invoice(): any;
731
- static DeliveryAddress(): any;
732
- static TimeStampData(): any;
733
- static Promise(): any;
734
728
  static ShipmentStatus(): any;
735
- static ShipmentTotalDetails(): any;
736
- static Prices(): any;
737
- static ShipmentUserInfo(): any;
729
+ static DeliveryAddress(): any;
730
+ static ShipmentPayment(): any;
738
731
  static NestedTrackingDetails(): any;
739
732
  static TrackingDetails(): any;
740
- static ShipmentPayment(): any;
733
+ static CurrentStatus(): any;
741
734
  static ItemBrand(): any;
742
735
  static Item(): any;
743
- static CurrentStatus(): any;
744
- static Identifiers(): any;
745
- static FinancialBreakup(): any;
746
736
  static AppliedFreeArticles(): any;
747
737
  static AppliedPromos(): any;
738
+ static Identifiers(): any;
739
+ static FinancialBreakup(): any;
740
+ static Prices(): any;
748
741
  static Bags(): any;
742
+ static ShipmentTotalDetails(): any;
743
+ static FulfillingStore(): any;
744
+ static ShipmentUserInfo(): any;
745
+ static TimeStampData(): any;
746
+ static Promise(): any;
747
+ static FulfillingCompany(): any;
749
748
  static Shipments(): any;
749
+ static UserInfo(): any;
750
750
  static OrderSchema(): any;
751
+ static OrderPage(): any;
751
752
  static OrderStatuses(): any;
752
753
  static OrderFilters(): any;
753
- static OrderPage(): any;
754
754
  static OrderList(): any;
755
755
  static ApefaceApiError(): any;
756
756
  static OrderById(): any;
@@ -768,17 +768,17 @@ export class Validator {
768
768
  static ShipmentBagReasons(): any;
769
769
  static ShipmentReason(): any;
770
770
  static ShipmentReasons(): any;
771
- static Products(): any;
772
- static ProductsDataUpdatesFilters(): any;
773
- static ProductsDataUpdates(): any;
774
- static EntitiesDataUpdates(): any;
775
- static DataUpdates(): any;
776
- static ProductsReasonsFilters(): any;
777
771
  static ProductsReasonsData(): any;
772
+ static ProductsReasonsFilters(): any;
778
773
  static ProductsReasons(): any;
779
774
  static EntityReasonData(): any;
780
775
  static EntitiesReasons(): any;
781
776
  static ReasonsData(): any;
777
+ static Products(): any;
778
+ static ProductsDataUpdatesFilters(): any;
779
+ static ProductsDataUpdates(): any;
780
+ static EntitiesDataUpdates(): any;
781
+ static DataUpdates(): any;
782
782
  static ShipmentsRequest(): any;
783
783
  static StatuesRequest(): any;
784
784
  static UpdateShipmentStatusRequest(): any;
@@ -809,22 +809,27 @@ export class Validator {
809
809
  static CartDeliveryModesResponse(): any;
810
810
  static PickupStoreDetail(): any;
811
811
  static StoreDetailsResponse(): any;
812
- static GetPincodeCityResponse(): any;
813
- static LogisticPincodeData(): any;
814
- static LogisticMeta(): any;
815
- static LogisticParents(): any;
816
- static LogisticError(): any;
817
- static GetPincodeZonesReqBody(): any;
818
- static GetPincodeZonesResponse(): any;
819
- static GetTatProductReqBody(): any;
820
- static LocationDetailsReq(): any;
821
- static TatReqProductArticles(): any;
822
- static LogisticRequestCategory(): any;
823
- static GetTatProductResponse(): any;
824
- static LocationDetails(): any;
825
- static TatProductArticles(): any;
826
- static LogisticResponseCategory(): any;
827
- static LogisticPromise(): any;
828
- static LogisticTimestamp(): any;
829
- static Formatted(): any;
812
+ static PincodeErrorSchemaResponse(): any;
813
+ static PincodeParentsResponse(): any;
814
+ static CountryMetaResponse(): any;
815
+ static PincodeMetaResponse(): any;
816
+ static PincodeDataResponse(): any;
817
+ static PincodeApiResponse(): any;
818
+ static TATCategoryRequest(): any;
819
+ static TATArticlesRequest(): any;
820
+ static TATLocationDetailsRequest(): any;
821
+ static TATViewRequest(): any;
822
+ static TATErrorSchemaResponse(): any;
823
+ static TATFormattedResponse(): any;
824
+ static TATTimestampResponse(): any;
825
+ static TATPromiseResponse(): any;
826
+ static TATArticlesResponse(): any;
827
+ static TATLocationDetailsResponse(): any;
828
+ static TATViewResponse(): any;
829
+ static DP(): any;
830
+ static LogisticsResponse(): any;
831
+ static CountryEntityResponse(): any;
832
+ static CountryListResponse(): any;
833
+ static GetZoneFromPincodeViewRequest(): any;
834
+ static GetZoneFromPincodeViewResponse(): any;
830
835
  }