@glissandoo/lib 1.91.0 → 1.92.1

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.
@@ -111,6 +111,7 @@ export declare enum FbFunctionName {
111
111
  OfferRemove = "offer-remove",
112
112
  OfferReopenSelection = "offer-reopenSelection",
113
113
  OfferSelectApplicant = "offer-selectApplicant",
114
+ OfferView = "offer-view",
114
115
  OfferViewApplicant = "offer-viewApplicant",
115
116
  PartnershipAddConfirmedAdmin = "partnership-addConfirmedAdmin",
116
117
  PartnershipCreate = "partnership-create",
@@ -115,6 +115,7 @@ var FbFunctionName;
115
115
  FbFunctionName["OfferRemove"] = "offer-remove";
116
116
  FbFunctionName["OfferReopenSelection"] = "offer-reopenSelection";
117
117
  FbFunctionName["OfferSelectApplicant"] = "offer-selectApplicant";
118
+ FbFunctionName["OfferView"] = "offer-view";
118
119
  FbFunctionName["OfferViewApplicant"] = "offer-viewApplicant";
119
120
  FbFunctionName["PartnershipAddConfirmedAdmin"] = "partnership-addConfirmedAdmin";
120
121
  FbFunctionName["PartnershipCreate"] = "partnership-create";
@@ -12,6 +12,7 @@ export declare namespace MiscFbFunctionsTypes {
12
12
  lastname?: string;
13
13
  downloadEbook?: boolean;
14
14
  groupId?: number;
15
+ lang: string;
15
16
  }
16
17
  type MiscAddSubscriberResult = void;
17
18
  }
@@ -1,7 +1,7 @@
1
1
  import { DefaultInstrumentId } from '../helpers/instruments';
2
2
  import { Descendant } from '../helpers/slate';
3
- import { CreatedOn } from '../helpers/types';
4
- import { OfferType } from '../models/Offer/types';
3
+ import { CreatedOn, GeoPointDeconstructed, TimestampDeconstructed } from '../helpers/types';
4
+ import { OfferData, OfferType } from '../models/Offer/types';
5
5
  export declare namespace OfferFbFunctionsTypes {
6
6
  interface PublishParams {
7
7
  offerId: string;
@@ -47,4 +47,14 @@ export declare namespace OfferFbFunctionsTypes {
47
47
  offerId: string;
48
48
  }
49
49
  type RemoveResult = void;
50
+ interface ViewParams {
51
+ offerId: string;
52
+ }
53
+ interface ViewResult extends Pick<OfferData, 'title' | 'description' | 'instrument' | 'locality' | 'country' | 'type' | 'groupId' | 'eventId' | 'applicantsIds' | 'timezone'> {
54
+ group: OfferData['groupInfo'];
55
+ createdAt: TimestampDeconstructed;
56
+ selectionClosedAt: TimestampDeconstructed | null;
57
+ deadlineAt: TimestampDeconstructed | null;
58
+ location: GeoPointDeconstructed;
59
+ }
50
60
  }
@@ -122,6 +122,7 @@ const regionByFunctions = {
122
122
  [index_1.FbFunctionName.OfferRemove]: GCloudRegions.EuropeWest6,
123
123
  [index_1.FbFunctionName.OfferReopenSelection]: GCloudRegions.EuropeWest6,
124
124
  [index_1.FbFunctionName.OfferSelectApplicant]: GCloudRegions.EuropeWest6,
125
+ [index_1.FbFunctionName.OfferView]: GCloudRegions.EuropeWest6,
125
126
  [index_1.FbFunctionName.OfferViewApplicant]: GCloudRegions.EuropeWest6,
126
127
  [index_1.FbFunctionName.PartnershipAddConfirmedAdmin]: GCloudRegions.EuropeWest6,
127
128
  [index_1.FbFunctionName.PartnershipCreate]: GCloudRegions.EuropeWest6,
@@ -77,6 +77,7 @@ export declare enum AppScenes {
77
77
  Modal = "Modal",
78
78
  Notifications = "Notifications",
79
79
  OnBoarding = "OnBoarding",
80
+ Offer = "Offer",
80
81
  Profile = "Me",
81
82
  ProfileSettings = "MeSettings",
82
83
  ProfileSettingsStack = "ProfileSettingsStack",
@@ -81,6 +81,7 @@ var AppScenes;
81
81
  AppScenes["Modal"] = "Modal";
82
82
  AppScenes["Notifications"] = "Notifications";
83
83
  AppScenes["OnBoarding"] = "OnBoarding";
84
+ AppScenes["Offer"] = "Offer";
84
85
  AppScenes["Profile"] = "Me";
85
86
  AppScenes["ProfileSettings"] = "MeSettings";
86
87
  AppScenes["ProfileSettingsStack"] = "ProfileSettingsStack";
@@ -15,3 +15,11 @@ export declare enum CreatedOn {
15
15
  App = "app",
16
16
  Dashboard = "dashboard"
17
17
  }
18
+ export interface TimestampDeconstructed {
19
+ _seconds: number;
20
+ _nanoseconds: number;
21
+ }
22
+ export interface GeoPointDeconstructed {
23
+ _latitude: number;
24
+ _longitude: number;
25
+ }
@@ -36,4 +36,5 @@ export default class Offer extends ModelWithLang<OfferData> {
36
36
  get deletedBy(): string | null;
37
37
  get isDeleted(): boolean;
38
38
  get isActive(): boolean;
39
+ get views(): number;
39
40
  }
@@ -102,5 +102,8 @@ class Offer extends lang_2.default {
102
102
  get isActive() {
103
103
  return !this.isDeleted;
104
104
  }
105
+ get views() {
106
+ return this.data.views || 0;
107
+ }
105
108
  }
106
109
  exports.default = Offer;
@@ -50,6 +50,7 @@ export interface OfferData {
50
50
  updatedBy: string;
51
51
  deletedAt: Timestamp | null;
52
52
  deletedBy: string | null;
53
+ views: number;
53
54
  readonly createdAt: Timestamp;
54
55
  readonly createdBy: string;
55
56
  readonly createdOn: CreatedOn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.91.0",
3
+ "version": "1.92.1",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",