@glissandoo/lib 1.14.0 → 1.15.0

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.
@@ -52,6 +52,20 @@ export declare namespace GroupRepertoryFbFunctionsTypes {
52
52
  score?: number;
53
53
  }
54
54
  export type IdentifyInstrumentsResult = IdentifyInstrumentItem[];
55
+ export interface IdentifyInstrumentsFromFileNamesFile {
56
+ fileName: string;
57
+ fileId: string;
58
+ }
59
+ export interface IdentifyInstrumentsFromFileNamesParams {
60
+ groupId: string;
61
+ files: IdentifyInstrumentsFromFileNamesFile[];
62
+ }
63
+ export interface IdentifyInstrumentsFromFileNamesItem {
64
+ fileId: number | string;
65
+ instrument?: InstrumentId;
66
+ score?: number;
67
+ }
68
+ export type IdentifyInstrumentsFromFileNamesResult = IdentifyInstrumentsFromFileNamesItem[];
55
69
  export interface RateParams {
56
70
  groupId: string;
57
71
  themeId: string;
@@ -56,6 +56,7 @@ export declare enum FbFunctionName {
56
56
  GroupRepertoryDownloadThemeFiles = "groupRepertory-downloadThemeFiles",
57
57
  GroupRepertoryEdit = "groupRepertory-edit",
58
58
  GroupRepertoryIdentifyInstruments = "groupRepertory-identifyInstruments",
59
+ GroupRepertoryIdentifyInstrumentsFromFileNames = "groupRepertory-identifyInstrumentsFromFileNames",
59
60
  GroupRepertoryOnCreate = "groupRepertory-onCreate",
60
61
  GroupRepertoryOnUpdate = "groupRepertory-onUpdate",
61
62
  GroupRepertoryPublish = "groupRepertory-publish",
@@ -60,6 +60,7 @@ var FbFunctionName;
60
60
  FbFunctionName["GroupRepertoryDownloadThemeFiles"] = "groupRepertory-downloadThemeFiles";
61
61
  FbFunctionName["GroupRepertoryEdit"] = "groupRepertory-edit";
62
62
  FbFunctionName["GroupRepertoryIdentifyInstruments"] = "groupRepertory-identifyInstruments";
63
+ FbFunctionName["GroupRepertoryIdentifyInstrumentsFromFileNames"] = "groupRepertory-identifyInstrumentsFromFileNames";
63
64
  FbFunctionName["GroupRepertoryOnCreate"] = "groupRepertory-onCreate";
64
65
  FbFunctionName["GroupRepertoryOnUpdate"] = "groupRepertory-onUpdate";
65
66
  FbFunctionName["GroupRepertoryPublish"] = "groupRepertory-publish";
@@ -38,6 +38,7 @@ const regionByFunctions = {
38
38
  [index_1.FbFunctionName.GroupRepertoryRate]: GCloudRegions.EuropeWest6,
39
39
  [index_1.FbFunctionName.GroupRepertoryDownloadThemeFiles]: GCloudRegions.UsCentral1,
40
40
  [index_1.FbFunctionName.GroupRepertoryIdentifyInstruments]: GCloudRegions.UsCentral1,
41
+ [index_1.FbFunctionName.GroupRepertoryIdentifyInstrumentsFromFileNames]: GCloudRegions.UsCentral1,
41
42
  [index_1.FbFunctionName.GroupRepertoryClaimMusicSheet]: GCloudRegions.UsCentral1,
42
43
  [index_1.FbFunctionName.GroupRepertoryOnCreate]: GCloudRegions.UsCentral1,
43
44
  [index_1.FbFunctionName.GroupRepertoryOnUpdate]: GCloudRegions.UsCentral1,
@@ -146,7 +146,7 @@ class Group extends basic_1.default {
146
146
  get isExpiredTrial() {
147
147
  const isOutDateTrial = date_fns_1.isBefore(this.createdAt.toDate(), date_fns_1.subMonths(new Date(), 1));
148
148
  const members = this.activePlayers.length;
149
- const isAboveMembersLimitPlanFree = members >= plans_1.membersPerPlan[plans_1.PlansGroup.Piano];
149
+ const isAboveMembersLimitPlanFree = members > plans_1.membersPerPlan[plans_1.PlansGroup.Piano];
150
150
  return this.status !== types_1.GroupStatus.Premium && isOutDateTrial && isAboveMembersLimitPlanFree;
151
151
  }
152
152
  get stageTemplates() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,12 +0,0 @@
1
- import { PlanPeriod, PlansGroup } from '../helpers/plans';
2
- export declare namespace PaymentsFbFunctionsTypes {
3
- interface StripeSessionParams {
4
- partnershipId: string;
5
- groupId: string;
6
- planId: PlansGroup;
7
- planPeriod: PlanPeriod;
8
- }
9
- interface StripeSessionResult {
10
- url: string;
11
- }
12
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- import { PlanPeriod, PlansGroup } from '../helpers/plans';
2
- export declare namespace StripeFbFunctionsTypes {
3
- interface SessionParams {
4
- partnershipId: string;
5
- groupId: string;
6
- planId: PlansGroup;
7
- planPeriod: PlanPeriod;
8
- }
9
- interface SessionResult {
10
- url: string;
11
- }
12
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });