@gofynd/fdk-client-javascript 0.1.35 → 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 (118) hide show
  1. package/README.md +1 -1
  2. package/documentation/application/CART.md +272 -249
  3. package/documentation/application/CATALOG.md +417 -413
  4. package/documentation/application/COMMON.md +4 -0
  5. package/documentation/application/COMMUNICATION.md +4 -0
  6. package/documentation/application/CONFIGURATION.md +4 -0
  7. package/documentation/application/CONTENT.md +7 -20
  8. package/documentation/application/FILESTORAGE.md +85 -0
  9. package/documentation/application/LEAD.md +6 -2
  10. package/documentation/application/LOGISTIC.md +427 -101
  11. package/documentation/application/ORDER.md +292 -288
  12. package/documentation/application/PAYMENT.md +445 -259
  13. package/documentation/application/POSCART.md +309 -286
  14. package/documentation/application/README.md +1 -1
  15. package/documentation/application/REWARDS.md +153 -160
  16. package/documentation/application/SHARE.md +4 -0
  17. package/documentation/application/THEME.md +4 -0
  18. package/documentation/application/USER.md +4 -0
  19. package/documentation/platform/ANALYTICS.md +4 -0
  20. package/documentation/platform/AUDITTRAIL.md +6 -2
  21. package/documentation/platform/BILLING.md +4 -0
  22. package/documentation/platform/CART.md +476 -459
  23. package/documentation/platform/CATALOG.md +4138 -2968
  24. package/documentation/platform/COMMON.md +4 -0
  25. package/documentation/platform/COMMUNICATION.md +4 -0
  26. package/documentation/platform/COMPANYPROFILE.md +258 -206
  27. package/documentation/platform/CONFIGURATION.md +4 -0
  28. package/documentation/platform/CONTENT.md +8 -21
  29. package/documentation/platform/DISCOUNT.md +4 -0
  30. package/documentation/platform/FILESTORAGE.md +85 -0
  31. package/documentation/platform/INVENTORY.md +4 -0
  32. package/documentation/platform/LEAD.md +6 -2
  33. package/documentation/platform/ORDER.md +6298 -1448
  34. package/documentation/platform/PARTNER.md +12 -8
  35. package/documentation/platform/PAYMENT.md +107 -103
  36. package/documentation/platform/README.md +2 -2
  37. package/documentation/platform/REWARDS.md +219 -152
  38. package/documentation/platform/SHARE.md +4 -0
  39. package/documentation/platform/THEME.md +4 -0
  40. package/documentation/platform/USER.md +4 -0
  41. package/documentation/platform/WEBHOOK.md +4 -0
  42. package/documentation/public/CONFIGURATION.md +4 -0
  43. package/documentation/public/INVENTORY.md +4 -0
  44. package/documentation/public/WEBHOOK.md +4 -0
  45. package/package.json +2 -2
  46. package/sdk/application/ApplicationAPIClient.js +3 -0
  47. package/sdk/application/ApplicationClient.d.ts +1 -0
  48. package/sdk/application/ApplicationClient.js +11 -1
  49. package/sdk/application/ApplicationConfig.d.ts +1 -0
  50. package/sdk/application/ApplicationConfig.js +1 -0
  51. package/sdk/application/ApplicationModels.d.ts +94 -85
  52. package/sdk/application/ApplicationModels.js +1909 -1792
  53. package/sdk/application/client/CartApplicationClient.d.ts +36 -36
  54. package/sdk/application/client/CatalogApplicationClient.d.ts +39 -39
  55. package/sdk/application/client/CatalogApplicationClient.js +16 -16
  56. package/sdk/application/client/CommonApplicationClient.d.ts +2 -2
  57. package/sdk/application/client/CommunicationApplicationClient.d.ts +5 -5
  58. package/sdk/application/client/ConfigurationApplicationClient.d.ts +17 -17
  59. package/sdk/application/client/ContentApplicationClient.d.ts +19 -19
  60. package/sdk/application/client/FileStorageApplicationClient.d.ts +14 -6
  61. package/sdk/application/client/FileStorageApplicationClient.js +2 -0
  62. package/sdk/application/client/LeadApplicationClient.d.ts +10 -10
  63. package/sdk/application/client/LogisticApplicationClient.d.ts +32 -21
  64. package/sdk/application/client/LogisticApplicationClient.js +62 -27
  65. package/sdk/application/client/OrderApplicationClient.d.ts +15 -15
  66. package/sdk/application/client/OrderApplicationClient.js +1 -1
  67. package/sdk/application/client/PaymentApplicationClient.d.ts +79 -57
  68. package/sdk/application/client/PaymentApplicationClient.js +66 -0
  69. package/sdk/application/client/PosCartApplicationClient.d.ts +38 -38
  70. package/sdk/application/client/RewardsApplicationClient.d.ts +34 -34
  71. package/sdk/application/client/RewardsApplicationClient.js +77 -77
  72. package/sdk/application/client/ShareApplicationClient.d.ts +8 -8
  73. package/sdk/application/client/ThemeApplicationClient.d.ts +4 -4
  74. package/sdk/application/client/UserApplicationClient.d.ts +63 -63
  75. package/sdk/application/models/CatalogValidator.d.ts +1 -1
  76. package/sdk/application/models/CatalogValidator.js +2 -2
  77. package/sdk/application/models/LogisticValidator.d.ts +2 -1
  78. package/sdk/application/models/LogisticValidator.js +11 -6
  79. package/sdk/application/models/PaymentValidator.d.ts +2 -0
  80. package/sdk/application/models/PaymentValidator.js +12 -0
  81. package/sdk/application/models/RewardsValidator.d.ts +3 -3
  82. package/sdk/application/models/RewardsValidator.js +12 -12
  83. package/sdk/common/AxiosHelper.js +1 -1
  84. package/sdk/common/Constant.d.ts +9 -0
  85. package/sdk/common/Constant.js +11 -0
  86. package/sdk/platform/PlatformApplicationClient.d.ts +7962 -6505
  87. package/sdk/platform/PlatformApplicationClient.js +4377 -3635
  88. package/sdk/platform/PlatformApplicationModels.d.ts +26 -31
  89. package/sdk/platform/PlatformApplicationModels.js +5530 -4134
  90. package/sdk/platform/PlatformClient.d.ts +3495 -2780
  91. package/sdk/platform/PlatformClient.js +3985 -3108
  92. package/sdk/platform/PlatformModels.d.ts +354 -273
  93. package/sdk/platform/PlatformModels.js +5635 -4211
  94. package/sdk/platform/client/AnalyticsPlatformClient.d.ts +5 -5
  95. package/sdk/platform/client/AuditTrailPlatformClient.d.ts +1 -1
  96. package/sdk/platform/client/BillingPlatformClient.d.ts +4 -4
  97. package/sdk/platform/client/CatalogPlatformClient.d.ts +222 -154
  98. package/sdk/platform/client/CatalogPlatformClient.js +473 -295
  99. package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +8 -8
  100. package/sdk/platform/client/ConfigurationPlatformClient.d.ts +9 -9
  101. package/sdk/platform/client/DiscountPlatformClient.d.ts +4 -4
  102. package/sdk/platform/client/FileStoragePlatformClient.d.ts +20 -4
  103. package/sdk/platform/client/FileStoragePlatformClient.js +49 -0
  104. package/sdk/platform/client/InventoryPlatformClient.d.ts +3 -3
  105. package/sdk/platform/client/LeadPlatformClient.d.ts +6 -6
  106. package/sdk/platform/client/OrderPlatformClient.d.ts +557 -131
  107. package/sdk/platform/client/OrderPlatformClient.js +1551 -247
  108. package/sdk/platform/client/PaymentPlatformClient.d.ts +4 -4
  109. package/sdk/platform/client/WebhookPlatformClient.d.ts +2 -2
  110. package/sdk/platform/models/CatalogValidator.d.ts +26 -22
  111. package/sdk/platform/models/CatalogValidator.js +109 -72
  112. package/sdk/platform/models/OrderValidator.d.ts +43 -11
  113. package/sdk/platform/models/OrderValidator.js +312 -51
  114. package/sdk/public/client/ConfigurationPublicClient.d.ts +2 -2
  115. package/sdk/public/client/InventoryPublicClient.d.ts +7 -7
  116. package/sdk/public/client/WebhookPublicClient.d.ts +3 -3
  117. package/tests/common/schema/action-url.json +15 -0
  118. package/tests/common/schema/url-action.json +16 -0
