@pocketprep/types 1.14.12 → 1.14.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ jobs:
15
15
  - uses: actions/checkout@v2
16
16
  - uses: actions/setup-node@v2
17
17
  with:
18
- node-version: 16.14.0
18
+ node-version: 20.17.0
19
19
  registry-url: https://registry.npmjs.org/
20
20
  - run: npm ci
21
21
  - run: npm run lint
package/CMS/Cloud.d.ts CHANGED
@@ -6,6 +6,10 @@ import {
6
6
  QuestionHistoryJSON,
7
7
  QuestionStats,
8
8
  TPassageLabel,
9
+ KnowledgeAreaDraftJSON,
10
+ QuestionScenarioDraftJSON,
11
+ MockExamDraftJSON,
12
+ ExamDraftJSON,
9
13
  } from './Class'
10
14
  import {
11
15
  GlobalQuestionMetricJSON,
@@ -13,7 +17,6 @@ import {
13
17
  BundlePayload,
14
18
  ExamMetadata,
15
19
  ExamDataJSON,
16
- ExamData,
17
20
  MockExam,
18
21
  QuestionJSON,
19
22
  BloomTaxonomyLevel,
@@ -341,4 +344,30 @@ export type getBloomLevelForQuestion = (params: {
341
344
  questionDraftId: string
342
345
  }) => Promise<BloomTaxonomyLevel>
343
346
 
344
- export type updateRedisQuestions = (params: { compositeKey: string }) => void
347
+ export type updateRedisQuestions = (params: { compositeKey: string }) => void
348
+
349
+ export type exportExamMetadata = (params: {
350
+ examDraft: ExamDraftJSON
351
+ freeCount: number
352
+ archivedCount: number
353
+ totalCount: number
354
+ examKnowledgeAreas: {
355
+ [kaName: string]: {
356
+ name: string
357
+ count: number
358
+ specialCount: number
359
+ }
360
+ }
361
+ }) => string
362
+
363
+ export type exportQuestionData = (params: {
364
+ examMetadataId: string
365
+ questions: QuestionDraftJSON[]
366
+ subjects: KnowledgeAreaDraftJSON[]
367
+ questionScenarios: QuestionScenarioDraftJSON[]
368
+ mockExams: (MockExamDraftJSON & { isNewMockExam: boolean })[]
369
+ }) => void
370
+
371
+ export type deleteOldParseDataV2 = (params: {
372
+ examMetadataId: string
373
+ }) => void
package/Study/Class.d.ts CHANGED
@@ -501,20 +501,11 @@ export type MockExamJSON = ReturnType<MockExam['toJSON']>
501
501
  export type MockExamPayload = Payload<MockExam>
502
502
 
503
503
  export type ExamMetadata = Parse.Object<{
504
- majorUpdate?: 1 | 0
505
504
  hideReferences: boolean
506
505
  examGuid: string
507
- knowledgeAreas: {
508
- [key: string]: {
509
- name: string
510
- count: number
511
- specialCount: number
512
- }
513
- }
514
506
  archivedCount: number
515
- columnNames: string[]
516
- dirty: boolean
517
- specialQuestions: number
507
+ freeCount?: number // only optional until data is backfilled from specialCount
508
+ totalCount?: number // only optional until data is backfilled from itemCount
518
509
  nativeAppName: string
519
510
  releaseInfo: {
520
511
  name: string
@@ -524,12 +515,22 @@ export type ExamMetadata = Parse.Object<{
524
515
  descriptiveName: string
525
516
  version: string
526
517
  compositeKey: string
527
- classicQuestions: number
528
- itemCount: number
529
- appId: string
530
518
  description: string
531
519
  isFree: boolean
532
520
  mockExams?: (MockExam | Parse.Pointer)[]
521
+
522
+ // DEPRECATED FIELDS
523
+ appId: string
524
+ knowledgeAreas: {
525
+ [key: string]: {
526
+ name: string
527
+ count: number
528
+ specialCount: number
529
+ }
530
+ }
531
+ itemCount: number
532
+ classicQuestions: number
533
+ specialQuestions: number
533
534
  }>
534
535
 
535
536
  export type ExamMetadataJSON = ReturnType<ExamMetadata['toJSON']>
@@ -0,0 +1,41 @@
1
+ import typescriptEslint from '@typescript-eslint/eslint-plugin'
2
+ import tsParser from '@typescript-eslint/parser'
3
+ import eslint from '@eslint/js'
4
+ import tslint from 'typescript-eslint'
5
+ import stylistic from '@stylistic/eslint-plugin'
6
+
7
+ export default [
8
+ eslint.configs.recommended,
9
+ ...tslint.configs.recommended,
10
+ {
11
+ plugins: {
12
+ '@stylistic': stylistic,
13
+ '@typescript-eslint': typescriptEslint,
14
+ },
15
+ languageOptions: {
16
+ globals: {
17
+ Parse: 'readonly'
18
+ },
19
+ parser: tsParser,
20
+ },
21
+ rules: {
22
+ 'quotes': ['error', 'single'],
23
+ 'comma-dangle': ['error', 'always-multiline'],
24
+ 'semi': ['error', 'never'],
25
+ 'max-len': ['error', { code: 120 }],
26
+ 'object-curly-spacing': ['error', 'always'],
27
+ 'array-bracket-spacing': ['error', 'always', { objectsInArrays: false, arraysInArrays: false }],
28
+ 'space-in-parens': ['error', 'never'],
29
+ 'space-before-function-paren': ['error', 'always'],
30
+ 'space-infix-ops': ['error', { int32Hint: true }],
31
+ 'eqeqeq': 'error',
32
+ 'prefer-const': 'error',
33
+ '@stylistic/indent': ['error', 4],
34
+ '@typescript-eslint/no-angle-bracket-type-assertion': 'off',
35
+ '@typescript-eslint/explicit-function-return-type': 'off',
36
+ '@typescript-eslint/explicit-member-accessibility': 'off',
37
+ '@typescript-eslint/no-var-requires': 'off',
38
+ '@typescript-eslint/interface-name-prefix': 'off'
39
+ },
40
+ }
41
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.14.12",
3
+ "version": "1.14.15",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,12 +23,14 @@
23
23
  "homepage": "https://github.com/Pocket-Prep/types#readme",
24
24
  "dependencies": {
25
25
  "@types/parse": "3.0.9",
26
- "stripe": "14.8.0"
26
+ "stripe": "16.12.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@typescript-eslint/eslint-plugin": "6.13.2",
30
- "@typescript-eslint/parser": "6.13.2",
31
- "eslint": "8.55.0",
32
- "typescript": "5.3.3"
29
+ "@stylistic/eslint-plugin": "2.8.0",
30
+ "@typescript-eslint/eslint-plugin": "8.6.0",
31
+ "@typescript-eslint/parser": "8.6.0",
32
+ "eslint": "9.11.0",
33
+ "typescript": "5.6.2",
34
+ "typescript-eslint": "8.6.0"
33
35
  }
34
36
  }
package/.eslintrc.js DELETED
@@ -1,34 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- globals: {
4
- Parse: 'readonly'
5
- },
6
- extends: [
7
- 'eslint:recommended',
8
- 'plugin:@typescript-eslint/recommended',
9
- ],
10
- parser: '@typescript-eslint/parser',
11
- plugins: ['@typescript-eslint'],
12
- rules: {
13
- 'quotes': [ 'error', 'single' ],
14
- 'comma-dangle': [ 'error', 'always-multiline' ],
15
- 'semi': [ 'error', 'never' ],
16
- 'max-len': [ 'error', { 'code': 120 }],
17
- 'object-curly-spacing': [ 'error', 'always' ],
18
- 'array-bracket-spacing': [ 'error', 'always', { 'objectsInArrays': false, 'arraysInArrays': false }],
19
- 'space-in-parens': [ 'error', 'never' ],
20
- 'space-before-function-paren': [ 'error', 'always' ],
21
- 'eqeqeq': 'error',
22
- 'prefer-const': 'error',
23
- "indent": "off", // There is a @typescript-eslint/indent instead
24
- "@typescript-eslint/indent": ["error", 4],
25
- '@typescript-eslint/member-delimiter-style': [ 'error', { 'multiline': { delimiter: 'none' } }],
26
- '@typescript-eslint/interface-name-prefix': [ 'error', 'always' ],
27
- '@typescript-eslint/no-angle-bracket-type-assertion': 'off',
28
- '@typescript-eslint/explicit-function-return-type': 'off',
29
- '@typescript-eslint/explicit-member-accessibility': 'off',
30
- '@typescript-eslint/no-var-requires': 'off',
31
- '@typescript-eslint/no-unused-vars': 'off',
32
- '@typescript-eslint/interface-name-prefix': 'off'
33
- }
34
- }
package/type-tests.ts DELETED
File without changes