@kineticdata/react 5.1.1 → 6.0.0

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 (305) hide show
  1. package/assets/task/icons/drag-handle.svg +3 -0
  2. package/assets/task/icons/plus_small.svg +2 -4
  3. package/lib/apis/agent/adapters.js +16 -12
  4. package/lib/apis/agent/bridges.js +54 -41
  5. package/lib/apis/agent/handlers.js +51 -38
  6. package/lib/apis/core/activity.js +19 -11
  7. package/lib/apis/core/attributeDefinitions.js +54 -46
  8. package/lib/apis/core/attributeDefinitions.test.js +47 -55
  9. package/lib/apis/core/authentication.js +58 -63
  10. package/lib/apis/core/backgroundJobs.js +38 -30
  11. package/lib/apis/core/bridgeModelAttributeMappings.js +42 -34
  12. package/lib/apis/core/bridgeModelAttributes.js +47 -37
  13. package/lib/apis/core/bridgeModelMappings.js +42 -34
  14. package/lib/apis/core/bridgeModelQualificationMappings.js +42 -34
  15. package/lib/apis/core/bridgeModelQualifications.js +42 -34
  16. package/lib/apis/core/bridgeModels.js +61 -45
  17. package/lib/apis/core/bridgeModels.test.js +64 -80
  18. package/lib/apis/core/bridgedresources.js +64 -71
  19. package/lib/apis/core/bridgedresources.test.js +34 -31
  20. package/lib/apis/core/categories.js +59 -52
  21. package/lib/apis/core/categories.test.js +36 -33
  22. package/lib/apis/core/fileResources.js +41 -33
  23. package/lib/apis/core/filestores.js +42 -34
  24. package/lib/apis/core/formTypes.js +50 -44
  25. package/lib/apis/core/forms.js +53 -48
  26. package/lib/apis/core/forms.test.js +60 -74
  27. package/lib/apis/core/kapps.js +45 -39
  28. package/lib/apis/core/kapps.test.js +45 -52
  29. package/lib/apis/core/logs.js +20 -16
  30. package/lib/apis/core/memberships.js +23 -20
  31. package/lib/apis/core/meta.js +31 -19
  32. package/lib/apis/core/notices.js +17 -9
  33. package/lib/apis/core/oauthClients.js +49 -45
  34. package/lib/apis/core/platformComponents.js +73 -57
  35. package/lib/apis/core/platformItems.js +30 -0
  36. package/lib/apis/core/profile.js +28 -21
  37. package/lib/apis/core/profile.test.js +20 -17
  38. package/lib/apis/core/securityPolicyDefinitions.js +48 -41
  39. package/lib/apis/core/securityPolicyDefinitions.test.js +50 -60
  40. package/lib/apis/core/space.js +23 -16
  41. package/lib/apis/core/space.test.js +31 -38
  42. package/lib/apis/core/submissions.js +220 -172
  43. package/lib/apis/core/submissions.test.js +81 -51
  44. package/lib/apis/core/teams.js +51 -44
  45. package/lib/apis/core/teams.test.js +42 -39
  46. package/lib/apis/core/translations.js +123 -130
  47. package/lib/apis/core/translations.test.js +278 -368
  48. package/lib/apis/core/users.js +56 -49
  49. package/lib/apis/core/users.test.js +42 -39
  50. package/lib/apis/core/version.js +20 -11
  51. package/lib/apis/core/webApis.js +42 -34
  52. package/lib/apis/core/webhooks.js +48 -41
  53. package/lib/apis/core/webhooks.test.js +50 -60
  54. package/lib/apis/core/webhooksJobs.js +30 -26
  55. package/lib/apis/core/workflows.js +64 -0
  56. package/lib/apis/http.js +89 -80
  57. package/lib/apis/http.test.js +37 -38
  58. package/lib/apis/index.js +506 -48
  59. package/lib/apis/system/index.js +228 -211
  60. package/lib/apis/task/index.js +283 -226
  61. package/lib/components/agent/bridge/BridgeForm.js +50 -50
  62. package/lib/components/agent/bridge/BridgeTable.js +12 -8
  63. package/lib/components/agent/filestore/FilestoreForm.js +49 -48
  64. package/lib/components/agent/filestore/FilestoreTable.js +12 -8
  65. package/lib/components/agent/handler/AgentHandlerForm.js +24 -27
  66. package/lib/components/agent/handler/AgentHandlerTable.js +12 -8
  67. package/lib/components/common/AttributeSelect.js +15 -9
  68. package/lib/components/common/BridgeSelect.js +48 -43
  69. package/lib/components/common/ComponentConfigContext.js +9 -2
  70. package/lib/components/common/ContentEditable.js +36 -60
  71. package/lib/components/common/FormSelect.js +70 -58
  72. package/lib/components/common/NodeSelect.js +23 -19
  73. package/lib/components/common/Scroller.js +24 -23
  74. package/lib/components/common/StaticSelect.js +57 -50
  75. package/lib/components/common/TableInput.js +54 -57
  76. package/lib/components/common/TeamSelect.js +42 -39
  77. package/lib/components/common/Typeahead.js +121 -138
  78. package/lib/components/common/UserSelect.js +42 -41
  79. package/lib/components/common/authentication/AuthInterceptor.js +15 -19
  80. package/lib/components/common/authentication/AuthInterceptor.test.js +46 -64
  81. package/lib/components/common/authentication/AuthenticationContainer.js +350 -454
  82. package/lib/components/common/authentication/RequestInterceptor.js +16 -19
  83. package/lib/components/common/code_input/CodeInput.js +92 -122
  84. package/lib/components/common/code_input/draftHelpers.js +96 -90
  85. package/lib/components/common/code_input/languageHelpers.js +49 -47
  86. package/lib/components/common/code_input/languageHelpers.test.js +21 -16
  87. package/lib/components/core/CoreFormModal.js +26 -24
  88. package/lib/components/core/CoreModal.js +37 -31
  89. package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +24 -23
  90. package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +18 -15
  91. package/lib/components/core/bridge_model/BridgeModelForm.js +27 -37
  92. package/lib/components/core/bridge_model/BridgeModelTable.js +12 -8
  93. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +17 -16
  94. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +25 -21
  95. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +20 -20
  96. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +27 -22
  97. package/lib/components/core/category/CategoryForm.js +22 -22
  98. package/lib/components/core/category/CategoryTable.js +15 -10
  99. package/lib/components/core/core_form/CoreForm.js +209 -285
  100. package/lib/components/core/core_form/CoreForm.test.js +12 -10
  101. package/lib/components/core/core_form/defaults/index.js +52 -44
  102. package/lib/components/core/core_form/globals.js +14 -5
  103. package/lib/components/core/field_definition/FieldDefinitionForm.js +23 -21
  104. package/lib/components/core/field_definition/FieldDefinitionTable.js +15 -10
  105. package/lib/components/core/file_resource/FileResourceForm.js +38 -37
  106. package/lib/components/core/file_resource/FileResourceTable.js +16 -12
  107. package/lib/components/core/form/FormForm.js +56 -61
  108. package/lib/components/core/form/FormTable.js +25 -22
  109. package/lib/components/core/form_type/FormTypeForm.js +14 -13
  110. package/lib/components/core/form_type/FormTypeTable.js +12 -8
  111. package/lib/components/core/i18n/I18n.js +54 -61
  112. package/lib/components/core/i18n/I18nContext.js +9 -2
  113. package/lib/components/core/i18n/I18nProvider.js +40 -43
  114. package/lib/components/core/i18n/Moment.js +40 -50
  115. package/lib/components/core/index_definition/IndexDefinitionForm.js +23 -24
  116. package/lib/components/core/index_definition/IndexDefinitionTable.js +19 -11
  117. package/lib/components/core/index_job/IndexJobTable.js +20 -15
  118. package/lib/components/core/kapp/KappForm.js +57 -58
  119. package/lib/components/core/kapp/KappTable.js +17 -12
  120. package/lib/components/core/log/LogTable.js +35 -33
  121. package/lib/components/core/oauth_client/OAuthClientForm.js +17 -17
  122. package/lib/components/core/oauth_client/OAuthClientTable.js +12 -8
  123. package/lib/components/core/platform_component/AgentComponentForm.js +15 -15
  124. package/lib/components/core/platform_component/AgentComponentTable.js +10 -5
  125. package/lib/components/core/platform_component/TaskComponentForm.js +14 -14
  126. package/lib/components/core/profile/ProfileForm.js +40 -39
  127. package/lib/components/core/security_definition/SecurityDefinitionForm.js +28 -25
  128. package/lib/components/core/security_definition/SecurityDefinitionTable.js +18 -13
  129. package/lib/components/core/space/SpaceForm.js +79 -90
  130. package/lib/components/core/submission/DatastoreSubmissionFilters.js +39 -40
  131. package/lib/components/core/submission/DatastoreSubmissionTable.js +37 -34
  132. package/lib/components/core/submission/FormSubmissionFilters.js +79 -75
  133. package/lib/components/core/submission/FormSubmissionTable.js +27 -20
  134. package/lib/components/core/submission/KappSubmissionTable.js +30 -29
  135. package/lib/components/core/submission/SubmissionForm.js +126 -55
  136. package/lib/components/core/submission/SubmissionTable.js +24 -20
  137. package/lib/components/core/submission/helpers.js +37 -33
  138. package/lib/components/core/submission/helpers.test.js +69 -20
  139. package/lib/components/core/team/TeamForm.js +24 -21
  140. package/lib/components/core/team/TeamTable.js +16 -11
  141. package/lib/components/core/translation/ContextForm.js +13 -10
  142. package/lib/components/core/translation/ContextTable.js +13 -10
  143. package/lib/components/core/translation/EntryForm.js +27 -24
  144. package/lib/components/core/translation/EntryTable.js +19 -16
  145. package/lib/components/core/translation/LocaleForm.js +16 -13
  146. package/lib/components/core/translation/LocaleTable.js +12 -8
  147. package/lib/components/core/user/UserForm.js +38 -37
  148. package/lib/components/core/user/UserTable.js +19 -15
  149. package/lib/components/core/webapi/WebApiForm.js +49 -61
  150. package/lib/components/core/webapi/WebApiTable.js +14 -10
  151. package/lib/components/core/webhook/WebhookForm.js +33 -32
  152. package/lib/components/core/webhook/WebhookTable.js +22 -20
  153. package/lib/components/core/webhook_job/WebhookJobTable.js +19 -16
  154. package/lib/components/form/Form.helpers.js +102 -90
  155. package/lib/components/form/Form.js +467 -524
  156. package/lib/components/form/Form.models.js +38 -24
  157. package/lib/components/form/FormState.js +8 -5
  158. package/lib/components/form/KitchenSinkForm.js +135 -4
  159. package/lib/components/form/defaults/AttributesField.js +48 -59
  160. package/lib/components/form/defaults/CheckboxField.js +14 -6
  161. package/lib/components/form/defaults/CodeField.js +15 -7
  162. package/lib/components/form/defaults/FormButtons.js +12 -4
  163. package/lib/components/form/defaults/FormError.js +12 -4
  164. package/lib/components/form/defaults/FormField.js +15 -7
  165. package/lib/components/form/defaults/FormLayout.js +12 -4
  166. package/lib/components/form/defaults/FormMultiField.js +15 -7
  167. package/lib/components/form/defaults/PasswordField.js +14 -6
  168. package/lib/components/form/defaults/RadioField.js +15 -7
  169. package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +17 -9
  170. package/lib/components/form/defaults/SelectField.js +16 -8
  171. package/lib/components/form/defaults/SelectMultiField.js +15 -7
  172. package/lib/components/form/defaults/TableField.js +14 -6
  173. package/lib/components/form/defaults/TeamField.js +15 -7
  174. package/lib/components/form/defaults/TeamMultiField.js +15 -7
  175. package/lib/components/form/defaults/TextField.js +14 -6
  176. package/lib/components/form/defaults/TextMultiField.js +26 -28
  177. package/lib/components/form/defaults/UserField.js +15 -7
  178. package/lib/components/form/defaults/UserMultiField.js +15 -7
  179. package/lib/components/form/defaults/index.js +48 -41
  180. package/lib/components/form/tests/Form.test.js +568 -864
  181. package/lib/components/form/tests/components.js +15 -25
  182. package/lib/components/form/tests/helpers.test.js +35 -33
  183. package/lib/components/index.js +981 -133
  184. package/lib/components/system/SystemBackgroundTasksTable.js +14 -10
  185. package/lib/components/system/SystemFilestoreForm.js +28 -25
  186. package/lib/components/system/SystemForm.js +19 -16
  187. package/lib/components/system/SystemIngressForm.js +10 -9
  188. package/lib/components/system/SystemSecurityForm.js +17 -14
  189. package/lib/components/system/SystemSmtpForm.js +13 -13
  190. package/lib/components/system/SystemTaskAdapterForm.js +21 -17
  191. package/lib/components/system/SystemUserForm.js +15 -14
  192. package/lib/components/system/helpers.js +62 -60
  193. package/lib/components/system/helpers.test.js +16 -12
  194. package/lib/components/system/spaces/SystemSpaceForm.js +25 -24
  195. package/lib/components/system/spaces/SystemTenantForm.js +43 -40
  196. package/lib/components/system/spaces/SystemTenantTable.js +12 -8
  197. package/lib/components/table/Table.js +219 -225
  198. package/lib/components/table/Table.redux.js +298 -327
  199. package/lib/components/table/Table.redux.test.js +49 -47
  200. package/lib/components/table/Table.test.js +107 -132
  201. package/lib/components/table/defaults/BodyCell.js +12 -6
  202. package/lib/components/table/defaults/BodyRow.js +10 -4
  203. package/lib/components/table/defaults/BooleanFilter.js +17 -11
  204. package/lib/components/table/defaults/EmptyBodyRow.js +12 -6
  205. package/lib/components/table/defaults/FilterLayout.js +17 -11
  206. package/lib/components/table/defaults/Footer.js +11 -5
  207. package/lib/components/table/defaults/FooterCell.js +10 -4
  208. package/lib/components/table/defaults/FooterRow.js +10 -4
  209. package/lib/components/table/defaults/Header.js +10 -4
  210. package/lib/components/table/defaults/HeaderCell.js +16 -10
  211. package/lib/components/table/defaults/HeaderRow.js +10 -4
  212. package/lib/components/table/defaults/PaginationControl.js +18 -9
  213. package/lib/components/table/defaults/TableBody.js +10 -4
  214. package/lib/components/table/defaults/TableLayout.js +12 -6
  215. package/lib/components/table/defaults/TextFilter.js +16 -10
  216. package/lib/components/table/defaults/index.js +41 -33
  217. package/lib/components/task/builder/Connector.js +100 -111
  218. package/lib/components/task/builder/ConnectorForm.js +17 -11
  219. package/lib/components/task/builder/Node.js +101 -83
  220. package/lib/components/task/builder/NodeForm.js +30 -27
  221. package/lib/components/task/builder/NodeParametersForm.js +27 -24
  222. package/lib/components/task/builder/SvgCanvas.js +67 -96
  223. package/lib/components/task/builder/SvgText.js +19 -134
  224. package/lib/components/task/builder/TaskDefinitionConfigForm.js +28 -23
  225. package/lib/components/task/builder/TreeBuilder.js +140 -115
  226. package/lib/components/task/builder/builder.redux.js +322 -300
  227. package/lib/components/task/builder/constants.js +94 -45
  228. package/lib/components/task/builder/helpers.js +184 -173
  229. package/lib/components/task/builder/helpers.test.js +20 -18
  230. package/lib/components/task/builder/models.js +133 -91
  231. package/lib/components/task/category/TaskCategoryForm.js +31 -29
  232. package/lib/components/task/category/TaskCategoryTable.js +12 -8
  233. package/lib/components/task/common/UsageTable.js +16 -12
  234. package/lib/components/task/engine/EngineSettingsForm.js +13 -11
  235. package/lib/components/task/errors/RunErrorTable.js +17 -13
  236. package/lib/components/task/errors/SystemErrorsTable.js +13 -9
  237. package/lib/components/task/handlers/HandlerForm.js +55 -55
  238. package/lib/components/task/handlers/HandlerTable.js +12 -8
  239. package/lib/components/task/handlers/MissingHandlerTable.js +12 -8
  240. package/lib/components/task/policy_rule/PolicyRuleForm.js +33 -32
  241. package/lib/components/task/policy_rule/PolicyRuleTable.js +12 -8
  242. package/lib/components/task/runs/CreateManualTriggerForm.js +17 -15
  243. package/lib/components/task/runs/RunTable.js +23 -20
  244. package/lib/components/task/runs/RunTaskTable.js +10 -6
  245. package/lib/components/task/sources/SourceForm.js +47 -47
  246. package/lib/components/task/sources/SourceTable.js +14 -11
  247. package/lib/components/task/triggers/TriggerTable.js +21 -18
  248. package/lib/components/task/workflows/LinkedWorkflowForm.js +249 -0
  249. package/lib/components/task/workflows/LinkedWorkflowTable.js +137 -0
  250. package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
  251. package/lib/components/task/workflows/WorkflowForm.js +61 -46
  252. package/lib/components/task/workflows/WorkflowTable.js +17 -14
  253. package/lib/helpers/SearchBuilder.js +73 -127
  254. package/lib/helpers/SearchBuilder.test.js +184 -175
  255. package/lib/helpers/index.js +116 -74
  256. package/lib/index.js +86 -38
  257. package/lib/reducer.js +11 -3
  258. package/lib/saga.js +42 -38
  259. package/lib/store.js +59 -35
  260. package/package.json +4 -29
  261. package/proxyhelper.js +105 -47
  262. package/assets/discussions/images/avi_128.png +0 -0
  263. package/assets/discussions/images/excel_128.png +0 -0
  264. package/assets/discussions/images/html_128.png +0 -0
  265. package/assets/discussions/images/illustrator_128.png +0 -0
  266. package/assets/discussions/images/indesign_128.png +0 -0
  267. package/assets/discussions/images/movie_128.png +0 -0
  268. package/assets/discussions/images/mpeg_128.png +0 -0
  269. package/assets/discussions/images/pdf_128.png +0 -0
  270. package/assets/discussions/images/photoshop_128.png +0 -0
  271. package/assets/discussions/images/powerpoint_128.png +0 -0
  272. package/assets/discussions/images/txt_128.png +0 -0
  273. package/assets/discussions/images/unknown_128.png +0 -0
  274. package/assets/discussions/images/word_128.png +0 -0
  275. package/assets/discussions/styles/_discussion.scss +0 -506
  276. package/lib/apis/discussions/index.js +0 -395
  277. package/lib/apis/socket/index.js +0 -77
  278. package/lib/apis/socket/socket.js +0 -350
  279. package/lib/apis/socket/socket.test.js +0 -90
  280. package/lib/apis/socket/timer.js +0 -45
  281. package/lib/apis/socket/timer.test.js +0 -51
  282. package/lib/apis/socket/topic.js +0 -185
  283. package/lib/apis/topics/index.js +0 -19
  284. package/lib/components/discussions/ChatInputForm.js +0 -424
  285. package/lib/components/discussions/DateBanner.js +0 -10
  286. package/lib/components/discussions/Discussion.js +0 -202
  287. package/lib/components/discussions/DiscussionForm.js +0 -227
  288. package/lib/components/discussions/InvitationForm.js +0 -107
  289. package/lib/components/discussions/MessageHistory.js +0 -110
  290. package/lib/components/discussions/MessagesByDate.js +0 -40
  291. package/lib/components/discussions/MessagesList.js +0 -30
  292. package/lib/components/discussions/MoreMessagesBanner.js +0 -26
  293. package/lib/components/discussions/ScrollHelper.js +0 -84
  294. package/lib/components/discussions/SystemMessage.js +0 -88
  295. package/lib/components/discussions/SystemMessageGroup.js +0 -15
  296. package/lib/components/discussions/UserMessage.js +0 -163
  297. package/lib/components/discussions/UserMessageGroup.js +0 -34
  298. package/lib/components/discussions/redux.js +0 -178
  299. package/lib/components/discussions/sagas.js +0 -500
  300. package/lib/helpers/discussions/canManage.js +0 -30
  301. package/lib/helpers/discussions/canManage.test.js +0 -69
  302. package/lib/helpers/discussions/generateSystemMessageContent.js +0 -131
  303. package/lib/helpers/discussions/generateSystemMessageContent.test.js +0 -450
  304. package/lib/models/discussions.js +0 -76
  305. package/lib/models/index.js +0 -1
