@insignia-education/api-sdk-js 0.15.61 → 0.15.63

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 (90) hide show
  1. package/.github/workflows/npm-publish-github-packages.yml +95 -12
  2. package/coverage/clover.xml +132 -1512
  3. package/coverage/coverage-final.json +1 -47
  4. package/coverage/lcov-report/Client.js.html +463 -0
  5. package/coverage/lcov-report/index.html +20 -65
  6. package/coverage/lcov-report/src/Client.js.html +141 -132
  7. package/coverage/lcov-report/src/api/index.html +1 -1
  8. package/coverage/lcov-report/src/api/index.js.html +8 -8
  9. package/coverage/lcov-report/src/api/v1/Accounts.js.html +3 -3
  10. package/coverage/lcov-report/src/api/v1/Admin.js.html +3 -3
  11. package/coverage/lcov-report/src/api/v1/Auth.js.html +7 -7
  12. package/coverage/lcov-report/src/api/v1/Categories.js.html +8 -8
  13. package/coverage/lcov-report/src/api/v1/Changelogs.js.html +8 -8
  14. package/coverage/lcov-report/src/api/v1/Configs.js.html +8 -8
  15. package/coverage/lcov-report/src/api/v1/ContactForms.js.html +8 -8
  16. package/coverage/lcov-report/src/api/v1/ConversationalTopics.js.html +8 -8
  17. package/coverage/lcov-report/src/api/v1/Countries.js.html +8 -8
  18. package/coverage/lcov-report/src/api/v1/Coupons.js.html +16 -16
  19. package/coverage/lcov-report/src/api/v1/Courses.js.html +27 -27
  20. package/coverage/lcov-report/src/api/v1/Currencies.js.html +10 -10
  21. package/coverage/lcov-report/src/api/v1/Dashboard.js.html +3 -3
  22. package/coverage/lcov-report/src/api/v1/EducationCenter.js.html +3 -3
  23. package/coverage/lcov-report/src/api/v1/Employee.js.html +5 -5
  24. package/coverage/lcov-report/src/api/v1/Files.js.html +8 -8
  25. package/coverage/lcov-report/src/api/v1/Forums.js.html +8 -8
  26. package/coverage/lcov-report/src/api/v1/Hashes.js.html +16 -13
  27. package/coverage/lcov-report/src/api/v1/Insignias.js.html +8 -8
  28. package/coverage/lcov-report/src/api/v1/Languages.js.html +8 -8
  29. package/coverage/lcov-report/src/api/v1/MailBlacklist.js.html +8 -8
  30. package/coverage/lcov-report/src/api/v1/MailingLists.js.html +3 -3
  31. package/coverage/lcov-report/src/api/v1/Offers.js.html +16 -16
  32. package/coverage/lcov-report/src/api/v1/Organizations.js.html +52 -52
  33. package/coverage/lcov-report/src/api/v1/PaymentMethods.js.html +7 -7
  34. package/coverage/lcov-report/src/api/v1/Payments.js.html +3 -3
  35. package/coverage/lcov-report/src/api/v1/Premiums.js.html +3 -3
  36. package/coverage/lcov-report/src/api/v1/Quizzes.js.html +42 -42
  37. package/coverage/lcov-report/src/api/v1/Sales.js.html +3 -3
  38. package/coverage/lcov-report/src/api/v1/Search.js.html +3 -3
  39. package/coverage/lcov-report/src/api/v1/ShortLinks.js.html +8 -8
  40. package/coverage/lcov-report/src/api/v1/Surveys.js.html +8 -8
  41. package/coverage/lcov-report/src/api/v1/Taxes.js.html +8 -8
  42. package/coverage/lcov-report/src/api/v1/Teacher.js.html +100 -70
  43. package/coverage/lcov-report/src/api/v1/Telegram.js.html +3 -3
  44. package/coverage/lcov-report/src/api/v1/TwoFactor.js.html +3 -3
  45. package/coverage/lcov-report/src/api/v1/UserSessionTypes.js.html +3 -3
  46. package/coverage/lcov-report/src/api/v1/UserTypes.js.html +8 -8
  47. package/coverage/lcov-report/src/api/v1/Users.js.html +112 -16
  48. package/coverage/lcov-report/src/api/v1/Utm.js.html +3 -3
  49. package/coverage/lcov-report/src/api/v1/Webauthn.js.html +3 -3
  50. package/coverage/lcov-report/src/api/v1/Zoom.js.html +19 -19
  51. package/coverage/lcov-report/src/api/v1/index.html +154 -184
  52. package/coverage/lcov-report/src/api/v1/index.js.html +52 -64
  53. package/coverage/lcov-report/src/index.html +21 -21
  54. package/coverage/lcov-report/src/index.js.html +3 -3
  55. package/coverage/lcov-report/tests/helpers.js.html +11 -11
  56. package/coverage/lcov-report/tests/index.html +7 -7
  57. package/coverage/lcov.info +146 -2451
  58. package/coverage/test-report.html +1 -10
  59. package/jest.config.mjs +12 -1
  60. package/package.json +2 -2
  61. package/src/api/v1/Coupons.js +11 -0
  62. package/src/api/v1/Courses.js +2 -0
  63. package/src/api/v1/Hashes.js +3 -2
  64. package/src/api/v1/Telegram.js +6 -0
  65. package/src/api/v1/Users.js +12 -0
  66. package/src/api/v1/index.js +0 -4
  67. package/tests/integration/api/v1/accounts.test.js +5 -11
  68. package/tests/integration/api/v1/auth/login.test.js +18 -34
  69. package/tests/integration/api/v1/conversational-topics.test.js +3 -5
  70. package/tests/integration/api/v1/countries.test.js +1 -1
  71. package/tests/integration/api/v1/coupons.test.js +2 -9
  72. package/tests/integration/api/v1/currencies/index.test.js +1 -1
  73. package/tests/integration/api/v1/files.test.js +18 -15
  74. package/tests/integration/api/v1/hashes.test.js +2 -10
  75. package/tests/integration/api/v1/mail-blacklist.test.js +2 -9
  76. package/tests/integration/api/v1/offers.test.js +2 -9
  77. package/tests/integration/api/v1/organizations.test.js +8 -8
  78. package/tests/integration/api/v1/quizzes/index.test.js +0 -2
  79. package/tests/integration/api/v1/short-links.test.js +2 -9
  80. package/tests/integration/api/v1/taxes.test.js +2 -3
  81. package/tests/integration/api/v1/teacher/index.test.js +1 -1
  82. package/tests/integration/api/v1/telegram.test.js +33 -0
  83. package/tests/integration/api/v1/user-types.test.js +2 -4
  84. package/tests/integration/api/v1/users/index.test.js +10 -13
  85. package/tests/integration/api/v1/users/telegram.test.js +36 -0
  86. package/tests/integration/api/v1/zoom.test.js +2 -9
  87. package/src/api/v1/Categories.js +0 -12
  88. package/src/api/v1/Configs.js +0 -12
  89. package/tests/integration/api/v1/categories.test.js +0 -19
  90. package/tests/integration/api/v1/configs.test.js +0 -20