@@ -28,28 +28,28 @@ declare class Configuration {
28
28
  * @summary: Get current application details
29
29
  * @description: Use this API to get the current application details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
30
30
  */
31
- getApplication({}?: any): Promise<any>;
31
+ getApplication({}?: any): Promise<Application>;
32
32
  /**
33
33
  * @param {Object} arg - Arg object.
34
34
  * @returns {Promise<ApplicationAboutResponse>} - Success response
35
35
  * @summary: Get application, owner and seller information
36
36
  * @description: Use this API to get the current application details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
37
37
  */
38
- getOwnerInfo({}?: any): Promise<any>;
38
+ getOwnerInfo({}?: any): Promise<ApplicationAboutResponse>;
39
39
  /**
40
40
  * @param {Object} arg - Arg object.
41
41
  * @returns {Promise<ApplicationDetail>} - Success response
42
42
  * @summary: Get basic application details
43
43
  * @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
44
44
  */
45
- getBasicDetails({}?: any): Promise<any>;
45
+ getBasicDetails({}?: any): Promise<ApplicationDetail>;
46
46
  /**
47
47
  * @param {Object} arg - Arg object.
48
48
  * @returns {Promise<AppTokenResponse>} - Success response
49
49
  * @summary: Get integration tokens
50
50
  * @description: Use this API to retrieve the tokens used while integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map and Facebook. **Note** - Token values are encrypted with AES encryption using a secret key. Kindly reach out to the developers for obtaining the secret key.
51
51
  */
52
- getIntegrationTokens({}?: any): Promise<any>;
52
+ getIntegrationTokens({}?: any): Promise<AppTokenResponse>;
53
53
  /**
54
54
  * @param {Object} arg - Arg object.
55
55
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -65,7 +65,7 @@ declare class Configuration {
65
65
  pageNo?: number;
66
66
  pageSize?: number;
67
67
  q?: string;
68
- }): Promise<any>;
68
+ }): Promise<OrderingStores>;
69
69
  /**
70
70
  * @param {Object} arg - Arg object.
71
71
  * @param {number} [arg.pageSize] - The number of items to retrieve in each
@@ -87,28 +87,28 @@ declare class Configuration {
87
87
  */
88
88
  getStoreDetailById({ storeId }?: {
89
89
  storeId: number;
90
- }): Promise<any>;
90
+ }): Promise<OrderingStore>;
91
91
  /**
92
92
  * @param {Object} arg - Arg object.
93
93
  * @returns {Promise<AppFeatureResponse>} - Success response
94
94
  * @summary: Get features of application
95
95
  * @description: Use this API to retrieve the configuration of features such as product detail, landing page, options in the login/registration screen, communication opt-in, cart options and many more.
96
96
  */