@@ -1,10 +1,14 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
- import axios from 'axios';
4
- import createError from 'axios/lib/core/createError';
5
- import { fetchAvailableLocales, clearTranslationsCache, fetchStagedTranslations, fetchDefaultLocale, setDefaultLocale, fetchEnabledLocales, enableLocale, disableLocale, fetchContexts, createContext, updateContext, deleteContext, fetchContextKeys, updateContextKey, fetchTranslations, upsertTranslations, deleteTranslations } from './translations';
6
- jest.mock('axios'); // Mock out the bundle object from a dependency.
1
+ "use strict";
7
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
5
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
6
+ var _axios = _interopRequireDefault(require("axios"));
7
+ var _createError = _interopRequireDefault(require("axios/lib/core/createError"));
8
+ var _translations = require("./translations");
9
+ jest.mock('axios');
10
+
11
+ // Mock out the bundle object from a dependency.
8
12
  jest.mock('../../helpers', function () {
9
13
  return {
10
14
  bundle: {
@@ -17,26 +21,25 @@ jest.mock('../../helpers', function () {
17
21
  describe('translations api', function () {
18
22
  describe('fetchAvailableLocales', function () {
19
23
  beforeEach(function () {
20
- axios.get.mockReset();
24
+ _axios["default"].get.mockReset();
21
25
  });
22
- test('success fetch', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
26
+ test('success fetch', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
23
27
  var result;
24
- return _regeneratorRuntime.wrap(function _callee$(_context) {
28
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
25
29
  while (1) {
26
30
  switch (_context.prev = _context.next) {
27
31
  case 0:
28
- axios.get.mockResolvedValue({
32
+ _axios["default"].get.mockResolvedValue({
29
33
  status: 200,
30
34
  data: {
31
35
  locales: [{}, {}]
32
36
  }
33
37
  });
34
38
  _context.next = 3;
35
- return fetchAvailableLocales();
36
-
39
+ return (0, _translations.fetchAvailableLocales)();
37
40
  case 3:
38
41
  result = _context.sent;
39
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/meta/locales', {
42
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/meta/locales', {
40
43
  params: {},
41
44
  headers: {
42
45
  'X-Kinetic-AuthAssumed': 'true'
@@ -45,7 +48,6 @@ describe('translations api', function () {
45
48
  expect(result).toEqual({
46
49
  locales: [{}, {}]
47
50
  });
48
-
49
51
  case 6:
50
52
  case "end":
51
53
  return _context.stop();
@@ -53,26 +55,25 @@ describe('translations api', function () {
53
55
  }
54
56
  }, _callee);
55
57
  })));
56
- test('success fetch localized', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
58
+ test('success fetch localized', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
57
59
  var result;
58
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
60
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
59
61
  while (1) {
60
62
  switch (_context2.prev = _context2.next) {
61
63
  case 0:
62
- axios.get.mockResolvedValue({
64
+ _axios["default"].get.mockResolvedValue({
63
65
  status: 200,
64
66
  data: {
65
67
  locales: [{}, {}]
66
68
  }
67
69
  });
68
70
  _context2.next = 3;
69
- return fetchAvailableLocales({
71
+ return (0, _translations.fetchAvailableLocales)({
70
72
  localeCode: 'en'
71
73
  });
72
-
73
74
  case 3:
74
75
  result = _context2.sent;
75
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/meta/locales', {
76
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/meta/locales', {
76
77
  params: {
77
78
  localized: 'en'
78
79
  },
@@ -83,7 +84,6 @@ describe('translations api', function () {
83
84
  expect(result).toEqual({
84
85
  locales: [{}, {}]
85
86
  });
86
-
87
87
  case 6:
88
88
  case "end":
89
89
  return _context2.stop();
@@ -91,22 +91,21 @@ describe('translations api', function () {
91
91
  }
92
92
  }, _callee2);
93
93
  })));
94
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
94
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
95
95
  var result;
96
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
96
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context3) {
97
97
  while (1) {
98
98
  switch (_context3.prev = _context3.next) {
99
99
  case 0:
100
- axios.get.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
100
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
101
101
  status: 403,
102
102
  statusText: 'Forbidden'
103
103
  }));
104
104
  _context3.next = 3;
105
- return fetchAvailableLocales();
106
-
105
+ return (0, _translations.fetchAvailableLocales)();
107
106
  case 3:
108
107
  result = _context3.sent;
109
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/meta/locales', {
108
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/meta/locales', {
110
109
  params: {},
111
110
  headers: {
112
111
  'X-Kinetic-AuthAssumed': 'true'
@@ -120,7 +119,6 @@ describe('translations api', function () {
120
119
  message: 'Forbidden'
121
120
  }
122
121
  });
123
-
124
122
  case 6:
125
123
  case "end":
126
124
  return _context3.stop();
@@ -131,26 +129,25 @@ describe('translations api', function () {
131
129
  });
132
130
  describe('clearTranslationsCache', function () {
133
131
  beforeEach(function () {
134
- axios["delete"].mockReset();
132
+ _axios["default"]["delete"].mockReset();
135
133
  });
136
- test('success clear', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
134
+ test('success clear', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
137
135
  var result;
138
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
136
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
139
137
  while (1) {
140
138
  switch (_context4.prev = _context4.next) {
141
139
  case 0:
142
- axios["delete"].mockResolvedValue({
140
+ _axios["default"]["delete"].mockResolvedValue({
143
141
  status: 200,
144
142
  data: {
145
143
  message: 'success'
146
144
  }
147
145
  });
148
146
  _context4.next = 3;
149
- return clearTranslationsCache();
150
-
147
+ return (0, _translations.clearTranslationsCache)();
151
148
  case 3:
152
149
  result = _context4.sent;
153
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/cache', {
150
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/cache', {
154
151
  params: {},
155
152
  headers: {
156
153
  'X-Kinetic-AuthAssumed': 'true'
@@ -159,7 +156,6 @@ describe('translations api', function () {
159
156
  expect(result).toEqual({
160
157
  message: 'success'
161
158
  });
162
-
163
159
  case 6:
164
160
  case "end":
165
161
  return _context4.stop();
@@ -167,22 +163,21 @@ describe('translations api', function () {
167
163
  }
168
164
  }, _callee4);
169
165
  })));
170
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
166
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee5() {
171
167
  var result;
172
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
168
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee5$(_context5) {
173
169
  while (1) {
174
170
  switch (_context5.prev = _context5.next) {
175
171
  case 0:
176
- axios["delete"].mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
172
+ _axios["default"]["delete"].mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
177
173
  status: 403,
178
174
  statusText: 'Forbidden'
179
175
  }));
180
176
  _context5.next = 3;
181
- return clearTranslationsCache();
182
-
177
+ return (0, _translations.clearTranslationsCache)();
183
178
  case 3:
184
179
  result = _context5.sent;
185
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/cache', {
180
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/cache', {
186
181
  params: {},
187
182
  headers: {
188
183
  'X-Kinetic-AuthAssumed': 'true'
@@ -196,7 +191,6 @@ describe('translations api', function () {
196
191
  message: 'Forbidden'
197
192
  }
198
193
  });
199
-
200
194
  case 6:
201
195
  case "end":
202
196
  return _context5.stop();
@@ -207,26 +201,25 @@ describe('translations api', function () {
207
201
  });
208
202
  describe('fetchStagedTranslations', function () {
209
203
  beforeEach(function () {
210
- axios.get.mockReset();
204
+ _axios["default"].get.mockReset();
211
205
  });
212
- test('success all staged translations', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
206
+ test('success all staged translations', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee6() {
213
207
  var result;
214
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
208
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee6$(_context6) {
215
209
  while (1) {
216
210
  switch (_context6.prev = _context6.next) {
217
211
  case 0:
218
- axios.get.mockResolvedValue({
212
+ _axios["default"].get.mockResolvedValue({
219
213
  status: 200,
220
214
  data: {
221
215
  changes: [{}, {}]
222
216
  }
223
217
  });
224
218
  _context6.next = 3;
225
- return fetchStagedTranslations();
226
-
219
+ return (0, _translations.fetchStagedTranslations)();
227
220
  case 3:
228
221
  result = _context6.sent;
229
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/staged', {
222
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/staged', {
230
223
  params: {},
231
224
  headers: {
232
225
  'X-Kinetic-AuthAssumed': 'true'
@@ -235,7 +228,6 @@ describe('translations api', function () {
235
228
  expect(result).toEqual({
236
229
  changes: [{}, {}]
237
230
  });
238
-
239
231
  case 6:
240
232
  case "end":
241
233
  return _context6.stop();
@@ -243,26 +235,25 @@ describe('translations api', function () {
243
235
  }
244
236
  }, _callee6);
245
237
  })));
246
- test('success staged translations by contexts', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
238
+ test('success staged translations by contexts', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee7() {
247
239
  var result;
248
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
240
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee7$(_context7) {
249
241
  while (1) {
250
242
  switch (_context7.prev = _context7.next) {
251
243
  case 0:
252
- axios.get.mockResolvedValue({
244
+ _axios["default"].get.mockResolvedValue({
253
245
  status: 200,
254
246
  data: {
255
247
  changes: [{}, {}]
256
248
  }
257
249
  });
258
250
  _context7.next = 3;
259
- return fetchStagedTranslations({
251
+ return (0, _translations.fetchStagedTranslations)({
260
252
  contextName: 'custom.test'
261
253
  });
262
-
263
254
  case 3:
264
255
  result = _context7.sent;
265
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/staged', {
256
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/staged', {
266
257
  params: {
267
258
  context: 'custom.test'
268
259
  },
@@ -273,7 +264,6 @@ describe('translations api', function () {
273
264
  expect(result).toEqual({
274
265
  changes: [{}, {}]
275
266
  });
276
-
277
267
  case 6:
278
268
  case "end":
279
269
  return _context7.stop();
@@ -281,22 +271,21 @@ describe('translations api', function () {
281
271
  }
282
272
  }, _callee7);
283
273
  })));
284
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
274
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee8() {
285
275
  var result;
286
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
276
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee8$(_context8) {
287
277
  while (1) {
288
278
  switch (_context8.prev = _context8.next) {
289
279
  case 0:
290
- axios.get.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
280
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
291
281
  status: 403,
292
282
  statusText: 'Forbidden'
293
283
  }));
294
284
  _context8.next = 3;
295
- return fetchStagedTranslations();
296
-
285
+ return (0, _translations.fetchStagedTranslations)();
297
286
  case 3:
298
287
  result = _context8.sent;
299
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/staged', {
288
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/staged', {
300
289
  params: {},
301
290
  headers: {
302
291
  'X-Kinetic-AuthAssumed': 'true'
@@ -310,7 +299,6 @@ describe('translations api', function () {
310
299
  message: 'Forbidden'
311
300
  }
312
301
  });
313
-
314
302
  case 6:
315
303
  case "end":
316
304
  return _context8.stop();
@@ -321,15 +309,15 @@ describe('translations api', function () {
321
309
  });
322
310
  describe('fetchDefaultLocale', function () {
323
311
  beforeEach(function () {
324
- axios.get.mockReset();
312
+ _axios["default"].get.mockReset();
325
313
  });
326
- test('success fetch', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
314
+ test('success fetch', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee9() {
327
315
  var result;
328
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
316
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee9$(_context9) {
329
317
  while (1) {
330
318
  switch (_context9.prev = _context9.next) {
331
319
  case 0:
332
- axios.get.mockResolvedValue({
320
+ _axios["default"].get.mockResolvedValue({
333
321
  status: 200,
334
322
  data: {
335
323
  defaultLocale: {
@@ -338,11 +326,10 @@ describe('translations api', function () {
338
326
  }
339
327
  });
340
328
  _context9.next = 3;
341
- return fetchDefaultLocale();
342
-
329
+ return (0, _translations.fetchDefaultLocale)();
343
330
  case 3:
344
331
  result = _context9.sent;
345
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
332
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
346
333
  params: {},
347
334
  headers: {
348
335
  'X-Kinetic-AuthAssumed': 'true'
@@ -353,7 +340,6 @@ describe('translations api', function () {
353
340
  code: 'en'
354
341
  }
355
342
  });
356
-
357
343
  case 6:
358
344
  case "end":
359
345
  return _context9.stop();
@@ -361,22 +347,21 @@ describe('translations api', function () {
361
347
  }
362
348
  }, _callee9);
363
349
  })));
364
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
350
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee10() {
365
351
  var result;
366
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
352
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee10$(_context10) {
367
353
  while (1) {
368
354
  switch (_context10.prev = _context10.next) {
369
355
  case 0:
370
- axios.get.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
356
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
371
357
  status: 403,
372
358
  statusText: 'Forbidden'
373
359
  }));
374
360
  _context10.next = 3;
375
- return fetchDefaultLocale();
376
-
361
+ return (0, _translations.fetchDefaultLocale)();
377
362
  case 3:
378
363
  result = _context10.sent;
379
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
364
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
380
365
  params: {},
381
366
  headers: {
382
367
  'X-Kinetic-AuthAssumed': 'true'
@@ -390,7 +375,6 @@ describe('translations api', function () {
390
375
  message: 'Forbidden'
391
376
  }
392
377
  });
393
-
394
378
  case 6:
395
379
  case "end":
396
380
  return _context10.stop();
@@ -401,15 +385,15 @@ describe('translations api', function () {
401
385
  });
402
386
  describe('setDefaultLocale', function () {
403
387
  beforeEach(function () {
404
- axios.put.mockReset();
388
+ _axios["default"].put.mockReset();
405
389
  });
406
- test('success set', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
390
+ test('success set', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee11() {
407
391
  var result;
408
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
392
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee11$(_context11) {
409
393
  while (1) {
410
394
  switch (_context11.prev = _context11.next) {
411
395
  case 0:
412
- axios.put.mockResolvedValue({
396
+ _axios["default"].put.mockResolvedValue({
413
397
  status: 200,
414
398
  data: {
415
399
  defaultLocale: {
@@ -418,13 +402,12 @@ describe('translations api', function () {
418
402
  }
419
403
  });
420
404
  _context11.next = 3;
421
- return setDefaultLocale({
405
+ return (0, _translations.setDefaultLocale)({
422
406
  localeCode: 'en'
423
407
  });
424
-
425
408
  case 3:
426
409
  result = _context11.sent;
427
- expect(axios.put.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
410
+ expect(_axios["default"].put.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
428
411
  code: 'en'
429
412
  }, {
430
413
  params: {},
@@ -437,7 +420,6 @@ describe('translations api', function () {
437
420
  code: 'en'
438
421
  }
439
422
  });
440
-
441
423
  case 6:
442
424
  case "end":
443
425
  return _context11.stop();
@@ -447,27 +429,26 @@ describe('translations api', function () {
447
429
  })));
448
430
  test('missing localeCode', function () {
449
431
  expect(function () {
450
- setDefaultLocale({});
432
+ (0, _translations.setDefaultLocale)({});
451
433
  }).toThrowError('setDefaultLocale failed! The following required options are missing: localeCode');
452
434
  });
453
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
435
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee12() {
454
436
  var result;
455
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
437
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee12$(_context12) {
456
438
  while (1) {
457
439
  switch (_context12.prev = _context12.next) {
458
440
  case 0:
459
- axios.put.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
441
+ _axios["default"].put.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
460
442
  status: 403,
461
443
  statusText: 'Forbidden'
462
444
  }));
463
445
  _context12.next = 3;
464
- return setDefaultLocale({
446
+ return (0, _translations.setDefaultLocale)({
465
447
  localeCode: 'en'
466
448
  });
467
-
468
449
  case 3:
469
450
  result = _context12.sent;
470
- expect(axios.put.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
451
+ expect(_axios["default"].put.mock.calls).toEqual([['space/app/api/v1/translations/settings/defaultLocale', {
471
452
  code: 'en'
472
453
  }, {
473
454
  params: {},
@@ -483,7 +464,6 @@ describe('translations api', function () {
483
464
  message: 'Forbidden'
484
465
  }
485
466
  });
486
-
487
467
  case 6:
488
468
  case "end":
489
469
  return _context12.stop();
@@ -494,26 +474,25 @@ describe('translations api', function () {
494
474
  });
495
475
  describe('fetchEnabledLocales', function () {
496
476
  beforeEach(function () {
497
- axios.get.mockReset();
477
+ _axios["default"].get.mockReset();
498
478
  });
499
- test('success fetch', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
479
+ test('success fetch', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee13() {
500
480
  var result;
501
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
481
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee13$(_context13) {
502
482
  while (1) {
503
483
  switch (_context13.prev = _context13.next) {
504
484
  case 0:
505
- axios.get.mockResolvedValue({
485
+ _axios["default"].get.mockResolvedValue({
506
486
  status: 200,
507
487
  data: {
508
488
  locales: [{}, {}]
509
489
  }
510
490
  });
511
491
  _context13.next = 3;
512
- return fetchEnabledLocales();
513
-
492
+ return (0, _translations.fetchEnabledLocales)();
514
493
  case 3:
515
494
  result = _context13.sent;
516
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
495
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
517
496
  params: {},
518
497
  headers: {
519
498
  'X-Kinetic-AuthAssumed': 'true'
@@ -522,7 +501,6 @@ describe('translations api', function () {
522
501
  expect(result).toEqual({
523
502
  locales: [{}, {}]
524
503
  });
525
-
526
504
  case 6:
527
505
  case "end":
528
506
  return _context13.stop();
@@ -530,22 +508,21 @@ describe('translations api', function () {
530
508
  }
531
509
  }, _callee13);
532
510
  })));
533
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
511
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee14() {
534
512
  var result;
535
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
513
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee14$(_context14) {
536
514
  while (1) {
537
515
  switch (_context14.prev = _context14.next) {
538
516
  case 0:
539
- axios.get.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
517
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
540
518
  status: 403,
541
519
  statusText: 'Forbidden'
542
520
  }));
543
521
  _context14.next = 3;
544
- return fetchEnabledLocales();
545
-
522
+ return (0, _translations.fetchEnabledLocales)();
546
523
  case 3:
547
524
  result = _context14.sent;
548
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
525
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
549
526
  params: {},
550
527
  headers: {
551
528
  'X-Kinetic-AuthAssumed': 'true'
@@ -559,7 +536,6 @@ describe('translations api', function () {
559
536
  message: 'Forbidden'
560
537
  }
561
538
  });
562
-
563
539
  case 6:
564
540
  case "end":
565
541
  return _context14.stop();
@@ -570,15 +546,15 @@ describe('translations api', function () {
570
546
  });
571
547
  describe('enableLocale', function () {
572
548
  beforeEach(function () {
573
- axios.post.mockReset();
549
+ _axios["default"].post.mockReset();
574
550
  });
575
- test('success enable locale', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
551
+ test('success enable locale', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee15() {
576
552
  var result;
577
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
553
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee15$(_context15) {
578
554
  while (1) {
579
555
  switch (_context15.prev = _context15.next) {
580
556
  case 0:
581
- axios.post.mockResolvedValue({
557
+ _axios["default"].post.mockResolvedValue({
582
558
  status: 200,
583
559
  data: {
584
560
  locale: {
@@ -587,13 +563,12 @@ describe('translations api', function () {
587
563
  }
588
564
  });
589
565
  _context15.next = 3;
590
- return enableLocale({
566
+ return (0, _translations.enableLocale)({
591
567
  localeCode: 'en'
592
568
  });
593
-
594
569
  case 3:
595
570
  result = _context15.sent;
596
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
571
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
597
572
  code: 'en'
598
573
  }, {
599
574
  params: {},
@@ -606,7 +581,6 @@ describe('translations api', function () {
606
581
  code: 'en'
607
582
  }
608
583
  });
609
-
610
584
  case 6:
611
585
  case "end":
612
586
  return _context15.stop();
@@ -616,27 +590,26 @@ describe('translations api', function () {
616
590
  })));
617
591
  test('missing localeCode', function () {
618
592
  expect(function () {
619
- enableLocale({});
593
+ (0, _translations.enableLocale)({});
620
594
  }).toThrowError('enableLocale failed! The following required options are missing: localeCode');
621
595
  });
622
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
596
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee16() {
623
597
  var result;
624
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
598
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee16$(_context16) {
625
599
  while (1) {
626
600
  switch (_context16.prev = _context16.next) {
627
601
  case 0:
628
- axios.post.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
602
+ _axios["default"].post.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
629
603
  status: 403,
630
604
  statusText: 'Forbidden'
631
605
  }));
632
606
  _context16.next = 3;
633
- return enableLocale({
607
+ return (0, _translations.enableLocale)({
634
608
  localeCode: 'en'
635
609
  });
636
-
637
610
  case 3:
638
611
  result = _context16.sent;
639
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
612
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/settings/locales', {
640
613
  code: 'en'
641
614
  }, {
642
615
  params: {},
@@ -652,7 +625,6 @@ describe('translations api', function () {
652
625
  message: 'Forbidden'
653
626
  }
654
627
  });
655
-
656
628
  case 6:
657
629
  case "end":
658
630
  return _context16.stop();
@@ -663,15 +635,15 @@ describe('translations api', function () {
663
635
  });
664
636
  describe('disableLocale', function () {
665
637
  beforeEach(function () {
666
- axios["delete"].mockReset();
638
+ _axios["default"]["delete"].mockReset();
667
639
  });
668
- test('success disable locale', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
640
+ test('success disable locale', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee17() {
669
641
  var result;
670
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
642
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee17$(_context17) {
671
643
  while (1) {
672
644
  switch (_context17.prev = _context17.next) {
673
645
  case 0:
674
- axios["delete"].mockResolvedValue({
646
+ _axios["default"]["delete"].mockResolvedValue({
675
647
  status: 200,
676
648
  data: {
677
649
  locale: {
@@ -680,13 +652,12 @@ describe('translations api', function () {
680
652
  }
681
653
  });
682
654
  _context17.next = 3;
683
- return disableLocale({
655
+ return (0, _translations.disableLocale)({
684
656
  localeCode: 'en'
685
657
  });
686
-
687
658
  case 3:
688
659
  result = _context17.sent;
689
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/settings/locales/en', {
660
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/settings/locales/en', {
690
661
  params: {},
691
662
  headers: {
692
663
  'X-Kinetic-AuthAssumed': 'true'
@@ -697,7 +668,6 @@ describe('translations api', function () {
697
668
  code: 'en'
698
669
  }
699
670
  });
700
-
701
671
  case 6:
702
672
  case "end":
703
673
  return _context17.stop();
@@ -707,27 +677,26 @@ describe('translations api', function () {
707
677
  })));
708
678
  test('missing localeCode', function () {
709
679
  expect(function () {
710
- disableLocale({});
680
+ (0, _translations.disableLocale)({});
711
681
  }).toThrowError('disableLocale failed! The following required options are missing: localeCode');
712
682
  });
713
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
683
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee18() {
714
684
  var result;
715
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
685
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee18$(_context18) {
716
686
  while (1) {
717
687
  switch (_context18.prev = _context18.next) {
718
688
  case 0:
719
- axios["delete"].mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
689
+ _axios["default"]["delete"].mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
720
690
  status: 403,
721
691
  statusText: 'Forbidden'
722
692
  }));
723
693
  _context18.next = 3;
724
- return disableLocale({
694
+ return (0, _translations.disableLocale)({
725
695
  localeCode: 'en'
726
696
  });
727
-
728
697
  case 3:
729
698
  result = _context18.sent;
730
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/settings/locales/en', {
699
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/settings/locales/en', {
731
700
  params: {},
732
701
  headers: {
733
702
  'X-Kinetic-AuthAssumed': 'true'
@@ -741,7 +710,6 @@ describe('translations api', function () {
741
710
  message: 'Forbidden'
742
711
  }
743
712
  });
744
-
745
713
  case 6:
746
714
  case "end":
747
715
  return _context18.stop();
@@ -752,15 +720,15 @@ describe('translations api', function () {
752
720
  });
753
721
  describe('fetchContexts', function () {
754
722
  beforeEach(function () {
755
- axios.get.mockReset();
723
+ _axios["default"].get.mockReset();
756
724
  });
757
- test('success fetch custom', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
725
+ test('success fetch custom', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee19() {
758
726
  var result;
759
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
727
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee19$(_context19) {
760
728
  while (1) {
761
729
  switch (_context19.prev = _context19.next) {
762
730
  case 0:
763
- axios.get.mockResolvedValue({
731
+ _axios["default"].get.mockResolvedValue({
764
732
  status: 200,
765
733
  data: {
766
734
  contexts: [{
@@ -769,13 +737,12 @@ describe('translations api', function () {
769
737
  }
770
738
  });
771
739
  _context19.next = 3;
772
- return fetchContexts({
740
+ return (0, _translations.fetchContexts)({
773
741
  custom: true
774
742
  });
775
-
776
743
  case 3:
777
744
  result = _context19.sent;
778
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
745
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
779
746
  params: {
780
747
  custom: true
781
748
  },
@@ -790,7 +757,6 @@ describe('translations api', function () {
790
757
  form: null
791
758
  }]
792
759
  });
793
-
794
760
  case 6:
795
761
  case "end":
796
762
  return _context19.stop();
@@ -798,13 +764,13 @@ describe('translations api', function () {
798
764
  }
799
765
  }, _callee19);
800
766
  })));
801
- test('success fetch expected', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
767
+ test('success fetch expected', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee20() {
802
768
  var result;
803
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
769
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee20$(_context20) {
804
770
  while (1) {
805
771
  switch (_context20.prev = _context20.next) {
806
772
  case 0:
807
- axios.get.mockResolvedValue({
773
+ _axios["default"].get.mockResolvedValue({
808
774
  status: 200,
809
775
  data: {
810
776
  contexts: [{
@@ -817,13 +783,12 @@ describe('translations api', function () {
817
783
  }
818
784
  });
819
785
  _context20.next = 3;
820
- return fetchContexts({
786
+ return (0, _translations.fetchContexts)({
821
787
  expected: true
822
788
  });
823
-
824
789
  case 3:
825
790
  result = _context20.sent;
826
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
791
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
827
792
  params: {
828
793
  expected: true
829
794
  },
@@ -846,7 +811,6 @@ describe('translations api', function () {
846
811
  form: 'formSlug'
847
812
  }]
848
813
  });
849
-
850
814
  case 6:
851
815
  case "end":
852
816
  return _context20.stop();
@@ -854,13 +818,13 @@ describe('translations api', function () {
854
818
  }
855
819
  }, _callee20);
856
820
  })));
857
- test('success fetch unexpected', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
821
+ test('success fetch unexpected', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee21() {
858
822
  var result;
859
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
823
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee21$(_context21) {
860
824
  while (1) {
861
825
  switch (_context21.prev = _context21.next) {
862
826
  case 0:
863
- axios.get.mockResolvedValue({
827
+ _axios["default"].get.mockResolvedValue({
864
828
  status: 200,
865
829
  data: {
866
830
  contexts: [{
@@ -869,13 +833,12 @@ describe('translations api', function () {
869
833
  }
870
834
  });
871
835
  _context21.next = 3;
872
- return fetchContexts({
836
+ return (0, _translations.fetchContexts)({
873
837
  unexpected: true
874
838
  });
875
-
876
839
  case 3:
877
840
  result = _context21.sent;
878
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
841
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
879
842
  params: {
880
843
  unexpected: true
881
844
  },
@@ -890,7 +853,6 @@ describe('translations api', function () {
890
853
  form: 'deletedFormSlug'
891
854
  }]
892
855
  });
893
-
894
856
  case 6:
895
857
  case "end":
896
858
  return _context21.stop();
@@ -898,25 +860,24 @@ describe('translations api', function () {
898
860
  }
899
861
  }, _callee21);
900
862
  })));
901
- test('failure fetch tooManyFlags', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
863
+ test('failure fetch tooManyFlags', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee22() {
902
864
  var result;
903
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
865
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee22$(_context22) {
904
866
  while (1) {
905
867
  switch (_context22.prev = _context22.next) {
906
868
  case 0:
907
- axios.get.mockRejectedValue(createError('Request failed with status code 400', null, 400, null, {
869
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 400', null, 400, null, {
908
870
  status: 400,
909
871
  statusText: 'The custom, expected, and unexpected flags can only be specified independently.'
910
872
  }));
911
873
  _context22.next = 3;
912
- return fetchContexts({
874
+ return (0, _translations.fetchContexts)({
913
875
  expected: true,
914
876
  unexpected: true
915
877
  });
916
-
917
878
  case 3:
918
879
  result = _context22.sent;
919
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
880
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
920
881
  params: {
921
882
  expected: true
922
883
  },
@@ -932,7 +893,6 @@ describe('translations api', function () {
932
893
  message: 'The custom, expected, and unexpected flags can only be specified independently.'
933
894
  }
934
895
  });
935
-
936
896
  case 6:
937
897
  case "end":
938
898
  return _context22.stop();
@@ -940,22 +900,21 @@ describe('translations api', function () {
940
900
  }
941
901
  }, _callee22);
942
902
  })));
943
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
903
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee23() {
944
904
  var result;
945
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
905
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee23$(_context23) {
946
906
  while (1) {
947
907
  switch (_context23.prev = _context23.next) {
948
908
  case 0:
949
- axios.get.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
909
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
950
910
  status: 403,
951
911
  statusText: 'Forbidden'
952
912
  }));
953
913
  _context23.next = 3;
954
- return fetchContexts();
955
-
914
+ return (0, _translations.fetchContexts)();
956
915
  case 3:
957
916
  result = _context23.sent;
958
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
917
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
959
918
  params: {},
960
919
  headers: {
961
920
  'X-Kinetic-AuthAssumed': 'true'
@@ -969,7 +928,6 @@ describe('translations api', function () {
969
928
  message: 'Forbidden'
970
929
  }
971
930
  });
972
-
973
931
  case 6:
974
932
  case "end":
975
933
  return _context23.stop();
@@ -980,30 +938,29 @@ describe('translations api', function () {
980
938
  });
981
939
  describe('createContext', function () {
982
940
  beforeEach(function () {
983
- axios.post.mockReset();
941
+ _axios["default"].post.mockReset();
984
942
  });
985
- test('success create', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
943
+ test('success create', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee24() {
986
944
  var result;
987
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
945
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee24$(_context24) {
988
946
  while (1) {
989
947
  switch (_context24.prev = _context24.next) {
990
948
  case 0:
991
- axios.post.mockResolvedValue({
949
+ _axios["default"].post.mockResolvedValue({
992
950
  status: 200,
993
951
  data: {
994
952
  context: {}
995
953
  }
996
954
  });
997
955
  _context24.next = 3;
998
- return createContext({
956
+ return (0, _translations.createContext)({
999
957
  context: {
1000
958
  name: 'custom.test'
1001
959
  }
1002
960
  });
1003
-
1004
961
  case 3:
1005
962
  result = _context24.sent;
1006
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
963
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {
1007
964
  name: 'custom.test'
1008
965
  }, {
1009
966
  params: {},
@@ -1014,7 +971,6 @@ describe('translations api', function () {
1014
971
  expect(result).toEqual({
1015
972
  context: {}
1016
973
  });
1017
-
1018
974
  case 6:
1019
975
  case "end":
1020
976
  return _context24.stop();
@@ -1024,27 +980,26 @@ describe('translations api', function () {
1024
980
  })));
1025
981
  test('missing context', function () {
1026
982
  expect(function () {
1027
- createContext({});
983
+ (0, _translations.createContext)({});
1028
984
  }).toThrowError('createContext failed! The following required options are missing: context');
1029
985
  });
1030
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
986
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee25() {
1031
987
  var result;
1032
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
988
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee25$(_context25) {
1033
989
  while (1) {
1034
990
  switch (_context25.prev = _context25.next) {
1035
991
  case 0:
1036
- axios.post.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
992
+ _axios["default"].post.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
1037
993
  status: 403,
1038
994
  statusText: 'Forbidden'
1039
995
  }));
1040
996
  _context25.next = 3;
1041
- return createContext({
997
+ return (0, _translations.createContext)({
1042
998
  context: {}
1043
999
  });
1044
-
1045
1000
  case 3:
1046
1001
  result = _context25.sent;
1047
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {}, {
1002
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/contexts', {}, {
1048
1003
  params: {},
1049
1004
  headers: {
1050
1005
  'X-Kinetic-AuthAssumed': 'true'
@@ -1058,7 +1013,6 @@ describe('translations api', function () {
1058
1013
  message: 'Forbidden'
1059
1014
  }
1060
1015
  });
1061
-
1062
1016
  case 6:
1063
1017
  case "end":
1064
1018
  return _context25.stop();
@@ -1069,31 +1023,30 @@ describe('translations api', function () {
1069
1023
  });
1070
1024
  describe('updateContext', function () {
1071
1025
  beforeEach(function () {
1072
- axios.put.mockReset();
1026
+ _axios["default"].put.mockReset();
1073
1027
  });
1074
- test('success update', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
1028
+ test('success update', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee26() {
1075
1029
  var result;
1076
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
1030
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee26$(_context26) {
1077
1031
  while (1) {
1078
1032
  switch (_context26.prev = _context26.next) {
1079
1033
  case 0:
1080
- axios.put.mockResolvedValue({
1034
+ _axios["default"].put.mockResolvedValue({
1081
1035
  status: 200,
1082
1036
  data: {
1083
1037
  context: {}
1084
1038
  }
1085
1039
  });
1086
1040
  _context26.next = 3;
1087
- return updateContext({
1041
+ return (0, _translations.updateContext)({
1088
1042
  contextName: 'custom.test',
1089
1043
  context: {
1090
1044
  name: 'custom.other'
1091
1045
  }
1092
1046
  });
1093
-
1094
1047
  case 3:
1095
1048
  result = _context26.sent;
1096
- expect(axios.put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {
1049
+ expect(_axios["default"].put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {
1097
1050
  name: 'custom.other'
1098
1051
  }, {
1099
1052
  params: {},
@@ -1104,7 +1057,6 @@ describe('translations api', function () {
1104
1057
  expect(result).toEqual({
1105
1058
  context: {}
1106
1059
  });
1107
-
1108
1060
  case 6:
1109
1061
  case "end":
1110
1062
  return _context26.stop();
@@ -1114,37 +1066,36 @@ describe('translations api', function () {
1114
1066
  })));
1115
1067
  test('missing contextName', function () {
1116
1068
  expect(function () {
1117
- updateContext({
1069
+ (0, _translations.updateContext)({
1118
1070
  context: {}
1119
1071
  });
1120
1072
  }).toThrowError('updateContext failed! The following required options are missing: contextName');
1121
1073
  });
1122
1074
  test('missing context', function () {
1123
1075
  expect(function () {
1124
- updateContext({
1076
+ (0, _translations.updateContext)({
1125
1077
  contextName: 'custom.test'
1126
1078
  });
1127
1079
  }).toThrowError('updateContext failed! The following required options are missing: context');
1128
1080
  });
1129
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
1081
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee27() {
1130
1082
  var result;
1131
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
1083
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee27$(_context27) {
1132
1084
  while (1) {
1133
1085
  switch (_context27.prev = _context27.next) {
1134
1086
  case 0:
1135
- axios.put.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
1087
+ _axios["default"].put.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
1136
1088
  status: 403,
1137
1089
  statusText: 'Forbidden'
1138
1090
  }));
1139
1091
  _context27.next = 3;
1140
- return updateContext({
1092
+ return (0, _translations.updateContext)({
1141
1093
  contextName: 'custom.test',
1142
1094
  context: {}
1143
1095
  });
1144
-
1145
1096
  case 3:
1146
1097
  result = _context27.sent;
1147
- expect(axios.put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {}, {
1098
+ expect(_axios["default"].put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {}, {
1148
1099
  params: {},
1149
1100
  headers: {
1150
1101
  'X-Kinetic-AuthAssumed': 'true'
@@ -1158,7 +1109,6 @@ describe('translations api', function () {
1158
1109
  message: 'Forbidden'
1159
1110
  }
1160
1111
  });
1161
-
1162
1112
  case 6:
1163
1113
  case "end":
1164
1114
  return _context27.stop();
@@ -1169,28 +1119,27 @@ describe('translations api', function () {
1169
1119
  });
1170
1120
  describe('deleteContext', function () {
1171
1121
  beforeEach(function () {
1172
- axios["delete"].mockReset();
1122
+ _axios["default"]["delete"].mockReset();
1173
1123
  });
1174
- test('success delete', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
1124
+ test('success delete', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee28() {
1175
1125
  var result;
1176
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1126
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee28$(_context28) {
1177
1127
  while (1) {
1178
1128
  switch (_context28.prev = _context28.next) {
1179
1129
  case 0:
1180
- axios["delete"].mockResolvedValue({
1130
+ _axios["default"]["delete"].mockResolvedValue({
1181
1131
  status: 200,
1182
1132
  data: {
1183
1133
  context: {}
1184
1134
  }
1185
1135
  });
1186
1136
  _context28.next = 3;
1187
- return deleteContext({
1137
+ return (0, _translations.deleteContext)({
1188
1138
  contextName: 'custom.test'
1189
1139
  });
1190
-
1191
1140
  case 3:
1192
1141
  result = _context28.sent;
1193
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {
1142
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {
1194
1143
  params: {},
1195
1144
  headers: {
1196
1145
  'X-Kinetic-AuthAssumed': 'true'
@@ -1199,7 +1148,6 @@ describe('translations api', function () {
1199
1148
  expect(result).toEqual({
1200
1149
  context: {}
1201
1150
  });
1202
-
1203
1151
  case 6:
1204
1152
  case "end":
1205
1153
  return _context28.stop();
@@ -1209,27 +1157,26 @@ describe('translations api', function () {
1209
1157
  })));
1210
1158
  test('missing contextName', function () {
1211
1159
  expect(function () {
1212
- deleteContext();
1160
+ (0, _translations.deleteContext)();
1213
1161
  }).toThrowError('deleteContext failed! The following required options are missing: contextName');
1214
1162
  });
1215
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
1163
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee29() {
1216
1164
  var result;
1217
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1165
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee29$(_context29) {
1218
1166
  while (1) {
1219
1167
  switch (_context29.prev = _context29.next) {
1220
1168
  case 0:
1221
- axios["delete"].mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
1169
+ _axios["default"]["delete"].mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
1222
1170
  status: 403,
1223
1171
  statusText: 'Forbidden'
1224
1172
  }));
1225
1173
  _context29.next = 3;
1226
- return deleteContext({
1174
+ return (0, _translations.deleteContext)({
1227
1175
  contextName: 'custom.test'
1228
1176
  });
1229
-
1230
1177
  case 3:
1231
1178
  result = _context29.sent;
1232
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {
1179
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test', {
1233
1180
  params: {},
1234
1181
  headers: {
1235
1182
  'X-Kinetic-AuthAssumed': 'true'
@@ -1243,7 +1190,6 @@ describe('translations api', function () {
1243
1190
  message: 'Forbidden'
1244
1191
  }
1245
1192
  });
1246
-
1247
1193
  case 6:
1248
1194
  case "end":
1249
1195
  return _context29.stop();
@@ -1254,28 +1200,27 @@ describe('translations api', function () {
1254
1200
  });
1255
1201
  describe('fetchContextKeys', function () {
1256
1202
  beforeEach(function () {
1257
- axios.get.mockReset();
1203
+ _axios["default"].get.mockReset();
1258
1204
  });
1259
- test('success fetch', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
1205
+ test('success fetch', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee30() {
1260
1206
  var result;
1261
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
1207
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee30$(_context30) {
1262
1208
  while (1) {
1263
1209
  switch (_context30.prev = _context30.next) {
1264
1210
  case 0:
1265
- axios.get.mockResolvedValue({
1211
+ _axios["default"].get.mockResolvedValue({
1266
1212
  status: 200,
1267
1213
  data: {
1268
1214
  keys: [{}, {}]
1269
1215
  }
1270
1216
  });
1271
1217
  _context30.next = 3;
1272
- return fetchContextKeys({
1218
+ return (0, _translations.fetchContextKeys)({
1273
1219
  contextName: 'custom.test'
1274
1220
  });
1275
-
1276
1221
  case 3:
1277
1222
  result = _context30.sent;
1278
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys', {
1223
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys', {
1279
1224
  params: {},
1280
1225
  headers: {
1281
1226
  'X-Kinetic-AuthAssumed': 'true'
@@ -1284,7 +1229,6 @@ describe('translations api', function () {
1284
1229
  expect(result).toEqual({
1285
1230
  keys: [{}, {}]
1286
1231
  });
1287
-
1288
1232
  case 6:
1289
1233
  case "end":
1290
1234
  return _context30.stop();
@@ -1294,27 +1238,26 @@ describe('translations api', function () {
1294
1238
  })));
1295
1239
  test('missing contextName', function () {
1296
1240
  expect(function () {
1297
- fetchContextKeys();
1241
+ (0, _translations.fetchContextKeys)();
1298
1242
  }).toThrowError('fetchContextKeys failed! The following required options are missing: contextName');
1299
1243
  });
1300
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
1244
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee31() {
1301
1245
  var result;
1302
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
1246
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee31$(_context31) {
1303
1247
  while (1) {
1304
1248
  switch (_context31.prev = _context31.next) {
1305
1249
  case 0:
1306
- axios.get.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
1250
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
1307
1251
  status: 403,
1308
1252
  statusText: 'Forbidden'
1309
1253
  }));
1310
1254
  _context31.next = 3;
1311
- return fetchContextKeys({
1255
+ return (0, _translations.fetchContextKeys)({
1312
1256
  contextName: 'custom.test'
1313
1257
  });
1314
-
1315
1258
  case 3:
1316
1259
  result = _context31.sent;
1317
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys', {
1260
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys', {
1318
1261
  params: {},
1319
1262
  headers: {
1320
1263
  'X-Kinetic-AuthAssumed': 'true'
@@ -1328,7 +1271,6 @@ describe('translations api', function () {
1328
1271
  message: 'Forbidden'
1329
1272
  }
1330
1273
  });
1331
-
1332
1274
  case 6:
1333
1275
  case "end":
1334
1276
  return _context31.stop();
@@ -1339,32 +1281,31 @@ describe('translations api', function () {
1339
1281
  });
1340
1282
  describe('updateContextKey', function () {
1341
1283
  beforeEach(function () {
1342
- axios.put.mockReset();
1284
+ _axios["default"].put.mockReset();
1343
1285
  });
1344
- test('success update', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
1286
+ test('success update', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee32() {
1345
1287
  var result;
1346
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1288
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee32$(_context32) {
1347
1289
  while (1) {
1348
1290
  switch (_context32.prev = _context32.next) {
1349
1291
  case 0:
1350
- axios.put.mockResolvedValue({
1292
+ _axios["default"].put.mockResolvedValue({
1351
1293
  status: 200,
1352
1294
  data: {
1353
1295
  message: 'success'
1354
1296
  }
1355
1297
  });
1356
1298
  _context32.next = 3;
1357
- return updateContextKey({
1299
+ return (0, _translations.updateContextKey)({
1358
1300
  contextName: 'custom.test',
1359
1301
  keyHash: 'asdf',
1360
1302
  key: {
1361
1303
  name: 'newKey'
1362
1304
  }
1363
1305
  });
1364
-
1365
1306
  case 3:
1366
1307
  result = _context32.sent;
1367
- expect(axios.put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys/asdf', {
1308
+ expect(_axios["default"].put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys/asdf', {
1368
1309
  name: 'newKey'
1369
1310
  }, {
1370
1311
  params: {},
@@ -1375,7 +1316,6 @@ describe('translations api', function () {
1375
1316
  expect(result).toEqual({
1376
1317
  message: 'success'
1377
1318
  });
1378
-
1379
1319
  case 6:
1380
1320
  case "end":
1381
1321
  return _context32.stop();
@@ -1385,7 +1325,7 @@ describe('translations api', function () {
1385
1325
  })));
1386
1326
  test('missing contextName', function () {
1387
1327
  expect(function () {
1388
- updateContextKey({
1328
+ (0, _translations.updateContextKey)({
1389
1329
  keyHash: 'asdf',
1390
1330
  key: {}
1391
1331
  });
@@ -1393,7 +1333,7 @@ describe('translations api', function () {
1393
1333
  });
1394
1334
  test('missing keyHash', function () {
1395
1335
  expect(function () {
1396
- updateContextKey({
1336
+ (0, _translations.updateContextKey)({
1397
1337
  contextName: 'custom.test',
1398
1338
  key: {}
1399
1339
  });
@@ -1401,34 +1341,33 @@ describe('translations api', function () {
1401
1341
  });
1402
1342
  test('missing key', function () {
1403
1343
  expect(function () {
1404
- updateContextKey({
1344
+ (0, _translations.updateContextKey)({
1405
1345
  contextName: 'custom.test',
1406
1346
  keyHash: 'asdf'
1407
1347
  });
1408
1348
  }).toThrowError('updateContextKey failed! The following required options are missing: key');
1409
1349
  });
1410
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
1350
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee33() {
1411
1351
  var result;
1412
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
1352
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee33$(_context33) {
1413
1353
  while (1) {
1414
1354
  switch (_context33.prev = _context33.next) {
1415
1355
  case 0:
1416
- axios.put.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
1356
+ _axios["default"].put.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
1417
1357
  status: 403,
1418
1358
  statusText: 'Forbidden'
1419
1359
  }));
1420
1360
  _context33.next = 3;
1421
- return updateContextKey({
1361
+ return (0, _translations.updateContextKey)({
1422
1362
  contextName: 'custom.test',
1423
1363
  keyHash: 'asdf',
1424
1364
  key: {
1425
1365
  name: 'newKey'
1426
1366
  }
1427
1367
  });
1428
-
1429
1368
  case 3:
1430
1369
  result = _context33.sent;
1431
- expect(axios.put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys/asdf', {
1370
+ expect(_axios["default"].put.mock.calls).toEqual([['space/app/api/v1/translations/contexts/custom.test/keys/asdf', {
1432
1371
  name: 'newKey'
1433
1372
  }, {
1434
1373
  params: {},
@@ -1444,7 +1383,6 @@ describe('translations api', function () {
1444
1383
  message: 'Forbidden'
1445
1384
  }
1446
1385
  });
1447
-
1448
1386
  case 6:
1449
1387
  case "end":
1450
1388
  return _context33.stop();
@@ -1455,30 +1393,29 @@ describe('translations api', function () {
1455
1393
  });
1456
1394
  describe('fetchTranslations', function () {
1457
1395
  beforeEach(function () {
1458
- axios.get.mockReset();
1396
+ _axios["default"].get.mockReset();
1459
1397
  });
1460
- test('success fetch cached', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34() {
1398
+ test('success fetch cached', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee34() {
1461
1399
  var result;
1462
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
1400
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee34$(_context34) {
1463
1401
  while (1) {
1464
1402
  switch (_context34.prev = _context34.next) {
1465
1403
  case 0:
1466
- axios.get.mockResolvedValue({
1404
+ _axios["default"].get.mockResolvedValue({
1467
1405
  status: 200,
1468
1406
  data: {
1469
1407
  entries: [{}, {}]
1470
1408
  }
1471
1409
  });
1472
1410
  _context34.next = 3;
1473
- return fetchTranslations({
1411
+ return (0, _translations.fetchTranslations)({
1474
1412
  cache: true,
1475
1413
  contextName: 'custom.test',
1476
1414
  localeCode: 'en'
1477
1415
  });
1478
-
1479
1416
  case 3:
1480
1417
  result = _context34.sent;
1481
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1418
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1482
1419
  params: {
1483
1420
  cache: true,
1484
1421
  context: 'custom.test',
@@ -1491,7 +1428,6 @@ describe('translations api', function () {
1491
1428
  expect(result).toEqual({
1492
1429
  entries: [{}, {}]
1493
1430
  });
1494
-
1495
1431
  case 6:
1496
1432
  case "end":
1497
1433
  return _context34.stop();
@@ -1501,7 +1437,7 @@ describe('translations api', function () {
1501
1437
  })));
1502
1438
  test('missing contextName', function () {
1503
1439
  expect(function () {
1504
- fetchTranslations({
1440
+ (0, _translations.fetchTranslations)({
1505
1441
  cache: true,
1506
1442
  localeCode: 'en'
1507
1443
  });
@@ -1509,33 +1445,32 @@ describe('translations api', function () {
1509
1445
  });
1510
1446
  test('missing localeCode', function () {
1511
1447
  expect(function () {
1512
- fetchTranslations({
1448
+ (0, _translations.fetchTranslations)({
1513
1449
  cache: true,
1514
1450
  contextName: 'custom.test'
1515
1451
  });
1516
1452
  }).toThrowError('fetchTranslations failed! The following required options are missing: localeCode');
1517
1453
  });
1518
- test('success fetch by context and locale', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35() {
1454
+ test('success fetch by context and locale', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee35() {
1519
1455
  var result;
1520
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
1456
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee35$(_context35) {
1521
1457
  while (1) {
1522
1458
  switch (_context35.prev = _context35.next) {
1523
1459
  case 0:
1524
- axios.get.mockResolvedValue({
1460
+ _axios["default"].get.mockResolvedValue({
1525
1461
  status: 200,
1526
1462
  data: {
1527
1463
  entries: [{}, {}]
1528
1464
  }
1529
1465
  });
1530
1466
  _context35.next = 3;
1531
- return fetchTranslations({
1467
+ return (0, _translations.fetchTranslations)({
1532
1468
  contextName: 'custom.test',
1533
1469
  localeCode: 'en'
1534
1470
  });
1535
-
1536
1471
  case 3:
1537
1472
  result = _context35.sent;
1538
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1473
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1539
1474
  params: {
1540
1475
  context: 'custom.test',
1541
1476
  locale: 'en'
@@ -1547,7 +1482,6 @@ describe('translations api', function () {
1547
1482
  expect(result).toEqual({
1548
1483
  entries: [{}, {}]
1549
1484
  });
1550
-
1551
1485
  case 6:
1552
1486
  case "end":
1553
1487
  return _context35.stop();
@@ -1555,27 +1489,26 @@ describe('translations api', function () {
1555
1489
  }
1556
1490
  }, _callee35);
1557
1491
  })));
1558
- test('success fetch by context and keyHash', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36() {
1492
+ test('success fetch by context and keyHash', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee36() {
1559
1493
  var result;
1560
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
1494
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee36$(_context36) {
1561
1495
  while (1) {
1562
1496
  switch (_context36.prev = _context36.next) {
1563
1497
  case 0:
1564
- axios.get.mockResolvedValue({
1498
+ _axios["default"].get.mockResolvedValue({
1565
1499
  status: 200,
1566
1500
  data: {
1567
1501
  entries: [{}, {}]
1568
1502
  }
1569
1503
  });
1570
1504
  _context36.next = 3;
1571
- return fetchTranslations({
1505
+ return (0, _translations.fetchTranslations)({
1572
1506
  contextName: 'custom.test',
1573
1507
  keyHash: 'asdf'
1574
1508
  });
1575
-
1576
1509
  case 3:
1577
1510
  result = _context36.sent;
1578
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1511
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1579
1512
  params: {
1580
1513
  context: 'custom.test',
1581
1514
  keyHash: 'asdf'
@@ -1587,7 +1520,6 @@ describe('translations api', function () {
1587
1520
  expect(result).toEqual({
1588
1521
  entries: [{}, {}]
1589
1522
  });
1590
-
1591
1523
  case 6:
1592
1524
  case "end":
1593
1525
  return _context36.stop();
@@ -1595,26 +1527,25 @@ describe('translations api', function () {
1595
1527
  }
1596
1528
  }, _callee36);
1597
1529
  })));
1598
- test('success fetch missing', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37() {
1530
+ test('success fetch missing', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee37() {
1599
1531
  var result;
1600
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
1532
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee37$(_context37) {
1601
1533
  while (1) {
1602
1534
  switch (_context37.prev = _context37.next) {
1603
1535
  case 0:
1604
- axios.get.mockResolvedValue({
1536
+ _axios["default"].get.mockResolvedValue({
1605
1537
  status: 200,
1606
1538
  data: {
1607
1539
  entries: [{}, {}]
1608
1540
  }
1609
1541
  });
1610
1542
  _context37.next = 3;
1611
- return fetchTranslations({
1543
+ return (0, _translations.fetchTranslations)({
1612
1544
  missing: true
1613
1545
  });
1614
-
1615
1546
  case 3:
1616
1547
  result = _context37.sent;
1617
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1548
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1618
1549
  params: {
1619
1550
  missing: true
1620
1551
  },
@@ -1625,7 +1556,6 @@ describe('translations api', function () {
1625
1556
  expect(result).toEqual({
1626
1557
  entries: [{}, {}]
1627
1558
  });
1628
-
1629
1559
  case 6:
1630
1560
  case "end":
1631
1561
  return _context37.stop();
@@ -1633,26 +1563,25 @@ describe('translations api', function () {
1633
1563
  }
1634
1564
  }, _callee37);
1635
1565
  })));
1636
- test('success export', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38() {
1566
+ test('success export', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee38() {
1637
1567
  var result;
1638
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
1568
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee38$(_context38) {
1639
1569
  while (1) {
1640
1570
  switch (_context38.prev = _context38.next) {
1641
1571
  case 0:
1642
- axios.get.mockResolvedValue({
1572
+ _axios["default"].get.mockResolvedValue({
1643
1573
  status: 200,
1644
1574
  data: {
1645
1575
  entries: null
1646
1576
  }
1647
1577
  });
1648
1578
  _context38.next = 3;
1649
- return fetchTranslations({
1579
+ return (0, _translations.fetchTranslations)({
1650
1580
  "export": 'csv'
1651
1581
  });
1652
-
1653
1582
  case 3:
1654
1583
  result = _context38.sent;
1655
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1584
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1656
1585
  params: {
1657
1586
  "export": 'csv',
1658
1587
  download: true
@@ -1664,7 +1593,6 @@ describe('translations api', function () {
1664
1593
  expect(result).toEqual({
1665
1594
  entries: null
1666
1595
  });
1667
-
1668
1596
  case 6:
1669
1597
  case "end":
1670
1598
  return _context38.stop();
@@ -1672,22 +1600,21 @@ describe('translations api', function () {
1672
1600
  }
1673
1601
  }, _callee38);
1674
1602
  })));
1675
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39() {
1603
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee39() {
1676
1604
  var result;
1677
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
1605
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee39$(_context39) {
1678
1606
  while (1) {
1679
1607
  switch (_context39.prev = _context39.next) {
1680
1608
  case 0:
1681
- axios.get.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
1609
+ _axios["default"].get.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
1682
1610
  status: 403,
1683
1611
  statusText: 'Forbidden'
1684
1612
  }));
1685
1613
  _context39.next = 3;
1686
- return fetchTranslations();
1687
-
1614
+ return (0, _translations.fetchTranslations)();
1688
1615
  case 3:
1689
1616
  result = _context39.sent;
1690
- expect(axios.get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1617
+ expect(_axios["default"].get.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1691
1618
  params: {},
1692
1619
  headers: {
1693
1620
  'X-Kinetic-AuthAssumed': 'true'
@@ -1701,7 +1628,6 @@ describe('translations api', function () {
1701
1628
  message: 'Forbidden'
1702
1629
  }
1703
1630
  });
1704
-
1705
1631
  case 6:
1706
1632
  case "end":
1707
1633
  return _context39.stop();
@@ -1712,30 +1638,29 @@ describe('translations api', function () {
1712
1638
  });
1713
1639
  describe('upsertTranslations', function () {
1714
1640
  beforeEach(function () {
1715
- axios.post.mockReset();
1641
+ _axios["default"].post.mockReset();
1716
1642
  });
1717
- test('success upsert single', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40() {
1643
+ test('success upsert single', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee40() {
1718
1644
  var result;
1719
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
1645
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee40$(_context40) {
1720
1646
  while (1) {
1721
1647
  switch (_context40.prev = _context40.next) {
1722
1648
  case 0:
1723
- axios.post.mockResolvedValue({
1649
+ _axios["default"].post.mockResolvedValue({
1724
1650
  status: 200,
1725
1651
  data: {
1726
1652
  message: 'success'
1727
1653
  }
1728
1654
  });
1729
1655
  _context40.next = 3;
1730
- return upsertTranslations({
1656
+ return (0, _translations.upsertTranslations)({
1731
1657
  translation: {
1732
1658
  value: 'test'
1733
1659
  }
1734
1660
  });
1735
-
1736
1661
  case 3:
1737
1662
  result = _context40.sent;
1738
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1663
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1739
1664
  value: 'test'
1740
1665
  }, {
1741
1666
  params: {},
@@ -1746,7 +1671,6 @@ describe('translations api', function () {
1746
1671
  expect(result).toEqual({
1747
1672
  message: 'success'
1748
1673
  });
1749
-
1750
1674
  case 6:
1751
1675
  case "end":
1752
1676
  return _context40.stop();
@@ -1756,31 +1680,30 @@ describe('translations api', function () {
1756
1680
  })));
1757
1681
  test('missing translation', function () {
1758
1682
  expect(function () {
1759
- upsertTranslations();
1683
+ (0, _translations.upsertTranslations)();
1760
1684
  }).toThrowError('upsertTranslations failed! The following required options are missing: translation');
1761
1685
  });
1762
- test('success upsert list', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41() {
1686
+ test('success upsert list', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee41() {
1763
1687
  var result;
1764
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
1688
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee41$(_context41) {
1765
1689
  while (1) {
1766
1690
  switch (_context41.prev = _context41.next) {
1767
1691
  case 0:
1768
- axios.post.mockResolvedValue({
1692
+ _axios["default"].post.mockResolvedValue({
1769
1693
  status: 200,
1770
1694
  data: {
1771
1695
  message: 'success'
1772
1696
  }
1773
1697
  });
1774
1698
  _context41.next = 3;
1775
- return upsertTranslations({
1699
+ return (0, _translations.upsertTranslations)({
1776
1700
  translations: [{
1777
1701
  value: 'test'
1778
1702
  }]
1779
1703
  });
1780
-
1781
1704
  case 3:
1782
1705
  result = _context41.sent;
1783
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/entries', [{
1706
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/entries', [{
1784
1707
  value: 'test'
1785
1708
  }], {
1786
1709
  params: {},
@@ -1791,7 +1714,6 @@ describe('translations api', function () {
1791
1714
  expect(result).toEqual({
1792
1715
  message: 'success'
1793
1716
  });
1794
-
1795
1717
  case 6:
1796
1718
  case "end":
1797
1719
  return _context41.stop();
@@ -1799,13 +1721,13 @@ describe('translations api', function () {
1799
1721
  }
1800
1722
  }, _callee41);
1801
1723
  })));
1802
- test('success import', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42() {
1724
+ test('success import', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee42() {
1803
1725
  var testFile, testFormData, result;
1804
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
1726
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee42$(_context42) {
1805
1727
  while (1) {
1806
1728
  switch (_context42.prev = _context42.next) {
1807
1729
  case 0:
1808
- axios.post.mockResolvedValue({
1730
+ _axios["default"].post.mockResolvedValue({
1809
1731
  status: 200,
1810
1732
  data: {
1811
1733
  message: 'success'
@@ -1815,14 +1737,13 @@ describe('translations api', function () {
1815
1737
  testFormData = new FormData();
1816
1738
  testFormData.append('file', testFile);
1817
1739
  _context42.next = 6;
1818
- return upsertTranslations({
1740
+ return (0, _translations.upsertTranslations)({
1819
1741
  "import": 'csv',
1820
1742
  file: testFile
1821
1743
  });
1822
-
1823
1744
  case 6:
1824
1745
  result = _context42.sent;
1825
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/entries', testFormData, {
1746
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/entries', testFormData, {
1826
1747
  params: {
1827
1748
  "import": 'csv'
1828
1749
  },
@@ -1834,7 +1755,6 @@ describe('translations api', function () {
1834
1755
  expect(result).toEqual({
1835
1756
  message: 'success'
1836
1757
  });
1837
-
1838
1758
  case 9:
1839
1759
  case "end":
1840
1760
  return _context42.stop();
@@ -1844,31 +1764,30 @@ describe('translations api', function () {
1844
1764
  })));
1845
1765
  test('missing file', function () {
1846
1766
  expect(function () {
1847
- upsertTranslations({
1767
+ (0, _translations.upsertTranslations)({
1848
1768
  "import": 'csv'
1849
1769
  });
1850
1770
  }).toThrowError('upsertTranslations failed! The following required options are missing: file');
1851
1771
  });
1852
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43() {
1772
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee43() {
1853
1773
  var result;
1854
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
1774
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee43$(_context43) {
1855
1775
  while (1) {
1856
1776
  switch (_context43.prev = _context43.next) {
1857
1777
  case 0:
1858
- axios.post.mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
1778
+ _axios["default"].post.mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
1859
1779
  status: 403,
1860
1780
  statusText: 'Forbidden'
1861
1781
  }));
1862
1782
  _context43.next = 3;
1863
- return upsertTranslations({
1783
+ return (0, _translations.upsertTranslations)({
1864
1784
  translation: {
1865
1785
  value: 'test'
1866
1786
  }
1867
1787
  });
1868
-
1869
1788
  case 3:
1870
1789
  result = _context43.sent;
1871
- expect(axios.post.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1790
+ expect(_axios["default"].post.mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1872
1791
  value: 'test'
1873
1792
  }, {
1874
1793
  params: {},
@@ -1884,7 +1803,6 @@ describe('translations api', function () {
1884
1803
  message: 'Forbidden'
1885
1804
  }
1886
1805
  });
1887
-
1888
1806
  case 6:
1889
1807
  case "end":
1890
1808
  return _context43.stop();
@@ -1895,28 +1813,27 @@ describe('translations api', function () {
1895
1813
  });
1896
1814
  describe('deleteTranslations', function () {
1897
1815
  beforeEach(function () {
1898
- axios["delete"].mockReset();
1816
+ _axios["default"]["delete"].mockReset();
1899
1817
  });
1900
- test('success delete by context', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44() {
1818
+ test('success delete by context', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee44() {
1901
1819
  var result;
1902
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
1820
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee44$(_context44) {
1903
1821
  while (1) {
1904
1822
  switch (_context44.prev = _context44.next) {
1905
1823
  case 0:
1906
- axios["delete"].mockResolvedValue({
1824
+ _axios["default"]["delete"].mockResolvedValue({
1907
1825
  status: 200,
1908
1826
  data: {
1909
1827
  message: 'success'
1910
1828
  }
1911
1829
  });
1912
1830
  _context44.next = 3;
1913
- return deleteTranslations({
1831
+ return (0, _translations.deleteTranslations)({
1914
1832
  contextName: 'custom.test'
1915
1833
  });
1916
-
1917
1834
  case 3:
1918
1835
  result = _context44.sent;
1919
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1836
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1920
1837
  params: {
1921
1838
  context: 'custom.test'
1922
1839
  },
@@ -1927,7 +1844,6 @@ describe('translations api', function () {
1927
1844
  expect(result).toEqual({
1928
1845
  message: 'success'
1929
1846
  });
1930
-
1931
1847
  case 6:
1932
1848
  case "end":
1933
1849
  return _context44.stop();
@@ -1935,26 +1851,25 @@ describe('translations api', function () {
1935
1851
  }
1936
1852
  }, _callee44);
1937
1853
  })));
1938
- test('success delete by locale', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45() {
1854
+ test('success delete by locale', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee45() {
1939
1855
  var result;
1940
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
1856
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee45$(_context45) {
1941
1857
  while (1) {
1942
1858
  switch (_context45.prev = _context45.next) {
1943
1859
  case 0:
1944
- axios["delete"].mockResolvedValue({
1860
+ _axios["default"]["delete"].mockResolvedValue({
1945
1861
  status: 200,
1946
1862
  data: {
1947
1863
  message: 'success'
1948
1864
  }
1949
1865
  });
1950
1866
  _context45.next = 3;
1951
- return deleteTranslations({
1867
+ return (0, _translations.deleteTranslations)({
1952
1868
  localeCode: 'en'
1953
1869
  });
1954
-
1955
1870
  case 3:
1956
1871
  result = _context45.sent;
1957
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1872
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1958
1873
  params: {
1959
1874
  locale: 'en'
1960
1875
  },
@@ -1965,7 +1880,6 @@ describe('translations api', function () {
1965
1880
  expect(result).toEqual({
1966
1881
  message: 'success'
1967
1882
  });
1968
-
1969
1883
  case 6:
1970
1884
  case "end":
1971
1885
  return _context45.stop();
@@ -1973,28 +1887,27 @@ describe('translations api', function () {
1973
1887
  }
1974
1888
  }, _callee45);
1975
1889
  })));
1976
- test('success delete specific', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46() {
1890
+ test('success delete specific', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee46() {
1977
1891
  var result;
1978
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
1892
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee46$(_context46) {
1979
1893
  while (1) {
1980
1894
  switch (_context46.prev = _context46.next) {
1981
1895
  case 0:
1982
- axios["delete"].mockResolvedValue({
1896
+ _axios["default"]["delete"].mockResolvedValue({
1983
1897
  status: 200,
1984
1898
  data: {
1985
1899
  message: 'success'
1986
1900
  }
1987
1901
  });
1988
1902
  _context46.next = 3;
1989
- return deleteTranslations({
1903
+ return (0, _translations.deleteTranslations)({
1990
1904
  contextName: 'custom.test',
1991
1905
  localeCode: 'en',
1992
1906
  keyHash: 'asdf'
1993
1907
  });
1994
-
1995
1908
  case 3:
1996
1909
  result = _context46.sent;
1997
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1910
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1998
1911
  params: {
1999
1912
  context: 'custom.test',
2000
1913
  locale: 'en',
@@ -2007,7 +1920,6 @@ describe('translations api', function () {
2007
1920
  expect(result).toEqual({
2008
1921
  message: 'success'
2009
1922
  });
2010
-
2011
1923
  case 6:
2012
1924
  case "end":
2013
1925
  return _context46.stop();
@@ -2017,27 +1929,26 @@ describe('translations api', function () {
2017
1929
  })));
2018
1930
  test('missing contextName', function () {
2019
1931
  expect(function () {
2020
- deleteTranslations({
1932
+ (0, _translations.deleteTranslations)({
2021
1933
  keyHash: 'asdf'
2022
1934
  });
2023
1935
  }).toThrowError('deleteTranslations failed! The following required options are missing: contextName');
2024
1936
  });
2025
- test('forbidden', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47() {
1937
+ test('forbidden', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee47() {
2026
1938
  var result;
2027
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
1939
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee47$(_context47) {
2028
1940
  while (1) {
2029
1941
  switch (_context47.prev = _context47.next) {
2030
1942
  case 0:
2031
- axios["delete"].mockRejectedValue(createError('Request failed with status code 403', null, 403, null, {
1943
+ _axios["default"]["delete"].mockRejectedValue((0, _createError["default"])('Request failed with status code 403', null, 403, null, {
2032
1944
  status: 403,
2033
1945
  statusText: 'Forbidden'
2034
1946
  }));
2035
1947
  _context47.next = 3;
2036
- return deleteTranslations();
2037
-
1948
+ return (0, _translations.deleteTranslations)();
2038
1949
  case 3:
2039
1950
  result = _context47.sent;
2040
- expect(axios["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
1951
+ expect(_axios["default"]["delete"].mock.calls).toEqual([['space/app/api/v1/translations/entries', {
2041
1952
  params: {},
2042
1953
  headers: {
2043
1954
  'X-Kinetic-AuthAssumed': 'true'
@@ -2051,7 +1962,6 @@ describe('translations api', function () {
2051
1962
  message: 'Forbidden'
2052
1963
  }
2053
1964
  });
2054
-
2055
1965
  case 6:
2056
1966
  case "end":
2057
1967
  return _context47.stop();