@deallony/shared 1.2.72 → 1.2.75

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.
@@ -0,0 +1,15 @@
1
+ /** Messages between the app (WebView / iframe) and the event site's /preview/:token page */
2
+ export declare const EventPreviewMessageType: {
3
+ readonly SET_TEMPLATE: "deallony:set-template";
4
+ readonly READY: "deallony:preview-ready";
5
+ };
6
+ export type EventPreviewMessage = {
7
+ type: typeof EventPreviewMessageType.SET_TEMPLATE;
8
+ template: string;
9
+ } | {
10
+ type: typeof EventPreviewMessageType.READY;
11
+ template: string | null;
12
+ };
13
+ /** Query parameter that picks the template on the preview page's first paint */
14
+ export declare const EventPreviewTemplateParam = "template";
15
+ export declare const DEFAULT_WEDDING_TEMPLATE = "wedding-01";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_WEDDING_TEMPLATE = exports.EventPreviewTemplateParam = exports.EventPreviewMessageType = void 0;
4
+ /** Messages between the app (WebView / iframe) and the event site's /preview/:token page */
5
+ exports.EventPreviewMessageType = {
6
+ SET_TEMPLATE: "deallony:set-template",
7
+ READY: "deallony:preview-ready",
8
+ };
9
+ /** Query parameter that picks the template on the preview page's first paint */
10
+ exports.EventPreviewTemplateParam = "template";
11
+ exports.DEFAULT_WEDDING_TEMPLATE = "wedding-01";
@@ -5,3 +5,4 @@ export * from "./EventTemplate";
5
5
  export * from "./EventTimeline";
6
6
  export * from "./EventInvitationScanType";
7
7
  export * from "./EventPricing";
8
+ export * from "./EventPreview";
@@ -21,3 +21,4 @@ __exportStar(require("./EventTemplate"), exports);
21
21
  __exportStar(require("./EventTimeline"), exports);
22
22
  __exportStar(require("./EventInvitationScanType"), exports);
23
23
  __exportStar(require("./EventPricing"), exports);
24
+ __exportStar(require("./EventPreview"), exports);
@@ -1,11 +1,29 @@
1
1
  import { IAd } from "../ad/Ad";
2
- /** Notifications kept in the user's notification centre. Only favorites updates for now. */
2
+ /** Notifications kept in the user's notification centre ("نشاطي"). Chat keeps its own counter. */
3
3
  export declare enum NotificationTypeEnum {
4
4
  FAVORITE_PRICE_DROP = "favorite_price_drop",
5
5
  FAVORITE_SOLD = "favorite_sold",
6
6
  FAVORITE_BACK = "favorite_back",
7
- FAVORITE_SIMILAR = "favorite_similar"
7
+ FAVORITE_SIMILAR = "favorite_similar",
8
+ /** The owner's ad was reviewed (approved) */
9
+ AD_CHECKED = "ad_checked",
10
+ /** The owner's ad expires soon */
11
+ AD_EXPIRING = "ad_expiring",
12
+ /** Daily: people saved the owner's ads */
13
+ AD_SAVED = "ad_saved",
14
+ /** Loyalty points earned */
15
+ POINTS_EARNED = "points_earned",
16
+ /** Sent by Deallony from the dashboard */
17
+ DEALLONY_NEWS = "deallony_news"
8
18
  }