@@ -1,14 +1,17 @@
1
- name: Node.js Package
1
+ name: Bump version, publish, and sync front
2
2
 
3
3
  on:
4
- release:
5
- types: [created]
4
+ push:
5
+ branches: [master]
6
6
 
7
7
  jobs:
8
- publish:
8
+ bump-and-publish:
9
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
9
10
  runs-on: ubuntu-latest
10
11
  permissions:
11
- contents: read
12
+ contents: write
13
+ outputs:
14
+ version: ${{ steps.bump.outputs.version }}
12
15
  steps:
13
16
  - uses: actions/checkout@v4
14
17
 
@@ -18,14 +21,94 @@ jobs:
18
21
  node-version: 25
19
22
  registry-url: 'https://registry.npmjs.org/'
20
23
 
21
- # - name: Install dependencies
22
- # run: npm install
23
-
24
- # we remove tests until we have a beta env for the api
25
- # - name: Run tests
26
- # run: npm test
24
+ - name: Configure git
25
+ run: |
26
+ git config user.name "github-actions[bot]"
27
+ git config user.email "github-actions[bot]@users.noreply.github.com"
27
28
 
28
- - name: Publish to NPM
29
+ - name: Bump patch version
30
+ id: bump
31
+ run: |
32
+ NEW_VERSION=$(npm version patch -m "chore: release v%s [skip ci]")
33
+ echo "version=${NEW_VERSION#v}" >> "$GITHUB_OUTPUT"
34
+
35
+ - name: Push version bump
36
+ run: git push origin HEAD:master --follow-tags
37
+
38
+ - name: Publish to npm
29
39
  run: npm publish --access public
