@stackfactor/client-api 1.1.15-8.1 → 1.1.15

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 (304) hide show
  1. package/exports.js +71 -0
  2. package/index.js +3 -0
  3. package/lib/actionNotifications.js +82 -0
  4. package/lib/address.js +27 -0
  5. package/lib/aiAssistant.js +131 -0
  6. package/lib/axiosClient.js +85 -0
  7. package/lib/config.js +74 -0
  8. package/lib/constants.js +127 -0
  9. package/lib/dashboard.js +79 -0
  10. package/lib/departmentTrainingPlans.js +180 -0
  11. package/lib/groups.js +302 -0
  12. package/lib/integration.js +352 -0
  13. package/lib/integrationConfiguration.js +108 -0
  14. package/lib/integrations/contentGenerator.js +79 -0
  15. package/lib/learningContent.js +383 -0
  16. package/lib/learningPath.js +220 -0
  17. package/lib/logger.js +60 -0
  18. package/lib/role.js +406 -0
  19. package/lib/roleTemplate.js +258 -0
  20. package/lib/skill.js +514 -0
  21. package/lib/skillAssessmentTestingSession.js +148 -0
  22. package/lib/skillAssessments.js +145 -0
  23. package/lib/skillTemplate.js +318 -0
  24. package/lib/teams.js +294 -0
  25. package/lib/tenants.js +57 -0
  26. package/lib/trainingPlans.js +279 -0
  27. package/lib/userInformation.js +109 -0
  28. package/lib/users.js +695 -0
  29. package/lib/utils.js +48 -0
  30. package/package.json +10 -31
  31. package/declarations/axios.d.ts +0 -1
  32. package/declarations/html2plaintext.d.ts +0 -1
  33. package/dist/cjs/actionNotifications.d.ts +0 -24
  34. package/dist/cjs/actionNotifications.d.ts.map +0 -1
  35. package/dist/cjs/actionNotifications.js +0 -73
  36. package/dist/cjs/actionNotifications.js.map +0 -1
  37. package/dist/cjs/address.d.ts +0 -8
  38. package/dist/cjs/address.d.ts.map +0 -1
  39. package/dist/cjs/address.js +0 -24
  40. package/dist/cjs/address.js.map +0 -1
  41. package/dist/cjs/aiAssistant.d.ts +0 -42
  42. package/dist/cjs/aiAssistant.d.ts.map +0 -1
  43. package/dist/cjs/aiAssistant.js +0 -135
  44. package/dist/cjs/aiAssistant.js.map +0 -1
  45. package/dist/cjs/avatar.d.ts +0 -11
  46. package/dist/cjs/avatar.d.ts.map +0 -1
  47. package/dist/cjs/avatar.js +0 -32
  48. package/dist/cjs/avatar.js.map +0 -1
  49. package/dist/cjs/axiosClient.d.ts +0 -31
  50. package/dist/cjs/axiosClient.d.ts.map +0 -1
  51. package/dist/cjs/axiosClient.js +0 -126
  52. package/dist/cjs/axiosClient.js.map +0 -1
  53. package/dist/cjs/config.d.ts +0 -23
  54. package/dist/cjs/config.d.ts.map +0 -1
  55. package/dist/cjs/config.js +0 -63
  56. package/dist/cjs/config.js.map +0 -1
  57. package/dist/cjs/constants.d.ts +0 -69
  58. package/dist/cjs/constants.d.ts.map +0 -1
  59. package/dist/cjs/constants.js +0 -91
  60. package/dist/cjs/constants.js.map +0 -1
  61. package/dist/cjs/dashboard.d.ts +0 -23
  62. package/dist/cjs/dashboard.d.ts.map +0 -1
  63. package/dist/cjs/dashboard.js +0 -74
  64. package/dist/cjs/dashboard.js.map +0 -1
  65. package/dist/cjs/departmentTrainingPlans.d.ts +0 -53
  66. package/dist/cjs/departmentTrainingPlans.d.ts.map +0 -1
  67. package/dist/cjs/departmentTrainingPlans.js +0 -153
  68. package/dist/cjs/departmentTrainingPlans.js.map +0 -1
  69. package/dist/cjs/groups.d.ts +0 -90
  70. package/dist/cjs/groups.d.ts.map +0 -1
  71. package/dist/cjs/groups.js +0 -273
  72. package/dist/cjs/groups.js.map +0 -1
  73. package/dist/cjs/index.d.ts +0 -33
  74. package/dist/cjs/index.d.ts.map +0 -1
  75. package/dist/cjs/index.js +0 -77
  76. package/dist/cjs/index.js.map +0 -1
  77. package/dist/cjs/integration.d.ts +0 -82
  78. package/dist/cjs/integration.d.ts.map +0 -1
  79. package/dist/cjs/integration.js +0 -316
  80. package/dist/cjs/integration.js.map +0 -1
  81. package/dist/cjs/integrationConfiguration.d.ts +0 -27
  82. package/dist/cjs/integrationConfiguration.d.ts.map +0 -1
  83. package/dist/cjs/integrationConfiguration.js +0 -86
  84. package/dist/cjs/integrationConfiguration.js.map +0 -1
  85. package/dist/cjs/integrations/contentGenerator.d.ts +0 -22
  86. package/dist/cjs/integrations/contentGenerator.d.ts.map +0 -1
  87. package/dist/cjs/integrations/contentGenerator.js +0 -69
  88. package/dist/cjs/integrations/contentGenerator.js.map +0 -1
  89. package/dist/cjs/learningContent.d.ts +0 -153
  90. package/dist/cjs/learningContent.d.ts.map +0 -1
  91. package/dist/cjs/learningContent.js +0 -474
  92. package/dist/cjs/learningContent.js.map +0 -1
  93. package/dist/cjs/learningPath.d.ts +0 -64
  94. package/dist/cjs/learningPath.d.ts.map +0 -1
  95. package/dist/cjs/learningPath.js +0 -205
  96. package/dist/cjs/learningPath.js.map +0 -1
  97. package/dist/cjs/logger.d.ts +0 -19
  98. package/dist/cjs/logger.d.ts.map +0 -1
  99. package/dist/cjs/logger.js +0 -60
  100. package/dist/cjs/logger.js.map +0 -1
  101. package/dist/cjs/microSkillsQuizes.d.ts +0 -18
  102. package/dist/cjs/microSkillsQuizes.d.ts.map +0 -1
  103. package/dist/cjs/microSkillsQuizes.js +0 -53
  104. package/dist/cjs/microSkillsQuizes.js.map +0 -1
  105. package/dist/cjs/quotas.d.ts +0 -15
  106. package/dist/cjs/quotas.d.ts.map +0 -1
  107. package/dist/cjs/quotas.js +0 -50
  108. package/dist/cjs/quotas.js.map +0 -1
  109. package/dist/cjs/role.d.ts +0 -113
  110. package/dist/cjs/role.d.ts.map +0 -1
  111. package/dist/cjs/role.js +0 -363
  112. package/dist/cjs/role.js.map +0 -1
  113. package/dist/cjs/roleTemplate.d.ts +0 -73
  114. package/dist/cjs/roleTemplate.d.ts.map +0 -1
  115. package/dist/cjs/roleTemplate.js +0 -236
  116. package/dist/cjs/roleTemplate.js.map +0 -1
  117. package/dist/cjs/security.d.ts +0 -27
  118. package/dist/cjs/security.d.ts.map +0 -1
  119. package/dist/cjs/security.js +0 -79
  120. package/dist/cjs/security.js.map +0 -1
  121. package/dist/cjs/skill.d.ts +0 -141
  122. package/dist/cjs/skill.d.ts.map +0 -1
  123. package/dist/cjs/skill.js +0 -440
  124. package/dist/cjs/skill.js.map +0 -1
  125. package/dist/cjs/skillAssessmentTestingSession.d.ts +0 -85
  126. package/dist/cjs/skillAssessmentTestingSession.d.ts.map +0 -1
  127. package/dist/cjs/skillAssessmentTestingSession.js +0 -276
  128. package/dist/cjs/skillAssessmentTestingSession.js.map +0 -1
  129. package/dist/cjs/skillAssessments.d.ts +0 -49
  130. package/dist/cjs/skillAssessments.d.ts.map +0 -1
  131. package/dist/cjs/skillAssessments.js +0 -156
  132. package/dist/cjs/skillAssessments.js.map +0 -1
  133. package/dist/cjs/skillTemplate.d.ts +0 -87
  134. package/dist/cjs/skillTemplate.d.ts.map +0 -1
  135. package/dist/cjs/skillTemplate.js +0 -281
  136. package/dist/cjs/skillTemplate.js.map +0 -1
  137. package/dist/cjs/talentTransfromation.d.ts +0 -29
  138. package/dist/cjs/talentTransfromation.d.ts.map +0 -1
  139. package/dist/cjs/talentTransfromation.js +0 -100
  140. package/dist/cjs/talentTransfromation.js.map +0 -1
  141. package/dist/cjs/teams.d.ts +0 -85
  142. package/dist/cjs/teams.d.ts.map +0 -1
  143. package/dist/cjs/teams.js +0 -252
  144. package/dist/cjs/teams.js.map +0 -1
  145. package/dist/cjs/tenants.d.ts +0 -16
  146. package/dist/cjs/tenants.d.ts.map +0 -1
  147. package/dist/cjs/tenants.js +0 -55
  148. package/dist/cjs/tenants.js.map +0 -1
  149. package/dist/cjs/trainingPlans.d.ts +0 -92
  150. package/dist/cjs/trainingPlans.d.ts.map +0 -1
  151. package/dist/cjs/trainingPlans.js +0 -309
  152. package/dist/cjs/trainingPlans.js.map +0 -1
  153. package/dist/cjs/trainingPlansProficiencyLevels.d.ts +0 -32
  154. package/dist/cjs/trainingPlansProficiencyLevels.d.ts.map +0 -1
  155. package/dist/cjs/trainingPlansProficiencyLevels.js +0 -97
  156. package/dist/cjs/trainingPlansProficiencyLevels.js.map +0 -1
  157. package/dist/cjs/userInformation.d.ts +0 -29
  158. package/dist/cjs/userInformation.d.ts.map +0 -1
  159. package/dist/cjs/userInformation.js +0 -81
  160. package/dist/cjs/userInformation.js.map +0 -1
  161. package/dist/cjs/users.d.ts +0 -206
  162. package/dist/cjs/users.d.ts.map +0 -1
  163. package/dist/cjs/users.js +0 -694
  164. package/dist/cjs/users.js.map +0 -1
  165. package/dist/cjs/utils.d.ts +0 -14
  166. package/dist/cjs/utils.d.ts.map +0 -1
  167. package/dist/cjs/utils.js +0 -58
  168. package/dist/cjs/utils.js.map +0 -1
  169. package/dist/esm/actionNotifications.d.ts +0 -24
  170. package/dist/esm/actionNotifications.d.ts.map +0 -1
  171. package/dist/esm/actionNotifications.js +0 -67
  172. package/dist/esm/actionNotifications.js.map +0 -1
  173. package/dist/esm/address.d.ts +0 -8
  174. package/dist/esm/address.d.ts.map +0 -1
  175. package/dist/esm/address.js +0 -20
  176. package/dist/esm/address.js.map +0 -1
  177. package/dist/esm/aiAssistant.d.ts +0 -42
  178. package/dist/esm/aiAssistant.d.ts.map +0 -1
  179. package/dist/esm/aiAssistant.js +0 -126
  180. package/dist/esm/aiAssistant.js.map +0 -1
  181. package/dist/esm/avatar.d.ts +0 -11
  182. package/dist/esm/avatar.d.ts.map +0 -1
  183. package/dist/esm/avatar.js +0 -28
  184. package/dist/esm/avatar.js.map +0 -1
  185. package/dist/esm/axiosClient.d.ts +0 -31
  186. package/dist/esm/axiosClient.d.ts.map +0 -1
  187. package/dist/esm/axiosClient.js +0 -81
  188. package/dist/esm/axiosClient.js.map +0 -1
  189. package/dist/esm/config.d.ts +0 -23
  190. package/dist/esm/config.d.ts.map +0 -1
  191. package/dist/esm/config.js +0 -57
  192. package/dist/esm/config.js.map +0 -1
  193. package/dist/esm/constants.d.ts +0 -69
  194. package/dist/esm/constants.d.ts.map +0 -1
  195. package/dist/esm/constants.js +0 -88
  196. package/dist/esm/constants.js.map +0 -1
  197. package/dist/esm/dashboard.d.ts +0 -23
  198. package/dist/esm/dashboard.d.ts.map +0 -1
  199. package/dist/esm/dashboard.js +0 -68
  200. package/dist/esm/dashboard.js.map +0 -1
  201. package/dist/esm/departmentTrainingPlans.d.ts +0 -53
  202. package/dist/esm/departmentTrainingPlans.d.ts.map +0 -1
  203. package/dist/esm/departmentTrainingPlans.js +0 -144
  204. package/dist/esm/departmentTrainingPlans.js.map +0 -1
  205. package/dist/esm/groups.d.ts +0 -90
  206. package/dist/esm/groups.d.ts.map +0 -1
  207. package/dist/esm/groups.js +0 -258
  208. package/dist/esm/groups.js.map +0 -1
  209. package/dist/esm/index.d.ts +0 -33
  210. package/dist/esm/index.d.ts.map +0 -1
  211. package/dist/esm/index.js +0 -33
  212. package/dist/esm/index.js.map +0 -1
  213. package/dist/esm/integration.d.ts +0 -82
  214. package/dist/esm/integration.d.ts.map +0 -1
  215. package/dist/esm/integration.js +0 -299
  216. package/dist/esm/integration.js.map +0 -1
  217. package/dist/esm/integrationConfiguration.d.ts +0 -27
  218. package/dist/esm/integrationConfiguration.d.ts.map +0 -1
  219. package/dist/esm/integrationConfiguration.js +0 -80
  220. package/dist/esm/integrationConfiguration.js.map +0 -1
  221. package/dist/esm/integrations/contentGenerator.d.ts +0 -22
  222. package/dist/esm/integrations/contentGenerator.d.ts.map +0 -1
  223. package/dist/esm/integrations/contentGenerator.js +0 -64
  224. package/dist/esm/integrations/contentGenerator.js.map +0 -1
  225. package/dist/esm/learningContent.d.ts +0 -153
  226. package/dist/esm/learningContent.d.ts.map +0 -1
  227. package/dist/esm/learningContent.js +0 -453
  228. package/dist/esm/learningContent.js.map +0 -1
  229. package/dist/esm/learningPath.d.ts +0 -64
  230. package/dist/esm/learningPath.d.ts.map +0 -1
  231. package/dist/esm/learningPath.js +0 -194
  232. package/dist/esm/learningPath.js.map +0 -1
  233. package/dist/esm/logger.d.ts +0 -19
  234. package/dist/esm/logger.d.ts.map +0 -1
  235. package/dist/esm/logger.js +0 -55
  236. package/dist/esm/logger.js.map +0 -1
  237. package/dist/esm/microSkillsQuizes.d.ts +0 -18
  238. package/dist/esm/microSkillsQuizes.d.ts.map +0 -1
  239. package/dist/esm/microSkillsQuizes.js +0 -48
  240. package/dist/esm/microSkillsQuizes.js.map +0 -1
  241. package/dist/esm/quotas.d.ts +0 -15
  242. package/dist/esm/quotas.d.ts.map +0 -1
  243. package/dist/esm/quotas.js +0 -45
  244. package/dist/esm/quotas.js.map +0 -1
  245. package/dist/esm/role.d.ts +0 -113
  246. package/dist/esm/role.d.ts.map +0 -1
  247. package/dist/esm/role.js +0 -346
  248. package/dist/esm/role.js.map +0 -1
  249. package/dist/esm/roleTemplate.d.ts +0 -73
  250. package/dist/esm/roleTemplate.d.ts.map +0 -1
  251. package/dist/esm/roleTemplate.js +0 -224
  252. package/dist/esm/roleTemplate.js.map +0 -1
  253. package/dist/esm/security.d.ts +0 -27
  254. package/dist/esm/security.d.ts.map +0 -1
  255. package/dist/esm/security.js +0 -72
  256. package/dist/esm/security.js.map +0 -1
  257. package/dist/esm/skill.d.ts +0 -141
  258. package/dist/esm/skill.d.ts.map +0 -1
  259. package/dist/esm/skill.js +0 -418
  260. package/dist/esm/skill.js.map +0 -1
  261. package/dist/esm/skillAssessmentTestingSession.d.ts +0 -85
  262. package/dist/esm/skillAssessmentTestingSession.d.ts.map +0 -1
  263. package/dist/esm/skillAssessmentTestingSession.js +0 -261
  264. package/dist/esm/skillAssessmentTestingSession.js.map +0 -1
  265. package/dist/esm/skillAssessments.d.ts +0 -49
  266. package/dist/esm/skillAssessments.d.ts.map +0 -1
  267. package/dist/esm/skillAssessments.js +0 -147
  268. package/dist/esm/skillAssessments.js.map +0 -1
  269. package/dist/esm/skillTemplate.d.ts +0 -87
  270. package/dist/esm/skillTemplate.d.ts.map +0 -1
  271. package/dist/esm/skillTemplate.js +0 -267
  272. package/dist/esm/skillTemplate.js.map +0 -1
  273. package/dist/esm/talentTransfromation.d.ts +0 -29
  274. package/dist/esm/talentTransfromation.d.ts.map +0 -1
  275. package/dist/esm/talentTransfromation.js +0 -93
  276. package/dist/esm/talentTransfromation.js.map +0 -1
  277. package/dist/esm/teams.d.ts +0 -85
  278. package/dist/esm/teams.d.ts.map +0 -1
  279. package/dist/esm/teams.js +0 -238
  280. package/dist/esm/teams.js.map +0 -1
  281. package/dist/esm/tenants.d.ts +0 -16
  282. package/dist/esm/tenants.d.ts.map +0 -1
  283. package/dist/esm/tenants.js +0 -50
  284. package/dist/esm/tenants.js.map +0 -1
  285. package/dist/esm/trainingPlans.d.ts +0 -92
  286. package/dist/esm/trainingPlans.d.ts.map +0 -1
  287. package/dist/esm/trainingPlans.js +0 -293
  288. package/dist/esm/trainingPlans.js.map +0 -1
  289. package/dist/esm/trainingPlansProficiencyLevels.d.ts +0 -32
  290. package/dist/esm/trainingPlansProficiencyLevels.d.ts.map +0 -1
  291. package/dist/esm/trainingPlansProficiencyLevels.js +0 -90
  292. package/dist/esm/trainingPlansProficiencyLevels.js.map +0 -1
  293. package/dist/esm/userInformation.d.ts +0 -29
  294. package/dist/esm/userInformation.d.ts.map +0 -1
  295. package/dist/esm/userInformation.js +0 -75
  296. package/dist/esm/userInformation.js.map +0 -1
  297. package/dist/esm/users.d.ts +0 -206
  298. package/dist/esm/users.d.ts.map +0 -1
  299. package/dist/esm/users.js +0 -663
  300. package/dist/esm/users.js.map +0 -1
  301. package/dist/esm/utils.d.ts +0 -14
  302. package/dist/esm/utils.d.ts.map +0 -1
  303. package/dist/esm/utils.js +0 -50
  304. package/dist/esm/utils.js.map +0 -1
