@cravery/types 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.
@@ -0,0 +1,12 @@
1
+ import { Locale } from "../core";
2
+ import { Recipe } from "./recipe";
3
+ import { RecipeSource } from "./source";
4
+ export interface RecipeEntity extends Recipe {
5
+ confidence: number;
6
+ createdBy: string;
7
+ originalLocale: Locale;
8
+ searchTerms: string[];
9
+ source: RecipeSource;
10
+ sourceRef: string;
11
+ }
12
+ //# sourceMappingURL=entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/recipes/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/recipes/entity.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
- export * from "./admin";
2
1
  export * from "./content";
2
+ export * from "./entity";
3
3
  export * from "./instruction";
4
4
  export * from "./meta";
5
5
  export * from "./recipe";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./admin"), exports);
18
17
  __exportStar(require("./content"), exports);
18
+ __exportStar(require("./entity"), exports);
19
19
  __exportStar(require("./instruction"), exports);
20
20
  __exportStar(require("./meta"), exports);
21
21
  __exportStar(require("./recipe"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,gDAA8B;AAC9B,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,gDAA8B;AAC9B,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,yCAAuB"}
@@ -7,5 +7,6 @@ export interface RecipeStats {
7
7
  shares: number;
8
8
  score: number;
9
9
  updatedAt: UnixTimestamp;
10
+ velocity: number;
10
11
  }
11
12
  //# sourceMappingURL=stats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/recipes/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,aAAa,CAAC;CAC1B"}
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/recipes/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -1,3 +1,5 @@
1
1
  export declare const USER_ROLE_VALUES: readonly ["admin", "developer", "moderator", "translator", "user", "guest"];
2
2
  export type UserRole = (typeof USER_ROLE_VALUES)[number];
3
+ export declare const PRIVILEGED_ROLE_VALUES: readonly ["admin", "developer", "moderator", "translator"];
4
+ export type PrivilegedRole = (typeof PRIVILEGED_ROLE_VALUES)[number];
3
5
  //# sourceMappingURL=role.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../src/users/role.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6EAOnB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../src/users/role.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6EAOnB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,sBAAsB,4DAKzB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.USER_ROLE_VALUES = void 0;
3
+ exports.PRIVILEGED_ROLE_VALUES = exports.USER_ROLE_VALUES = void 0;
4
4
  exports.USER_ROLE_VALUES = [
5
5
  "admin",
6
6
  "developer",
@@ -9,4 +9,10 @@ exports.USER_ROLE_VALUES = [
9
9
  "user",
10
10
  "guest",
11
11
  ];
12
+ exports.PRIVILEGED_ROLE_VALUES = [
13
+ "admin",
14
+ "developer",
15
+ "moderator",
16
+ "translator",
17
+ ];
12
18
  //# sourceMappingURL=role.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"role.js","sourceRoot":"","sources":["../../src/users/role.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,OAAO;IACP,WAAW;IACX,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;CACC,CAAC"}
1
+ {"version":3,"file":"role.js","sourceRoot":"","sources":["../../src/users/role.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,OAAO;IACP,WAAW;IACX,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;CACC,CAAC;AAGE,QAAA,sBAAsB,GAAG;IACpC,OAAO;IACP,WAAW;IACX,WAAW;IACX,YAAY;CACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/types",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Core types for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,7 +2,7 @@ import { Locale } from "../core";
2
2
  import { Recipe } from "./recipe";
3
3
  import { RecipeSource } from "./source";
4
4
 
5
- export interface AdminRecipe extends Recipe {
5
+ export interface RecipeEntity extends Recipe {
6
6
  confidence: number;
7
7
  createdBy: string;
8
8
  originalLocale: Locale;
@@ -1,5 +1,5 @@
1
- export * from "./admin";
2
1
  export * from "./content";
2
+ export * from "./entity";
3
3
  export * from "./instruction";
4
4
  export * from "./meta";
5
5
  export * from "./recipe";
@@ -8,4 +8,5 @@ export interface RecipeStats {
8
8
  shares: number;
9
9
  score: number;
10
10
  updatedAt: UnixTimestamp;
11
+ velocity: number;
11
12
  }
package/src/users/role.ts CHANGED
@@ -7,3 +7,11 @@ export const USER_ROLE_VALUES = [
7
7
  "guest",
8
8
  ] as const;
9
9
  export type UserRole = (typeof USER_ROLE_VALUES)[number];
10
+
11
+ export const PRIVILEGED_ROLE_VALUES = [
12
+ "admin",
13
+ "developer",
14
+ "moderator",
15
+ "translator",
16
+ ] as const;
17
+ export type PrivilegedRole = (typeof PRIVILEGED_ROLE_VALUES)[number];