@voicenter-team/events-sdk 0.0.8 → 0.0.10

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 (54) hide show
  1. package/dist/voicenter-events-sdk.d.ts +185 -36
  2. package/package.json +4 -1
  3. package/.eslintrc.cjs +0 -16
  4. package/.github/workflows/main.yml +0 -16
  5. package/.idea/VoicenterEventsSDK.iml +0 -12
  6. package/.idea/git_toolbox_prj.xml +0 -15
  7. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  8. package/.idea/jsLibraryMappings.xml +0 -6
  9. package/.idea/jsLinters/eslint.xml +0 -7
  10. package/.idea/modules.xml +0 -8
  11. package/.idea/vcs.xml +0 -6
  12. package/.nvmrc +0 -1
  13. package/TODELETE_TEMP/events.json +0 -69122
  14. package/TODELETE_TEMP/temphelper.cjs +0 -101
  15. package/docs/package-lock.json +0 -3820
  16. package/docs/package.json +0 -25
  17. package/docs/src/.vuepress/client.js +0 -8
  18. package/docs/src/.vuepress/components/Demo.vue +0 -183
  19. package/docs/src/.vuepress/config.js +0 -60
  20. package/docs/src/.vuepress/public/favicon.ico +0 -0
  21. package/docs/src/.vuepress/public/images/logo.png +0 -0
  22. package/docs/src/.vuepress/styles/index.scss +0 -0
  23. package/docs/src/.vuepress/styles/index.styl +0 -8
  24. package/docs/src/.vuepress/styles/palette.styl +0 -10
  25. package/docs/src/demo.md +0 -7
  26. package/docs/src/index.md +0 -4
  27. package/jest.config.js +0 -11
  28. package/src/classes/auth/auth.class.ts +0 -205
  29. package/src/classes/auth/auth.urls.ts +0 -10
  30. package/src/classes/events-sdk/events-sdk-default-options.ts +0 -46
  31. package/src/classes/events-sdk/events-sdk.class.ts +0 -250
  32. package/src/classes/events-sdk/events-sdk.test.ts +0 -9
  33. package/src/classes/events-sdk/events-sdk.types.ts +0 -69
  34. package/src/classes/socket-io/socket-io.class.ts +0 -172
  35. package/src/classes/socket-io/socket-io.d.ts +0 -10
  36. package/src/classes/socket-io/versions/index.ts +0 -52
  37. package/src/classes/socket-io/versions/v1_3_7.js +0 -2083
  38. package/src/classes/storage/storage.class.ts +0 -43
  39. package/src/enum/auth.enum.ts +0 -4
  40. package/src/enum/events.enum.ts +0 -98
  41. package/src/index.ts +0 -6
  42. package/src/types/auth.d.ts +0 -49
  43. package/src/types/events.common.d.ts +0 -110
  44. package/src/types/events.d.ts +0 -175
  45. package/src/types/listeners.d.ts +0 -37
  46. package/src/types/public-api.d.ts +0 -39
  47. package/src/types/socket.d.ts +0 -5
  48. package/swagger/generated/Swagger.json +0 -1
  49. package/swagger/index.js +0 -60
  50. package/swagger/package.json +0 -21
  51. package/swagger/scripts/update-swagger-json.js +0 -53
  52. package/swagger/yarn.lock +0 -2100
  53. package/tsconfig.json +0 -50
  54. package/vite.config.ts +0 -41
@@ -1,53 +0,0 @@
1
- import fs from 'fs'
2
- import mysql from '@voicenter-team/mysql-dynamic-cluster'
3
-
4
- const connection = mysql.createPoolCluster({
5
- clusterName: 'demo',
6
- hosts: [
7
- {
8
- host: '192.168.187.22',
9
- port: 3306,
10
- name: 'lab22',
11
- }
12
- ],
13
- // Configuration for all pools
14
- defaultPoolSettings: {
15
- user: 'api',
16
- password: 'SecretAPI35t478p3!!!',
17
- database: 'voicenter_core',
18
- docsDatabase: 'monitor_events_api_doc',
19
- charset: 'utf8mb4',
20
- port: 3313,
21
- // validators: [],
22
- // loadFactors: [],
23
- },
24
- })
25
-
26
- const pathToFile = 'generated/'
27
- const filename = 'Swagger.json'
28
- const fullPath = pathToFile + filename
29
-
30
- const generate = async () => {
31
- await connection.connect()
32
-
33
- const results = await connection.query('SELECT monitor_events_api_doc.FN_GetSwagger(0.01) as data')
34
-
35
- const targetResult = results[0].data
36
-
37
- console.log(targetResult)
38
-
39
- const targetResultString = JSON.stringify(targetResult)
40
-
41
- if (!fs.existsSync(pathToFile)) {
42
- fs.mkdirSync(pathToFile, { recursive: true })
43
- }
44
-
45
- fs.writeFile(fullPath, targetResultString, (err) => {
46
- if (err) throw err
47
- console.log('Swagger.json is updated!')
48
- })
49
-
50
- await connection.disconnect()
51
- }
52
-
53
- generate().then(data => console.log(data))