@gofynd/fdk-client-javascript 1.1.3 → 1.1.5

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 (51) hide show
  1. package/README.md +1 -0
  2. package/index.d.ts +4 -1
  3. package/index.js +7 -0
  4. package/package.json +1 -1
  5. package/partner.d.ts +4 -0
  6. package/partner.js +7 -0
  7. package/sdk/application/Common/CommonApplicationModel.js +4 -0
  8. package/sdk/application/Configuration/ConfigurationApplicationModel.js +5 -5
  9. package/sdk/application/Lead/LeadApplicationModel.js +4 -1
  10. package/sdk/partner/OAuthClient.d.ts +14 -0
  11. package/sdk/partner/OAuthClient.js +112 -0
  12. package/sdk/partner/PartnerAPIClient.d.ts +12 -0
  13. package/sdk/partner/PartnerAPIClient.js +42 -0
  14. package/sdk/partner/PartnerClient.d.ts +6 -0
  15. package/sdk/partner/PartnerClient.js +17 -0
  16. package/sdk/partner/PartnerConfig.d.ts +30 -0
  17. package/sdk/partner/PartnerConfig.js +39 -0
  18. package/sdk/partner/index.d.ts +3 -0
  19. package/sdk/partner/index.js +5 -0
  20. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +32 -0
  21. package/sdk/platform/Cart/CartPlatformApplicationClient.js +184 -0
  22. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
  23. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +19 -0
  24. package/sdk/platform/Cart/CartPlatformModel.d.ts +6 -0
  25. package/sdk/platform/Cart/CartPlatformModel.js +72 -1
  26. package/sdk/platform/Catalog/CatalogPlatformModel.js +2 -2
  27. package/sdk/platform/Common/CommonPlatformModel.js +4 -0
  28. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +8 -7
  29. package/sdk/platform/Order/OrderPlatformClient.d.ts +3 -1
  30. package/sdk/platform/Order/OrderPlatformClient.js +5 -0
  31. package/sdk/platform/Order/OrderPlatformModel.js +1 -1
  32. package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
  33. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +4 -0
  34. package/sdk/platform/Payment/PaymentPlatformModel.js +42 -7
  35. package/sdk/platform/PlatformApplicationClient.d.ts +103 -2
  36. package/sdk/platform/PlatformApplicationClient.js +109 -0
  37. package/sdk/platform/PlatformClient.d.ts +642 -36
  38. package/sdk/platform/PlatformClient.js +773 -18
  39. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +134 -0
  40. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +852 -0
  41. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +16 -0
  42. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +81 -0
  43. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +223 -0
  44. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1296 -0
  45. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +97 -0
  46. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +776 -0
  47. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +21 -0
  48. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +130 -0
  49. package/sdk/platform/index.d.ts +1 -0
  50. package/sdk/platform/index.js +2 -0
  51. package/sdk/public/Configuration/ConfigurationPublicModel.js +5 -0