@@ -1,27 +0,0 @@
1
- /**
2
- * Get the enabled authentication connections for current organization.
3
- * @param {String} authToken - Authorization token
4
- * @returns {Promise<object>}
5
- */
6
- export declare const getAuthConnections: (authToken: string) => Promise<object>;
7
- /**
8
- * Set the enabled authentication connections for current organization.
9
- * @param {Object} data - the object containing the updated configuration
10
- * @param {String} authToken - Authorization token
11
- * @returns {Promise<object>}
12
- */
13
- export declare const setAuthConnections: (data: object, authToken: string) => Promise<object>;
14
- /**
15
- * Reset the MFA for the user.
16
- * @param {String} userId
17
- * @param {String} authToken
18
- * @returns {Promise<object>}
19
- */
20
- export declare const resetMFA: (userId: string, authToken: string) => Promise<object>;
21
- /**
22
- * Synchronize the authentication connections with Auth0.
23
- * @param {String} authToken
24
- * @returns {Promise<object>}
25
- */
26
- export declare const synchronizeWithAuth0: (authToken: string) => Promise<object>;
27
- //# sourceMappingURL=security.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/lib/security.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,KAAG,OAAO,CAAC,MAAM,CAcpE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,MAAM,EACZ,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,CAehB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,MAAM,CAe1E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,KAAG,OAAO,CAAC,MAAM,CActE,CAAC"}
@@ -1,72 +0,0 @@
1
- import { client } from "./axiosClient.js";
2
- /**
3
- * Get the enabled authentication connections for current organization.
4
- * @param {String} authToken - Authorization token
5
- * @returns {Promise<object>}
6
- */
7
- export const getAuthConnections = (authToken) => {
8
- return new Promise((resolve, reject) => {
9
- const getConfigInformationRequest = client.get(`api/v1/security/authconnections`, { headers: { authorization: authToken } });
10
- getConfigInformationRequest
11
- .then((response) => {
12
- resolve(response.data);
13
- })
14
- .catch((error) => {
15
- reject(error);
16
- });
17
- });
18
- };
19
- /**
20
- * Set the enabled authentication connections for current organization.
21
- * @param {Object} data - the object containing the updated configuration
22
- * @param {String} authToken - Authorization token
23
- * @returns {Promise<object>}
24
- */
25
- export const setAuthConnections = (data, authToken) => {
26
- return new Promise((resolve, reject) => {
27
- const setConfigInformationRequest = client.post(`api/v1/security/authconnections`, { data: data }, { headers: { authorization: authToken } });
28
- setConfigInformationRequest
29
- .then((response) => {
30
- resolve(response.data);
31
- })
32
- .catch((error) => {
33
- reject(error);
34
- });
35
- });
36
- };
37
- /**
38
- * Reset the MFA for the user.
39
- * @param {String} userId
40
- * @param {String} authToken
41
- * @returns {Promise<object>}
42
- */
43
- export const resetMFA = (userId, authToken) => {
44
- return new Promise((resolve, reject) => {
45
- const resetMFARequest = client.post(`api/v1/security/resetmfa`, userId ? {} : { userId: userId }, { headers: { authorization: authToken } });
46
- resetMFARequest
47
- .then((response) => {
48
- resolve(response.data);
49
- })
50
- .catch((error) => {
51
- reject(error);
52
- });
53
- });
54
- };
55
- /**
56
- * Synchronize the authentication connections with Auth0.
57
- * @param {String} authToken
58
- * @returns {Promise<object>}
59
- */
60
- export const synchronizeWithAuth0 = (authToken) => {
61
- return new Promise((resolve, reject) => {
62
- const synchronizeRequest = client.get(`api/v1/security/synchronizewithauth0`, { headers: { authorization: authToken } });
63
- synchronizeRequest
64
- .then((response) => {
65
- resolve(response.data);
66
- })
67
- .catch((error) => {
68
- reject(error);
69
- });
70
- });
71
- };
72
- //# sourceMappingURL=security.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/lib/security.ts"],"names":[],"mappings":"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"}
@@ -1,141 +0,0 @@
1
- /**
2
- * Create skill and set information
3
- * @param {Object} data
4
- * @param {String} token Authorization token
5
- * @returns {Promise<object>}
6
- */
7
- export declare const createSkill: (data: object, token: string) => Promise<object>;
8
- /**
9
- * Create skills from templates
10
- * @param {Array<String>} templateIds
11
- * @param {String} token Authorization token
12
- * @returns {Promise<object>}
13
- */
14
- export declare const createSkillsFromTemplates: (templateIds: string[], token: string) => Promise<object>;
15
- /**
16
- * Delete skill
17
- * @param {String} id The id of the skill to be deleted
18
- * @param {String} comments The comments included with the deletion
19
- * @param {String} token Authorization token
20
- * @returns {Promise<object>}
21
- */
22
- export declare const deleteSkill: (id: string, comments: string, token: string) => Promise<object>;
23
- /**
24
- * Discard the skill draft changes
25
- * @param {String} id The id of the skill to be discarded
26
- * @param {String} token Authorization token
27
- * @returns {Promise<object>}
28
- */
29
- export declare const discardSkillChanges: (id: string, token: string) => Promise<object>;
30
- /**
31
- * Get the list of imported skill templates
32
- * @param {String} token Authorization token
33
- * @returns {Promise<object>}
34
- */
35
- export declare const getImportedSkillTemplates: (token: string) => Promise<object>;
36
- /**
37
- * Get the skill related roles
38
- * @param {String} id
39
- * @param {String} token Authorization token
40
- * @param {Boolean} includeRoleInformation
41
- * @returns {Promise<object>}
42
- */
43
- export declare const getSkillRelatedRoles: (id: string, token: string, includeRoleInformation?: boolean) => Promise<object>;
44
- /**
45
- * Get skill required assessment type
46
- * @param {String} id
47
- * @param {String} token Authorization token
48
- * @returns {Promise<object>}
49
- */
50
- export declare const getSkillRequiredAssessmentType: (id: string, token: string) => Promise<object>;
51
- /**
52
- * Get skill information
53
- * @param {String} id The id of the skill
54
- * @param {String} version The version of the skill
55
- * @param {Boolean} returnNullIfVersionNotFound When true it will return null if the version is not found
56
- * @param {String} token Authorization token
57
- * @returns {Promise<object>}
58
- */
59
- export declare const getSkillInformationById: (id: string, version: string, returnNullIfVersionNotFound: boolean, token: string) => Promise<object>;
60
- /**
61
- * Get skill list
62
- * @param {Array<String>} filter The filter used to select the skill
63
- * @param {String} version The version to be retrieved
64
- * @param {Boolean} includeDeleted If true it will return deleted records as well
65
- * @param {Boolean} returnDefaultIfVersionNotAvailable Return the default version if published not available
66
- * @param {Boolean} namesOnly Return only the names of the skills
67
- * @param {String} token Authorization token
68
- * @returns {Promise<object>}
69
- */
70
- export declare const getSkillList: (filter: string[], version: string, includeDeleted: boolean, returnDefaultIfVersionNotAvailable: boolean, namesOnly: boolean, token: string) => Promise<object>;
71
- /**
72
- * Get skills for team by id
73
- * @param {String} teamId The ID of the team for which skills will be loaded
74
- * @param {Number} maxDepth How many levels down in the organization the skills will be loaded
75
- * @param {Boolean} returnNullIfVersionNotFound Return null if the version is not found
76
- * @param {String} token Authorization token
77
- * @returns {Promise<object>}
78
- */
79
- export declare const getTeamSkillsById: (teamId: string, maxDepth: number, returnNullIfVersionNotFound: boolean, token: string) => Promise<object>;
80
- /**
81
- * Get current user team skills
82
- * @param {Number} maxDepth How many levels down in the organization the skills will be loaded
83
- * @param {String} token Authorization token
84
- * @returns {Promise<object>}
85
- */
86
- export declare const getCurrentUserTeamSkills: (maxDepth: number, token: string) => Promise<object>;
87
- /**
88
- * Get skill template updates
89
- * @param {String} id The skill id
90
- * @param {String} token Authorization token
91
- * @returns {Promise<object>}
92
- */
93
- export declare const getSkillTemplateUpdates: (id: string, token: string) => Promise<object>;
94
- /**
95
- * Import skill templates
96
- * @param {Array<String>} data The list of role templates to be imported
97
- * @param {Boolean} publish If true the imported templates will be published
98
- * @param {String} token Authorization token
99
- * @returns {Promise<object>}
100
- */
101
- export declare const importSkillTemplates: (data: string[], publish: boolean, token: string) => Promise<object>;
102
- /**
103
- * Publish skill
104
- * @param {String} id The id of the skill to be published
105
- * @param {String} comments The comments to be include with the request
106
- * @param {String} token Authorization token
107
- * @returns {Promise<object>}
108
- */
109
- export declare const publishSkill: (id: string, comments: string, token: string) => Promise<object>;
110
- /**
111
- * Set skill information
112
- * @param {String} id The id of the skill to be updated
113
- * @param {Object} data Data used to update the skill
114
- * @param {String} token Authorization token
115
- * @returns {Promise<object>}
116
- */
117
- export declare const setSkillInformation: (id: string, data: object, token: string) => Promise<object>;
118
- /**
119
- * Set the skill information from template
120
- * @param {String} id The id of the skill to be updated
121
- * @param {Object} data Data used to update the skill
122
- * @param {String} token Authorization token
123
- * @returns {Promise<object>}
124
- */
125
- export declare const setSkillInformationFromTemplate: (id: string, data: object, token: string) => Promise<object>;
126
- /**
127
- * Validate skill information
128
- * @param {String} id The id of the skill to be updated
129
- * @param {String} token Authorization token
130
- * @returns {Promise<object>}
131
- */
132
- export declare const validateSkill: (id: string, token: string) => Promise<object>;
133
- /**
134
- * Watch skill
135
- * @param {String} id The id of the skill to be updated
136
- * @param {Boolean} watch Set to true or false
137
- * @param {String} token Authorization token
138
- * @returns {Promise<object>}
139
- */
140
- export declare const watchSkill: (id: string, watch: boolean, token: string) => Promise<object>;
141
- //# sourceMappingURL=skill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/lib/skill.ts"],"names":[],"mappings":"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"}
package/dist/esm/skill.js DELETED
@@ -1,418 +0,0 @@
1
- import { client } from "./axiosClient.js";
2
- /**
3
- * Create skill and set information
4
- * @param {Object} data
5
- * @param {String} token Authorization token
6
- * @returns {Promise<object>}
7
- */
8
- export const createSkill = (data, token) => {
9
- return new Promise((resolve, reject) => {
10
- const confirmationRequest = client.put("api/v1/skills", { data: data }, {
11
- headers: { authorization: token },
12
- });
13
- confirmationRequest
14
- .then((response) => {
15
- resolve(response.data);
16
- })
17
- .catch((error) => {
18
- reject(error);
19
- });
20
- });
21
- };
22
- /**
23
- * Create skills from templates
24
- * @param {Array<String>} templateIds
25
- * @param {String} token Authorization token
26
- * @returns {Promise<object>}
27
- */
28
- export const createSkillsFromTemplates = (templateIds, token) => {
29
- return new Promise((resolve, reject) => {
30
- const requestData = {
31
- templateIds: templateIds,
32
- };
33
- const confirmationRequest = client.put("api/v1/skills/createfromtemplate/", requestData, {
34
- headers: { authorization: token },
35
- });
36
- confirmationRequest
37
- .then((response) => {
38
- resolve(response.data);
39
- })
40
- .catch((error) => {
41
- reject(error);
42
- });
43
- });
44
- };
45
- /**
46
- * Delete skill
47
- * @param {String} id The id of the skill to be deleted
48
- * @param {String} comments The comments included with the deletion
49
- * @param {String} token Authorization token
50
- * @returns {Promise<object>}
51
- */
52
- export const deleteSkill = (id, comments, token) => {
53
- return new Promise((resolve, reject) => {
54
- const data = {
55
- id: id,
56
- };
57
- if (comments)
58
- data.comments = comments;
59
- const request = client.delete(`api/v1/skills/`, {
60
- headers: { authorization: token },
61
- data: data,
62
- });
63
- request
64
- .then((response) => {
65
- resolve(response.data);
66
- })
67
- .catch((error) => {
68
- reject(error);
69
- });
70
- });
71
- };
72
- /**
73
- * Discard the skill draft changes
74
- * @param {String} id The id of the skill to be discarded
75
- * @param {String} token Authorization token
76
- * @returns {Promise<object>}
77
- */
78
- export const discardSkillChanges = (id, token) => {
79
- return new Promise((resolve, reject) => {
80
- const data = {};
81
- const request = client.get(`api/v1/skills/discard/${id}`, {
82
- headers: { authorization: token },
83
- data: data,
84
- });
85
- request
86
- .then((response) => {
87
- resolve(response.data);
88
- })
89
- .catch((error) => {
90
- reject(error);
91
- });
92
- });
93
- };
94
- /**
95
- * Get the list of imported skill templates
96
- * @param {String} token Authorization token
97
- * @returns {Promise<object>}
98
- */
99
- export const getImportedSkillTemplates = (token) => {
100
- return new Promise((resolve, reject) => {
101
- const request = client.get(`api/v1/skills/getimportedskilltemplates`, {
102
- headers: { authorization: token },
103
- });
104
- request
105
- .then((response) => {
106
- resolve(response.data);
107
- })
108
- .catch((error) => {
109
- reject(error);
110
- });
111
- });
112
- };
113
- /**
114
- * Get the skill related roles
115
- * @param {String} id
116
- * @param {String} token Authorization token
117
- * @param {Boolean} includeRoleInformation
118
- * @returns {Promise<object>}
119
- */
120
- export const getSkillRelatedRoles = (id, token, includeRoleInformation = false) => {
121
- return new Promise((resolve, reject) => {
122
- const confirmationRequest = client.get(`api/v1/skills/getskillrelatedroles/${id}/${includeRoleInformation}`, {
123
- headers: { authorization: token },
124
- });
125
- confirmationRequest
126
- .then((response) => {
127
- resolve(response.data);
128
- })
129
- .catch((error) => {
130
- reject(error);
131
- });
132
- });
133
- };
134
- /**
135
- * Get skill required assessment type
136
- * @param {String} id
137
- * @param {String} token Authorization token
138
- * @returns {Promise<object>}
139
- */
140
- export const getSkillRequiredAssessmentType = (id, token) => {
141
- return new Promise((resolve, reject) => {
142
- const confirmationRequest = client.get(`api/v1/skills/getrequiredassessmenttype/${id}`, {
143
- headers: { authorization: token },
144
- });
145
- confirmationRequest
146
- .then((response) => {
147
- resolve(response.data);
148
- })
149
- .catch((error) => {
150
- reject(error);
151
- });
152
- });
153
- };
154
- /**
155
- * Get skill information
156
- * @param {String} id The id of the skill
157
- * @param {String} version The version of the skill
158
- * @param {Boolean} returnNullIfVersionNotFound When true it will return null if the version is not found
159
- * @param {String} token Authorization token
160
- * @returns {Promise<object>}
161
- */
162
- export const getSkillInformationById = (id, version, returnNullIfVersionNotFound, token) => {
163
- return new Promise((resolve, reject) => {
164
- const confirmationRequest = client.get(`api/v1/skills/skill/${id}/${version}/${returnNullIfVersionNotFound}`, {
165
- headers: { authorization: token },
166
- });
167
- confirmationRequest
168
- .then((response) => {
169
- resolve(response.data);
170
- })
171
- .catch((error) => {
172
- reject(error);
173
- });
174
- });
175
- };
176
- /**
177
- * Get skill list
178
- * @param {Array<String>} filter The filter used to select the skill
179
- * @param {String} version The version to be retrieved
180
- * @param {Boolean} includeDeleted If true it will return deleted records as well
181
- * @param {Boolean} returnDefaultIfVersionNotAvailable Return the default version if published not available
182
- * @param {Boolean} namesOnly Return only the names of the skills
183
- * @param {String} token Authorization token
184
- * @returns {Promise<object>}
185
- */
186
- export const getSkillList = (filter, version, includeDeleted, returnDefaultIfVersionNotAvailable, namesOnly, token) => {
187
- return new Promise((resolve, reject) => {
188
- const requestData = {
189
- includeDeleted: includeDeleted,
190
- namesOnly: namesOnly,
191
- returnDefaultIfVersionNotAvailable: returnDefaultIfVersionNotAvailable,
192
- version: version,
193
- filter: filter,
194
- };
195
- if (filter)
196
- requestData.filter = filter;
197
- const confirmationRequest = client.post(`api/v1/skills`, requestData, {
198
- headers: { authorization: token },
199
- });
200
- confirmationRequest
201
- .then((response) => {
202
- resolve(response.data);
203
- })
204
- .catch((error) => {
205
- reject(error);
206
- });
207
- });
208
- };
209
- /**
210
- * Get skills for team by id
211
- * @param {String} teamId The ID of the team for which skills will be loaded
212
- * @param {Number} maxDepth How many levels down in the organization the skills will be loaded
213
- * @param {Boolean} returnNullIfVersionNotFound Return null if the version is not found
214
- * @param {String} token Authorization token
215
- * @returns {Promise<object>}
216
- */
217
- export const getTeamSkillsById = (teamId, maxDepth, returnNullIfVersionNotFound, token) => {
218
- return new Promise((resolve, reject) => {
219
- const confirmationRequest = client.get(`api/v1/skills/getteambyid/${teamId}/${maxDepth}/${returnNullIfVersionNotFound}`, {
220
- headers: { authorization: token },
221
- });
222
- confirmationRequest
223
- .then((response) => {
224
- resolve(response.data);
225
- })
226
- .catch((error) => {
227
- reject(error);
228
- });
229
- });
230
- };
231
- /**
232
- * Get current user team skills
233
- * @param {Number} maxDepth How many levels down in the organization the skills will be loaded
234
- * @param {String} token Authorization token
235
- * @returns {Promise<object>}
236
- */
237
- export const getCurrentUserTeamSkills = (maxDepth, token) => {
238
- return new Promise((resolve, reject) => {
239
- const confirmationRequest = client.get(`api/v1/skills/getcurrentuserteam/${maxDepth}`, {
240
- headers: { authorization: token },
241
- });
242
- confirmationRequest
243
- .then((response) => {
244
- resolve(response.data);
245
- })
246
- .catch((error) => {
247
- reject(error);
248
- });
249
- });
250
- };
251
- /**
252
- * Get skill template updates
253
- * @param {String} id The skill id
254
- * @param {String} token Authorization token
255
- * @returns {Promise<object>}
256
- */
257
- export const getSkillTemplateUpdates = (id, token) => {
258
- return new Promise((resolve, reject) => {
259
- const confirmationRequest = client.get(`api/v1/skills/getskilltemplateupdates/${id}`, {
260
- headers: { authorization: token },
261
- });
262
- confirmationRequest
263
- .then((response) => {
264
- resolve(response.data);
265
- })
266
- .catch((error) => {
267
- reject(error);
268
- });
269
- });
270
- };
271
- /**
272
- * Import skill templates
273
- * @param {Array<String>} data The list of role templates to be imported
274
- * @param {Boolean} publish If true the imported templates will be published
275
- * @param {String} token Authorization token
276
- * @returns {Promise<object>}
277
- */
278
- export const importSkillTemplates = (data, publish, token) => {
279
- return new Promise((resolve, reject) => {
280
- const requestData = {
281
- data: data,
282
- publish: publish,
283
- };
284
- const confirmationRequest = client.post(`api/v1/skills/importtemplates`, requestData, {
285
- headers: { authorization: token },
286
- });
287
- confirmationRequest
288
- .then((response) => {
289
- resolve(response.data);
290
- })
291
- .catch((error) => {
292
- reject(error);
293
- });
294
- });
295
- };
296
- /**
297
- * Publish skill
298
- * @param {String} id The id of the skill to be published
299
- * @param {String} comments The comments to be include with the request
300
- * @param {String} token Authorization token
301
- * @returns {Promise<object>}
302
- */
303
- export const publishSkill = (id, comments, token) => {
304
- return new Promise((resolve, reject) => {
305
- const data = {};
306
- if (comments)
307
- data.comments = comments;
308
- const confirmationRequest = client.post(`api/v1/skills/publish/${id}`, data, {
309
- headers: { authorization: token },
310
- });
311
- confirmationRequest
312
- .then((response) => {
313
- resolve(response.data);
314
- })
315
- .catch((error) => {
316
- reject(error);
317
- });
318
- });
319
- };
320
- /**
321
- * Set skill information
322
- * @param {String} id The id of the skill to be updated
323
- * @param {Object} data Data used to update the skill
324
- * @param {String} token Authorization token
325
- * @returns {Promise<object>}
326
- */
327
- export const setSkillInformation = (id, data, token) => {
328
- return new Promise((resolve, reject) => {
329
- const requestData = {
330
- data: data,
331
- id: id,
332
- };
333
- const confirmationRequest = client.post(`api/v1/skills/update/`, requestData, {
334
- headers: { authorization: token },
335
- });
336
- confirmationRequest
337
- .then((response) => {
338
- resolve(response.data);
339
- })
340
- .catch((error) => {
341
- reject(error);
342
- });
343
- });
344
- };
345
- /**
346
- * Set the skill information from template
347
- * @param {String} id The id of the skill to be updated
348
- * @param {Object} data Data used to update the skill
349
- * @param {String} token Authorization token
350
- * @returns {Promise<object>}
351
- */
352
- export const setSkillInformationFromTemplate = (id, data, token) => {
353
- return new Promise((resolve, reject) => {
354
- const requestData = {
355
- data: data,
356
- id: id,
357
- };
358
- const confirmationRequest = client.post(`api/v1/skills/updatefromtemplate/`, requestData, {
359
- headers: { authorization: token },
360
- });
361
- confirmationRequest
362
- .then((response) => {
363
- resolve(response.data);
364
- })
365
- .catch((error) => {
366
- reject(error);
367
- });
368
- });
369
- };
370
- /**
371
- * Validate skill information
372
- * @param {String} id The id of the skill to be updated
373
- * @param {String} token Authorization token
374
- * @returns {Promise<object>}
375
- */
376
- export const validateSkill = (id, token) => {
377
- return new Promise((resolve, reject) => {
378
- const requestData = {
379
- id: id,
380
- };
381
- const confirmationRequest = client.post(`api/v1/skills/validate/`, requestData, {
382
- headers: { authorization: token },
383
- });
384
- confirmationRequest
385
- .then((response) => {
386
- resolve(response.data);
387
- })
388
- .catch((error) => {
389
- reject(error);
390
- });
391
- });
392
- };
393
- /**
394
- * Watch skill
395
- * @param {String} id The id of the skill to be updated
396
- * @param {Boolean} watch Set to true or false
397
- * @param {String} token Authorization token
398
- * @returns {Promise<object>}
399
- */
400
- export const watchSkill = (id, watch, token) => {
401
- return new Promise((resolve, reject) => {
402
- const requestData = {
403
- id: id,
404
- watch: watch,
405
- };
406
- const confirmationRequest = client.post(`api/v1/skills/watch`, requestData, {
407
- headers: { authorization: token },
408
- });
409
- confirmationRequest
410
- .then((response) => {
411
- resolve(response.data);
412
- })
413
- .catch((error) => {
414
- reject(error);
415
- });
416
- });
417
- };
418
- //# sourceMappingURL=skill.js.map