@gofynd/fdk-client-javascript 0.1.35

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 (277) hide show
  1. package/.github/workflows/on_create_release.yml +23 -0
  2. package/.github/workflows/on_merge_main.yml +38 -0
  3. package/.github/workflows/on_pull_request.yml +35 -0
  4. package/.prettierrc +5 -0
  5. package/LICENSE +21 -0
  6. package/README.md +118 -0
  7. package/application.d.ts +3 -0
  8. package/application.js +6 -0
  9. package/common.d.ts +4 -0
  10. package/common.js +9 -0
  11. package/documentation/application/CART.md +7290 -0
  12. package/documentation/application/CATALOG.md +9570 -0
  13. package/documentation/application/COMMON.md +448 -0
  14. package/documentation/application/COMMUNICATION.md +463 -0
  15. package/documentation/application/CONFIGURATION.md +2902 -0
  16. package/documentation/application/CONTENT.md +3350 -0
  17. package/documentation/application/FILESTORAGE.md +491 -0
  18. package/documentation/application/LEAD.md +1891 -0
  19. package/documentation/application/LOGISTIC.md +439 -0
  20. package/documentation/application/ORDER.md +3428 -0
  21. package/documentation/application/PAYMENT.md +5035 -0
  22. package/documentation/application/POSCART.md +7889 -0
  23. package/documentation/application/README.md +21 -0
  24. package/documentation/application/REWARDS.md +714 -0
  25. package/documentation/application/SHARE.md +729 -0
  26. package/documentation/application/THEME.md +5796 -0
  27. package/documentation/application/USER.md +4326 -0
  28. package/documentation/platform/ANALYTICS.md +1150 -0
  29. package/documentation/platform/AUDITTRAIL.md +572 -0
  30. package/documentation/platform/BILLING.md +2396 -0
  31. package/documentation/platform/CART.md +5539 -0
  32. package/documentation/platform/CATALOG.md +21624 -0
  33. package/documentation/platform/COMMON.md +448 -0
  34. package/documentation/platform/COMMUNICATION.md +5714 -0
  35. package/documentation/platform/COMPANYPROFILE.md +2141 -0
  36. package/documentation/platform/CONFIGURATION.md +7335 -0
  37. package/documentation/platform/CONTENT.md +8989 -0
  38. package/documentation/platform/DISCOUNT.md +773 -0
  39. package/documentation/platform/FILESTORAGE.md +994 -0
  40. package/documentation/platform/INVENTORY.md +1775 -0
  41. package/documentation/platform/LEAD.md +4736 -0
  42. package/documentation/platform/ORDER.md +3764 -0
  43. package/documentation/platform/PARTNER.md +216 -0
  44. package/documentation/platform/PAYMENT.md +3444 -0
  45. package/documentation/platform/README.md +27 -0
  46. package/documentation/platform/REWARDS.md +871 -0
  47. package/documentation/platform/SHARE.md +602 -0
  48. package/documentation/platform/THEME.md +35725 -0
  49. package/documentation/platform/USER.md +2305 -0
  50. package/documentation/platform/WEBHOOK.md +587 -0
  51. package/documentation/public/CONFIGURATION.md +448 -0
  52. package/documentation/public/INVENTORY.md +686 -0
  53. package/documentation/public/WEBHOOK.md +348 -0
  54. package/index.d.ts +10 -0
  55. package/index.js +18 -0
  56. package/jest.config.d.ts +4 -0
  57. package/jest.config.js +6 -0
  58. package/package.json +35 -0
  59. package/platform.d.ts +3 -0
  60. package/platform.js +6 -0
  61. package/public.d.ts +3 -0
  62. package/public.js +6 -0
  63. package/sdk/application/ApplicationAPIClient.d.ts +11 -0
  64. package/sdk/application/ApplicationAPIClient.js +44 -0
  65. package/sdk/application/ApplicationClient.d.ts +40 -0
  66. package/sdk/application/ApplicationClient.js +84 -0
  67. package/sdk/application/ApplicationConfig.d.ts +19 -0
  68. package/sdk/application/ApplicationConfig.js +55 -0
  69. package/sdk/application/ApplicationModels.d.ts +826 -0
  70. package/sdk/application/ApplicationModels.js +10474 -0
  71. package/sdk/application/client/CartApplicationClient.d.ts +432 -0
  72. package/sdk/application/client/CartApplicationClient.js +1066 -0
  73. package/sdk/application/client/CatalogApplicationClient.d.ts +694 -0
  74. package/sdk/application/client/CatalogApplicationClient.js +1629 -0
  75. package/sdk/application/client/CommonApplicationClient.d.ts +38 -0
  76. package/sdk/application/client/CommonApplicationClient.js +105 -0
  77. package/sdk/application/client/CommunicationApplicationClient.d.ts +39 -0
  78. package/sdk/application/client/CommunicationApplicationClient.js +131 -0
  79. package/sdk/application/client/ConfigurationApplicationClient.d.ts +210 -0
  80. package/sdk/application/client/ConfigurationApplicationClient.js +649 -0
  81. package/sdk/application/client/ContentApplicationClient.d.ts +256 -0
  82. package/sdk/application/client/ContentApplicationClient.js +785 -0
  83. package/sdk/application/client/FileStorageApplicationClient.d.ts +88 -0
  84. package/sdk/application/client/FileStorageApplicationClient.js +214 -0
  85. package/sdk/application/client/LeadApplicationClient.d.ts +90 -0
  86. package/sdk/application/client/LeadApplicationClient.js +264 -0
  87. package/sdk/application/client/LogisticApplicationClient.d.ts +42 -0
  88. package/sdk/application/client/LogisticApplicationClient.js +128 -0
  89. package/sdk/application/client/OrderApplicationClient.d.ts +190 -0
  90. package/sdk/application/client/OrderApplicationClient.js +479 -0
  91. package/sdk/application/client/PaymentApplicationClient.d.ts +454 -0
  92. package/sdk/application/client/PaymentApplicationClient.js +1378 -0
  93. package/sdk/application/client/PosCartApplicationClient.d.ts +449 -0
  94. package/sdk/application/client/PosCartApplicationClient.js +1123 -0
  95. package/sdk/application/client/RewardsApplicationClient.d.ts +93 -0
  96. package/sdk/application/client/RewardsApplicationClient.js +293 -0
  97. package/sdk/application/client/ShareApplicationClient.d.ts +87 -0
  98. package/sdk/application/client/ShareApplicationClient.js +268 -0
  99. package/sdk/application/client/ThemeApplicationClient.d.ts +52 -0
  100. package/sdk/application/client/ThemeApplicationClient.js +161 -0
  101. package/sdk/application/client/UserApplicationClient.d.ts +446 -0
  102. package/sdk/application/client/UserApplicationClient.js +1275 -0
  103. package/sdk/application/constructUrl.d.ts +5 -0
  104. package/sdk/application/constructUrl.js +13 -0
  105. package/sdk/application/index.d.ts +2 -0
  106. package/sdk/application/index.js +4 -0
  107. package/sdk/application/models/CartValidator.d.ts +29 -0
  108. package/sdk/application/models/CartValidator.js +223 -0
  109. package/sdk/application/models/CatalogValidator.d.ts +33 -0
  110. package/sdk/application/models/CatalogValidator.js +233 -0
  111. package/sdk/application/models/CommonValidator.d.ts +5 -0
  112. package/sdk/application/models/CommonValidator.js +18 -0
  113. package/sdk/application/models/CommunicationValidator.d.ts +6 -0
  114. package/sdk/application/models/CommunicationValidator.js +20 -0
  115. package/sdk/application/models/ConfigurationValidator.d.ts +19 -0
  116. package/sdk/application/models/ConfigurationValidator.js +88 -0
  117. package/sdk/application/models/ContentValidator.d.ts +22 -0
  118. package/sdk/application/models/ContentValidator.js +106 -0
  119. package/sdk/application/models/FileStorageValidator.d.ts +6 -0
  120. package/sdk/application/models/FileStorageValidator.js +24 -0
  121. package/sdk/application/models/LeadValidator.d.ts +10 -0
  122. package/sdk/application/models/LeadValidator.js +48 -0
  123. package/sdk/application/models/LogisticValidator.d.ts +6 -0
  124. package/sdk/application/models/LogisticValidator.js +22 -0
  125. package/sdk/application/models/OrderValidator.d.ts +15 -0
  126. package/sdk/application/models/OrderValidator.js +87 -0
  127. package/sdk/application/models/PaymentValidator.d.ts +40 -0
  128. package/sdk/application/models/PaymentValidator.js +235 -0
  129. package/sdk/application/models/PosCartValidator.d.ts +30 -0
  130. package/sdk/application/models/PosCartValidator.js +232 -0
  131. package/sdk/application/models/RewardsValidator.d.ts +10 -0
  132. package/sdk/application/models/RewardsValidator.js +43 -0
  133. package/sdk/application/models/ShareValidator.d.ts +10 -0
  134. package/sdk/application/models/ShareValidator.js +44 -0
  135. package/sdk/application/models/ThemeValidator.d.ts +7 -0
  136. package/sdk/application/models/ThemeValidator.js +27 -0
  137. package/sdk/application/models/UserValidator.d.ts +38 -0
  138. package/sdk/application/models/UserValidator.js +233 -0
  139. package/sdk/common/AxiosHelper.d.ts +1 -0
  140. package/sdk/common/AxiosHelper.js +141 -0
  141. package/sdk/common/Constant.d.ts +294 -0
  142. package/sdk/common/Constant.js +332 -0
  143. package/sdk/common/FDKError.d.ts +26 -0
  144. package/sdk/common/FDKError.js +51 -0
  145. package/sdk/common/Logger.d.ts +2 -0
  146. package/sdk/common/Logger.js +85 -0
  147. package/sdk/common/Paginator.d.ts +16 -0
  148. package/sdk/common/Paginator.js +26 -0
  149. package/sdk/common/RequestSigner.d.ts +1 -0
  150. package/sdk/common/RequestSigner.js +306 -0
  151. package/sdk/common/Utility.d.ts +9 -0
  152. package/sdk/common/Utility.js +86 -0
  153. package/sdk/common/utils.d.ts +14 -0
  154. package/sdk/common/utils.js +165 -0
  155. package/sdk/platform/OAuthClient.d.ts +26 -0
  156. package/sdk/platform/OAuthClient.js +221 -0
  157. package/sdk/platform/PlatformAPIClient.d.ts +12 -0
  158. package/sdk/platform/PlatformAPIClient.js +43 -0
  159. package/sdk/platform/PlatformApplicationClient.d.ts +24398 -0
  160. package/sdk/platform/PlatformApplicationClient.js +23185 -0
  161. package/sdk/platform/PlatformApplicationModels.d.ts +333 -0
  162. package/sdk/platform/PlatformApplicationModels.js +21262 -0
  163. package/sdk/platform/PlatformClient.d.ts +9535 -0
  164. package/sdk/platform/PlatformClient.js +12336 -0
  165. package/sdk/platform/PlatformConfig.d.ts +29 -0
  166. package/sdk/platform/PlatformConfig.js +36 -0
  167. package/sdk/platform/PlatformModels.d.ts +1396 -0
  168. package/sdk/platform/PlatformModels.js +19222 -0
  169. package/sdk/platform/client/AnalyticsPlatformClient.d.ts +84 -0
  170. package/sdk/platform/client/AnalyticsPlatformClient.js +215 -0
  171. package/sdk/platform/client/AuditTrailPlatformClient.d.ts +38 -0
  172. package/sdk/platform/client/AuditTrailPlatformClient.js +133 -0
  173. package/sdk/platform/client/BillingPlatformClient.d.ts +109 -0
  174. package/sdk/platform/client/BillingPlatformClient.js +381 -0
  175. package/sdk/platform/client/CatalogPlatformClient.d.ts +806 -0
  176. package/sdk/platform/client/CatalogPlatformClient.js +2462 -0
  177. package/sdk/platform/client/CommonPlatformClient.d.ts +30 -0
  178. package/sdk/platform/client/CommonPlatformClient.js +84 -0
  179. package/sdk/platform/client/CommunicationPlatformClient.d.ts +26 -0
  180. package/sdk/platform/client/CommunicationPlatformClient.js +72 -0
  181. package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +182 -0
  182. package/sdk/platform/client/CompanyProfilePlatformClient.js +540 -0
  183. package/sdk/platform/client/ConfigurationPlatformClient.d.ts +277 -0
  184. package/sdk/platform/client/ConfigurationPlatformClient.js +806 -0
  185. package/sdk/platform/client/DiscountPlatformClient.d.ts +118 -0
  186. package/sdk/platform/client/DiscountPlatformClient.js +364 -0
  187. package/sdk/platform/client/FileStoragePlatformClient.d.ts +111 -0
  188. package/sdk/platform/client/FileStoragePlatformClient.js +268 -0
  189. package/sdk/platform/client/InventoryPlatformClient.d.ts +125 -0
  190. package/sdk/platform/client/InventoryPlatformClient.js +409 -0
  191. package/sdk/platform/client/LeadPlatformClient.d.ts +150 -0
  192. package/sdk/platform/client/LeadPlatformClient.js +439 -0
  193. package/sdk/platform/client/OrderPlatformClient.d.ts +190 -0
  194. package/sdk/platform/client/OrderPlatformClient.js +521 -0
  195. package/sdk/platform/client/PaymentPlatformClient.d.ts +98 -0
  196. package/sdk/platform/client/PaymentPlatformClient.js +331 -0
  197. package/sdk/platform/client/WebhookPlatformClient.d.ts +64 -0
  198. package/sdk/platform/client/WebhookPlatformClient.js +207 -0
  199. package/sdk/platform/index.d.ts +2 -0
  200. package/sdk/platform/index.js +4 -0
  201. package/sdk/platform/models/AnalyticsValidator.d.ts +7 -0
  202. package/sdk/platform/models/AnalyticsValidator.js +36 -0
  203. package/sdk/platform/models/AuditTrailValidator.d.ts +7 -0
  204. package/sdk/platform/models/AuditTrailValidator.js +26 -0
  205. package/sdk/platform/models/BillingValidator.d.ts +15 -0
  206. package/sdk/platform/models/BillingValidator.js +72 -0
  207. package/sdk/platform/models/CartValidator.d.ts +0 -0
  208. package/sdk/platform/models/CartValidator.js +0 -0
  209. package/sdk/platform/models/CatalogValidator.d.ts +74 -0
  210. package/sdk/platform/models/CatalogValidator.js +484 -0
  211. package/sdk/platform/models/CommonValidator.d.ts +5 -0
  212. package/sdk/platform/models/CommonValidator.js +18 -0
  213. package/sdk/platform/models/CommunicationValidator.d.ts +4 -0
  214. package/sdk/platform/models/CommunicationValidator.js +11 -0
  215. package/sdk/platform/models/CompanyProfileValidator.d.ts +17 -0
  216. package/sdk/platform/models/CompanyProfileValidator.js +93 -0
  217. package/sdk/platform/models/ConfigurationValidator.d.ts +21 -0
  218. package/sdk/platform/models/ConfigurationValidator.js +134 -0
  219. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  220. package/sdk/platform/models/ContentValidator.js +0 -0
  221. package/sdk/platform/models/DiscountValidator.d.ts +13 -0
  222. package/sdk/platform/models/DiscountValidator.js +75 -0
  223. package/sdk/platform/models/FileStorageValidator.d.ts +9 -0
  224. package/sdk/platform/models/FileStorageValidator.js +44 -0
  225. package/sdk/platform/models/InventoryValidator.d.ts +15 -0
  226. package/sdk/platform/models/InventoryValidator.js +81 -0
  227. package/sdk/platform/models/LeadValidator.d.ts +14 -0
  228. package/sdk/platform/models/LeadValidator.js +78 -0
  229. package/sdk/platform/models/OrderValidator.d.ts +14 -0
  230. package/sdk/platform/models/OrderValidator.js +110 -0
  231. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  232. package/sdk/platform/models/PartnerValidator.js +0 -0
  233. package/sdk/platform/models/PaymentValidator.d.ts +13 -0
  234. package/sdk/platform/models/PaymentValidator.js +65 -0
  235. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  236. package/sdk/platform/models/RewardsValidator.js +0 -0
  237. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  238. package/sdk/platform/models/ShareValidator.js +0 -0
  239. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  240. package/sdk/platform/models/ThemeValidator.js +0 -0
  241. package/sdk/platform/models/UserValidator.d.ts +0 -0
  242. package/sdk/platform/models/UserValidator.js +0 -0
  243. package/sdk/platform/models/WebhookValidator.d.ts +9 -0
  244. package/sdk/platform/models/WebhookValidator.js +42 -0
  245. package/sdk/public/PublicAPIClient.d.ts +11 -0
  246. package/sdk/public/PublicAPIClient.js +38 -0
  247. package/sdk/public/PublicClient.d.ts +12 -0
  248. package/sdk/public/PublicClient.js +24 -0
  249. package/sdk/public/PublicConfig.d.ts +10 -0
  250. package/sdk/public/PublicConfig.js +12 -0
  251. package/sdk/public/PublicModels.d.ts +50 -0
  252. package/sdk/public/PublicModels.js +712 -0
  253. package/sdk/public/client/ConfigurationPublicClient.d.ts +38 -0
  254. package/sdk/public/client/ConfigurationPublicClient.js +102 -0
  255. package/sdk/public/client/InventoryPublicClient.d.ts +81 -0
  256. package/sdk/public/client/InventoryPublicClient.js +239 -0
  257. package/sdk/public/client/WebhookPublicClient.d.ts +28 -0
  258. package/sdk/public/client/WebhookPublicClient.js +92 -0
  259. package/sdk/public/constructUrl.d.ts +5 -0
  260. package/sdk/public/constructUrl.js +13 -0
  261. package/sdk/public/index.d.ts +2 -0
  262. package/sdk/public/index.js +4 -0
  263. package/sdk/public/models/ConfigurationValidator.d.ts +5 -0
  264. package/sdk/public/models/ConfigurationValidator.js +18 -0
  265. package/sdk/public/models/InventoryValidator.d.ts +9 -0
  266. package/sdk/public/models/InventoryValidator.js +43 -0
  267. package/sdk/public/models/WebhookValidator.d.ts +5 -0
  268. package/sdk/public/models/WebhookValidator.js +14 -0
  269. package/tests/application/catalog.spec.js +47 -0
  270. package/tests/common/action-url.spec.js +35 -0
  271. package/tests/common/schema/action-url.json +163 -0
  272. package/tests/common/schema/url-action.json +667 -0
  273. package/tests/common/url-action.spec.js +48 -0
  274. package/tests/helpers/cookie.helper.js +31 -0
  275. package/tests/helpers/oauth.helper.js +43 -0
  276. package/tests/platform/catalog.spec.js +49 -0
  277. package/tests/public/location.spec.js +39 -0