@@ -0,0 +1,21 @@
1
+ export = ServiceabilityValidator;
2
+ declare class ServiceabilityValidator {
3
+ static createZone(): any;
4
+ static getAllStores(): any;
5
+ static getCompanyStoreView(): any;
6
+ static getDpAccount(): any;
7
+ static getDpCompanyRules(): any;
8
+ static getDpRuleInsert(): any;
9
+ static getDpRules(): any;
10
+ static getEntityRegionView(): any;
11
+ static getListView(): any;
12
+ static getOptimalLocations(): any;
13
+ static getStore(): any;
14
+ static getZoneDataView(): any;
15
+ static getZoneListView(): any;
16
+ static updateDpRule(): any;
17
+ static updateZoneControllerView(): any;
18
+ static upsertDpAccount(): any;
19
+ static upsertDpCompanyRules(): any;
20
+ static upsertDpRules(): any;
21
+ }
@@ -0,0 +1,130 @@
1
+ const Joi = require("joi");
2
+
3
+ const ServiceabilityModel = require("./ServiceabilityPlatformModel");
4
+ class ServiceabilityValidator {
5
+ static createZone() {
6
+ return Joi.object({
7
+ body: ServiceabilityModel.ZoneRequest().required(),
8
+ }).required();
9
+ }
10
+
11
+ static getAllStores() {
12
+ return Joi.object({}).required();
13
+ }
14
+
15
+ static getCompanyStoreView() {
16
+ return Joi.object({
17
+ pageNumber: Joi.number(),
18
+ pageSize: Joi.number(),
19
+ }).required();
20
+ }
21
+
22
+ static getDpAccount() {
23
+ return Joi.object({
24
+ pageNumber: Joi.number(),
25
+ pageSize: Joi.number(),
26
+ stage: Joi.string().allow(""),
27
+ paymentMode: Joi.string().allow(""),
28
+ transportType: Joi.string().allow(""),
29
+ }).required();
30
+ }
31
+
32
+ static getDpCompanyRules() {
33
+ return Joi.object({}).required();
34
+ }
35
+
36
+ static getDpRuleInsert() {
37
+ return Joi.object({
38
+ pageNumber: Joi.number(),
39
+ pageSize: Joi.number(),
40
+ }).required();
41
+ }
42
+
43
+ static getDpRules() {
44
+ return Joi.object({
45
+ ruleUid: Joi.string().allow("").required(),
46
+ }).required();
47
+ }
48
+
49
+ static getEntityRegionView() {
50
+ return Joi.object({
51
+ body: ServiceabilityModel.EntityRegionView_Request().required(),
52
+ }).required();
53
+ }
54
+
55
+ static getListView() {
56
+ return Joi.object({
57
+ pageNumber: Joi.number(),
58
+ pageSize: Joi.number(),
59
+ name: Joi.string().allow(""),
60
+ isActive: Joi.boolean(),
61
+ channelIds: Joi.string().allow(""),
62
+ q: Joi.string().allow(""),
63
+ }).required();
64
+ }
65
+
66
+ static getOptimalLocations() {
67
+ return Joi.object({
68
+ body: ServiceabilityModel.ReAssignStoreRequest().required(),
69
+ }).required();
70
+ }
71
+
72
+ static getStore() {
73
+ return Joi.object({
74
+ storeUid: Joi.number().required(),
75
+ }).required();
76
+ }
77
+
78
+ static getZoneDataView() {
79
+ return Joi.object({
80
+ zoneId: Joi.string().allow("").required(),
81
+ }).required();
82
+ }
83
+
84
+ static getZoneListView() {
85
+ return Joi.object({
86
+ pageNumber: Joi.number(),
87
+ pageNo: Joi.number(),
88
+ pageSize: Joi.number(),
89
+ name: Joi.string().allow(""),
90
+ isActive: Joi.boolean(),
91
+ channelIds: Joi.string().allow(""),
92
+ q: Joi.string().allow(""),
93
+ zoneId: Joi.array().items(Joi.string().allow("")),
94
+ }).required();
95
+ }
96
+
97
+ static updateDpRule() {
98
+ return Joi.object({
99
+ ruleUid: Joi.string().allow("").required(),
100
+ body: ServiceabilityModel.DpRulesUpdateRequest().required(),
101
+ }).required();
102
+ }
103
+
104
+ static updateZoneControllerView() {
105
+ return Joi.object({
106
+ zoneId: Joi.string().allow("").required(),
107
+ body: ServiceabilityModel.ZoneUpdateRequest().required(),
108
+ }).required();
109
+ }
110
+
111
+ static upsertDpAccount() {
112
+ return Joi.object({
113
+ body: ServiceabilityModel.CompanyDpAccountRequest().required(),
114
+ }).required();
115
+ }
116
+
117
+ static upsertDpCompanyRules() {
118
+ return Joi.object({
119
+ body: ServiceabilityModel.DPCompanyRuleRequest().required(),
120
+ }).required();
121
+ }
122
+
123
+ static upsertDpRules() {
124
+ return Joi.object({
125
+ body: ServiceabilityModel.DpRuleRequest().required(),
126
+ }).required();
127
+ }
128
+ }
129
+
130
+ module.exports = ServiceabilityValidator;
@@ -19,6 +19,7 @@ export namespace PlatformModel {
19
19
  const PartnerPlatformModel: typeof import("./Partner/PartnerPlatformModel");
20
20
  const PaymentPlatformModel: typeof import("./Payment/PaymentPlatformModel");
21
21
  const RewardsPlatformModel: typeof import("./Rewards/RewardsPlatformModel");
22
+ const ServiceabilityPlatformModel: typeof import("./Serviceability/ServiceabilityPlatformModel");
22
23
  const SharePlatformModel: typeof import("./Share/SharePlatformModel");
23
24
  const ThemePlatformModel: typeof import("./Theme/ThemePlatformModel");
24
25
  const UserPlatformModel: typeof import("./User/UserPlatformModel");
@@ -38,6 +38,8 @@ module.exports = {
38
38
 
39
39
  RewardsPlatformModel: require("./Rewards/RewardsPlatformModel"),
40
40
 
41
+ ServiceabilityPlatformModel: require("./Serviceability/ServiceabilityPlatformModel"),
42
+
41
43
  SharePlatformModel: require("./Share/SharePlatformModel"),
42
44
 
43
45
  ThemePlatformModel: require("./Theme/ThemePlatformModel"),
@@ -27,6 +27,7 @@ class ConfigurationModel {
27
27
  redirections: Joi.array().items(
28
28
  ConfigurationModel.ApplicationRedirections()
29
29
  ),
30
+ slug: Joi.string().allow(""),
30
31
  token: Joi.string().allow(""),
31
32
  updated_at: Joi.string().allow(""),
32
33
  website: ConfigurationModel.ApplicationWebsite(),
@@ -98,14 +99,18 @@ class ConfigurationModel {
98
99
  __v: Joi.number(),
99
100
  _id: Joi.string().allow(""),
100
101
  capital: Joi.string().allow(""),
102
+ country_code: Joi.string().allow(""),
101
103
  currency: Joi.string().allow(""),
102
104
  default_currency: ConfigurationModel.LocationDefaultCurrency(),
103
105
  default_language: ConfigurationModel.LocationDefaultLanguage(),
104
106
  iso2: Joi.string().allow(""),
105
107
  iso3: Joi.string().allow(""),
108
+ latitude: Joi.string().allow(""),
109
+ longitude: Joi.string().allow(""),
106
110
  name: Joi.string().allow(""),
107
111
  parent: Joi.string().allow(""),
108
112
  phone_code: Joi.string().allow(""),
113
+ state_code: Joi.string().allow(""),
109
114
  type: Joi.string().allow(""),
110
115
  uid: Joi.number(),
111
116
  });