19
+ /** How the centre groups types for its filter chips and settings */
20
+ export declare enum NotificationCategoryEnum {
21
+ FAVORITES = "favorites",
22
+ MY_ADS = "my_ads",
23
+ POINTS = "points",
24
+ DEALLONY = "deallony"
25
+ }
26
+ export declare const NOTIFICATION_CATEGORY: Record<NotificationTypeEnum, NotificationCategoryEnum>;
9
27
  export type NotificationText = {
10
28
  ar: string;
11
29
  en: string;
@@ -20,6 +38,10 @@ export type INotificationData = {
20
38
  count?: number;
21
39
  subject_type?: string;
22
40
  category_id?: number | null;
41
+ /** Where tapping it goes, when not the ad itself (an app route or route object) */
42
+ route?: unknown;
43
+ points?: number;
44
+ expires_at?: Date | string | null;
23
45
  };
24
46
  export type INotification = {
25
47
  id: number;
@@ -47,6 +69,7 @@ export type GetNotificationsDto = {
47
69
  page?: number;
48
70
  limit?: number;
49
71
  type?: NotificationTypeEnum;
72
+ category?: NotificationCategoryEnum;
50
73
  };
51
74
  export type MarkNotificationsReadDto = {
52
75
  ids?: number[];
@@ -1,11 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotificationTypeEnum = void 0;
4
- /** Notifications kept in the user's notification centre. Only favorites updates for now. */
3
+ exports.NOTIFICATION_CATEGORY = exports.NotificationCategoryEnum = exports.NotificationTypeEnum = void 0;
4
+ /** Notifications kept in the user's notification centre ("نشاطي"). Chat keeps its own counter. */
5
5
  var NotificationTypeEnum;
6
6
  (function (NotificationTypeEnum) {
7
7
  NotificationTypeEnum["FAVORITE_PRICE_DROP"] = "favorite_price_drop";
8
8
  NotificationTypeEnum["FAVORITE_SOLD"] = "favorite_sold";
9
9
  NotificationTypeEnum["FAVORITE_BACK"] = "favorite_back";
10
10
  NotificationTypeEnum["FAVORITE_SIMILAR"] = "favorite_similar";
11
+ /** The owner's ad was reviewed (approved) */
12
+ NotificationTypeEnum["AD_CHECKED"] = "ad_checked";
13
+ /** The owner's ad expires soon */
14
+ NotificationTypeEnum["AD_EXPIRING"] = "ad_expiring";
15
+ /** Daily: people saved the owner's ads */
16
+ NotificationTypeEnum["AD_SAVED"] = "ad_saved";
17
+ /** Loyalty points earned */
18
+ NotificationTypeEnum["POINTS_EARNED"] = "points_earned";
19
+ /** Sent by Deallony from the dashboard */
20
+ NotificationTypeEnum["DEALLONY_NEWS"] = "deallony_news";
11
21
  })(NotificationTypeEnum || (exports.NotificationTypeEnum = NotificationTypeEnum = {}));
22
+ /** How the centre groups types for its filter chips and settings */
23
+ var NotificationCategoryEnum;
24
+ (function (NotificationCategoryEnum) {
25
+ NotificationCategoryEnum["FAVORITES"] = "favorites";
26
+ NotificationCategoryEnum["MY_ADS"] = "my_ads";
27
+ NotificationCategoryEnum["POINTS"] = "points";
28
+ NotificationCategoryEnum["DEALLONY"] = "deallony";
29
+ })(NotificationCategoryEnum || (exports.NotificationCategoryEnum = NotificationCategoryEnum = {}));
30
+ exports.NOTIFICATION_CATEGORY = {
31
+ [NotificationTypeEnum.FAVORITE_PRICE_DROP]: NotificationCategoryEnum.FAVORITES,
32
+ [NotificationTypeEnum.FAVORITE_SOLD]: NotificationCategoryEnum.FAVORITES,
33
+ [NotificationTypeEnum.FAVORITE_BACK]: NotificationCategoryEnum.FAVORITES,
34
+ [NotificationTypeEnum.FAVORITE_SIMILAR]: NotificationCategoryEnum.FAVORITES,
35
+ [NotificationTypeEnum.AD_CHECKED]: NotificationCategoryEnum.MY_ADS,
36
+ [NotificationTypeEnum.AD_EXPIRING]: NotificationCategoryEnum.MY_ADS,
37
+ [NotificationTypeEnum.AD_SAVED]: NotificationCategoryEnum.MY_ADS,
38
+ [NotificationTypeEnum.POINTS_EARNED]: NotificationCategoryEnum.POINTS,
39
+ [NotificationTypeEnum.DEALLONY_NEWS]: NotificationCategoryEnum.DEALLONY,
40
+ };
@@ -1,5 +1,6 @@
1
1
  import type { IUser } from '../user/User';
2
2
  import type { IEventVenue } from '../events/EventVenue';
3
+ import type { IMedia } from '../media/Media';
3
4
  export type CompanyMemberRole = 'owner' | 'admin' | 'member';
4
5
  export type CompanyType = 'company' | 'team' | 'other';
5
6
  export type ICompanyMember = {
@@ -15,6 +16,8 @@ export type ICompanyMember = {
15
16
  export type ICompany = {
16
17
  id?: number;
17
18
  name: string;
19
+ /** Company logo image, uploaded through the assets service */
20
+ logo?: IMedia | null;
18
21
  type?: CompanyType;
19
22
  user_id?: number | null;
20
23
  user?: IUser | null;
@@ -29,6 +32,7 @@ export type ICompanyProfile = {
29
32
  id: number;
30
33
  name: string;
31
34
  type: CompanyType;
35
+ logo?: IMedia | null;
32
36
  status: string;
33
37
  members_count: number;
34
38
  ads_count: number;
@@ -27,4 +27,8 @@ export type IEvent = {
27
27
  payment_id?: number | null;
28
28
  paid_amount?: string | null;
29
29
  paid_at?: string | Date | null;
30
+ /** Guest invitation page on the event site, computed by the API */
31
+ public_url?: string | null;
32
+ /** Private preview page that works before publishing; returned to the owner only */
33
+ preview_url?: string | null;
30
34
  };
@@ -0,0 +1,8 @@
1
+ /** Messages between the app (WebView / iframe) and the event site's /preview/:token page */
2
+ export const EventPreviewMessageType = {
3
+ SET_TEMPLATE: "deallony:set-template",
4
+ READY: "deallony:preview-ready",
5
+ };
6
+ /** Query parameter that picks the template on the preview page's first paint */
7
+ export const EventPreviewTemplateParam = "template";
8
+ export const DEFAULT_WEDDING_TEMPLATE = "wedding-01";
@@ -5,3 +5,4 @@ export * from "./EventTemplate.js";
5
5
  export * from "./EventTimeline.js";
6
6
  export * from "./EventInvitationScanType.js";
7
7
  export * from "./EventPricing.js";
8
+ export * from "./EventPreview.js";
@@ -1,8 +1,37 @@
1
- /** Notifications kept in the user's notification centre. Only favorites updates for now. */
1
+ /** Notifications kept in the user's notification centre ("نشاطي"). Chat keeps its own counter. */
2
2
  export var NotificationTypeEnum;
3
3
  (function (NotificationTypeEnum) {
4
4
  NotificationTypeEnum["FAVORITE_PRICE_DROP"] = "favorite_price_drop";
5
5
  NotificationTypeEnum["FAVORITE_SOLD"] = "favorite_sold";
6
6
  NotificationTypeEnum["FAVORITE_BACK"] = "favorite_back";
7
7
  NotificationTypeEnum["FAVORITE_SIMILAR"] = "favorite_similar";
8
+ /** The owner's ad was reviewed (approved) */
9
+ NotificationTypeEnum["AD_CHECKED"] = "ad_checked";
10
+ /** The owner's ad expires soon */
11
+ NotificationTypeEnum["AD_EXPIRING"] = "ad_expiring";
12
+ /** Daily: people saved the owner's ads */
13
+ NotificationTypeEnum["AD_SAVED"] = "ad_saved";
14
+ /** Loyalty points earned */
15
+ NotificationTypeEnum["POINTS_EARNED"] = "points_earned";
16
+ /** Sent by Deallony from the dashboard */
17
+ NotificationTypeEnum["DEALLONY_NEWS"] = "deallony_news";
8
18
  })(NotificationTypeEnum || (NotificationTypeEnum = {}));
19
+ /** How the centre groups types for its filter chips and settings */
20
+ export var NotificationCategoryEnum;
21
+ (function (NotificationCategoryEnum) {
22
+ NotificationCategoryEnum["FAVORITES"] = "favorites";
23
+ NotificationCategoryEnum["MY_ADS"] = "my_ads";
24
+ NotificationCategoryEnum["POINTS"] = "points";
25
+ NotificationCategoryEnum["DEALLONY"] = "deallony";
26
+ })(NotificationCategoryEnum || (NotificationCategoryEnum = {}));
27
+ export const NOTIFICATION_CATEGORY = {
28
+ [NotificationTypeEnum.FAVORITE_PRICE_DROP]: NotificationCategoryEnum.FAVORITES,
29
+ [NotificationTypeEnum.FAVORITE_SOLD]: NotificationCategoryEnum.FAVORITES,
30
+ [NotificationTypeEnum.FAVORITE_BACK]: NotificationCategoryEnum.FAVORITES,
31
+ [NotificationTypeEnum.FAVORITE_SIMILAR]: NotificationCategoryEnum.FAVORITES,
32
+ [NotificationTypeEnum.AD_CHECKED]: NotificationCategoryEnum.MY_ADS,
33
+ [NotificationTypeEnum.AD_EXPIRING]: NotificationCategoryEnum.MY_ADS,
34
+ [NotificationTypeEnum.AD_SAVED]: NotificationCategoryEnum.MY_ADS,
35
+ [NotificationTypeEnum.POINTS_EARNED]: NotificationCategoryEnum.POINTS,
36
+ [NotificationTypeEnum.DEALLONY_NEWS]: NotificationCategoryEnum.DEALLONY,
37
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deallony/shared",
3
- "version": "1.2.72",
3
+ "version": "1.2.75",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",