@glissandoo/lib 1.94.2 → 1.95.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/federationPartnership.d.ts +1 -1
- package/functions/partner.d.ts +3 -2
- package/functions/partnership.d.ts +1 -1
- package/functions/partnershipPartner.d.ts +1 -1
- package/helpers/collections.d.ts +5 -5
- package/helpers/collections.js +5 -5
- package/helpers/types.d.ts +7 -0
- package/models/Customer/basic.d.ts +1 -1
- package/models/Customer/types.d.ts +1 -1
- package/models/Federation/index.d.ts +1 -1
- package/models/Federation/types.d.ts +1 -1
- package/models/Partnership/Partner/basic.d.ts +4 -4
- package/models/Partnership/Partner/basic.js +2 -2
- package/models/Partnership/Partner/index.d.ts +12 -7
- package/models/Partnership/Partner/index.js +25 -7
- package/models/Partnership/Partner/tiny.d.ts +4 -5
- package/models/Partnership/Partner/tiny.js +2 -5
- package/models/Partnership/Partner/types.d.ts +5 -10
- package/models/Partnership/Subscription/index.d.ts +1 -1
- package/models/Partnership/Subscription/index.js +2 -2
- package/models/Partnership/Subscription/types.d.ts +3 -3
- package/models/Partnership/basic.d.ts +2 -2
- package/models/Partnership/basic.js +3 -13
- package/models/Partnership/types.d.ts +2 -1
- package/package.json +1 -1
package/functions/partner.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PartnershipPartnerData } from '../models/Partnership/Partner/types';
|
|
2
|
+
import { BasicAddressData } from '../helpers/types';
|
|
2
3
|
import PartnerSubscription from '../models/Partnership/Subscription';
|
|
3
4
|
import { PartnershipData } from '../models/Partnership/types';
|
|
4
5
|
export declare namespace PartnerFbFunctionsTypes {
|
|
@@ -37,7 +38,7 @@ export declare namespace PartnerFbFunctionsTypes {
|
|
|
37
38
|
token: string;
|
|
38
39
|
}
|
|
39
40
|
interface GetByTokenResult {
|
|
40
|
-
partner: Pick<
|
|
41
|
+
partner: Pick<PartnershipPartnerData, 'name' | 'lastname' | 'email' | 'phone' | 'address'> & {
|
|
41
42
|
id: string;
|
|
42
43
|
birthdate: number | null;
|
|
43
44
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreatedOn } from '../helpers/types';
|
|
2
|
-
import { BasicAddressData } from '../
|
|
2
|
+
import { BasicAddressData } from '../helpers/types';
|
|
3
3
|
export declare namespace PartnershipPartnerFbFunctionsTypes {
|
|
4
4
|
interface CreateParams {
|
|
5
5
|
partnershipId: string;
|
package/helpers/collections.d.ts
CHANGED
|
@@ -21,11 +21,11 @@ export declare enum CollectionNames {
|
|
|
21
21
|
GroupStageTemplates = "stageTemplates",
|
|
22
22
|
Metrics = "metrics",
|
|
23
23
|
Partnership = "partnership",
|
|
24
|
-
PartnershipPartners = "
|
|
25
|
-
PartnershipGroups = "
|
|
26
|
-
PartnershipSubscriptions = "
|
|
27
|
-
PartnershipPayments = "
|
|
28
|
-
PartnershipPlans = "
|
|
24
|
+
PartnershipPartners = "partnershipPartner",
|
|
25
|
+
PartnershipGroups = "partnershipGroup",
|
|
26
|
+
PartnershipSubscriptions = "partnershipSubscription",
|
|
27
|
+
PartnershipPayments = "partnershipPayment",
|
|
28
|
+
PartnershipPlans = "partnershipPlan",
|
|
29
29
|
Federation = "federation",
|
|
30
30
|
FederationPartnerships = "partnerships",
|
|
31
31
|
Offer = "offer",
|
package/helpers/collections.js
CHANGED
|
@@ -25,11 +25,11 @@ var CollectionNames;
|
|
|
25
25
|
CollectionNames["GroupStageTemplates"] = "stageTemplates";
|
|
26
26
|
CollectionNames["Metrics"] = "metrics";
|
|
27
27
|
CollectionNames["Partnership"] = "partnership";
|
|
28
|
-
CollectionNames["PartnershipPartners"] = "
|
|
29
|
-
CollectionNames["PartnershipGroups"] = "
|
|
30
|
-
CollectionNames["PartnershipSubscriptions"] = "
|
|
31
|
-
CollectionNames["PartnershipPayments"] = "
|
|
32
|
-
CollectionNames["PartnershipPlans"] = "
|
|
28
|
+
CollectionNames["PartnershipPartners"] = "partnershipPartner";
|
|
29
|
+
CollectionNames["PartnershipGroups"] = "partnershipGroup";
|
|
30
|
+
CollectionNames["PartnershipSubscriptions"] = "partnershipSubscription";
|
|
31
|
+
CollectionNames["PartnershipPayments"] = "partnershipPayment";
|
|
32
|
+
CollectionNames["PartnershipPlans"] = "partnershipPlan";
|
|
33
33
|
CollectionNames["Federation"] = "federation";
|
|
34
34
|
CollectionNames["FederationPartnerships"] = "partnerships";
|
|
35
35
|
CollectionNames["Offer"] = "offer";
|
package/helpers/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export default class CustomerBasic<D> extends Model<D & CustomerBasicData> {
|
|
|
5
5
|
get basicInfo(): CustomerBasicData;
|
|
6
6
|
get displayName(): string;
|
|
7
7
|
get email(): string;
|
|
8
|
-
get address(): import("
|
|
8
|
+
get address(): import("../../helpers/types").BasicAddressData;
|
|
9
9
|
get displayAddress(): string;
|
|
10
10
|
get phone(): string | null;
|
|
11
11
|
get groupIds(): string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentReference, Timestamp } from '@google-cloud/firestore';
|
|
2
2
|
import { AdminItem } from '../../helpers/types';
|
|
3
|
-
import { BasicAddressData } from '
|
|
3
|
+
import { BasicAddressData } from '../../helpers/types';
|
|
4
4
|
export declare enum CustomerRoles {
|
|
5
5
|
Admin = "admin"
|
|
6
6
|
}
|
|
@@ -13,7 +13,7 @@ export default class Federation extends Model<FederationData> {
|
|
|
13
13
|
get photoURL(): string;
|
|
14
14
|
get phone(): string | null;
|
|
15
15
|
get web(): string | null;
|
|
16
|
-
get address(): import("
|
|
16
|
+
get address(): import("../../helpers/types").BasicAddressData | null;
|
|
17
17
|
get displayAddress(): string;
|
|
18
18
|
get partnershipConnectedIds(): string[];
|
|
19
19
|
get createdAt(): FirebaseFirestore.Timestamp;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentReference, Timestamp } from '@google-cloud/firestore';
|
|
2
2
|
import { AdminItem } from '../../helpers/types';
|
|
3
|
-
import { BasicAddressData } from '
|
|
3
|
+
import { BasicAddressData } from '../../helpers/types';
|
|
4
4
|
export interface FederationData {
|
|
5
5
|
displayName: string;
|
|
6
6
|
photoURL: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DocumentModel } from '../../Model';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
export default class
|
|
2
|
+
import PartnershipPartnerTiny from './tiny';
|
|
3
|
+
import { PartnershipPartnerBasicData } from './types';
|
|
4
|
+
export default class PartnershipPartnerBasic<D> extends PartnershipPartnerTiny<D & PartnershipPartnerBasicData> {
|
|
5
5
|
constructor(doc: DocumentModel);
|
|
6
|
-
get basicInfo():
|
|
6
|
+
get basicInfo(): PartnershipPartnerBasicData;
|
|
7
7
|
get createdAt(): FirebaseFirestore.Timestamp;
|
|
8
8
|
get createdBy(): import("../../../types/firestore").DocumentReference<import("../../../types/firestore").DocumentData>;
|
|
9
9
|
get deletedAt(): FirebaseFirestore.Timestamp | null;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const tiny_1 = __importDefault(require("./tiny"));
|
|
7
|
-
class
|
|
7
|
+
class PartnershipPartnerBasic extends tiny_1.default {
|
|
8
8
|
constructor(doc) {
|
|
9
9
|
super(doc);
|
|
10
10
|
}
|
|
@@ -36,4 +36,4 @@ class PartnerBasic extends tiny_1.default {
|
|
|
36
36
|
return this.exists && !this.isDeleted;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
exports.default =
|
|
39
|
+
exports.default = PartnershipPartnerBasic;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export default class Partner extends PartnerBasic<PartnerData> {
|
|
5
|
-
constructor(doc: DocumentModel);
|
|
1
|
+
import PartnershipPartnerBasic from './basic';
|
|
2
|
+
import { PartnershipPartnerData } from './types';
|
|
3
|
+
export default class PartnershipPartner extends PartnershipPartnerBasic<PartnershipPartnerData> {
|
|
6
4
|
get name(): string;
|
|
7
5
|
get lastname(): string;
|
|
8
6
|
get email(): string;
|
|
9
7
|
get phone(): string | null;
|
|
10
8
|
get birthdate(): FirebaseFirestore.Timestamp | null;
|
|
11
|
-
get partnershipId(): string
|
|
12
|
-
get address(): import("
|
|
9
|
+
get partnershipId(): string;
|
|
10
|
+
get address(): import("../../../helpers/types").BasicAddressData | null;
|
|
11
|
+
get iban(): string | null;
|
|
13
12
|
get displayAddress(): string | null;
|
|
13
|
+
get createdAt(): FirebaseFirestore.Timestamp;
|
|
14
|
+
get createdBy(): import("../../../types/firestore").DocumentReference<import("../../../types/firestore").DocumentData>;
|
|
15
|
+
get deletedAt(): FirebaseFirestore.Timestamp | null;
|
|
16
|
+
get deletedBy(): string | null;
|
|
17
|
+
get isDeleted(): boolean;
|
|
18
|
+
get isActive(): boolean;
|
|
14
19
|
}
|
|
@@ -3,13 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const lodash_1 = require("lodash");
|
|
7
6
|
const isString_1 = __importDefault(require("lodash/isString"));
|
|
7
|
+
const utils_1 = require("../../../helpers/utils");
|
|
8
8
|
const basic_1 = __importDefault(require("./basic"));
|
|
9
|
-
class
|
|
10
|
-
constructor(doc) {
|
|
11
|
-
super(doc);
|
|
12
|
-
}
|
|
9
|
+
class PartnershipPartner extends basic_1.default {
|
|
13
10
|
get name() {
|
|
14
11
|
return this.data.name;
|
|
15
12
|
}
|
|
@@ -26,11 +23,14 @@ class Partner extends basic_1.default {
|
|
|
26
23
|
return this.data.birthdate;
|
|
27
24
|
}
|
|
28
25
|
get partnershipId() {
|
|
29
|
-
return (0,
|
|
26
|
+
return (0, utils_1.at)(this.ref.path.split('/'), 1) || '';
|
|
30
27
|
}
|
|
31
28
|
get address() {
|
|
32
29
|
return this.data.address;
|
|
33
30
|
}
|
|
31
|
+
get iban() {
|
|
32
|
+
return this.data.iban;
|
|
33
|
+
}
|
|
34
34
|
get displayAddress() {
|
|
35
35
|
if (!this.address)
|
|
36
36
|
return null;
|
|
@@ -38,5 +38,23 @@ class Partner extends basic_1.default {
|
|
|
38
38
|
const fields = [street, postalCode, city, province, country];
|
|
39
39
|
return fields.filter((field) => (0, isString_1.default)(field)).join(', ');
|
|
40
40
|
}
|
|
41
|
+
get createdAt() {
|
|
42
|
+
return this.data.createdAt;
|
|
43
|
+
}
|
|
44
|
+
get createdBy() {
|
|
45
|
+
return this.data.createdBy;
|
|
46
|
+
}
|
|
47
|
+
get deletedAt() {
|
|
48
|
+
return this.data.deletedAt || null;
|
|
49
|
+
}
|
|
50
|
+
get deletedBy() {
|
|
51
|
+
return this.data.deletedBy || null;
|
|
52
|
+
}
|
|
53
|
+
get isDeleted() {
|
|
54
|
+
return this.deletedAt !== null;
|
|
55
|
+
}
|
|
56
|
+
get isActive() {
|
|
57
|
+
return this.exists && !this.isDeleted;
|
|
58
|
+
}
|
|
41
59
|
}
|
|
42
|
-
exports.default =
|
|
60
|
+
exports.default = PartnershipPartner;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import Model
|
|
2
|
-
import {
|
|
3
|
-
export default class
|
|
4
|
-
|
|
5
|
-
get tinyInfo(): PartnerTinyData;
|
|
1
|
+
import Model from '../../Model';
|
|
2
|
+
import { PartnershipPartnerTinyData } from './types';
|
|
3
|
+
export default class PartnershipPartnerTiny<D> extends Model<D & PartnershipPartnerTinyData> {
|
|
4
|
+
get tinyInfo(): PartnershipPartnerTinyData;
|
|
6
5
|
get photoURL(): string | null;
|
|
7
6
|
get displayName(): string;
|
|
8
7
|
}
|
|
@@ -4,10 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Model_1 = __importDefault(require("../../Model"));
|
|
7
|
-
class
|
|
8
|
-
constructor(doc) {
|
|
9
|
-
super(doc);
|
|
10
|
-
}
|
|
7
|
+
class PartnershipPartnerTiny extends Model_1.default {
|
|
11
8
|
get tinyInfo() {
|
|
12
9
|
return {
|
|
13
10
|
displayName: this.displayName,
|
|
@@ -21,4 +18,4 @@ class PartnerTiny extends Model_1.default {
|
|
|
21
18
|
return this.data.displayName;
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.default =
|
|
21
|
+
exports.default = PartnershipPartnerTiny;
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import { Timestamp } from '@google-cloud/firestore';
|
|
2
|
+
import { BasicAddressData } from '../../../helpers/types';
|
|
2
3
|
import { DocumentReference } from '../../../types/firestore';
|
|
3
|
-
export interface
|
|
4
|
-
street?: string;
|
|
5
|
-
city?: string;
|
|
6
|
-
postalCode?: string;
|
|
7
|
-
province?: string;
|
|
8
|
-
country?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface PartnerTinyData {
|
|
4
|
+
export interface PartnershipPartnerTinyData {
|
|
11
5
|
photoURL: string | null;
|
|
12
6
|
displayName: string;
|
|
13
7
|
}
|
|
14
|
-
export interface
|
|
8
|
+
export interface PartnershipPartnerBasicData extends PartnershipPartnerTinyData {
|
|
15
9
|
readonly createdAt: Timestamp;
|
|
16
10
|
readonly createdBy: DocumentReference;
|
|
17
11
|
deletedAt: Timestamp | null;
|
|
18
12
|
deletedBy: string | null;
|
|
19
13
|
}
|
|
20
|
-
export interface
|
|
14
|
+
export interface PartnershipPartnerData extends PartnershipPartnerBasicData {
|
|
21
15
|
name: string;
|
|
22
16
|
lastname: string;
|
|
23
17
|
email: string;
|
|
24
18
|
address: BasicAddressData | null;
|
|
25
19
|
phone: string | null;
|
|
26
20
|
birthdate: Timestamp | null;
|
|
21
|
+
iban: string | null;
|
|
27
22
|
groupIds: string[];
|
|
28
23
|
}
|
|
@@ -3,7 +3,7 @@ import PartnershipPlanBasic from '../Plan/basic';
|
|
|
3
3
|
import { SubscriptionData, SubscriptionStatus } from './types';
|
|
4
4
|
export default class PartnerSubscription extends PartnershipPlanBasic<SubscriptionData> {
|
|
5
5
|
constructor(doc: DocumentModel);
|
|
6
|
-
get
|
|
6
|
+
get planId(): string;
|
|
7
7
|
get partnerId(): string;
|
|
8
8
|
get partnershipId(): string;
|
|
9
9
|
get status(): SubscriptionStatus;
|
|
@@ -11,8 +11,8 @@ class PartnerSubscription extends basic_1.default {
|
|
|
11
11
|
constructor(doc) {
|
|
12
12
|
super(doc);
|
|
13
13
|
}
|
|
14
|
-
get
|
|
15
|
-
return this.data.
|
|
14
|
+
get planId() {
|
|
15
|
+
return this.data.planId;
|
|
16
16
|
}
|
|
17
17
|
get partnerId() {
|
|
18
18
|
return (0, utils_1.at)(this.ref.path.split('/'), 3) || '';
|
|
@@ -15,7 +15,7 @@ export interface SubscriptionData extends PartnershipPlanBasicData {
|
|
|
15
15
|
paymentDate: Timestamp;
|
|
16
16
|
status: SubscriptionStatus;
|
|
17
17
|
lastPayment: LastPaymentType | null;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
planId: string;
|
|
19
|
+
createdBy: DocumentReference;
|
|
20
|
+
createdAt: Timestamp;
|
|
21
21
|
}
|
|
@@ -2,11 +2,11 @@ import Model, { DocumentModel } from '../Model';
|
|
|
2
2
|
import { PartnershipBasicData } from './types';
|
|
3
3
|
export default class PartnershipBasic<D> extends Model<D & PartnershipBasicData> {
|
|
4
4
|
constructor(doc: DocumentModel);
|
|
5
|
-
get basicInfo(): PartnershipBasicData;
|
|
6
5
|
get displayName(): string;
|
|
7
6
|
get photoURL(): string;
|
|
8
7
|
get email(): string;
|
|
9
|
-
get
|
|
8
|
+
get website(): string | null;
|
|
9
|
+
get address(): import("../../helpers/types").BasicAddressData;
|
|
10
10
|
get displayAddress(): string;
|
|
11
11
|
get phone(): string | null;
|
|
12
12
|
get groupIds(): string[];
|
|
@@ -9,19 +9,6 @@ class PartnershipBasic extends Model_1.default {
|
|
|
9
9
|
constructor(doc) {
|
|
10
10
|
super(doc);
|
|
11
11
|
}
|
|
12
|
-
get basicInfo() {
|
|
13
|
-
return {
|
|
14
|
-
displayName: this.displayName,
|
|
15
|
-
photoURL: this.photoURL,
|
|
16
|
-
email: this.email,
|
|
17
|
-
phone: this.phone,
|
|
18
|
-
address: this.address,
|
|
19
|
-
CIF: this.CIF,
|
|
20
|
-
groupIds: this.groupIds,
|
|
21
|
-
partnerCount: this.partnerCount,
|
|
22
|
-
memberCount: this.memberCount,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
12
|
get displayName() {
|
|
26
13
|
return this.data.displayName;
|
|
27
14
|
}
|
|
@@ -31,6 +18,9 @@ class PartnershipBasic extends Model_1.default {
|
|
|
31
18
|
get email() {
|
|
32
19
|
return this.data.email;
|
|
33
20
|
}
|
|
21
|
+
get website() {
|
|
22
|
+
return this.data.website || null;
|
|
23
|
+
}
|
|
34
24
|
get address() {
|
|
35
25
|
return this.data.address || {};
|
|
36
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentReference, Timestamp } from '@google-cloud/firestore';
|
|
2
2
|
import { AdminItem } from '../../helpers/types';
|
|
3
|
-
import { BasicAddressData } from '
|
|
3
|
+
import { BasicAddressData } from '../../helpers/types';
|
|
4
4
|
export declare enum PartnershipRoles {
|
|
5
5
|
Admin = "admin"
|
|
6
6
|
}
|
|
@@ -12,6 +12,7 @@ export interface PartnershipBasicData {
|
|
|
12
12
|
photoURL: string;
|
|
13
13
|
email: string;
|
|
14
14
|
phone: string | null;
|
|
15
|
+
website: string | null;
|
|
15
16
|
address: BasicAddressData;
|
|
16
17
|
CIF: string | null;
|
|
17
18
|
groupIds: string[];
|