@@ -0,0 +1,409 @@
1
+ const Paginator = require("../../common/Paginator");
2
+ const PlatformAPIClient = require("../PlatformAPIClient");
3
+ const { FDKClientValidationError } = require("../../common/FDKError");
4
+ const InventoryValidator = require("../models/InventoryValidator");
5
+ class Inventory {
6
+ constructor(config) {
7
+ this.config = config;
8
+ }
9
+
10
+ /**
11
+ * @param {Object} arg - Arg object.
12
+ * @param {number} [arg.pageNo] - Page Number
13
+ * @param {number} [arg.pageSize] - Page Size
14
+ * @summary: Get Job Configs For A Company
15
+ * @description: REST Endpoint that returns all job configs for a company
16
+ */
17
+ getJobsByCompany({ pageNo, pageSize } = {}) {
18
+ const { error } = InventoryValidator.getJobsByCompany().validate(
19
+ {
20
+ pageNo,
21
+ pageSize,
22
+ },
23
+ { abortEarly: false, allowUnknown: true }
24
+ );
25
+ if (error) {
26
+ return Promise.reject(new FDKClientValidationError(error));
27
+ }
28
+
29
+ const query_params = {};
30
+ query_params["page_no"] = pageNo;
31
+ query_params["page_size"] = pageSize;
32
+
33
+ const xHeaders = {};
34
+
35
+ return PlatformAPIClient.execute(
36
+ this.config,
37
+ "get",
38
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
39
+ query_params,
40
+ undefined,
41
+ xHeaders
42
+ );
43
+ }
44
+
45
+ /**
46
+ * @param {Object} arg - Arg object.
47
+ * @param {JobConfigDTO} arg.body
48
+ * @summary: Updates An Existing Job Config
49
+ * @description: REST Endpoint that updates a job config
50
+ */
51
+ updateJob({ body } = {}) {
52
+ const { error } = InventoryValidator.updateJob().validate(
53
+ {
54
+ body,
55
+ },
56
+ { abortEarly: false, allowUnknown: true }
57
+ );
58
+ if (error) {
59
+ return Promise.reject(new FDKClientValidationError(error));
60
+ }
61
+
62
+ const query_params = {};
63
+
64
+ const xHeaders = {};
65
+
66
+ return PlatformAPIClient.execute(
67
+ this.config,
68
+ "put",
69
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
70
+ query_params,
71
+ body,
72
+ xHeaders
73
+ );
74
+ }
75
+
76
+ /**
77
+ * @param {Object} arg - Arg object.
78
+ * @param {JobConfigDTO} arg.body
79
+ * @summary: Creates A New Job Config
80
+ * @description: REST Endpoint that creates a new job config
81
+ */
82
+ createJob({ body } = {}) {
83
+ const { error } = InventoryValidator.createJob().validate(
84
+ {
85
+ body,
86
+ },
87
+ { abortEarly: false, allowUnknown: true }
88
+ );
89
+ if (error) {
90
+ return Promise.reject(new FDKClientValidationError(error));
91
+ }
92
+
93
+ const query_params = {};
94
+
95
+ const xHeaders = {};
96
+
97
+ return PlatformAPIClient.execute(
98
+ this.config,
99
+ "post",
100
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
101
+ query_params,
102
+ body,
103
+ xHeaders
104
+ );
105
+ }
106
+
107
+ /**
108
+ * @param {Object} arg - Arg object.
109
+ * @param {SuppressStorePayload} arg.body
110
+ * @summary: Get Slingshot Configuration Of A Company
111
+ * @description: REST Endpoint that returns all configuration detail of a company
112
+ */
113
+ suppressStores({ body } = {}) {
114
+ const { error } = InventoryValidator.suppressStores().validate(
115
+ {
116
+ body,
117
+ },
118
+ { abortEarly: false, allowUnknown: true }
119
+ );
120
+ if (error) {
121
+ return Promise.reject(new FDKClientValidationError(error));
122
+ }
123
+
124
+ const query_params = {};
125
+
126
+ const xHeaders = {};
127
+
128
+ return PlatformAPIClient.execute(
129
+ this.config,
130
+ "post",
131
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/kafka/suppressStore`,
132
+ query_params,
133
+ body,
134
+ xHeaders
135
+ );
136
+ }
137
+
138
+ /**
139
+ * @param {Object} arg - Arg object.
140
+ * @summary: Get Slingshot Configuration Of A Company
141
+ * @description: REST Endpoint that returns all configuration detail of a company
142
+ */
143
+ getConfigByCompany({} = {}) {
144
+ const { error } = InventoryValidator.getConfigByCompany().validate(
145
+ {},
146
+ { abortEarly: false, allowUnknown: true }
147
+ );
148
+ if (error) {
149
+ return Promise.reject(new FDKClientValidationError(error));
150
+ }
151
+
152
+ const query_params = {};
153
+
154
+ const xHeaders = {};
155
+
156
+ return PlatformAPIClient.execute(
157
+ this.config,
158
+ "get",
159
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/slingshot`,
160
+ query_params,
161
+ undefined,
162
+ xHeaders
163
+ );
164
+ }
165
+
166
+ /**
167
+ * @param {Object} arg - Arg object.
168
+ * @param {number} arg.jobId - Job Id
169
+ * @summary: Get Job Code Steps
170
+ * @description: REST Endpoint that returns Inventory Job Steps
171
+ */
172
+ getJobSteps({ jobId } = {}) {
173
+ const { error } = InventoryValidator.getJobSteps().validate(
174
+ {
175
+ jobId,
176
+ },
177
+ { abortEarly: false, allowUnknown: true }
178
+ );
179
+ if (error) {
180
+ return Promise.reject(new FDKClientValidationError(error));
181
+ }
182
+
183
+ const query_params = {};
184
+
185
+ const xHeaders = {};
186
+
187
+ return PlatformAPIClient.execute(
188
+ this.config,
189
+ "get",
190
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/steps/${jobId}`,
191
+ query_params,
192
+ undefined,
193
+ xHeaders
194
+ );
195
+ }
196
+
197
+ /**
198
+ * @param {Object} arg - Arg object.
199
+ * @param {string} arg.integrationId - Integration Id
200
+ * @param {number} [arg.pageNo] - Page Number
201
+ * @param {number} [arg.pageSize] - Page Size
202
+ * @summary: Get Job Configs By Company And Integration
203
+ * @description: REST Endpoint that returns all job configs by company And integration
204
+ */
205
+ getJobByCompanyAndIntegration({ integrationId, pageNo, pageSize } = {}) {
206
+ const {
207
+ error,
208
+ } = InventoryValidator.getJobByCompanyAndIntegration().validate(
209
+ {
210
+ integrationId,
211
+ pageNo,
212
+ pageSize,
213
+ },
214
+ { abortEarly: false, allowUnknown: true }
215
+ );
216
+ if (error) {
217
+ return Promise.reject(new FDKClientValidationError(error));
218
+ }
219
+
220
+ const query_params = {};
221
+ query_params["page_no"] = pageNo;
222
+ query_params["page_size"] = pageSize;
223
+
224
+ const xHeaders = {};
225
+
226
+ return PlatformAPIClient.execute(
227
+ this.config,
228
+ "get",
229
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/integration/${integrationId}`,
230
+ query_params,
231
+ undefined,
232
+ xHeaders
233
+ );
234
+ }
235
+
236
+ /**
237
+ * @param {Object} arg - Arg object.
238
+ * @param {string} arg.integrationId - IntegrationId
239
+ * @summary: Disable Job Config
240
+ * @description: REST Endpoint that disables Inventory Job Config
241
+ */
242
+ disable({ integrationId } = {}) {
243
+ const { error } = InventoryValidator.disable().validate(
244
+ {
245
+ integrationId,
246
+ },
247
+ { abortEarly: false, allowUnknown: true }
248
+ );
249
+ if (error) {
250
+ return Promise.reject(new FDKClientValidationError(error));
251
+ }
252
+
253
+ const query_params = {};
254
+
255
+ const xHeaders = {};
256
+
257
+ return PlatformAPIClient.execute(
258
+ this.config,
259
+ "get",
260
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/disable/integration/${integrationId}`,
261
+ query_params,
262
+ undefined,
263
+ xHeaders
264
+ );
265
+ }
266
+
267
+ /**
268
+ * @param {Object} arg - Arg object.
269
+ * @summary: Get Job Configs Defaults
270
+ * @description: REST Endpoint that returns default fields job configs by company And integration
271
+ */
272
+ getJobConfigDefaults({} = {}) {
273
+ const { error } = InventoryValidator.getJobConfigDefaults().validate(
274
+ {},
275
+ { abortEarly: false, allowUnknown: true }
276
+ );
277
+ if (error) {
278
+ return Promise.reject(new FDKClientValidationError(error));
279
+ }
280
+
281
+ const query_params = {};
282
+
283
+ const xHeaders = {};
284
+
285
+ return PlatformAPIClient.execute(
286
+ this.config,
287
+ "get",
288
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/defaults`,
289
+ query_params,
290
+ undefined,
291
+ xHeaders
292
+ );
293
+ }
294
+
295
+ /**
296
+ * @param {Object} arg - Arg object.
297
+ * @param {string} arg.code - Job Code
298
+ * @summary: Get Job Config By Code
299
+ * @description: REST Endpoint that returns job config by code
300
+ */
301
+ getJobByCode({ code } = {}) {
302
+ const { error } = InventoryValidator.getJobByCode().validate(
303
+ {
304
+ code,
305
+ },
306
+ { abortEarly: false, allowUnknown: true }
307
+ );
308
+ if (error) {
309
+ return Promise.reject(new FDKClientValidationError(error));
310
+ }
311
+
312
+ const query_params = {};
313
+
314
+ const xHeaders = {};
315
+
316
+ return PlatformAPIClient.execute(
317
+ this.config,
318
+ "get",
319
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}`,
320
+ query_params,
321
+ undefined,
322
+ xHeaders
323
+ );
324
+ }
325
+
326
+ /**
327
+ * @param {Object} arg - Arg object.
328
+ * @param {string} arg.code - Code
329
+ * @param {number} [arg.pageNo] - Page Number
330
+ * @param {number} [arg.pageSize] - Page Size
331
+ * @param {string} [arg.status] - Status
332
+ * @param {string} [arg.date] - From Date
333
+ * @summary: Get Job Metrics
334
+ * @description: REST Endpoint that returns Inventory Run History For A Job Code
335
+ */
336
+ getJobCodeMetrics({ code, pageNo, pageSize, status, date } = {}) {
337
+ const { error } = InventoryValidator.getJobCodeMetrics().validate(
338
+ {
339
+ code,
340
+ pageNo,
341
+ pageSize,
342
+ status,
343
+ date,
344
+ },
345
+ { abortEarly: false, allowUnknown: true }
346
+ );
347
+ if (error) {
348
+ return Promise.reject(new FDKClientValidationError(error));
349
+ }
350
+
351
+ const query_params = {};
352
+ query_params["page_no"] = pageNo;
353
+ query_params["page_size"] = pageSize;
354
+ query_params["status"] = status;
355
+ query_params["date"] = date;
356
+
357
+ const xHeaders = {};
358
+
359
+ return PlatformAPIClient.execute(
360
+ this.config,
361
+ "get",
362
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}/metrics`,
363
+ query_params,
364
+ undefined,
365
+ xHeaders
366
+ );
367
+ }
368
+
369
+ /**
370
+ * @param {Object} arg - Arg object.
371
+ * @param {string} arg.integrationId - Integration Id
372
+ * @param {number} [arg.pageNo] - Page Number
373
+ * @param {number} [arg.pageSize] - Page Size
374
+ * @summary: Get Job Codes By Company And Integration
375
+ * @description: REST Endpoint that returns all job codes by company And integration
376
+ */
377
+ getJobCodesByCompanyAndIntegration({ integrationId, pageNo, pageSize } = {}) {
378
+ const {
379
+ error,
380
+ } = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
381
+ {
382
+ integrationId,
383
+ pageNo,
384
+ pageSize,
385
+ },
386
+ { abortEarly: false, allowUnknown: true }
387
+ );
388
+ if (error) {
389
+ return Promise.reject(new FDKClientValidationError(error));
390
+ }
391
+
392
+ const query_params = {};
393
+ query_params["page_no"] = pageNo;
394
+ query_params["page_size"] = pageSize;
395
+
396
+ const xHeaders = {};
397
+
398
+ return PlatformAPIClient.execute(
399
+ this.config,
400
+ "get",
401
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/integration/${integrationId}`,
402
+ query_params,
403
+ undefined,
404
+ xHeaders
405
+ );
406
+ }
407
+ }
408
+
409
+ module.exports = Inventory;
@@ -0,0 +1,150 @@
1
+ export = Lead;
2
+ declare class Lead {
3
+ constructor(config: any);
4
+ config: any;
5
+ /**
6
+ * @param {Object} arg - Arg object.
7
+ * @param {boolean} [arg.items] - Decides that the reponse will contain the
8
+ * list of tickets
9
+ * @param {boolean} [arg.filters] - Decides that the reponse will contain
10
+ * the ticket filters
11
+ * @param {string} [arg.q] - Search through ticket titles and description
12
+ * @param {string} [arg.status] - Filter tickets on status
13
+ * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
14
+ * @param {string} [arg.category] - Filter tickets on category
15
+ * @param {number} [arg.pageNo] - The page number to navigate through the
16
+ * given set of results.
17
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
18
+ * page. Default is 12.
19
+ * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
20
+ * @description: Gets the list of company level tickets and/or ticket filters
21
+ */
22
+ getTickets({ items, filters, q, status, priority, category, pageNo, pageSize, }?: {
23
+ items?: boolean;
24
+ filters?: boolean;
25
+ q?: string;
26
+ status?: string;
27
+ priority?: any;
28
+ category?: string;
29
+ pageNo?: number;
30
+ pageSize?: number;
31
+ }): Promise<any>;
32
+ /**
33
+ * @param {Object} arg - Arg object.
34
+ * @param {boolean} [arg.items] - Decides that the reponse will contain the
35
+ * list of tickets
36
+ * @param {boolean} [arg.filters] - Decides that the reponse will contain
37
+ * the ticket filters
38
+ * @param {string} [arg.q] - Search through ticket titles and description
39
+ * @param {string} [arg.status] - Filter tickets on status
40
+ * @param {PriorityEnum} [arg.priority] - Filter tickets on priority
41
+ * @param {string} [arg.category] - Filter tickets on category
42
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
43
+ * page. Default is 12.
44
+ * @summary: Gets the list of company level tickets and/or ticket filters depending on query params
45
+ * @description: Gets the list of company level tickets and/or ticket filters
46
+ */
47
+ getTicketsPaginator({ items, filters, q, status, priority, category, pageSize, }?: {
48
+ items?: boolean;
49
+ filters?: boolean;
50
+ q?: string;
51
+ status?: string;
52
+ priority?: any;
53
+ category?: string;
54
+ pageSize?: number;
55
+ }): Paginator;
56
+ /**
57
+ * @param {Object} arg - Arg object.
58
+ * @param {AddTicketPayload} arg.body
59
+ * @summary: Creates a company level ticket
60
+ * @description: Creates a company level ticket
61
+ */
62
+ createTicket({ body }?: {
63
+ body: any;
64
+ }): Promise<any>;
65
+ /**
66
+ * @param {Object} arg - Arg object.
67
+ * @param {string} arg.id - Tiket ID of the ticket to be fetched
68
+ * @summary: Retreives ticket details of a company level ticket with ticket ID
69
+ * @description: Retreives ticket details of a company level ticket
70
+ */
71
+ getTicket({ id }?: {
72
+ id: string;
73
+ }): Promise<any>;
74
+ /**
75
+ * @param {Object} arg - Arg object.
76
+ * @param {string} arg.id - Ticket ID of ticket to be edited
77
+ * @param {EditTicketPayload} arg.body
78
+ * @summary: Edits ticket details of a company level ticket
79
+ * @description: Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes
80
+ */
81
+ editTicket({ id, body }?: {
82
+ id: string;
83
+ body: any;
84
+ }): Promise<any>;
85
+ /**
86
+ * @param {Object} arg - Arg object.
87
+ * @param {string} arg.id - Ticket ID for which history is created
88
+ * @param {TicketHistoryPayload} arg.body
89
+ * @summary: Create history for specific company level ticket
90
+ * @description: Create history for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
91
+ */
92
+ createHistory({ id, body }?: {
93
+ id: string;
94
+ body: any;
95
+ }): Promise<any>;
96
+ /**
97
+ * @param {Object} arg - Arg object.
98
+ * @param {string} arg.id - Ticket ID for which history is to be fetched
99
+ * @summary: Gets history list for specific company level ticket
100
+ * @description: Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating.
101
+ */
102
+ getTicketHistory({ id }?: {
103
+ id: string;
104
+ }): Promise<any>;
105
+ /**
106
+ * @param {Object} arg - Arg object.
107
+ * @param {string} arg.id - Ticket ID for which feedbacks are to be fetched
108
+ * @summary: Gets a list of feedback submitted against that ticket
109
+ * @description: Gets a list of feedback submitted against that ticket
110
+ */
111
+ getFeedbacks({ id }?: {
112
+ id: string;
113
+ }): Promise<any>;
114
+ /**
115
+ * @param {Object} arg - Arg object.
116
+ * @param {string} arg.id - Ticket ID for which feedback is to be submitted
117
+ * @param {TicketFeedbackPayload} arg.body
118
+ * @summary: Submit a response for feeback form against that ticket
119
+ * @description: Submit a response for feeback form against that ticket
120
+ */
121
+ submitFeedback({ id, body }?: {
122
+ id: string;
123
+ body: any;
124
+ }): Promise<any>;
125
+ /**
126
+ * @param {Object} arg - Arg object.
127
+ * @param {string} arg.uniqueName - Unique name of video room
128
+ * @summary: Get Token to join a specific Video Room using it's unqiue name
129
+ * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there.
130
+ */
131
+ getTokenForVideoRoom({ uniqueName }?: {
132
+ uniqueName: string;
133
+ }): Promise<any>;
134
+ /**
135
+ * @param {Object} arg - Arg object.
136
+ * @param {string} arg.uniqueName - Unique name of Video Room
137
+ * @summary: Get participants of a specific Video Room using it's unique name
138
+ * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names.
139
+ */
140
+ getVideoParticipants({ uniqueName }?: {
141
+ uniqueName: string;
142
+ }): Promise<any>;
143
+ /**
144
+ * @param {Object} arg - Arg object.
145
+ * @summary: Get general support configuration.
146
+ * @description: Get general support configuration.
147
+ */
148
+ getGeneralConfig({}?: any): Promise<any>;
149
+ }
150
+ import Paginator = require("../../common/Paginator");