97
- getFeatures({}?: any): Promise<any>;
97
+ getFeatures({}?: any): Promise<AppFeatureResponse>;
98
98
  /**
99
99
  * @param {Object} arg - Arg object.
100
100
  * @returns {Promise<ApplicationInformation>} - Success response
101
101
  * @summary: Get application information
102
102
  * @description: Use this API to retrieve information about the social links, address and contact information of the company/seller/brand operating the application.
103
103
  */
104
- getContactInfo({}?: any): Promise<any>;
104
+ getContactInfo({}?: any): Promise<ApplicationInformation>;
105
105
  /**
106
106
  * @param {Object} arg - Arg object.
107
107
  * @returns {Promise<CurrenciesResponse>} - Success response
108
108
  * @summary: Get all currencies list
109
109
  * @description: Use this API to get a list of currencies available. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
110
110
  */
111
- getCurrencies({}?: any): Promise<any>;
111
+ getCurrencies({}?: any): Promise<CurrenciesResponse>;
112
112
  /**
113
113
  * @param {Object} arg - Arg object.
114
114
  * @param {string} arg.id - Object ID assigned to the currency
@@ -118,21 +118,21 @@ declare class Configuration {
118
118
  */
119
119
  getCurrencyById({ id }?: {
120
120
  id: string;
121
- }): Promise<any>;
121
+ }): Promise<Currency>;
122
122
  /**
123
123
  * @param {Object} arg - Arg object.
124
124
  * @returns {Promise<AppCurrencyResponse>} - Success response
125
125
  * @summary: Get currencies enabled in the application
126
126
  * @description: Use this API to get a list of currencies allowed in the current application. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
127
127
  */
128
- getAppCurrencies({}?: any): Promise<any>;
128
+ getAppCurrencies({}?: any): Promise<AppCurrencyResponse>;
129
129
  /**
130
130
  * @param {Object} arg - Arg object.
131
131
  * @returns {Promise<LanguageResponse>} - Success response
132
132
  * @summary: Get list of languages
133
133
  * @description: Use this API to get a list of languages supported in the application.
134
134
  */
135
- getLanguages({}?: any): Promise<any>;
135
+ getLanguages({}?: any): Promise<LanguageResponse>;
136
136
  /**
137
137
  * @param {Object} arg - Arg object.
138
138
  * @param {OrderingStoreSelectRequest} arg.body
@@ -141,15 +141,15 @@ declare class Configuration {
141
141
  * @description: Use this API to get an Ordering Store signed cookie upon selecting an ordering store. This will be used by the cart service to verify a coupon against the selected ordering store in cart.
142
142
  */