30
40
  env:
31
41
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
42
+
43
+ sync-front:
44
+ needs: bump-and-publish
45
+ runs-on: ubuntu-latest
46
+ env:
47
+ SDK_VERSION: ${{ needs.bump-and-publish.outputs.version }}
48
+ steps:
49
+ - name: Wait for npm registry propagation
50
+ run: sleep 15
51
+
52
+ - name: Setup node
53
+ uses: actions/setup-node@v4
54
+ with:
55
+ node-version: 24
56
+
57
+ # ---- beta: direct commit + push ----
58
+ - name: Checkout front (beta)
59
+ uses: actions/checkout@v4
60
+ with:
61
+ repository: insignia-education/front
62
+ ref: beta
63
+ token: ${{ secrets.FRONT_REPO_PAT }}
64
+ path: front-beta
65
+
66
+ - name: Bump SDK in front (beta)
67
+ working-directory: front-beta
68
+ run: npm install "@insignia-education/api-sdk-js@${SDK_VERSION}"
69
+
70
+ - name: Commit and push (beta)
71
+ working-directory: front-beta
72
+ run: |
73
+ git config user.name "github-actions[bot]"
74
+ git config user.email "github-actions[bot]@users.noreply.github.com"
75
+ git add package.json package-lock.json
76
+ if git diff --cached --quiet; then
77
+ echo "No changes, skipping"
78
+ else
79
+ git commit -m "chore: bump @insignia-education/api-sdk-js to ${SDK_VERSION}"
80
+ git push origin beta
81
+ fi
82
+
83
+ # ---- master: open a PR for review ----
84
+ - name: Checkout front (master)
85
+ uses: actions/checkout@v4
86
+ with:
87
+ repository: insignia-education/front
88
+ ref: master
89
+ token: ${{ secrets.FRONT_REPO_PAT }}
90
+ path: front-master
91
+
92
+ - name: Bump SDK in front (master branch)
93
+ working-directory: front-master
94
+ run: npm install "@insignia-education/api-sdk-js@${SDK_VERSION}"
95
+
96
+ - name: Open PR against master
97
+ working-directory: front-master
98
+ env:
99
+ GH_TOKEN: ${{ secrets.FRONT_REPO_PAT }}
100
+ run: |
101
+ git config user.name "github-actions[bot]"
102
+ git config user.email "github-actions[bot]@users.noreply.github.com"
103
+ if git diff --quiet; then
104
+ echo "No changes, skipping PR"
105
+ exit 0
106
+ fi
107
+ BRANCH="chore/bump-api-sdk-js-${SDK_VERSION}"
108
+ git checkout -b "$BRANCH"
109
+ git add package.json package-lock.json
110
+ git commit -m "chore: bump @insignia-education/api-sdk-js to ${SDK_VERSION}"
111
+ git push origin "$BRANCH"
112
+ gh pr create --repo insignia-education/front --base master --head "$BRANCH" \
113
+ --title "chore: bump @insignia-education/api-sdk-js to ${SDK_VERSION}" \
114
+ --body "Automated dependency bump triggered by insignia-education/api-sdk-js@${SDK_VERSION}."