@glissandoo/lib 1.84.2 → 1.86.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.
@@ -94,7 +94,6 @@ export declare enum FbFunctionName {
94
94
  GroupRepertoryRate = "groupRepertory-rate",
95
95
  GroupSendInvitationEmail = "group-sendInvitationEmail",
96
96
  JWTGenerate = "jwt-generate",
97
- MetricsDaily = "metrics-daily",
98
97
  MetricsWeekly = "metrics-weekly",
99
98
  MiscAddSubscriber = "misc-addSubscriber",
100
99
  MiscScheduledFirestoreExport = "misc-scheduledFirestoreExport",
@@ -98,7 +98,6 @@ var FbFunctionName;
98
98
  FbFunctionName["GroupRepertoryRate"] = "groupRepertory-rate";
99
99
  FbFunctionName["GroupSendInvitationEmail"] = "group-sendInvitationEmail";
100
100
  FbFunctionName["JWTGenerate"] = "jwt-generate";
101
- FbFunctionName["MetricsDaily"] = "metrics-daily";
102
101
  FbFunctionName["MetricsWeekly"] = "metrics-weekly";
103
102
  FbFunctionName["MiscAddSubscriber"] = "misc-addSubscriber";
104
103
  FbFunctionName["MiscScheduledFirestoreExport"] = "misc-scheduledFirestoreExport";
@@ -134,7 +134,6 @@ const regionByFunctions = {
134
134
  [index_1.FbFunctionName.MiscHandleActiveCampaignAutomationContacts]: GCloudRegions.EuropeWest6,
135
135
  [index_1.FbFunctionName.Auth]: GCloudRegions.UsCentral1,
136
136
  [index_1.FbFunctionName.GroupCronSatistactionIndexWeekly]: GCloudRegions.EuropeWest6,
137
- [index_1.FbFunctionName.MetricsDaily]: GCloudRegions.EuropeWest6,
138
137
  [index_1.FbFunctionName.MetricsWeekly]: GCloudRegions.EuropeWest6,
139
138
  [index_1.FbFunctionName.MiscScheduledFirestoreExport]: GCloudRegions.EuropeWest6,
140
139
  [index_1.FbFunctionName.ReminderResponseDeadlineSoon]: GCloudRegions.EuropeWest6,
@@ -22,7 +22,7 @@ export default class Offer extends ModelWithLang<OfferData> {
22
22
  get selectionClosedBy(): string | null;
23
23
  get isSelectionClosed(): boolean;
24
24
  get updatedAt(): FirebaseFirestore.Timestamp;
25
- get updatedBy(): string | null;
25
+ get updatedBy(): string;
26
26
  get deletedAt(): FirebaseFirestore.Timestamp | null;
27
27
  get deletedBy(): string | null;
28
28
  get isDeleted(): boolean;
@@ -64,10 +64,10 @@ class Offer extends lang_2.default {
64
64
  return !(0, lodash_1.isNull)(this.selectionClosedAt);
65
65
  }
66
66
  get updatedAt() {
67
- return this.data.updatedAt || null;
67
+ return this.data.updatedAt;
68
68
  }
69
69
  get updatedBy() {
70
- return this.data.updatedBy || null;
70
+ return this.data.updatedBy;
71
71
  }
72
72
  get deletedAt() {
73
73
  return this.data.deletedAt || null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.84.2",
3
+ "version": "1.86.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -13,6 +13,7 @@
13
13
  "format": "prettier --write \"src/**/*.ts\" \"src/lang/*.json\"",
14
14
  "format:single": "prettier --write",
15
15
  "lint": "eslint --ext .ts ./src",
16
+ "lint:single": "eslint",
16
17
  "prepare": "rm -rf ./lib && npm run build:link",
17
18
  "set-husky": "node scripts/setHusky.js",
18
19
  "preversion": "npm run lint",
@@ -48,11 +49,6 @@
48
49
  "typescript": "^4.9.4"
49
50
  },
50
51
  "lint-staged": {
51
- "*.ts": [
52
- "npm run format:single --"
53
- ],
54
- "*.json": [
55
- "npm run format:single --"
56
- ]
52
+ "*.{ts,json}": "npm run format:single --"
57
53
  }
58
54
  }
@@ -38,6 +38,7 @@ export interface Database {
38
38
  datetime: string;
39
39
  datetimeEnd: string;
40
40
  deletedAt: string | null;
41
+ deletedBy: string | null;
41
42
  description: string | null;
42
43
  descriptionSlate: Json[];
43
44
  displayName: string | null;
@@ -83,6 +84,7 @@ export interface Database {
83
84
  datetime: string;
84
85
  datetimeEnd: string;
85
86
  deletedAt?: string | null;
87
+ deletedBy?: string | null;
86
88
  description?: string | null;
87
89
  descriptionSlate: Json[];
88
90
  displayName?: string | null;
@@ -128,6 +130,7 @@ export interface Database {
128
130
  datetime?: string;
129
131
  datetimeEnd?: string;
130
132
  deletedAt?: string | null;
133
+ deletedBy?: string | null;
131
134
  description?: string | null;
132
135
  descriptionSlate?: Json[];
133
136
  displayName?: string | null;
@@ -167,7 +170,7 @@ export interface Database {
167
170
  };
168
171
  Relationships: [
169
172
  {
170
- foreignKeyName: 'event_promoter_fkey';
173
+ foreignKeyName: 'event_promoter_group_id_fkey';
171
174
  columns: ['promoter'];
172
175
  referencedRelation: 'group';
173
176
  referencedColumns: ['id'];
@@ -186,6 +189,7 @@ export interface Database {
186
189
  createdOn: Database['public']['Enums']['group_created_on'];
187
190
  customerId: string | null;
188
191
  deletedAt: string | null;
192
+ deletedBy: string | null;
189
193
  description: string | null;
190
194
  displayName: string;
191
195
  id: string;
@@ -206,10 +210,12 @@ export interface Database {
206
210
  playerIds: string[];
207
211
  players: Json;
208
212
  repertoireTags: Json;
213
+ rollcallLink: string | null;
209
214
  satisfactionIndex: Json;
210
215
  shortDynamicLink: string | null;
211
216
  socialNetworks: Json | null;
212
217
  status: Database['public']['Enums']['group_status'];
218
+ subscriptionId: string | null;
213
219
  templates: Json;
214
220
  trialEndAt: string | null;
215
221
  updatedAt: string;
@@ -227,6 +233,7 @@ export interface Database {
227
233
  createdOn: Database['public']['Enums']['group_created_on'];
228
234
  customerId?: string | null;
229
235
  deletedAt?: string | null;
236
+ deletedBy?: string | null;
230
237
  description?: string | null;
231
238
  displayName: string;
232
239
  id: string;
@@ -247,10 +254,12 @@ export interface Database {
247
254
  playerIds: string[];
248
255
  players: Json;
249
256
  repertoireTags: Json;
257
+ rollcallLink?: string | null;
250
258
  satisfactionIndex: Json;
251
259
  shortDynamicLink?: string | null;
252
260
  socialNetworks?: Json | null;
253
261
  status: Database['public']['Enums']['group_status'];
262
+ subscriptionId?: string | null;
254
263
  templates: Json;
255
264
  trialEndAt?: string | null;
256
265
  updatedAt?: string;
@@ -268,6 +277,7 @@ export interface Database {
268
277
  createdOn?: Database['public']['Enums']['group_created_on'];
269
278
  customerId?: string | null;
270
279
  deletedAt?: string | null;
280
+ deletedBy?: string | null;
271
281
  description?: string | null;
272
282
  displayName?: string;
273
283
  id?: string;
@@ -288,10 +298,12 @@ export interface Database {
288
298
  playerIds?: string[];
289
299
  players?: Json;
290
300
  repertoireTags?: Json;
301
+ rollcallLink?: string | null;
291
302
  satisfactionIndex?: Json;
292
303
  shortDynamicLink?: string | null;
293
304
  socialNetworks?: Json | null;
294
305
  status?: Database['public']['Enums']['group_status'];
306
+ subscriptionId?: string | null;
295
307
  templates?: Json;
296
308
  trialEndAt?: string | null;
297
309
  updatedAt?: string;
@@ -300,6 +312,82 @@ export interface Database {
300
312
  };
301
313
  Relationships: [];
302
314
  };
315
+ offer: {
316
+ Row: {
317
+ applicants: Json;
318
+ applicantsIds: string[];
319
+ createdAt: string;
320
+ createdBy: string;
321
+ deadlineAt: string | null;
322
+ deletedAt: string | null;
323
+ deletedBy: string | null;
324
+ description: string;
325
+ event: string | null;
326
+ group: string;
327
+ id: string;
328
+ instrument: string;
329
+ selectionClosedAt: string | null;
330
+ selectionClosedBy: string | null;
331
+ title: string;
332
+ type: Database['public']['Enums']['offer_type'];
333
+ updatedAt: string;
334
+ updatedBy: string;
335
+ };
336
+ Insert: {
337
+ applicants: Json;
338
+ applicantsIds: string[];
339
+ createdAt: string;
340
+ createdBy: string;
341
+ deadlineAt?: string | null;
342
+ deletedAt?: string | null;
343
+ deletedBy?: string | null;
344
+ description: string;
345
+ event?: string | null;
346
+ group: string;
347
+ id: string;
348
+ instrument: string;
349
+ selectionClosedAt?: string | null;
350
+ selectionClosedBy?: string | null;
351
+ title: string;
352
+ type: Database['public']['Enums']['offer_type'];
353
+ updatedAt: string;
354
+ updatedBy: string;
355
+ };
356
+ Update: {
357
+ applicants?: Json;
358
+ applicantsIds?: string[];
359
+ createdAt?: string;
360
+ createdBy?: string;
361
+ deadlineAt?: string | null;
362
+ deletedAt?: string | null;
363
+ deletedBy?: string | null;
364
+ description?: string;
365
+ event?: string | null;
366
+ group?: string;
367
+ id?: string;
368
+ instrument?: string;
369
+ selectionClosedAt?: string | null;
370
+ selectionClosedBy?: string | null;
371
+ title?: string;
372
+ type?: Database['public']['Enums']['offer_type'];
373
+ updatedAt?: string;
374
+ updatedBy?: string;
375
+ };
376
+ Relationships: [
377
+ {
378
+ foreignKeyName: 'public_offer_event_fkey';
379
+ columns: ['event'];
380
+ referencedRelation: 'event';
381
+ referencedColumns: ['id'];
382
+ },
383
+ {
384
+ foreignKeyName: 'public_offer_group_fkey';
385
+ columns: ['group'];
386
+ referencedRelation: 'group';
387
+ referencedColumns: ['id'];
388
+ }
389
+ ];
390
+ };
303
391
  };
304
392
  Views: {
305
393
  [_ in never]: never;
@@ -315,6 +403,7 @@ export interface Database {
315
403
  group_plan: 'piano' | 'mezzopiano' | 'mezzoforte' | 'forte' | 'fortissimo' | 'tutti';
316
404
  group_plan_period: 'yearly' | 'monthly';
317
405
  group_status: 'premium' | 'trial' | 'inactive' | 'deleted';
406
+ offer_type: 'group' | 'event';
318
407
  social_network: 'facebook' | 'twitter' | 'instagram' | 'youtube';
319
408
  };
320
409
  CompositeTypes: {
@@ -37,6 +37,7 @@ export interface Database {
37
37
  datetime: string;
38
38
  datetimeEnd: string;
39
39
  deletedAt: string | null;
40
+ deletedBy: string | null;
40
41
  description: string | null;
41
42
  descriptionSlate: Json[];
42
43
  displayName: string | null;
@@ -82,6 +83,7 @@ export interface Database {
82
83
  datetime: string;
83
84
  datetimeEnd: string;
84
85
  deletedAt?: string | null;
86
+ deletedBy?: string | null;
85
87
  description?: string | null;
86
88
  descriptionSlate: Json[];
87
89
  displayName?: string | null;
@@ -127,6 +129,7 @@ export interface Database {
127
129
  datetime?: string;
128
130
  datetimeEnd?: string;
129
131
  deletedAt?: string | null;
132
+ deletedBy?: string | null;
130
133
  description?: string | null;
131
134
  descriptionSlate?: Json[];
132
135
  displayName?: string | null;
@@ -166,7 +169,7 @@ export interface Database {
166
169
  };
167
170
  Relationships: [
168
171
  {
169
- foreignKeyName: 'event_promoter_fkey';
172
+ foreignKeyName: 'event_promoter_group_id_fkey';
170
173
  columns: ['promoter'];
171
174
  referencedRelation: 'group';
172
175
  referencedColumns: ['id'];
@@ -185,6 +188,7 @@ export interface Database {
185
188
  createdOn: Database['public']['Enums']['group_created_on'];
186
189
  customerId: string | null;
187
190
  deletedAt: string | null;
191
+ deletedBy: string | null;
188
192
  description: string | null;
189
193
  displayName: string;
190
194
  id: string;
@@ -205,10 +209,12 @@ export interface Database {
205
209
  playerIds: string[];
206
210
  players: Json;
207
211
  repertoireTags: Json;
212
+ rollcallLink: string | null;
208
213
  satisfactionIndex: Json;
209
214
  shortDynamicLink: string | null;
210
215
  socialNetworks: Json | null;
211
216
  status: Database['public']['Enums']['group_status'];
217
+ subscriptionId: string | null;
212
218
  templates: Json;
213
219
  trialEndAt: string | null;
214
220
  updatedAt: string;
@@ -226,6 +232,7 @@ export interface Database {
226
232
  createdOn: Database['public']['Enums']['group_created_on'];
227
233
  customerId?: string | null;
228
234
  deletedAt?: string | null;
235
+ deletedBy?: string | null;
229
236
  description?: string | null;
230
237
  displayName: string;
231
238
  id: string;
@@ -246,10 +253,12 @@ export interface Database {
246
253
  playerIds: string[];
247
254
  players: Json;
248
255
  repertoireTags: Json;
256
+ rollcallLink?: string | null;
249
257
  satisfactionIndex: Json;
250
258
  shortDynamicLink?: string | null;
251
259
  socialNetworks?: Json | null;
252
260
  status: Database['public']['Enums']['group_status'];
261
+ subscriptionId?: string | null;
253
262
  templates: Json;
254
263
  trialEndAt?: string | null;
255
264
  updatedAt?: string;
@@ -267,6 +276,7 @@ export interface Database {
267
276
  createdOn?: Database['public']['Enums']['group_created_on'];
268
277
  customerId?: string | null;
269
278
  deletedAt?: string | null;
279
+ deletedBy?: string | null;
270
280
  description?: string | null;
271
281
  displayName?: string;
272
282
  id?: string;
@@ -287,10 +297,12 @@ export interface Database {
287
297
  playerIds?: string[];
288
298
  players?: Json;
289
299
  repertoireTags?: Json;
300
+ rollcallLink?: string | null;
290
301
  satisfactionIndex?: Json;
291
302
  shortDynamicLink?: string | null;
292
303
  socialNetworks?: Json | null;
293
304
  status?: Database['public']['Enums']['group_status'];
305
+ subscriptionId?: string | null;
294
306
  templates?: Json;
295
307
  trialEndAt?: string | null;
296
308
  updatedAt?: string;
@@ -299,6 +311,82 @@ export interface Database {
299
311
  };
300
312
  Relationships: [];
301
313
  };
314
+ offer: {
315
+ Row: {
316
+ applicants: Json;
317
+ applicantsIds: string[];
318
+ createdAt: string;
319
+ createdBy: string;
320
+ deadlineAt: string | null;
321
+ deletedAt: string | null;
322
+ deletedBy: string | null;
323
+ description: string;
324
+ event: string | null;
325
+ group: string;
326
+ id: string;
327
+ instrument: string;
328
+ selectionClosedAt: string | null;
329
+ selectionClosedBy: string | null;
330
+ title: string;
331
+ type: Database['public']['Enums']['offer_type'];
332
+ updatedAt: string;
333
+ updatedBy: string;
334
+ };
335
+ Insert: {
336
+ applicants: Json;
337
+ applicantsIds: string[];
338
+ createdAt: string;
339
+ createdBy: string;
340
+ deadlineAt?: string | null;
341
+ deletedAt?: string | null;
342
+ deletedBy?: string | null;
343
+ description: string;
344
+ event?: string | null;
345
+ group: string;
346
+ id: string;
347
+ instrument: string;
348
+ selectionClosedAt?: string | null;
349
+ selectionClosedBy?: string | null;
350
+ title: string;
351
+ type: Database['public']['Enums']['offer_type'];
352
+ updatedAt: string;
353
+ updatedBy: string;
354
+ };
355
+ Update: {
356
+ applicants?: Json;
357
+ applicantsIds?: string[];
358
+ createdAt?: string;
359
+ createdBy?: string;
360
+ deadlineAt?: string | null;
361
+ deletedAt?: string | null;
362
+ deletedBy?: string | null;
363
+ description?: string;
364
+ event?: string | null;
365
+ group?: string;
366
+ id?: string;
367
+ instrument?: string;
368
+ selectionClosedAt?: string | null;
369
+ selectionClosedBy?: string | null;
370
+ title?: string;
371
+ type?: Database['public']['Enums']['offer_type'];
372
+ updatedAt?: string;
373
+ updatedBy?: string;
374
+ };
375
+ Relationships: [
376
+ {
377
+ foreignKeyName: 'public_offer_event_fkey';
378
+ columns: ['event'];
379
+ referencedRelation: 'event';
380
+ referencedColumns: ['id'];
381
+ },
382
+ {
383
+ foreignKeyName: 'public_offer_group_fkey';
384
+ columns: ['group'];
385
+ referencedRelation: 'group';
386
+ referencedColumns: ['id'];
387
+ }
388
+ ];
389
+ };
302
390
  };
303
391
  Views: {
304
392
  [_ in never]: never;
@@ -314,6 +402,7 @@ export interface Database {
314
402
  group_plan: 'piano' | 'mezzopiano' | 'mezzoforte' | 'forte' | 'fortissimo' | 'tutti';
315
403
  group_plan_period: 'yearly' | 'monthly';
316
404
  group_status: 'premium' | 'trial' | 'inactive' | 'deleted';
405
+ offer_type: 'group' | 'event';
317
406
  social_network: 'facebook' | 'twitter' | 'instagram' | 'youtube';
318
407
  };
319
408
  CompositeTypes: {
@@ -1,20 +1,15 @@
1
- import { MergeDeep, SetOptional } from 'type-fest';
1
+ import { MergeDeep } from 'type-fest';
2
2
  import { Database as DatabaseGenerated } from './generated';
3
3
  import { EventOverwrite } from './overwrites/event';
4
4
  import { GroupOverwrite } from './overwrites/group';
5
+ import { OfferOverwrite } from './overwrites/offer';
6
+ import { Overwrite } from './overwrites';
5
7
  export type Database = MergeDeep<DatabaseGenerated, {
6
8
  public: {
7
9
  Tables: {
8
- group: {
9
- Row: GroupOverwrite;
10
- Insert: SetOptional<GroupOverwrite, 'configSites' | 'socialNetworks'>;
11
- Update: Partial<GroupOverwrite>;
12
- };
13
- event: {
14
- Row: EventOverwrite;
15
- Insert: SetOptional<EventOverwrite, 'repeat' | 'stage'>;
16
- Update: Partial<EventOverwrite>;
17
- };
10
+ group: Overwrite<GroupOverwrite, 'configSites' | 'socialNetworks'>;
11
+ event: Overwrite<EventOverwrite, 'repeat' | 'stage'>;
12
+ offer: Overwrite<OfferOverwrite>;
18
13
  };
19
14
  };
20
15
  }>;
@@ -1,23 +1,18 @@
1
- import { MergeDeep, SetOptional } from 'type-fest';
1
+ import { MergeDeep } from 'type-fest';
2
2
  import { Database as DatabaseGenerated } from './generated';
3
3
  import { EventOverwrite } from './overwrites/event';
4
4
  import { GroupOverwrite } from './overwrites/group';
5
+ import { OfferOverwrite } from './overwrites/offer';
6
+ import { Overwrite } from './overwrites';
5
7
 
6
8
  export type Database = MergeDeep<
7
9
  DatabaseGenerated,
8
10
  {
9
11
  public: {
10
12
  Tables: {
11
- group: {
12
- Row: GroupOverwrite;
13
- Insert: SetOptional<GroupOverwrite, 'configSites' | 'socialNetworks'>;
14
- Update: Partial<GroupOverwrite>;
15
- };
16
- event: {
17
- Row: EventOverwrite;
18
- Insert: SetOptional<EventOverwrite, 'repeat' | 'stage'>;
19
- Update: Partial<EventOverwrite>;
20
- };
13
+ group: Overwrite<GroupOverwrite, 'configSites' | 'socialNetworks'>;
14
+ event: Overwrite<EventOverwrite, 'repeat' | 'stage'>;
15
+ offer: Overwrite<OfferOverwrite>;
21
16
  };
22
17
  };
23
18
  }
@@ -0,0 +1,6 @@
1
+ import { SetOptional } from 'type-fest';
2
+ export type Overwrite<T, OptionalKeysInInsert extends keyof T | never = never> = {
3
+ Row: T;
4
+ Insert: [OptionalKeysInInsert] extends [never] ? T : SetOptional<T, OptionalKeysInInsert>;
5
+ Update: Partial<T>;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { SetOptional } from 'type-fest';
2
+
3
+ export type Overwrite<T, OptionalKeysInInsert extends keyof T | never = never> = {
4
+ Row: T;
5
+ Insert: [OptionalKeysInInsert] extends [never] ? T : SetOptional<T, OptionalKeysInInsert>;
6
+ Update: Partial<T>;
7
+ };
@@ -0,0 +1,11 @@
1
+ import { InstrumentId } from '../../../helpers/instruments';
2
+ export interface OfferApplicantBasicData {
3
+ appliedAt: string;
4
+ selectedAt: string | null;
5
+ discardedAt: string | null;
6
+ message: string | null;
7
+ }
8
+ export interface OfferOverwrite {
9
+ instrument: InstrumentId;
10
+ applicants: Record<string, OfferApplicantBasicData>;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { InstrumentId } from '../../../helpers/instruments';
2
+
3
+ export interface OfferApplicantBasicData {
4
+ appliedAt: string;
5
+ selectedAt: string | null;
6
+ discardedAt: string | null;
7
+ message: string | null;
8
+ }
9
+
10
+ export interface OfferOverwrite {
11
+ instrument: InstrumentId;
12
+ applicants: Record<string, OfferApplicantBasicData>;
13
+ }