143
143
  getOrderingStoreCookie({ body }?: {
144
- body: any;
145
- }): Promise<any>;
144
+ body: OrderingStoreSelectRequest;
145
+ }): Promise<SuccessMessageResponse>;
146
146
  /**
147
147
  * @param {Object} arg - Arg object.
148
148
  * @returns {Promise<SuccessMessageResponse>} - Success response
149
149
  * @summary: Unset the Ordering Store signed cookie.
150
150
  * @description: Use this API to unset the Ordering Store cookie upon changing the sales channel, by its domain URL, in the Universal Fynd Store app.
151
151
  */
152
- removeOrderingStoreCookie({}?: any): Promise<any>;
152
+ removeOrderingStoreCookie({}?: any): Promise<SuccessMessageResponse>;
153
153
  /**
154
154
  * @param {Object} arg - Arg object.
155
155
  * @param {number} [arg.pageNo] -
@@ -170,7 +170,7 @@ declare class Configuration {
170
170
  orderIncent?: boolean;
171
171
  orderingStore?: number;
172
172
  user?: string;
173
- }): Promise<any>;
173
+ }): Promise<AppStaffListResponse>;
174
174
  /**
175
175
  * @param {Object} arg - Arg object.
176
176
  * @param {number} [arg.pageSize] -
@@ -205,6 +205,6 @@ declare class Configuration {
205
205
  orderIncent?: boolean;
206
206
  orderingStore?: number;
207
207
  user?: string;
208
- }): Promise<any>;
208
+ }): Promise<AppStaffResponse>;
209
209
  }
210
210
  import Paginator = require("../../common/Paginator");
@@ -31,7 +31,7 @@ declare class Content {
31
31
  * @summary: Get live announcements
32
32
  * @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve live announcements. Get announcements on individual pages or for all pages.
33
33
  */
34
- getAnnouncements({}?: any): Promise<any>;
34
+ getAnnouncements({}?: any): Promise<AnnouncementsResponseSchema>;
35
35
  /**
36
36
  * @param {Object} arg - Arg object.
37
37
  * @param {string} arg.slug - A short, human-readable, URL-friendly
@@ -45,7 +45,7 @@ declare class Content {
45
45
  getBlog({ slug, rootId }?: {
46
46
  slug: string;
47
47
  rootId?: string;
48
- }): Promise<any>;
48
+ }): Promise<BlogSchema>;
49
49
  /**
50
50
  * @param {Object} arg - Arg object.
51
51
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -58,7 +58,7 @@ declare class Content {
58
58
  getBlogs({ pageNo, pageSize }?: {
59
59
  pageNo?: number;
60
60
  pageSize?: number;
61
- }): Promise<any>;
61
+ }): Promise<BlogGetResponse>;
62
62
  /**
63
63
  * @param {Object} arg - Arg object.
64
64
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
@@ -74,21 +74,21 @@ declare class Content {
74
74
  * @summary: Get the data loaders associated with an application
75
75
  * @description: Use this API to get all selected data loaders of the application in the form of tags.
76
76
  */
77
- getDataLoaders({}?: any): Promise<any>;
77
+ getDataLoaders({}?: any): Promise<DataLoadersSchema>;
78
78
  /**
79
79
  * @param {Object} arg - Arg object.
80
80
  * @returns {Promise<FaqResponseSchema>} - Success response
81
81
  * @summary: Get a list of FAQs
82
82
  * @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website.
83
83
  */
84
- getFaqs({}?: any): Promise<any>;
84
+ getFaqs({}?: any): Promise<FaqResponseSchema>;
85
85
  /**
86
86
  * @param {Object} arg - Arg object.
87
87
  * @returns {Promise<GetFaqCategoriesSchema>} - Success response
88
88
  * @summary: Get a list of FAQ categories
89
89
  * @description: FAQs can be divided into categories. Use this API to get a list of FAQ categories.
90
90
  */
91
- getFaqCategories({}?: any): Promise<any>;
91
+ getFaqCategories({}?: any): Promise<GetFaqCategoriesSchema>;
92
92
  /**
93
93
  * @param {Object} arg - Arg object.
94
94
  * @param {string} arg.slug - A short, human-readable, URL-friendly
@@ -100,7 +100,7 @@ declare class Content {
100
100
  */
101
101
  getFaqBySlug({ slug }?: {
102
102
  slug: string;
103
- }): Promise<any>;
103
+ }): Promise<FaqSchema>;
104
104
  /**
105
105
  * @param {Object} arg - Arg object.
106
106
  * @param {string} arg.slug - A short, human-readable, URL-friendly
@@ -112,7 +112,7 @@ declare class Content {
112
112
  */
