@ibiliaze/global-vars 1.71.0 → 1.73.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.
@@ -1,3 +1,4 @@
1
+ import { Types } from 'mongoose';
1
2
  export type ISODateString = string;
2
3
  export interface SeatBase<Id = string, TDate = ISODateString> {
3
4
  _id?: Id;
@@ -185,7 +186,7 @@ export interface TaskBase<Id = string, TDate = string> {
185
186
  description?: string;
186
187
  comments?: TaskCommentBase<Id, TDate>[];
187
188
  }
188
- export interface UserBase {
189
+ export interface ProjectUserBase {
189
190
  id: string;
190
191
  name: string;
191
192
  days?: number;
@@ -396,10 +397,10 @@ export interface GroupBase<Id = string, TDate = string> {
396
397
  createdAt?: TDate;
397
398
  updatedAt?: TDate;
398
399
  }
399
- export interface JobBase<Id = string, TDate = string> {
400
+ export interface JobBase<Id, TDate> {
400
401
  _id?: Id;
401
402
  name: string;
402
- data?: unknown;
403
+ data?: AgendaJob<Id, TDate>;
403
404
  type?: string;
404
405
  priority?: number;
405
406
  nextRunAt?: TDate;
@@ -413,6 +414,30 @@ export interface JobBase<Id = string, TDate = string> {
413
414
  createdAt?: TDate;
414
415
  updatedAt?: TDate;
415
416
  }
417
+ export interface AgendaJob<Id, TDate> {
418
+ attrs: {
419
+ _id: Types.ObjectId;
420
+ data: AgendaJobData<Id, TDate>;
421
+ };
422
+ }
423
+ export interface AgendaJobData<Id, TDate> {
424
+ type: 'emailCampaign' | 'paymentReminder' | 'eventReminder';
425
+ id: string;
426
+ paymentReminder?: {
427
+ quoteId: Types.ObjectId;
428
+ quoteRef: string;
429
+ to: string;
430
+ subject: string;
431
+ name: string;
432
+ } & PaymentBase;
433
+ emailCampaign?: {
434
+ campaignId: Types.ObjectId;
435
+ groupId: Types.ObjectId;
436
+ } & CampaignStageBase<Id>;
437
+ eventReminder?: {
438
+ reminder: number;
439
+ } & EventBase<Id, TDate>;
440
+ }
416
441
  export interface LogBase<Id = string, TDate = string> {
417
442
  _id?: Id;
418
443
  object?: unknown;
@@ -444,7 +469,7 @@ export interface OccupanceBase<Id = string, TDate = string> {
444
469
  sectionId: Id;
445
470
  fixtureId: Id;
446
471
  ticketCode: string;
447
- sale: OccupanceSaleBase<Id>;
472
+ sale?: OccupanceSaleBase<Id>;
448
473
  occupied?: boolean;
449
474
  reserved?: boolean;
450
475
  reservedAt?: TDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiliaze/global-vars",
3
- "version": "1.71.0",
3
+ "version": "1.73.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -21,7 +21,7 @@
21
21
  "scripts": {
22
22
  "build": "tsc",
23
23
  "pub": "npm publish --access public",
24
- "git": "git add .; git commit -m 'changes'; git tag -a v1.71.0 -m 'v1.71.0'; git push origin v1.71.0; git push",
24
+ "git": "git add .; git commit -m 'changes'; git tag -a v1.73.0 -m 'v1.73.0'; git push origin v1.73.0; git push",
25
25
  "push": "npm run build; npm run git; npm run pub"
26
26
  },
27
27
  "author": "Ibi Hasanli",