@novo-learning/service-lib 0.0.9 → 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.
@@ -0,0 +1,5 @@
1
+ import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
2
+ export declare class IsExerciseType implements ValidatorConstraintInterface {
3
+ validate(text: string, _: ValidationArguments): boolean;
4
+ defaultMessage(_: ValidationArguments): string;
5
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.IsExerciseType = void 0;
10
+ const novo_sdk_1 = require("@novo-learning/novo-sdk");
11
+ const class_validator_1 = require("class-validator");
12
+ let IsExerciseType = class IsExerciseType {
13
+ validate(text, _) {
14
+ return Object.values(novo_sdk_1.ExerciseType).includes(text);
15
+ }
16
+ defaultMessage(_) {
17
+ return 'Provided value is not a phoneset. Allowed values are: ' + Object.values(novo_sdk_1.ExerciseType).join(', ');
18
+ }
19
+ };
20
+ IsExerciseType = __decorate([
21
+ (0, class_validator_1.ValidatorConstraint)({ name: 'IsExerciseType', async: false })
22
+ ], IsExerciseType);
23
+ exports.IsExerciseType = IsExerciseType;
24
+ //# sourceMappingURL=exercise-type.validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exercise-type.validator.js","sourceRoot":"","sources":["../../src/validators/exercise-type.validator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,sDAAuD;AACvD,qDAAyG;AAGzG,IAAa,cAAc,GAA3B,MAAa,cAAc;IACzB,QAAQ,CAAC,IAAY,EAAE,CAAsB;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,uBAAY,CAAC,CAAC,QAAQ,CAAC,IAAoB,CAAC,CAAC;IACpE,CAAC;IAED,cAAc,CAAC,CAAsB;QACnC,OAAO,wDAAwD,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3G,CAAC;CACF,CAAA;AARY,cAAc;IAD1B,IAAA,qCAAmB,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;GACjD,cAAc,CAQ1B;AARY,wCAAc"}
@@ -0,0 +1,5 @@
1
+ import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
2
+ export declare class IsLanguageCode implements ValidatorConstraintInterface {
3
+ validate(text: string, _: ValidationArguments): boolean;
4
+ defaultMessage(_: ValidationArguments): string;
5
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.IsLanguageCode = void 0;
10
+ const novo_sdk_1 = require("@novo-learning/novo-sdk");
11
+ const class_validator_1 = require("class-validator");
12
+ let IsLanguageCode = class IsLanguageCode {
13
+ validate(text, _) {
14
+ return Object.values(novo_sdk_1.LanguageCode).includes(text);
15
+ }
16
+ defaultMessage(_) {
17
+ return 'Provided value is not a phoneset. Allowed values are: ' + Object.values(novo_sdk_1.LanguageCode).join(', ');
18
+ }
19
+ };
20
+ IsLanguageCode = __decorate([
21
+ (0, class_validator_1.ValidatorConstraint)({ name: 'IsLanguageCode', async: false })
22
+ ], IsLanguageCode);
23
+ exports.IsLanguageCode = IsLanguageCode;
24
+ //# sourceMappingURL=language-code.validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-code.validator.js","sourceRoot":"","sources":["../../src/validators/language-code.validator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,sDAAuD;AACvD,qDAAyG;AAGzG,IAAa,cAAc,GAA3B,MAAa,cAAc;IACzB,QAAQ,CAAC,IAAY,EAAE,CAAsB;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,uBAAY,CAAC,CAAC,QAAQ,CAAC,IAAoB,CAAC,CAAC;IACpE,CAAC;IAED,cAAc,CAAC,CAAsB;QACnC,OAAO,wDAAwD,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3G,CAAC;CACF,CAAA;AARY,cAAc;IAD1B,IAAA,qCAAmB,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;GACjD,cAAc,CAQ1B;AARY,wCAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novo-learning/service-lib",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Common components for Novo services",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "@nestjs/common": "^8.4.4",
22
22
  "@nestjs/core": "^8.2.4",
23
23
  "@nestjs/passport": "^8.0.1",
24
- "@novo-learning/novo-sdk": "^0.0.8",
24
+ "@novo-learning/novo-sdk": "^0.0.10",
25
25
  "@types/validator": "^13.7.1",
26
26
  "babel-jest": "^27.5.1",
27
27
  "buffer": "^6.0.3",