113
113
  getFaqCategoryBySlug({ slug }?: {
114
114
  slug: string;
115
- }): Promise<any>;
115
+ }): Promise<GetFaqCategoryBySlugSchema>;
116
116
  /**
117
117
  * @param {Object} arg - Arg object.
118
118
  * @param {string} arg.slug - A short, human-readable, URL-friendly
@@ -124,21 +124,21 @@ declare class Content {
124
124
  */
125
125
  getFaqsByCategorySlug({ slug }?: {
126
126
  slug: string;
127
- }): Promise<any>;
127
+ }): Promise<GetFaqSchema>;
128
128
  /**
129
129
  * @param {Object} arg - Arg object.
130
130
  * @returns {Promise<LandingPageSchema>} - Success response
131
131
  * @summary: Get the landing page
132
132
  * @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch the details of a landing page.
133
133
  */
134
- getLandingPage({}?: any): Promise<any>;
134
+ getLandingPage({}?: any): Promise<LandingPageSchema>;
135
135
  /**
136
136
  * @param {Object} arg - Arg object.
137
137
  * @returns {Promise<ApplicationLegal>} - Success response
138
138
  * @summary: Get legal information
139
139
  * @description: Use this API to get the legal information of an application, which includes Privacy Policy, Terms and Conditions, Shipping Policy and FAQs regarding the usage of the application.
140
140
  */
141
- getLegalInformation({}?: any): Promise<any>;
141
+ getLegalInformation({}?: any): Promise<ApplicationLegal>;
142
142
  /**
143
143
  * @param {Object} arg - Arg object.
144
144
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -151,7 +151,7 @@ declare class Content {
151
151
  getNavigations({ pageNo, pageSize }?: {
152
152
  pageNo?: number;
153
153
  pageSize?: number;
154
- }): Promise<any>;
154
+ }): Promise<NavigationGetResponse>;
155
155
  /**
156
156
  * @param {Object} arg - Arg object.
157
157
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
@@ -167,7 +167,7 @@ declare class Content {
167
167
  * @summary: Get the SEO of an application
168
168
  * @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap.
169
169
  */
170
- getSEOConfiguration({}?: any): Promise<any>;
170
+ getSEOConfiguration({}?: any): Promise<SeoComponent>;
171
171
  /**
172
172
  * @param {Object} arg - Arg object.
173
173
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -180,7 +180,7 @@ declare class Content {
180
180
  getSlideshows({ pageNo, pageSize }?: {
181
181
  pageNo?: number;
182
182
  pageSize?: number;
183
- }): Promise<any>;
183
+ }): Promise<SlideshowGetResponse>;
184
184
  /**
185
185
  * @param {Object} arg - Arg object.
186
186
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
@@ -201,21 +201,21 @@ declare class Content {
201
201
  */
202
202
  getSlideshow({ slug }?: {
203
203
  slug: string;
204
- }): Promise<any>;
204
+ }): Promise<SlideshowSchema>;
205
205
  /**
206
206
  * @param {Object} arg - Arg object.
207
207
  * @returns {Promise<Support>} - Success response
208
208
  * @summary: Get the support information
209
209
  * @description: Use this API to get contact details for customer support including emails and phone numbers.
210
210
  */
211
- getSupportInformation({}?: any): Promise<any>;
211
+ getSupportInformation({}?: any): Promise<Support>;
212
212
  /**
213
213
  * @param {Object} arg - Arg object.
214
214
  * @returns {Promise<TagsSchema>} - Success response
215
215
  * @summary: Get the tags associated with an application
216
216
  * @description: Use this API to get all the CSS and JS injected in the application in the form of tags.
217
217
  */
218
- getTags({}?: any): Promise<any>;
218
+ getTags({}?: any): Promise<TagsSchema>;
219
219
  /**
220
220
  * @param {Object} arg - Arg object.
221
221
  * @param {string} arg.slug - A short, human-readable, URL-friendly
@@ -229,7 +229,7 @@ declare class Content {
229
229
  getPage({ slug, rootId }?: {
230
230
  slug: string;
231
231
  rootId?: string;
232
- }): Promise<any>;
232
+ }): Promise<PageSchema>;
233
233
  /**
234
234
  * @param {Object} arg - Arg object.
235
235
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -242,7 +242,7 @@ declare class Content {
242
242
  getPages({ pageNo, pageSize }?: {
243
243
  pageNo?: number;
244
244
  pageSize?: number;
245
- }): Promise<any>;
245
+ }): Promise<PageGetResponse>;
246
246
  /**
247
247
  * @param {Object} arg - Arg object.
248
248
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
@@ -36,8 +36,8 @@ declare class FileStorage {
36
36
  */
37
37
  startUpload({ namespace, body }?: {
38
38
  namespace: string;
39
- body: any;
40
- }): Promise<any>;
39
+ body: StartRequest;
40
+ }): Promise<StartResponse>;
41
41
  /**
42
42
  * @param {Object} arg - Arg object.
43
43
  * @param {string} arg.namespace - Name of the bucket created for storing objects.
@@ -65,8 +65,8 @@ declare class FileStorage {
65
65
  */
66
66
  completeUpload({ namespace, body }?: {
67
67
  namespace: string;
68
- body: any;
69
- }): Promise<any>;
68
+ body: StartResponse;
69
+ }): Promise<CompleteResponse>;
70
70
  /**
71
71
  * @param {Object} arg - Arg object.
72
72
  * @param {SignUrlRequest} arg.body
@@ -75,8 +75,16 @@ declare class FileStorage {
75
75
  * @description: Describe here
76
76
  */
77
77
  signUrls({ body }?: {
78
- body: any;
79
- }): Promise<any>;
78
+ body: SignUrlRequest;
79
+ }): Promise<SignUrlResponse>;
80
+ /**
81
+ * @param data
82
+ * @param {string} file_name
83
+ * @param {string} content_type
84
+ * @param {string} namespace
85
+ * @param {number} size
86
+ * @param {number} tags
87
+ */
80
88
  upload({ data, file_name, content_type, namespace, size, tags, }?: {
81
89
  data: any;
82
90
  file_name: any;
@@ -200,10 +200,12 @@ FileStorage.prototype.upload = function ({
200
200
  reject({ message: "Failed to upload file" });
201
201
  }
202
202
  delete dataObj.tags;
203
+
203
204
  const completeRes = await this.completeUpload({
204
205
  namespace,
205
206
  body: dataObj,
206
207
  });
208
+
207
209
  resolve(completeRes);
208
210
  } catch (err) {
209
211
  reject(err);
@@ -22,7 +22,7 @@ declare class Lead {
22
22
  */
23
23
  getTicket({ id }?: {
24
24
  id: string;
25
- }): Promise<any>;
25
+ }): Promise<Ticket>;
26
26
  /**
27
27
  * @param {Object} arg - Arg object.
28
28
  * @param {string} arg.id - Ticket ID for which history is created
@@ -33,8 +33,8 @@ declare class Lead {
33
33
  */
34
34
  createHistory({ id, body }?: {
35
35
  id: string;
36
- body: any;
37
- }): Promise<any>;
36
+ body: TicketHistoryPayload;
37
+ }): Promise<TicketHistory>;
38
38
  /**
39
39
  * @param {Object} arg - Arg object.
40
40
  * @param {AddTicketPayload} arg.body
@@ -43,8 +43,8 @@ declare class Lead {
43
43
  * @description: This is used to Create Ticket.
44
44
  */
45
45
  createTicket({ body }?: {
46
- body: any;
47
- }): Promise<any>;
46
+ body: AddTicketPayload;
47
+ }): Promise<Ticket>;
48
48
  /**
49
49
  * @param {Object} arg - Arg object.
50
50
  * @param {string} arg.slug - Slug of form whose response is getting submitted
@@ -54,7 +54,7 @@ declare class Lead {
54
54
  */
55
55
  getCustomForm({ slug }?: {
56
56
  slug: string;
57
- }): Promise<any>;
57
+ }): Promise<CustomForm>;
58
58
  /**
59
59
  * @param {Object} arg - Arg object.
60
60
  * @param {string} arg.slug - Slug of form whose response is getting submitted
@@ -65,8 +65,8 @@ declare class Lead {
65
65
  */
66
66
  submitCustomForm({ slug, body }?: {
67
67
  slug: string;
68
- body: any;
69
- }): Promise<any>;
68
+ body: CustomFormSubmissionPayload;
69
+ }): Promise<SubmitCustomFormResponse>;
70
70
  /**
71
71
  * @param {Object} arg - Arg object.
72
72
  * @param {string} arg.uniqueName - Unique name of Video Room
@@ -76,7 +76,7 @@ declare class Lead {
76
76
  */
77
77
  getParticipantsInsideVideoRoom({ uniqueName }?: {
78
78
  uniqueName: string;
79
- }): Promise<any>;
79
+ }): Promise<GetParticipantsInsideVideoRoomResponse>;
80
80
  /**
81
81
  * @param {Object} arg - Arg object.
82
82
  * @param {string} arg.uniqueName - Unique name of Video Room
@@ -86,5 +86,5 @@ declare class Lead {
86
86
  */
