@glissandoo/lib 1.88.0 → 1.89.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.
- package/functions/offer.d.ts +3 -3
- package/models/Evento/index.d.ts +3 -0
- package/models/Evento/index.js +9 -0
- package/models/Offer/index.d.ts +3 -2
- package/models/Offer/index.js +8 -5
- package/models/Offer/types.d.ts +5 -3
- package/models/User/index.d.ts +1 -1
- package/models/User/index.js +1 -1
- package/package.json +2 -2
- package/types/supabase/generated.d.ts +151 -20
- package/types/supabase/generated.ts +151 -20
- package/types/supabase/index.d.ts +1 -1
- package/types/supabase/index.ts +1 -1
- package/types/supabase/overwrites/group.d.ts +6 -5
- package/types/supabase/overwrites/group.ts +7 -5
- package/types/supabase/overwrites/offer.d.ts +4 -2
- package/types/supabase/overwrites/offer.ts +4 -2
- package/types/supabase/overwrites/utils.d.ts +4 -0
- package/types/supabase/overwrites/utils.js +2 -0
- package/types/supabase/overwrites/utils.ts +4 -0
package/functions/offer.d.ts
CHANGED
|
@@ -15,14 +15,14 @@ export declare namespace OfferFbFunctionsTypes {
|
|
|
15
15
|
};
|
|
16
16
|
country: string;
|
|
17
17
|
type: OfferType;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
groupId: string;
|
|
19
|
+
eventId: string | null;
|
|
20
20
|
deadlineAt: number | null;
|
|
21
21
|
timezone: string;
|
|
22
22
|
createdOn: CreatedOn;
|
|
23
23
|
}
|
|
24
24
|
type PublishResult = void;
|
|
25
|
-
type EditParams = Omit<PublishParams, 'instrument' | 'type' | '
|
|
25
|
+
type EditParams = Omit<PublishParams, 'instrument' | 'type' | 'groupId' | 'eventId' | 'createdOn'>;
|
|
26
26
|
type EditResult = void;
|
|
27
27
|
interface SelectApplicantParams {
|
|
28
28
|
offerId: string;
|
package/models/Evento/index.d.ts
CHANGED
|
@@ -60,6 +60,9 @@ export default class Evento extends EventoPromoter<EventData> {
|
|
|
60
60
|
get pendingPlayers(): EventoPlayerBasic[];
|
|
61
61
|
get confirmedRollCallPlayers(): EventoPlayerBasic[];
|
|
62
62
|
get declinedRollCallPlayers(): EventoPlayerBasic[];
|
|
63
|
+
get selectedPlayers(): EventoPlayerBasic[];
|
|
64
|
+
get discardedPlayers(): EventoPlayerBasic[];
|
|
65
|
+
get pendingSelectedPlayers(): EventoPlayerBasic[];
|
|
63
66
|
get isRollCalled(): boolean;
|
|
64
67
|
get isActiveRollCall(): boolean;
|
|
65
68
|
get templateId(): string | null;
|
package/models/Evento/index.js
CHANGED
|
@@ -168,6 +168,15 @@ class Evento extends promoter_1.default {
|
|
|
168
168
|
get declinedRollCallPlayers() {
|
|
169
169
|
return this.playersList().filter((player) => player.isRollCallDeclined);
|
|
170
170
|
}
|
|
171
|
+
get selectedPlayers() {
|
|
172
|
+
return this.playersList().filter((player) => player.isSelected);
|
|
173
|
+
}
|
|
174
|
+
get discardedPlayers() {
|
|
175
|
+
return this.playersList().filter((player) => player.isSelected);
|
|
176
|
+
}
|
|
177
|
+
get pendingSelectedPlayers() {
|
|
178
|
+
return this.playersList().filter((player) => player.isPendingSelected);
|
|
179
|
+
}
|
|
171
180
|
get isRollCalled() {
|
|
172
181
|
return this.rollCalledAt !== null;
|
|
173
182
|
}
|
package/models/Offer/index.d.ts
CHANGED
|
@@ -13,8 +13,9 @@ export default class Offer extends ModelWithLang<OfferData> {
|
|
|
13
13
|
get description(): import("../../helpers/slate").Descendant[];
|
|
14
14
|
get plainDescription(): string;
|
|
15
15
|
get type(): OfferType;
|
|
16
|
-
get
|
|
17
|
-
get
|
|
16
|
+
get groupId(): string;
|
|
17
|
+
get group(): import("../Group/types").GroupBasicData;
|
|
18
|
+
get eventId(): string | null;
|
|
18
19
|
get locality(): string;
|
|
19
20
|
get location(): FirebaseFirestore.GeoPoint;
|
|
20
21
|
get country(): string;
|
package/models/Offer/index.js
CHANGED
|
@@ -25,13 +25,13 @@ class Offer extends lang_2.default {
|
|
|
25
25
|
return this.data.createdOn;
|
|
26
26
|
}
|
|
27
27
|
get title() {
|
|
28
|
-
return this.data.title
|
|
28
|
+
return this.data.title;
|
|
29
29
|
}
|
|
30
30
|
get instrument() {
|
|
31
31
|
return this.data.instrument || instruments_1.DefaultInstrumentId.Maracas;
|
|
32
32
|
}
|
|
33
33
|
get description() {
|
|
34
|
-
return this.data.description ||
|
|
34
|
+
return this.data.description || [];
|
|
35
35
|
}
|
|
36
36
|
get plainDescription() {
|
|
37
37
|
return (0, slate_1.serializeSlateBlock)(this.description);
|
|
@@ -39,11 +39,14 @@ class Offer extends lang_2.default {
|
|
|
39
39
|
get type() {
|
|
40
40
|
return this.data.type || types_1.OfferType.Group;
|
|
41
41
|
}
|
|
42
|
+
get groupId() {
|
|
43
|
+
return this.data.groupId;
|
|
44
|
+
}
|
|
42
45
|
get group() {
|
|
43
|
-
return this.data.
|
|
46
|
+
return this.data.groupInfo;
|
|
44
47
|
}
|
|
45
|
-
get
|
|
46
|
-
return this.data.
|
|
48
|
+
get eventId() {
|
|
49
|
+
return this.data.eventId || null;
|
|
47
50
|
}
|
|
48
51
|
get locality() {
|
|
49
52
|
return this.data.locality;
|
package/models/Offer/types.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import { GeoPoint, Timestamp } from '@google-cloud/firestore';
|
|
|
2
2
|
import { DefaultInstrumentId } from '../../helpers/instruments';
|
|
3
3
|
import { Descendant } from '../../helpers/slate';
|
|
4
4
|
import { CreatedOn } from '../../helpers/types';
|
|
5
|
+
import { GroupBasicData } from '../Group/types';
|
|
5
6
|
import { UserBasicData } from '../User/types';
|
|
6
7
|
export declare enum OfferType {
|
|
7
8
|
Group = "group",
|
|
8
9
|
Event = "event"
|
|
9
10
|
}
|
|
10
|
-
export interface OfferAlgoliaData extends Pick<OfferData, 'country' | 'locality' | 'title' | 'timezone' | 'type' | '
|
|
11
|
+
export interface OfferAlgoliaData extends Pick<OfferData, 'country' | 'locality' | 'title' | 'timezone' | 'type' | 'groupId' | 'eventId' | 'applicantsIds' | 'groupInfo'> {
|
|
11
12
|
objectID: string;
|
|
12
13
|
_geoloc: {
|
|
13
14
|
lat: number;
|
|
@@ -35,8 +36,9 @@ export interface OfferData {
|
|
|
35
36
|
location: GeoPoint;
|
|
36
37
|
country: string;
|
|
37
38
|
type: OfferType;
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
groupId: string;
|
|
40
|
+
groupInfo: GroupBasicData;
|
|
41
|
+
eventId: string | null;
|
|
40
42
|
applicantsIds: string[];
|
|
41
43
|
applicants: Record<string, OfferApplicantBasicData>;
|
|
42
44
|
deadlineAt: Timestamp | null;
|
package/models/User/index.d.ts
CHANGED
package/models/User/index.js
CHANGED
|
@@ -167,7 +167,7 @@ class User extends basic_1.default {
|
|
|
167
167
|
return (0, objects_1.mapToArray)(this.devices);
|
|
168
168
|
}
|
|
169
169
|
get analyticsEnabled() {
|
|
170
|
-
return this.data.analyticsEnabled
|
|
170
|
+
return (0, lodash_1.isBoolean)(this.data.analyticsEnabled) ? this.data.analyticsEnabled : true;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
exports.default = User;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissandoo/lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.89.0",
|
|
4
4
|
"description": "Glissandoo library js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"link": "cp package.json ./lib && cd ./lib && npm link",
|
|
24
24
|
"translation:upload": "localazy upload",
|
|
25
25
|
"translation:download": "localazy download",
|
|
26
|
-
"supabase:types": "supabase gen types typescript --local > src/types/supabase/generated.ts"
|
|
26
|
+
"supabase:types": "supabase gen types typescript --local > src/types/supabase/generated.ts; prettier --write src/types/supabase/generated.ts"
|
|
27
27
|
},
|
|
28
28
|
"author": "Glissandoo",
|
|
29
29
|
"license": "ISC",
|
|
@@ -316,18 +316,25 @@ export interface Database {
|
|
|
316
316
|
Row: {
|
|
317
317
|
applicants: Json;
|
|
318
318
|
applicantsIds: string[];
|
|
319
|
+
country: string;
|
|
319
320
|
createdAt: string;
|
|
320
321
|
createdBy: string;
|
|
322
|
+
createdOn: Database['public']['Enums']['created_on'];
|
|
321
323
|
deadlineAt: string | null;
|
|
322
324
|
deletedAt: string | null;
|
|
323
325
|
deletedBy: string | null;
|
|
324
326
|
description: string;
|
|
325
|
-
|
|
326
|
-
|
|
327
|
+
eventId: string | null;
|
|
328
|
+
groupId: string;
|
|
329
|
+
groupInfo: Json;
|
|
327
330
|
id: string;
|
|
328
331
|
instrument: string;
|
|
332
|
+
locality: string;
|
|
333
|
+
location: unknown;
|
|
334
|
+
location_lonlat: Database['public']['CompositeTypes']['lonlat'];
|
|
329
335
|
selectionClosedAt: string | null;
|
|
330
336
|
selectionClosedBy: string | null;
|
|
337
|
+
timezone: string;
|
|
331
338
|
title: string;
|
|
332
339
|
type: Database['public']['Enums']['offer_type'];
|
|
333
340
|
updatedAt: string;
|
|
@@ -336,18 +343,25 @@ export interface Database {
|
|
|
336
343
|
Insert: {
|
|
337
344
|
applicants: Json;
|
|
338
345
|
applicantsIds: string[];
|
|
346
|
+
country: string;
|
|
339
347
|
createdAt: string;
|
|
340
348
|
createdBy: string;
|
|
349
|
+
createdOn: Database['public']['Enums']['created_on'];
|
|
341
350
|
deadlineAt?: string | null;
|
|
342
351
|
deletedAt?: string | null;
|
|
343
352
|
deletedBy?: string | null;
|
|
344
353
|
description: string;
|
|
345
|
-
|
|
346
|
-
|
|
354
|
+
eventId?: string | null;
|
|
355
|
+
groupId: string;
|
|
356
|
+
groupInfo?: Json;
|
|
347
357
|
id: string;
|
|
348
358
|
instrument: string;
|
|
359
|
+
locality: string;
|
|
360
|
+
location: unknown;
|
|
361
|
+
location_lonlat?: Database['public']['CompositeTypes']['lonlat'];
|
|
349
362
|
selectionClosedAt?: string | null;
|
|
350
363
|
selectionClosedBy?: string | null;
|
|
364
|
+
timezone: string;
|
|
351
365
|
title: string;
|
|
352
366
|
type: Database['public']['Enums']['offer_type'];
|
|
353
367
|
updatedAt: string;
|
|
@@ -356,37 +370,31 @@ export interface Database {
|
|
|
356
370
|
Update: {
|
|
357
371
|
applicants?: Json;
|
|
358
372
|
applicantsIds?: string[];
|
|
373
|
+
country?: string;
|
|
359
374
|
createdAt?: string;
|
|
360
375
|
createdBy?: string;
|
|
376
|
+
createdOn?: Database['public']['Enums']['created_on'];
|
|
361
377
|
deadlineAt?: string | null;
|
|
362
378
|
deletedAt?: string | null;
|
|
363
379
|
deletedBy?: string | null;
|
|
364
380
|
description?: string;
|
|
365
|
-
|
|
366
|
-
|
|
381
|
+
eventId?: string | null;
|
|
382
|
+
groupId?: string;
|
|
383
|
+
groupInfo?: Json;
|
|
367
384
|
id?: string;
|
|
368
385
|
instrument?: string;
|
|
386
|
+
locality?: string;
|
|
387
|
+
location?: unknown;
|
|
388
|
+
location_lonlat?: Database['public']['CompositeTypes']['lonlat'];
|
|
369
389
|
selectionClosedAt?: string | null;
|
|
370
390
|
selectionClosedBy?: string | null;
|
|
391
|
+
timezone?: string;
|
|
371
392
|
title?: string;
|
|
372
393
|
type?: Database['public']['Enums']['offer_type'];
|
|
373
394
|
updatedAt?: string;
|
|
374
395
|
updatedBy?: string;
|
|
375
396
|
};
|
|
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
|
-
];
|
|
397
|
+
Relationships: [];
|
|
390
398
|
};
|
|
391
399
|
};
|
|
392
400
|
Views: {
|
|
@@ -523,6 +531,98 @@ export interface Database {
|
|
|
523
531
|
}
|
|
524
532
|
];
|
|
525
533
|
};
|
|
534
|
+
s3_multipart_uploads: {
|
|
535
|
+
Row: {
|
|
536
|
+
bucket_id: string;
|
|
537
|
+
created_at: string;
|
|
538
|
+
id: string;
|
|
539
|
+
in_progress_size: number;
|
|
540
|
+
key: string;
|
|
541
|
+
owner_id: string | null;
|
|
542
|
+
upload_signature: string;
|
|
543
|
+
version: string;
|
|
544
|
+
};
|
|
545
|
+
Insert: {
|
|
546
|
+
bucket_id: string;
|
|
547
|
+
created_at?: string;
|
|
548
|
+
id: string;
|
|
549
|
+
in_progress_size?: number;
|
|
550
|
+
key: string;
|
|
551
|
+
owner_id?: string | null;
|
|
552
|
+
upload_signature: string;
|
|
553
|
+
version: string;
|
|
554
|
+
};
|
|
555
|
+
Update: {
|
|
556
|
+
bucket_id?: string;
|
|
557
|
+
created_at?: string;
|
|
558
|
+
id?: string;
|
|
559
|
+
in_progress_size?: number;
|
|
560
|
+
key?: string;
|
|
561
|
+
owner_id?: string | null;
|
|
562
|
+
upload_signature?: string;
|
|
563
|
+
version?: string;
|
|
564
|
+
};
|
|
565
|
+
Relationships: [
|
|
566
|
+
{
|
|
567
|
+
foreignKeyName: 's3_multipart_uploads_bucket_id_fkey';
|
|
568
|
+
columns: ['bucket_id'];
|
|
569
|
+
referencedRelation: 'buckets';
|
|
570
|
+
referencedColumns: ['id'];
|
|
571
|
+
}
|
|
572
|
+
];
|
|
573
|
+
};
|
|
574
|
+
s3_multipart_uploads_parts: {
|
|
575
|
+
Row: {
|
|
576
|
+
bucket_id: string;
|
|
577
|
+
created_at: string;
|
|
578
|
+
etag: string;
|
|
579
|
+
id: string;
|
|
580
|
+
key: string;
|
|
581
|
+
owner_id: string | null;
|
|
582
|
+
part_number: number;
|
|
583
|
+
size: number;
|
|
584
|
+
upload_id: string;
|
|
585
|
+
version: string;
|
|
586
|
+
};
|
|
587
|
+
Insert: {
|
|
588
|
+
bucket_id: string;
|
|
589
|
+
created_at?: string;
|
|
590
|
+
etag: string;
|
|
591
|
+
id?: string;
|
|
592
|
+
key: string;
|
|
593
|
+
owner_id?: string | null;
|
|
594
|
+
part_number: number;
|
|
595
|
+
size?: number;
|
|
596
|
+
upload_id: string;
|
|
597
|
+
version: string;
|
|
598
|
+
};
|
|
599
|
+
Update: {
|
|
600
|
+
bucket_id?: string;
|
|
601
|
+
created_at?: string;
|
|
602
|
+
etag?: string;
|
|
603
|
+
id?: string;
|
|
604
|
+
key?: string;
|
|
605
|
+
owner_id?: string | null;
|
|
606
|
+
part_number?: number;
|
|
607
|
+
size?: number;
|
|
608
|
+
upload_id?: string;
|
|
609
|
+
version?: string;
|
|
610
|
+
};
|
|
611
|
+
Relationships: [
|
|
612
|
+
{
|
|
613
|
+
foreignKeyName: 's3_multipart_uploads_parts_bucket_id_fkey';
|
|
614
|
+
columns: ['bucket_id'];
|
|
615
|
+
referencedRelation: 'buckets';
|
|
616
|
+
referencedColumns: ['id'];
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
foreignKeyName: 's3_multipart_uploads_parts_upload_id_fkey';
|
|
620
|
+
columns: ['upload_id'];
|
|
621
|
+
referencedRelation: 's3_multipart_uploads';
|
|
622
|
+
referencedColumns: ['id'];
|
|
623
|
+
}
|
|
624
|
+
];
|
|
625
|
+
};
|
|
526
626
|
};
|
|
527
627
|
Views: {
|
|
528
628
|
[_ in never]: never;
|
|
@@ -562,6 +662,37 @@ export interface Database {
|
|
|
562
662
|
bucket_id: string;
|
|
563
663
|
}[];
|
|
564
664
|
};
|
|
665
|
+
list_multipart_uploads_with_delimiter: {
|
|
666
|
+
Args: {
|
|
667
|
+
bucket_id: string;
|
|
668
|
+
prefix_param: string;
|
|
669
|
+
delimiter_param: string;
|
|
670
|
+
max_keys?: number;
|
|
671
|
+
next_key_token?: string;
|
|
672
|
+
next_upload_token?: string;
|
|
673
|
+
};
|
|
674
|
+
Returns: {
|
|
675
|
+
key: string;
|
|
676
|
+
id: string;
|
|
677
|
+
created_at: string;
|
|
678
|
+
}[];
|
|
679
|
+
};
|
|
680
|
+
list_objects_with_delimiter: {
|
|
681
|
+
Args: {
|
|
682
|
+
bucket_id: string;
|
|
683
|
+
prefix_param: string;
|
|
684
|
+
delimiter_param: string;
|
|
685
|
+
max_keys?: number;
|
|
686
|
+
start_after?: string;
|
|
687
|
+
next_token?: string;
|
|
688
|
+
};
|
|
689
|
+
Returns: {
|
|
690
|
+
name: string;
|
|
691
|
+
id: string;
|
|
692
|
+
metadata: Json;
|
|
693
|
+
updated_at: string;
|
|
694
|
+
}[];
|
|
695
|
+
};
|
|
565
696
|
search: {
|
|
566
697
|
Args: {
|
|
567
698
|
prefix: string;
|
|
@@ -315,18 +315,25 @@ export interface Database {
|
|
|
315
315
|
Row: {
|
|
316
316
|
applicants: Json;
|
|
317
317
|
applicantsIds: string[];
|
|
318
|
+
country: string;
|
|
318
319
|
createdAt: string;
|
|
319
320
|
createdBy: string;
|
|
321
|
+
createdOn: Database['public']['Enums']['created_on'];
|
|
320
322
|
deadlineAt: string | null;
|
|
321
323
|
deletedAt: string | null;
|
|
322
324
|
deletedBy: string | null;
|
|
323
325
|
description: string;
|
|
324
|
-
|
|
325
|
-
|
|
326
|
+
eventId: string | null;
|
|
327
|
+
groupId: string;
|
|
328
|
+
groupInfo: Json;
|
|
326
329
|
id: string;
|
|
327
330
|
instrument: string;
|
|
331
|
+
locality: string;
|
|
332
|
+
location: unknown;
|
|
333
|
+
location_lonlat: Database['public']['CompositeTypes']['lonlat'];
|
|
328
334
|
selectionClosedAt: string | null;
|
|
329
335
|
selectionClosedBy: string | null;
|
|
336
|
+
timezone: string;
|
|
330
337
|
title: string;
|
|
331
338
|
type: Database['public']['Enums']['offer_type'];
|
|
332
339
|
updatedAt: string;
|
|
@@ -335,18 +342,25 @@ export interface Database {
|
|
|
335
342
|
Insert: {
|
|
336
343
|
applicants: Json;
|
|
337
344
|
applicantsIds: string[];
|
|
345
|
+
country: string;
|
|
338
346
|
createdAt: string;
|
|
339
347
|
createdBy: string;
|
|
348
|
+
createdOn: Database['public']['Enums']['created_on'];
|
|
340
349
|
deadlineAt?: string | null;
|
|
341
350
|
deletedAt?: string | null;
|
|
342
351
|
deletedBy?: string | null;
|
|
343
352
|
description: string;
|
|
344
|
-
|
|
345
|
-
|
|
353
|
+
eventId?: string | null;
|
|
354
|
+
groupId: string;
|
|
355
|
+
groupInfo?: Json;
|
|
346
356
|
id: string;
|
|
347
357
|
instrument: string;
|
|
358
|
+
locality: string;
|
|
359
|
+
location: unknown;
|
|
360
|
+
location_lonlat?: Database['public']['CompositeTypes']['lonlat'];
|
|
348
361
|
selectionClosedAt?: string | null;
|
|
349
362
|
selectionClosedBy?: string | null;
|
|
363
|
+
timezone: string;
|
|
350
364
|
title: string;
|
|
351
365
|
type: Database['public']['Enums']['offer_type'];
|
|
352
366
|
updatedAt: string;
|
|
@@ -355,37 +369,31 @@ export interface Database {
|
|
|
355
369
|
Update: {
|
|
356
370
|
applicants?: Json;
|
|
357
371
|
applicantsIds?: string[];
|
|
372
|
+
country?: string;
|
|
358
373
|
createdAt?: string;
|
|
359
374
|
createdBy?: string;
|
|
375
|
+
createdOn?: Database['public']['Enums']['created_on'];
|
|
360
376
|
deadlineAt?: string | null;
|
|
361
377
|
deletedAt?: string | null;
|
|
362
378
|
deletedBy?: string | null;
|
|
363
379
|
description?: string;
|
|
364
|
-
|
|
365
|
-
|
|
380
|
+
eventId?: string | null;
|
|
381
|
+
groupId?: string;
|
|
382
|
+
groupInfo?: Json;
|
|
366
383
|
id?: string;
|
|
367
384
|
instrument?: string;
|
|
385
|
+
locality?: string;
|
|
386
|
+
location?: unknown;
|
|
387
|
+
location_lonlat?: Database['public']['CompositeTypes']['lonlat'];
|
|
368
388
|
selectionClosedAt?: string | null;
|
|
369
389
|
selectionClosedBy?: string | null;
|
|
390
|
+
timezone?: string;
|
|
370
391
|
title?: string;
|
|
371
392
|
type?: Database['public']['Enums']['offer_type'];
|
|
372
393
|
updatedAt?: string;
|
|
373
394
|
updatedBy?: string;
|
|
374
395
|
};
|
|
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
|
-
];
|
|
396
|
+
Relationships: [];
|
|
389
397
|
};
|
|
390
398
|
};
|
|
391
399
|
Views: {
|
|
@@ -522,6 +530,98 @@ export interface Database {
|
|
|
522
530
|
}
|
|
523
531
|
];
|
|
524
532
|
};
|
|
533
|
+
s3_multipart_uploads: {
|
|
534
|
+
Row: {
|
|
535
|
+
bucket_id: string;
|
|
536
|
+
created_at: string;
|
|
537
|
+
id: string;
|
|
538
|
+
in_progress_size: number;
|
|
539
|
+
key: string;
|
|
540
|
+
owner_id: string | null;
|
|
541
|
+
upload_signature: string;
|
|
542
|
+
version: string;
|
|
543
|
+
};
|
|
544
|
+
Insert: {
|
|
545
|
+
bucket_id: string;
|
|
546
|
+
created_at?: string;
|
|
547
|
+
id: string;
|
|
548
|
+
in_progress_size?: number;
|
|
549
|
+
key: string;
|
|
550
|
+
owner_id?: string | null;
|
|
551
|
+
upload_signature: string;
|
|
552
|
+
version: string;
|
|
553
|
+
};
|
|
554
|
+
Update: {
|
|
555
|
+
bucket_id?: string;
|
|
556
|
+
created_at?: string;
|
|
557
|
+
id?: string;
|
|
558
|
+
in_progress_size?: number;
|
|
559
|
+
key?: string;
|
|
560
|
+
owner_id?: string | null;
|
|
561
|
+
upload_signature?: string;
|
|
562
|
+
version?: string;
|
|
563
|
+
};
|
|
564
|
+
Relationships: [
|
|
565
|
+
{
|
|
566
|
+
foreignKeyName: 's3_multipart_uploads_bucket_id_fkey';
|
|
567
|
+
columns: ['bucket_id'];
|
|
568
|
+
referencedRelation: 'buckets';
|
|
569
|
+
referencedColumns: ['id'];
|
|
570
|
+
}
|
|
571
|
+
];
|
|
572
|
+
};
|
|
573
|
+
s3_multipart_uploads_parts: {
|
|
574
|
+
Row: {
|
|
575
|
+
bucket_id: string;
|
|
576
|
+
created_at: string;
|
|
577
|
+
etag: string;
|
|
578
|
+
id: string;
|
|
579
|
+
key: string;
|
|
580
|
+
owner_id: string | null;
|
|
581
|
+
part_number: number;
|
|
582
|
+
size: number;
|
|
583
|
+
upload_id: string;
|
|
584
|
+
version: string;
|
|
585
|
+
};
|
|
586
|
+
Insert: {
|
|
587
|
+
bucket_id: string;
|
|
588
|
+
created_at?: string;
|
|
589
|
+
etag: string;
|
|
590
|
+
id?: string;
|
|
591
|
+
key: string;
|
|
592
|
+
owner_id?: string | null;
|
|
593
|
+
part_number: number;
|
|
594
|
+
size?: number;
|
|
595
|
+
upload_id: string;
|
|
596
|
+
version: string;
|
|
597
|
+
};
|
|
598
|
+
Update: {
|
|
599
|
+
bucket_id?: string;
|
|
600
|
+
created_at?: string;
|
|
601
|
+
etag?: string;
|
|
602
|
+
id?: string;
|
|
603
|
+
key?: string;
|
|
604
|
+
owner_id?: string | null;
|
|
605
|
+
part_number?: number;
|
|
606
|
+
size?: number;
|
|
607
|
+
upload_id?: string;
|
|
608
|
+
version?: string;
|
|
609
|
+
};
|
|
610
|
+
Relationships: [
|
|
611
|
+
{
|
|
612
|
+
foreignKeyName: 's3_multipart_uploads_parts_bucket_id_fkey';
|
|
613
|
+
columns: ['bucket_id'];
|
|
614
|
+
referencedRelation: 'buckets';
|
|
615
|
+
referencedColumns: ['id'];
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
foreignKeyName: 's3_multipart_uploads_parts_upload_id_fkey';
|
|
619
|
+
columns: ['upload_id'];
|
|
620
|
+
referencedRelation: 's3_multipart_uploads';
|
|
621
|
+
referencedColumns: ['id'];
|
|
622
|
+
}
|
|
623
|
+
];
|
|
624
|
+
};
|
|
525
625
|
};
|
|
526
626
|
Views: {
|
|
527
627
|
[_ in never]: never;
|
|
@@ -561,6 +661,37 @@ export interface Database {
|
|
|
561
661
|
bucket_id: string;
|
|
562
662
|
}[];
|
|
563
663
|
};
|
|
664
|
+
list_multipart_uploads_with_delimiter: {
|
|
665
|
+
Args: {
|
|
666
|
+
bucket_id: string;
|
|
667
|
+
prefix_param: string;
|
|
668
|
+
delimiter_param: string;
|
|
669
|
+
max_keys?: number;
|
|
670
|
+
next_key_token?: string;
|
|
671
|
+
next_upload_token?: string;
|
|
672
|
+
};
|
|
673
|
+
Returns: {
|
|
674
|
+
key: string;
|
|
675
|
+
id: string;
|
|
676
|
+
created_at: string;
|
|
677
|
+
}[];
|
|
678
|
+
};
|
|
679
|
+
list_objects_with_delimiter: {
|
|
680
|
+
Args: {
|
|
681
|
+
bucket_id: string;
|
|
682
|
+
prefix_param: string;
|
|
683
|
+
delimiter_param: string;
|
|
684
|
+
max_keys?: number;
|
|
685
|
+
start_after?: string;
|
|
686
|
+
next_token?: string;
|
|
687
|
+
};
|
|
688
|
+
Returns: {
|
|
689
|
+
name: string;
|
|
690
|
+
id: string;
|
|
691
|
+
metadata: Json;
|
|
692
|
+
updated_at: string;
|
|
693
|
+
}[];
|
|
694
|
+
};
|
|
564
695
|
search: {
|
|
565
696
|
Args: {
|
|
566
697
|
prefix: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MergeDeep } from 'type-fest';
|
|
2
2
|
import { Database as DatabaseGenerated } from './generated';
|
|
3
|
+
import { Overwrite } from './overwrites';
|
|
3
4
|
import { EventOverwrite } from './overwrites/event';
|
|
4
5
|
import { GroupOverwrite } from './overwrites/group';
|
|
5
6
|
import { OfferOverwrite } from './overwrites/offer';
|
|
6
|
-
import { Overwrite } from './overwrites';
|
|
7
7
|
export type Database = MergeDeep<DatabaseGenerated, {
|
|
8
8
|
public: {
|
|
9
9
|
Tables: {
|
package/types/supabase/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MergeDeep } from 'type-fest';
|
|
2
2
|
import { Database as DatabaseGenerated } from './generated';
|
|
3
|
+
import { Overwrite } from './overwrites';
|
|
3
4
|
import { EventOverwrite } from './overwrites/event';
|
|
4
5
|
import { GroupOverwrite } from './overwrites/group';
|
|
5
6
|
import { OfferOverwrite } from './overwrites/offer';
|
|
6
|
-
import { Overwrite } from './overwrites';
|
|
7
7
|
|
|
8
8
|
export type Database = MergeDeep<
|
|
9
9
|
DatabaseGenerated,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { GroupData } from '../../../models/Group/types';
|
|
1
|
+
import { GroupBasicData, GroupData } from '../../../models/Group/types';
|
|
2
|
+
import { Location } from './utils';
|
|
2
3
|
export interface GroupAddress {
|
|
3
4
|
address: string;
|
|
4
|
-
location:
|
|
5
|
-
latitude: number;
|
|
6
|
-
longitude: number;
|
|
7
|
-
} | null;
|
|
5
|
+
location: Location | null;
|
|
8
6
|
default: boolean;
|
|
9
7
|
}
|
|
10
8
|
export interface GroupOnboardingMessage {
|
|
@@ -24,6 +22,9 @@ export interface GroupTemplateData {
|
|
|
24
22
|
export type GroupSocialNetworks = NonNullable<GroupData['socialNetworks']> | null;
|
|
25
23
|
export type GroupTemplates = Record<string, GroupTemplateData>;
|
|
26
24
|
export type GroupVisitedDashboardAt = Record<string, string>;
|
|
25
|
+
export type GroupBasic = Omit<GroupBasicData, 'location'> & {
|
|
26
|
+
location: Location;
|
|
27
|
+
};
|
|
27
28
|
export interface GroupOverwrite {
|
|
28
29
|
addresses: GroupAddress[];
|
|
29
30
|
config: GroupData['config'];
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { GroupData } from '../../../models/Group/types';
|
|
1
|
+
import { GroupBasicData, GroupData } from '../../../models/Group/types';
|
|
2
|
+
import { Location } from './utils';
|
|
2
3
|
|
|
3
4
|
export interface GroupAddress {
|
|
4
5
|
address: string;
|
|
5
|
-
location:
|
|
6
|
-
latitude: number;
|
|
7
|
-
longitude: number;
|
|
8
|
-
} | null;
|
|
6
|
+
location: Location | null;
|
|
9
7
|
default: boolean;
|
|
10
8
|
}
|
|
11
9
|
|
|
@@ -31,6 +29,10 @@ export type GroupTemplates = Record<string, GroupTemplateData>;
|
|
|
31
29
|
|
|
32
30
|
export type GroupVisitedDashboardAt = Record<string, string>;
|
|
33
31
|
|
|
32
|
+
export type GroupBasic = Omit<GroupBasicData, 'location'> & {
|
|
33
|
+
location: Location;
|
|
34
|
+
};
|
|
35
|
+
|
|
34
36
|
export interface GroupOverwrite {
|
|
35
37
|
addresses: GroupAddress[];
|
|
36
38
|
config: GroupData['config'];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DefaultInstrumentId } from '../../../helpers/instruments';
|
|
2
|
+
import { GroupBasic } from './group';
|
|
2
3
|
export interface OfferApplicantBasicData {
|
|
3
4
|
appliedAt: string;
|
|
4
5
|
selectedAt: string | null;
|
|
@@ -6,6 +7,7 @@ export interface OfferApplicantBasicData {
|
|
|
6
7
|
message: string | null;
|
|
7
8
|
}
|
|
8
9
|
export interface OfferOverwrite {
|
|
9
|
-
instrument:
|
|
10
|
+
instrument: DefaultInstrumentId;
|
|
10
11
|
applicants: Record<string, OfferApplicantBasicData>;
|
|
12
|
+
groupInfo: GroupBasic;
|
|
11
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DefaultInstrumentId } from '../../../helpers/instruments';
|
|
2
|
+
import { GroupBasic } from './group';
|
|
2
3
|
|
|
3
4
|
export interface OfferApplicantBasicData {
|
|
4
5
|
appliedAt: string;
|
|
@@ -8,6 +9,7 @@ export interface OfferApplicantBasicData {
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export interface OfferOverwrite {
|
|
11
|
-
instrument:
|
|
12
|
+
instrument: DefaultInstrumentId;
|
|
12
13
|
applicants: Record<string, OfferApplicantBasicData>;
|
|
14
|
+
groupInfo: GroupBasic;
|
|
13
15
|
}
|