@glissandoo/lib 1.94.1 → 1.94.2

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.
@@ -10,26 +10,14 @@ export declare namespace PartnershipPartnerFbFunctionsTypes {
10
10
  phone: string | null;
11
11
  birthdate: number | null;
12
12
  address: BasicAddressData | null;
13
- identificator: string;
14
13
  createdOn: CreatedOn;
15
14
  }
16
15
  type CreateResult = void;
17
- interface EditParams {
18
- partnershipId: string;
19
- }
16
+ type EditParams = Omit<CreateParams, 'createdOn'>;
20
17
  type EditResult = void;
21
18
  interface RemoveParams {
22
19
  partnershipId: string;
20
+ partnerId: string;
23
21
  }
24
22
  type RemoveResult = void;
25
- interface AddConfirmedAdminParams {
26
- partnershipId: string;
27
- userId: string;
28
- }
29
- type AddConfirmedAdminResult = void;
30
- interface RemoveAdminParams {
31
- partnershipId: string;
32
- email: string;
33
- }
34
- type RemoveAdminResult = void;
35
23
  }
@@ -5,7 +5,7 @@ export default class PartnerBasic<D> extends PartnerTiny<D & PartnerBasicData> {
5
5
  constructor(doc: DocumentModel);
6
6
  get basicInfo(): PartnerBasicData;
7
7
  get createdAt(): FirebaseFirestore.Timestamp;
8
- get createdBy(): string;
8
+ get createdBy(): import("../../../types/firestore").DocumentReference<import("../../../types/firestore").DocumentData>;
9
9
  get deletedAt(): FirebaseFirestore.Timestamp | null;
10
10
  get deletedBy(): string | null;
11
11
  get isDeleted(): boolean;
@@ -3,13 +3,12 @@ import PartnerBasic from './basic';
3
3
  import { PartnerData } from './types';
4
4
  export default class Partner extends PartnerBasic<PartnerData> {
5
5
  constructor(doc: DocumentModel);
6
- get identificator(): string;
7
6
  get name(): string;
8
7
  get lastname(): string;
9
8
  get email(): string;
10
9
  get phone(): string | null;
11
10
  get birthdate(): FirebaseFirestore.Timestamp | null;
12
- get partnershipId(): string;
11
+ get partnershipId(): string[];
13
12
  get address(): import("./types").BasicAddressData | null;
14
13
  get displayAddress(): string | null;
15
14
  }
@@ -3,15 +3,13 @@ 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");
6
7
  const isString_1 = __importDefault(require("lodash/isString"));
7
8
  const basic_1 = __importDefault(require("./basic"));
8
9
  class Partner extends basic_1.default {
9
10
  constructor(doc) {
10
11
  super(doc);
11
12
  }
12
- get identificator() {
13
- return this.data.identificator;
14
- }
15
13
  get name() {
16
14
  return this.data.name;
17
15
  }
@@ -28,7 +26,7 @@ class Partner extends basic_1.default {
28
26
  return this.data.birthdate;
29
27
  }
30
28
  get partnershipId() {
31
- return this.data.partnershipId;
29
+ return (0, lodash_1.at)(this.ref.path.split('/'), 1) || '';
32
30
  }
33
31
  get address() {
34
32
  return this.data.address;
@@ -1,4 +1,5 @@
1
1
  import { Timestamp } from '@google-cloud/firestore';
2
+ import { DocumentReference } from '../../../types/firestore';
2
3
  export interface BasicAddressData {
3
4
  street?: string;
4
5
  city?: string;
@@ -12,12 +13,11 @@ export interface PartnerTinyData {
12
13
  }
13
14
  export interface PartnerBasicData extends PartnerTinyData {
14
15
  readonly createdAt: Timestamp;
15
- readonly createdBy: string;
16
+ readonly createdBy: DocumentReference;
16
17
  deletedAt: Timestamp | null;
17
18
  deletedBy: string | null;
18
19
  }
19
20
  export interface PartnerData extends PartnerBasicData {
20
- identificator: string;
21
21
  name: string;
22
22
  lastname: string;
23
23
  email: string;
@@ -25,5 +25,4 @@ export interface PartnerData extends PartnerBasicData {
25
25
  phone: string | null;
26
26
  birthdate: Timestamp | null;
27
27
  groupIds: string[];
28
- readonly partnershipId: string;
29
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.94.1",
3
+ "version": "1.94.2",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",