87
87
  getTokenForVideoRoom({ uniqueName }?: {
88
88
  uniqueName: string;
89
- }): Promise<any>;
89
+ }): Promise<GetTokenForVideoRoomResponse>;
90
90
  }
@@ -3,40 +3,51 @@ declare class Logistic {
3
3
  constructor(_conf: any);
4
4
  _conf: any;
5
5
  _relativeUrls: {
6
+ getPincodeCity: string;
6
7
  getTatProduct: string;
8
+ getAllCountries: string;
7
9
  getPincodeZones: string;
8
- getPincodeCity: string;
9
10
  };
10
11
  _urls: {};
11
12
  updateUrls(urls: any): void;
12
13
  /**
13
14
  * @param {Object} arg - Arg object.
14
- * @param {GetTatProductReqBody} arg.body
15
- * @returns {Promise<GetTatProductResponse>} - Success response
16
- * @summary: Get TAT of a product
17
- * @description: Use this API to know the delivery turnaround time (TAT) by entering the product details along with the PIN Code of the location.
15
+ * @param {string} arg.pincode - A `pincode` contains a specific address of
16
+ * a location.
17
+ * @param {string} [arg.countryCode] - A 3 alphabetic country code
18
+ * @returns {Promise<PincodeApiResponse>} - Success response
19
+ * @summary: Get Pincode API
20
+ * @description: Get pincode data
21
+ */
22
+ getPincodeCity({ pincode, countryCode }?: {
23
+ pincode: string;
24
+ countryCode?: string;
25
+ }): Promise<PincodeApiResponse>;
26
+ /**
27
+ * @param {Object} arg - Arg object.
28
+ * @param {TATViewRequest} arg.body
29
+ * @returns {Promise<TATViewResponse>} - Success response
30
+ * @summary: Get TAT API
31
+ * @description: Get TAT data
18
32
  */
19
33
  getTatProduct({ body }?: {
20
- body: any;
21
- }): Promise<any>;
34
+ body: TATViewRequest;
35
+ }): Promise<TATViewResponse>;
22
36
  /**
23
37
  * @param {Object} arg - Arg object.
24
- * @param {GetPincodeZonesReqBody} arg.body
25
- * @returns {Promise<GetPincodeZonesResponse>} - Success response
26
- * @summary: Get Pincode Zones
27
- * @description: Get to know the zones of a specefic pincode
38
+ * @returns {Promise<CountryListResponse>} - Success response
39
+ * @summary: Get Country List
40
+ * @description: Get all countries
28
41
  */
29
- getPincodeZones({ body }?: {
30
- body: any;
31
- }): Promise<any>;
42
+ getAllCountries({}?: any): Promise<CountryListResponse>;
32
43
  /**
33
44
  * @param {Object} arg - Arg object.
34
- * @param {string} arg.pincode - The PIN Code of the area, e.g. 400059
35
- * @returns {Promise<GetPincodeCityResponse>} - Success response
36
- * @summary: Get city from PIN Code
37
- * @description: Use this API to retrieve a city by its PIN Code.
45
+ * @param {GetZoneFromPincodeViewRequest} arg.body
46
+ * @returns {Promise<GetZoneFromPincodeViewResponse>} - Success response
47
+ * @summary: GET zone from the Pincode.
48
+ * @description: This API returns zone from the Pincode View.
38
49
  */
39
- getPincodeCity({ pincode }?: {
40
- pincode: string;
41
- }): Promise<any>;
50
+ getPincodeZones({ body }?: {
51
+ body: GetZoneFromPincodeViewRequest;
52
+ }): Promise<GetZoneFromPincodeViewResponse>;
42
53
  }
