@glissandoo/lib 1.82.0 → 1.83.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/index.d.ts +10 -0
- package/functions/index.js +10 -0
- package/functions/offer.d.ts +27 -0
- package/functions/offer.js +2 -0
- package/functions/offerApplicant.d.ts +12 -0
- package/functions/offerApplicant.js +2 -0
- package/functions/regions.js +10 -0
- package/functions/user.d.ts +5 -0
- package/helpers/collections.d.ts +1 -0
- package/helpers/collections.js +1 -0
- package/helpers/errors.d.ts +1 -0
- package/helpers/errors.js +1 -0
- package/models/Evento/Player/basic.d.ts +2 -0
- package/models/Evento/Player/basic.js +6 -0
- package/models/Evento/Player/index.d.ts +2 -0
- package/models/Evento/Player/index.js +6 -0
- package/models/Evento/types.d.ts +1 -0
- package/models/Offer/Applicant/basic.d.ts +16 -0
- package/models/Offer/Applicant/basic.js +39 -0
- package/models/Offer/Applicant/types.d.ts +11 -0
- package/models/Offer/Applicant/types.js +2 -0
- package/models/Offer/index.d.ts +30 -0
- package/models/Offer/index.js +85 -0
- package/models/Offer/types.d.ts +26 -0
- package/models/Offer/types.js +8 -0
- package/models/User/index.d.ts +1 -0
- package/models/User/index.js +3 -0
- package/models/User/types.d.ts +1 -0
- package/package.json +6 -5
package/functions/index.d.ts
CHANGED
|
@@ -119,7 +119,17 @@ export declare enum FbFunctionName {
|
|
|
119
119
|
UserOnUpdate = "user-onUpdate",
|
|
120
120
|
UserRegister = "user-register",
|
|
121
121
|
UserRemove = "user-remove",
|
|
122
|
+
UserJoinEvent = "user-joinEvent",
|
|
122
123
|
UserSendYearWrapped = "user-sendYearWrapped",
|
|
124
|
+
OfferPublish = "offer-publish",
|
|
125
|
+
OfferEdit = "offer-edit",
|
|
126
|
+
OfferEditSelection = "offer-editSelection",
|
|
127
|
+
OfferOnUpdate = "offer-onUpdate",
|
|
128
|
+
OfferCloseSelection = "offer-closeSelection",
|
|
129
|
+
OfferRemove = "offer-remove",
|
|
130
|
+
OfferApplicantAdd = "offerApplicant-add",
|
|
131
|
+
OfferApplicantEdit = "offerApplicant-edit",
|
|
132
|
+
OfferApplicantRemove = "offerApplicant-remove",
|
|
123
133
|
WebhookStripe = "webhook-stripe",
|
|
124
134
|
WebhookGocardless = "webhook-gocardless",
|
|
125
135
|
WebhookMessagebird = "webhook-messagebird",
|
package/functions/index.js
CHANGED
|
@@ -123,7 +123,17 @@ var FbFunctionName;
|
|
|
123
123
|
FbFunctionName["UserOnUpdate"] = "user-onUpdate";
|
|
124
124
|
FbFunctionName["UserRegister"] = "user-register";
|
|
125
125
|
FbFunctionName["UserRemove"] = "user-remove";
|
|
126
|
+
FbFunctionName["UserJoinEvent"] = "user-joinEvent";
|
|
126
127
|
FbFunctionName["UserSendYearWrapped"] = "user-sendYearWrapped";
|
|
128
|
+
FbFunctionName["OfferPublish"] = "offer-publish";
|
|
129
|
+
FbFunctionName["OfferEdit"] = "offer-edit";
|
|
130
|
+
FbFunctionName["OfferEditSelection"] = "offer-editSelection";
|
|
131
|
+
FbFunctionName["OfferOnUpdate"] = "offer-onUpdate";
|
|
132
|
+
FbFunctionName["OfferCloseSelection"] = "offer-closeSelection";
|
|
133
|
+
FbFunctionName["OfferRemove"] = "offer-remove";
|
|
134
|
+
FbFunctionName["OfferApplicantAdd"] = "offerApplicant-add";
|
|
135
|
+
FbFunctionName["OfferApplicantEdit"] = "offerApplicant-edit";
|
|
136
|
+
FbFunctionName["OfferApplicantRemove"] = "offerApplicant-remove";
|
|
127
137
|
FbFunctionName["WebhookStripe"] = "webhook-stripe";
|
|
128
138
|
FbFunctionName["WebhookGocardless"] = "webhook-gocardless";
|
|
129
139
|
FbFunctionName["WebhookMessagebird"] = "webhook-messagebird";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InstrumentId } from '../helpers/instruments';
|
|
2
|
+
import { OfferType } from '../models/Offer/types';
|
|
3
|
+
export declare namespace OfferFbFunctionsTypes {
|
|
4
|
+
interface PublishParams {
|
|
5
|
+
offerId: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
instrument: InstrumentId;
|
|
9
|
+
type: OfferType;
|
|
10
|
+
group: string;
|
|
11
|
+
event: string | null;
|
|
12
|
+
deadlineAt: number | null;
|
|
13
|
+
}
|
|
14
|
+
type PublishResult = void;
|
|
15
|
+
type EditParams = Pick<PublishParams, 'offerId' | 'title' | 'description' | 'deadlineAt'>;
|
|
16
|
+
type EditResult = void;
|
|
17
|
+
interface EditSelectionParams {
|
|
18
|
+
offerId: string;
|
|
19
|
+
selectedApplicantsIds: string[];
|
|
20
|
+
discardedApplicantsIds: string[];
|
|
21
|
+
}
|
|
22
|
+
type EditSelectionResult = void;
|
|
23
|
+
type CloseSelectionParams = Pick<PublishParams, 'offerId'>;
|
|
24
|
+
type CloseSelectionResult = void;
|
|
25
|
+
type RemoveParams = Pick<PublishParams, 'offerId'>;
|
|
26
|
+
type RemoveResult = void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare namespace OfferApplicantFbFunctionsTypes {
|
|
2
|
+
interface AddParams {
|
|
3
|
+
offerId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
message: string | null;
|
|
6
|
+
}
|
|
7
|
+
type AddResult = void;
|
|
8
|
+
type EditParams = AddParams;
|
|
9
|
+
type EditResult = void;
|
|
10
|
+
type RemoveParams = Pick<AddParams, 'offerId' | 'userId'>;
|
|
11
|
+
type RemoveResult = void;
|
|
12
|
+
}
|
package/functions/regions.js
CHANGED
|
@@ -14,6 +14,7 @@ const regionByFunctions = {
|
|
|
14
14
|
[index_1.FbFunctionName.UserOnCreateDoc]: GCloudRegions.UsCentral1,
|
|
15
15
|
[index_1.FbFunctionName.UserOnUpdate]: GCloudRegions.UsCentral1,
|
|
16
16
|
[index_1.FbFunctionName.UserRemove]: GCloudRegions.EuropeWest6,
|
|
17
|
+
[index_1.FbFunctionName.UserJoinEvent]: GCloudRegions.EuropeWest6,
|
|
17
18
|
[index_1.FbFunctionName.UserOnLogin]: GCloudRegions.EuropeWest6,
|
|
18
19
|
[index_1.FbFunctionName.UserOnSignUp]: GCloudRegions.EuropeWest6,
|
|
19
20
|
[index_1.FbFunctionName.UserSendYearWrapped]: GCloudRegions.EuropeWest6,
|
|
@@ -119,6 +120,15 @@ const regionByFunctions = {
|
|
|
119
120
|
[index_1.FbFunctionName.PartnershipRemoveAdmin]: GCloudRegions.EuropeWest6,
|
|
120
121
|
[index_1.FbFunctionName.PartnershipGroupAdd]: GCloudRegions.EuropeWest6,
|
|
121
122
|
[index_1.FbFunctionName.PartnershipGroupRemove]: GCloudRegions.EuropeWest6,
|
|
123
|
+
[index_1.FbFunctionName.OfferPublish]: GCloudRegions.EuropeWest6,
|
|
124
|
+
[index_1.FbFunctionName.OfferEdit]: GCloudRegions.EuropeWest6,
|
|
125
|
+
[index_1.FbFunctionName.OfferEditSelection]: GCloudRegions.EuropeWest6,
|
|
126
|
+
[index_1.FbFunctionName.OfferOnUpdate]: GCloudRegions.EuropeWest6,
|
|
127
|
+
[index_1.FbFunctionName.OfferCloseSelection]: GCloudRegions.EuropeWest6,
|
|
128
|
+
[index_1.FbFunctionName.OfferRemove]: GCloudRegions.EuropeWest6,
|
|
129
|
+
[index_1.FbFunctionName.OfferApplicantAdd]: GCloudRegions.EuropeWest6,
|
|
130
|
+
[index_1.FbFunctionName.OfferApplicantEdit]: GCloudRegions.EuropeWest6,
|
|
131
|
+
[index_1.FbFunctionName.OfferApplicantRemove]: GCloudRegions.EuropeWest6,
|
|
122
132
|
[index_1.FbFunctionName.MiscAddSubscriber]: GCloudRegions.EuropeWest6,
|
|
123
133
|
[index_1.FbFunctionName.MiscHandleActiveCampaignAutomationContacts]: GCloudRegions.EuropeWest6,
|
|
124
134
|
[index_1.FbFunctionName.Auth]: GCloudRegions.UsCentral1,
|
package/functions/user.d.ts
CHANGED
package/helpers/collections.d.ts
CHANGED
package/helpers/collections.js
CHANGED
|
@@ -34,5 +34,6 @@ var CollectionNames;
|
|
|
34
34
|
CollectionNames["Payment"] = "payment";
|
|
35
35
|
CollectionNames["Federation"] = "federation";
|
|
36
36
|
CollectionNames["FederationPartnerships"] = "partnerships";
|
|
37
|
+
CollectionNames["Offer"] = "offer";
|
|
37
38
|
CollectionNames["WebhookEvent"] = "webhookEvent";
|
|
38
39
|
})(CollectionNames = exports.CollectionNames || (exports.CollectionNames = {}));
|
package/helpers/errors.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare enum HttpsErrorMessages {
|
|
|
21
21
|
InvalidSuperAdmin = "error.superadmin.noValid",
|
|
22
22
|
InvalidData = "error.data.noValid",
|
|
23
23
|
InvalidCommunication = "error.communication.noValid",
|
|
24
|
+
InvalidOffer = "error.offer.noValid",
|
|
24
25
|
InvalidPartner = "error.partner.noValid",
|
|
25
26
|
InvalidPartnership = "error.partnership.noValid",
|
|
26
27
|
InvalidPartnershipPlan = "error.partnershipPlan.noValid",
|
package/helpers/errors.js
CHANGED
|
@@ -22,6 +22,7 @@ var HttpsErrorMessages;
|
|
|
22
22
|
HttpsErrorMessages["InvalidSuperAdmin"] = "error.superadmin.noValid";
|
|
23
23
|
HttpsErrorMessages["InvalidData"] = "error.data.noValid";
|
|
24
24
|
HttpsErrorMessages["InvalidCommunication"] = "error.communication.noValid";
|
|
25
|
+
HttpsErrorMessages["InvalidOffer"] = "error.offer.noValid";
|
|
25
26
|
HttpsErrorMessages["InvalidPartner"] = "error.partner.noValid";
|
|
26
27
|
HttpsErrorMessages["InvalidPartnership"] = "error.partnership.noValid";
|
|
27
28
|
HttpsErrorMessages["InvalidPartnershipPlan"] = "error.partnershipPlan.noValid";
|
|
@@ -9,6 +9,8 @@ export default class EventoPlayerBasic {
|
|
|
9
9
|
get displayName(): string;
|
|
10
10
|
get photoURL(): string;
|
|
11
11
|
get mainInstrument(): import("../../../helpers/instruments").InstrumentId;
|
|
12
|
+
get isGuest(): boolean;
|
|
13
|
+
get isGroupPlayer(): boolean;
|
|
12
14
|
get status(): EventPlayerStatus | null;
|
|
13
15
|
get reason(): import("./types").EventPlayerReason | null;
|
|
14
16
|
get note(): string | null;
|
|
@@ -22,6 +22,12 @@ class EventoPlayerBasic {
|
|
|
22
22
|
get mainInstrument() {
|
|
23
23
|
return this.data.mainInstrument;
|
|
24
24
|
}
|
|
25
|
+
get isGuest() {
|
|
26
|
+
return this.data.isGuest || false;
|
|
27
|
+
}
|
|
28
|
+
get isGroupPlayer() {
|
|
29
|
+
return !this.isGuest;
|
|
30
|
+
}
|
|
25
31
|
get status() {
|
|
26
32
|
return this.data.status || null;
|
|
27
33
|
}
|
|
@@ -7,6 +7,8 @@ export default class EventoPlayer extends PlayerBasic<EventPlayerData> {
|
|
|
7
7
|
get joinedAt(): FirebaseFirestore.Timestamp;
|
|
8
8
|
get eventId(): string;
|
|
9
9
|
get status(): EventPlayerStatus | null;
|
|
10
|
+
get isGuest(): boolean;
|
|
11
|
+
get isGroupPlayer(): boolean;
|
|
10
12
|
get isConfirmed(): boolean;
|
|
11
13
|
get isDeclined(): boolean;
|
|
12
14
|
get isPending(): boolean;
|
|
@@ -21,6 +21,12 @@ class EventoPlayer extends basic_1.default {
|
|
|
21
21
|
get status() {
|
|
22
22
|
return this.data.status;
|
|
23
23
|
}
|
|
24
|
+
get isGuest() {
|
|
25
|
+
return this.data.isGuest || false;
|
|
26
|
+
}
|
|
27
|
+
get isGroupPlayer() {
|
|
28
|
+
return !this.isGuest;
|
|
29
|
+
}
|
|
24
30
|
get isConfirmed() {
|
|
25
31
|
return this.status === types_1.EventPlayerStatus.Confirmed;
|
|
26
32
|
}
|
package/models/Evento/types.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AOfferApplicantBasicData } from './types';
|
|
2
|
+
export default class OfferApplicantBasic {
|
|
3
|
+
offerId: string;
|
|
4
|
+
protected data: AOfferApplicantBasicData;
|
|
5
|
+
constructor(offerId: string, data: AOfferApplicantBasicData);
|
|
6
|
+
get id(): string;
|
|
7
|
+
get username(): string;
|
|
8
|
+
get displayName(): string;
|
|
9
|
+
get photoURL(): string;
|
|
10
|
+
get appliedAt(): FirebaseFirestore.Timestamp;
|
|
11
|
+
get selectedAt(): FirebaseFirestore.Timestamp | null;
|
|
12
|
+
get isSelected(): boolean;
|
|
13
|
+
get discardedAt(): FirebaseFirestore.Timestamp | null;
|
|
14
|
+
get isDiscarded(): boolean;
|
|
15
|
+
get message(): string | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class OfferApplicantBasic {
|
|
4
|
+
constructor(offerId, data) {
|
|
5
|
+
this.offerId = offerId;
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
get id() {
|
|
9
|
+
return this.data.id;
|
|
10
|
+
}
|
|
11
|
+
get username() {
|
|
12
|
+
return this.data.username;
|
|
13
|
+
}
|
|
14
|
+
get displayName() {
|
|
15
|
+
return this.data.displayName;
|
|
16
|
+
}
|
|
17
|
+
get photoURL() {
|
|
18
|
+
return this.data.photoURL;
|
|
19
|
+
}
|
|
20
|
+
get appliedAt() {
|
|
21
|
+
return this.data.appliedAt;
|
|
22
|
+
}
|
|
23
|
+
get selectedAt() {
|
|
24
|
+
return this.data.selectedAt || null;
|
|
25
|
+
}
|
|
26
|
+
get isSelected() {
|
|
27
|
+
return !!this.selectedAt;
|
|
28
|
+
}
|
|
29
|
+
get discardedAt() {
|
|
30
|
+
return this.data.discardedAt || null;
|
|
31
|
+
}
|
|
32
|
+
get isDiscarded() {
|
|
33
|
+
return !!this.discardedAt;
|
|
34
|
+
}
|
|
35
|
+
get message() {
|
|
36
|
+
return this.data.message || null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.default = OfferApplicantBasic;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Timestamp } from '@google-cloud/firestore';
|
|
2
|
+
import { UserBasicData } from '../../User/types';
|
|
3
|
+
export interface OfferApplicantBasicData extends UserBasicData {
|
|
4
|
+
appliedAt: Timestamp;
|
|
5
|
+
selectedAt: Timestamp | null;
|
|
6
|
+
discardedAt: Timestamp | null;
|
|
7
|
+
message: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface AOfferApplicantBasicData extends OfferApplicantBasicData {
|
|
10
|
+
id: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LanguagesTypes } from '../../lang';
|
|
2
|
+
import { DocumentModel } from '../Model';
|
|
3
|
+
import ModelWithLang from '../Model/lang';
|
|
4
|
+
import OfferApplicantBasic from './Applicant/basic';
|
|
5
|
+
import { OfferData, OfferType } from './types';
|
|
6
|
+
export default class Offer extends ModelWithLang<OfferData> {
|
|
7
|
+
constructor(doc: DocumentModel, lang?: LanguagesTypes);
|
|
8
|
+
get createdAt(): FirebaseFirestore.Timestamp;
|
|
9
|
+
get createdBy(): string;
|
|
10
|
+
get title(): string;
|
|
11
|
+
get instrument(): import("../../helpers/instruments").InstrumentId;
|
|
12
|
+
get description(): string;
|
|
13
|
+
get type(): OfferType;
|
|
14
|
+
get group(): string;
|
|
15
|
+
get event(): string | null;
|
|
16
|
+
get applicantsIds(): string[];
|
|
17
|
+
get applicants(): Record<string, import("./Applicant/types").OfferApplicantBasicData>;
|
|
18
|
+
get applicantList(): OfferApplicantBasic[];
|
|
19
|
+
get deadlineAt(): FirebaseFirestore.Timestamp | null;
|
|
20
|
+
get isResponseAllowed(): boolean;
|
|
21
|
+
get selectionClosedAt(): FirebaseFirestore.Timestamp | null;
|
|
22
|
+
get selectionClosedBy(): string | null;
|
|
23
|
+
get isSelectionClosed(): boolean;
|
|
24
|
+
get updatedAt(): FirebaseFirestore.Timestamp;
|
|
25
|
+
get updatedBy(): string | null;
|
|
26
|
+
get deletedAt(): FirebaseFirestore.Timestamp | null;
|
|
27
|
+
get deletedBy(): string | null;
|
|
28
|
+
get isDeleted(): boolean;
|
|
29
|
+
get isActive(): boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const date_fns_1 = require("date-fns");
|
|
7
|
+
const lodash_1 = require("lodash");
|
|
8
|
+
const instruments_1 = require("../../helpers/instruments");
|
|
9
|
+
const objects_1 = require("../../helpers/objects");
|
|
10
|
+
const lang_1 = require("../../lang");
|
|
11
|
+
const lang_2 = __importDefault(require("../Model/lang"));
|
|
12
|
+
const basic_1 = __importDefault(require("./Applicant/basic"));
|
|
13
|
+
const types_1 = require("./types");
|
|
14
|
+
class Offer extends lang_2.default {
|
|
15
|
+
constructor(doc, lang = lang_1.defaultLocale) {
|
|
16
|
+
super(doc, lang);
|
|
17
|
+
}
|
|
18
|
+
get createdAt() {
|
|
19
|
+
return this.data.createdAt;
|
|
20
|
+
}
|
|
21
|
+
get createdBy() {
|
|
22
|
+
return this.data.createdBy;
|
|
23
|
+
}
|
|
24
|
+
get title() {
|
|
25
|
+
return this.data.title || '';
|
|
26
|
+
}
|
|
27
|
+
get instrument() {
|
|
28
|
+
return this.data.instrument || instruments_1.DefaultInstrumentId.Maracas;
|
|
29
|
+
}
|
|
30
|
+
get description() {
|
|
31
|
+
return this.data.description || '';
|
|
32
|
+
}
|
|
33
|
+
get type() {
|
|
34
|
+
return this.data.type || types_1.OfferType.Group;
|
|
35
|
+
}
|
|
36
|
+
get group() {
|
|
37
|
+
return this.data.group || '';
|
|
38
|
+
}
|
|
39
|
+
get event() {
|
|
40
|
+
return this.data.event || null;
|
|
41
|
+
}
|
|
42
|
+
get applicantsIds() {
|
|
43
|
+
return this.data.applicantsIds || [];
|
|
44
|
+
}
|
|
45
|
+
get applicants() {
|
|
46
|
+
return this.data.applicants || {};
|
|
47
|
+
}
|
|
48
|
+
get applicantList() {
|
|
49
|
+
return (0, objects_1.mapToArray)(this.applicants).map((data) => new basic_1.default(this.id, data));
|
|
50
|
+
}
|
|
51
|
+
get deadlineAt() {
|
|
52
|
+
return this.data.deadlineAt || null;
|
|
53
|
+
}
|
|
54
|
+
get isResponseAllowed() {
|
|
55
|
+
return (!this.isSelectionClosed && (this.deadlineAt ? (0, date_fns_1.isFuture)(this.deadlineAt.toDate()) : true));
|
|
56
|
+
}
|
|
57
|
+
get selectionClosedAt() {
|
|
58
|
+
return this.data.selectionClosedAt || null;
|
|
59
|
+
}
|
|
60
|
+
get selectionClosedBy() {
|
|
61
|
+
return this.data.selectionClosedBy || null;
|
|
62
|
+
}
|
|
63
|
+
get isSelectionClosed() {
|
|
64
|
+
return !(0, lodash_1.isNull)(this.selectionClosedAt);
|
|
65
|
+
}
|
|
66
|
+
get updatedAt() {
|
|
67
|
+
return this.data.updatedAt || null;
|
|
68
|
+
}
|
|
69
|
+
get updatedBy() {
|
|
70
|
+
return this.data.updatedBy || null;
|
|
71
|
+
}
|
|
72
|
+
get deletedAt() {
|
|
73
|
+
return this.data.deletedAt || null;
|
|
74
|
+
}
|
|
75
|
+
get deletedBy() {
|
|
76
|
+
return this.data.deletedBy || null;
|
|
77
|
+
}
|
|
78
|
+
get isDeleted() {
|
|
79
|
+
return !this.exists || !(0, lodash_1.isNull)(this.deletedAt);
|
|
80
|
+
}
|
|
81
|
+
get isActive() {
|
|
82
|
+
return !this.isDeleted;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.default = Offer;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Timestamp } from '@google-cloud/firestore';
|
|
2
|
+
import { InstrumentId } from '../../helpers/instruments';
|
|
3
|
+
import { OfferApplicantBasicData } from './Applicant/types';
|
|
4
|
+
export declare enum OfferType {
|
|
5
|
+
Group = "group",
|
|
6
|
+
Event = "event"
|
|
7
|
+
}
|
|
8
|
+
export interface OfferData {
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
instrument: InstrumentId;
|
|
12
|
+
type: OfferType;
|
|
13
|
+
group: string;
|
|
14
|
+
event: string | null;
|
|
15
|
+
applicantsIds: string[];
|
|
16
|
+
applicants: Record<string, OfferApplicantBasicData>;
|
|
17
|
+
deadlineAt: Timestamp | null;
|
|
18
|
+
selectionClosedAt: Timestamp | null;
|
|
19
|
+
selectionClosedBy: string | null;
|
|
20
|
+
updatedAt: Timestamp;
|
|
21
|
+
updatedBy: string;
|
|
22
|
+
deletedAt: Timestamp | null;
|
|
23
|
+
deletedBy: string | null;
|
|
24
|
+
readonly createdAt: Timestamp;
|
|
25
|
+
readonly createdBy: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OfferType = void 0;
|
|
4
|
+
var OfferType;
|
|
5
|
+
(function (OfferType) {
|
|
6
|
+
OfferType["Group"] = "group";
|
|
7
|
+
OfferType["Event"] = "event";
|
|
8
|
+
})(OfferType = exports.OfferType || (exports.OfferType = {}));
|
package/models/User/index.d.ts
CHANGED
package/models/User/index.js
CHANGED
package/models/User/types.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ export interface UserData extends UserBasicData {
|
|
|
93
93
|
registerVia: UserRegisterVia;
|
|
94
94
|
lastAppLoginAt: Timestamp | null;
|
|
95
95
|
lastWebLoginAt: Timestamp | null;
|
|
96
|
+
appliedOffers: string[];
|
|
96
97
|
}
|
|
97
98
|
export interface AUserBasicData extends UserBasicData {
|
|
98
99
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissandoo/lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.83.0",
|
|
4
4
|
"description": "Glissandoo library js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"tsc": "tsc",
|
|
9
|
-
"build": "tsc",
|
|
10
|
-
"build:watch": "tsc --watch",
|
|
8
|
+
"tsc": "cp package.json ./lib && tsc",
|
|
9
|
+
"build": "npm run tsc",
|
|
10
|
+
"build:watch": "npm run tsc -- --watch",
|
|
11
|
+
"build:link": "tsc",
|
|
11
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
13
|
"format": "prettier --write \"src/**/*.ts\" \"src/lang/*.json\"",
|
|
13
14
|
"format:single": "prettier --write",
|
|
14
15
|
"lint": "eslint --ext .ts ./src",
|
|
15
|
-
"prepare": "rm -rf ./lib && npm run build",
|
|
16
|
+
"prepare": "rm -rf ./lib && npm run build:link",
|
|
16
17
|
"set-husky": "node scripts/setHusky.js",
|
|
17
18
|
"preversion": "npm run lint",
|
|
18
19
|
"version": "npm run format && git add -A src && ./publish.sh",
|