@@ -8,9 +8,10 @@ class Logistic {
8
8
  constructor(_conf) {
9
9
  this._conf = _conf;
10
10
  this._relativeUrls = {
11
- getTatProduct: "/service/application/logistics/v1.0",
12
- getPincodeZones: "/service/application/logistics/v1.0/pincode/zones",
13
11
  getPincodeCity: "/service/application/logistics/v1.0/pincode/{pincode}",
12
+ getTatProduct: "/service/application/logistics/v1.0/",
13
+ getAllCountries: "/service/application/logistics/v1.0/country-list",
14
+ getPincodeZones: "/service/application/logistics/v1.0/pincode/zones",
14
15
  };
15
16
  this._urls = Object.entries(this._relativeUrls).reduce(
16
17
  (urls, [method, relativeUrl]) => {
@@ -30,10 +31,45 @@ class Logistic {
30
31
 
31
32
  /**
32
33
  * @param {Object} arg - Arg object.
33
- * @param {GetTatProductReqBody} arg.body
34
- * @returns {Promise<GetTatProductResponse>} - Success response
35
- * @summary: Get TAT of a product
36
- * @description: Use this API to know the delivery turnaround time (TAT) by entering the product details along with the PIN Code of the location.
34
+ * @param {string} arg.pincode - A `pincode` contains a specific address of
35
+ * a location.
36
+ * @param {string} [arg.countryCode] - A 3 alphabetic country code
37
+ * @returns {Promise<PincodeApiResponse>} - Success response
38
+ * @summary: Get Pincode API
39
+ * @description: Get pincode data
40
+ */
41
+ getPincodeCity({ pincode, countryCode } = {}) {
42
+ const { error } = LogisticValidator.getPincodeCity().validate(
43
+ { pincode, countryCode },
44
+ { abortEarly: false, allowUnknown: true }
45
+ );
46
+ if (error) {
47
+ return Promise.reject(new FDKClientValidationError(error));
48
+ }
49
+ const query_params = {};
50
+ query_params["country_code"] = countryCode;
51
+
52
+ const xHeaders = {};
53
+
54
+ return APIClient.execute(
55
+ this._conf,
56
+ "get",
57
+ constructUrl({
58
+ url: this._urls["getPincodeCity"],
59
+ params: { pincode },
60
+ }),
61
+ query_params,
62
+ undefined,
63
+ xHeaders
64
+ );
65
+ }
66
+
67
+ /**
68
+ * @param {Object} arg - Arg object.
69
+ * @param {TATViewRequest} arg.body
70
+ * @returns {Promise<TATViewResponse>} - Success response
71
+ * @summary: Get TAT API
72
+ * @description: Get TAT data
37
73
  */
38
74
  getTatProduct({ body } = {}) {
39
75
  const { error } = LogisticValidator.getTatProduct().validate(
@@ -62,14 +98,13 @@ class Logistic {
62
98
 
63
99
  /**
64
100
  * @param {Object} arg - Arg object.
65
- * @param {GetPincodeZonesReqBody} arg.body
66
- * @returns {Promise<GetPincodeZonesResponse>} - Success response
67
- * @summary: Get Pincode Zones
68
- * @description: Get to know the zones of a specefic pincode
101
+ * @returns {Promise<CountryListResponse>} - Success response
102
+ * @summary: Get Country List
103
+ * @description: Get all countries
69
104
  */
70
- getPincodeZones({ body } = {}) {
71
- const { error } = LogisticValidator.getPincodeZones().validate(
72
- { body },
105
+ getAllCountries({} = {}) {
106
+ const { error } = LogisticValidator.getAllCountries().validate(
107
+ {},
73
108
  { abortEarly: false, allowUnknown: true }
74
109
  );
75
110
  if (error) {
@@ -81,27 +116,27 @@ class Logistic {
81
116
 
82
117
  return APIClient.execute(
83
118
  this._conf,
84
- "post",
119
+ "get",
85
120
  constructUrl({
86
- url: this._urls["getPincodeZones"],
121
+ url: this._urls["getAllCountries"],
87
122
  params: {},
88
123
  }),
89
124
  query_params,
90
- body,
125
+ undefined,
91
126
  xHeaders
92
127
  );
93
128
  }
94
129
 
95
130
  /**
96
131
  * @param {Object} arg - Arg object.
97
- * @param {string} arg.pincode - The PIN Code of the area, e.g. 400059
98
- * @returns {Promise<GetPincodeCityResponse>} - Success response
99
- * @summary: Get city from PIN Code
100
- * @description: Use this API to retrieve a city by its PIN Code.
132
+ * @param {GetZoneFromPincodeViewRequest} arg.body
133
+ * @returns {Promise<GetZoneFromPincodeViewResponse>} - Success response
134
+ * @summary: GET zone from the Pincode.
135
+ * @description: This API returns zone from the Pincode View.
101
136
  */
102
- getPincodeCity({ pincode } = {}) {
103
- const { error } = LogisticValidator.getPincodeCity().validate(
104
- { pincode },
137
+ getPincodeZones({ body } = {}) {
138
+ const { error } = LogisticValidator.getPincodeZones().validate(
139
+ { body },
105
140
  { abortEarly: false, allowUnknown: true }
106
141
  );
107
142
  if (error) {
@@ -113,13 +148,13 @@ class Logistic {
113
148
 
114
149
  return APIClient.execute(
115
150
  this._conf,
116
- "get",
151
+ "post",
117
152
  constructUrl({
118
- url: this._urls["getPincodeCity"],
119
- params: { pincode },
153
+ url: this._urls["getPincodeZones"],
154
+ params: {},
120
155
  }),
121
156
  query_params,
122
- undefined,
157
+ body,
123
158
  xHeaders
124
159
  );
125
160
  }