@bondsports/types 2.3.31-team-c-6 → 2.3.31-team-c-8

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.
@@ -79,11 +79,11 @@ export interface IFindDiscountsOptions {
79
79
  }
80
80
  export interface IDiscountRelatedResources {
81
81
  memberships?: Record<number, IProductRelatedMembership>;
82
- programs?: Record<number, IProductRelatedProgram>;
82
+ programs?: Record<number, IProductRelatedProgram[]>;
83
83
  }
84
84
  export interface IProductRelatedResource {
85
85
  membership?: IProductRelatedMembership;
86
- program?: IProductRelatedProgram;
86
+ programs?: IProductRelatedProgram[];
87
87
  }
88
88
  export interface IDiscountItem {
89
89
  id: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Product.js","sourceRoot":"","sources":["../../../../src/types/product-pricing/entities/Product.ts"],"names":[],"mappings":";;;AAmBA,oGAAiG;AAsBjG,MAAa,OAAQ,SAAQ,mEAAgC;CAkI5D;AAlID,0BAkIC"}
1
+ {"version":3,"file":"Product.js","sourceRoot":"","sources":["../../../../src/types/product-pricing/entities/Product.ts"],"names":[],"mappings":";;;AAmBA,oGAAiG;AAwBjG,MAAa,OAAQ,SAAQ,mEAAgC;CAkI5D;AAlID,0BAkIC"}
@@ -17,12 +17,12 @@ export interface RawUserProgramInfo extends UserProgramInfo {
17
17
  }
18
18
  export interface IProductRelatedProgram {
19
19
  productId: number;
20
- programId: number;
21
- sessionId: number;
20
+ programId?: number;
21
+ sessionId?: number;
22
22
  programType: ProgramTypesEnum;
23
23
  }
24
24
  export interface IProductRelatedProgramQuery extends IProductRelatedProgram {
25
- parentSessionId: number;
25
+ parentSessionId?: number;
26
26
  resourceId: number;
27
27
  }
28
28
  export interface ISessionsFilters {
@@ -1,2 +1 @@
1
- export * from './punch-pass.dto.deprecated';
2
1
  export * from './punch-pass.dto';
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./punch-pass.dto.deprecated"), exports);
18
17
  __exportStar(require("./punch-pass.dto"), exports);
19
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/punch-pass/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/punch-pass/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
@@ -2,6 +2,7 @@ import { TimeUnit } from '@bondsports/date-time';
2
2
  import { SimpleEventDto } from '../../dto/events.dto';
3
3
  import { IdDto, PaginationQuery, ResourceIdAndTypeDto, SimpleResourceDto } from '../../dto/general.dto';
4
4
  import { PaymentStatusEnum } from '../../payment/types/enums/payment.enums';
5
+ import { SimpleSessionDto } from '../../programs-seasons/dto/program-seasons.dto';
5
6
  import { ByOrganizationIdAndResourceId } from '../../resources/dto/resource.dto';
6
7
  import { OrderByEnum, ResourceNameTypeEnum } from '../../services/enums.service';
7
8
  import { SimpleUserDto, UserWithContactInfoDto } from '../../user/dto/user.dto';
@@ -72,6 +73,7 @@ export declare class UserPunchPassDto extends IdDto {
72
73
  passesLeft: number;
73
74
  totalPasses: number;
74
75
  durationWindow?: number;
76
+ isGlobalPass?: boolean;
75
77
  durationWindowUnit?: TimeUnit;
76
78
  durationQuantity?: number;
77
79
  financialInfo?: UserPunchPassFinancialInfoDto;
@@ -109,3 +111,24 @@ export declare class PunchPassUserEligibleDto extends UserWithContactInfoDto imp
109
111
  isExpired?: boolean;
110
112
  resources?: ResourceIdAndTypeDto[];
111
113
  }
114
+ export declare class EventRedemptionDto extends SimpleEventDto {
115
+ attendeeId: number;
116
+ quantity: number;
117
+ occurAt: string;
118
+ redeemedAt: string;
119
+ punch?: number;
120
+ session?: SimpleSessionDto;
121
+ }
122
+ export declare class GetPunchPassEventsQueryDto {
123
+ startDate: number;
124
+ endDate: number;
125
+ itemsPerPage: number;
126
+ includeResources?: boolean;
127
+ includeSessions?: boolean;
128
+ orderBy?: OrderByEnum;
129
+ includeDeleted?: boolean;
130
+ }
131
+ export declare class ByUserAndProductUserIdDto {
132
+ userId: number;
133
+ productUserId: number;
134
+ }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PunchPassUserEligibleDto = exports.GetResourcesEligiblePunchPassUsersDto = exports.GetResourceEligiblePunchPassUsersDto = exports.ByResourceIdAndTypeDto = exports.ByResourceNameTypeDto = exports.ByOrganizationIdAndResourceIdAndTypeDto = exports.UserPunchPassDto = exports.UserPunchPassFinancialInfoDto = exports.GetUserPunchPassesOptionsDto = exports.PunchPassDto = exports.CreatePunchPassDetailsDto = exports.RedemptionDto = exports.BasePunchPassFieldsDto = void 0;
3
+ exports.ByUserAndProductUserIdDto = exports.GetPunchPassEventsQueryDto = exports.EventRedemptionDto = exports.PunchPassUserEligibleDto = exports.GetResourcesEligiblePunchPassUsersDto = exports.GetResourceEligiblePunchPassUsersDto = exports.ByResourceIdAndTypeDto = exports.ByResourceNameTypeDto = exports.ByOrganizationIdAndResourceIdAndTypeDto = exports.UserPunchPassDto = exports.UserPunchPassFinancialInfoDto = exports.GetUserPunchPassesOptionsDto = exports.PunchPassDto = exports.CreatePunchPassDetailsDto = exports.RedemptionDto = exports.BasePunchPassFieldsDto = void 0;
4
+ const events_dto_1 = require("../../dto/events.dto");
4
5
  const general_dto_1 = require("../../dto/general.dto");
5
6
  const resource_dto_1 = require("../../resources/dto/resource.dto");
6
7
  const user_dto_1 = require("../../user/dto/user.dto");
@@ -43,4 +44,13 @@ exports.GetResourcesEligiblePunchPassUsersDto = GetResourcesEligiblePunchPassUse
43
44
  class PunchPassUserEligibleDto extends user_dto_1.UserWithContactInfoDto {
44
45
  }
45
46
  exports.PunchPassUserEligibleDto = PunchPassUserEligibleDto;
47
+ class EventRedemptionDto extends events_dto_1.SimpleEventDto {
48
+ }
49
+ exports.EventRedemptionDto = EventRedemptionDto;
50
+ class GetPunchPassEventsQueryDto {
51
+ }
52
+ exports.GetPunchPassEventsQueryDto = GetPunchPassEventsQueryDto;
53
+ class ByUserAndProductUserIdDto {
54
+ }
55
+ exports.ByUserAndProductUserIdDto = ByUserAndProductUserIdDto;
46
56
  //# sourceMappingURL=punch-pass.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"punch-pass.dto.js","sourceRoot":"","sources":["../../../../src/types/punch-pass/dto/punch-pass.dto.ts"],"names":[],"mappings":";;;AAGA,uDAAwG;AAGxG,mEAAiF;AAEjF,sDAAgF;AAShF,MAAa,sBAAsB;CAclC;AAdD,wDAcC;AAED,MAAa,aAAc,SAAQ,mBAAK;CAQvC;AARD,sCAQC;AAED,MAAa,yBAA0B,SAAQ,sBAAsB;CAAG;AAAxE,8DAAwE;AAExE,MAAa,YAAa,SAAQ,sBAAsB;CAQvD;AARD,oCAQC;AAED,MAAa,4BAA6B,SAAQ,6BAAe;CAkChE;AAlCD,oEAkCC;AAED,MAAa,6BAA6B;CAczC;AAdD,sEAcC;AAED,MAAa,gBAAiB,SAAQ,mBAAK;CA8C1C;AA9CD,4CA8CC;AAED,MAAa,uCAAwC,SAAQ,4CAA6B;CAEzF;AAFD,0FAEC;AAED,MAAa,qBAAqB;CAEjC;AAFD,sDAEC;AAED,MAAa,sBAAuB,SAAQ,qBAAqB;CAEhE;AAFD,wDAEC;AAED,MAAa,oCAAqC,SAAQ,6BAAe;CAUxE;AAVD,oFAUC;AAED,MAAa,qCAAsC,SAAQ,oCAAoC;CAM9F;AAND,sFAMC;AAED,MAAa,wBAAyB,SAAQ,iCAAsB;CAMnE;AAND,4DAMC"}
1
+ {"version":3,"file":"punch-pass.dto.js","sourceRoot":"","sources":["../../../../src/types/punch-pass/dto/punch-pass.dto.ts"],"names":[],"mappings":";;;AAEA,qDAAsD;AACtD,uDAAwG;AAGxG,mEAAiF;AAEjF,sDAAgF;AAShF,MAAa,sBAAsB;CAclC;AAdD,wDAcC;AAED,MAAa,aAAc,SAAQ,mBAAK;CAQvC;AARD,sCAQC;AAED,MAAa,yBAA0B,SAAQ,sBAAsB;CAAG;AAAxE,8DAAwE;AAExE,MAAa,YAAa,SAAQ,sBAAsB;CAQvD;AARD,oCAQC;AAED,MAAa,4BAA6B,SAAQ,6BAAe;CAkChE;AAlCD,oEAkCC;AAED,MAAa,6BAA6B;CAczC;AAdD,sEAcC;AAED,MAAa,gBAAiB,SAAQ,mBAAK;CAgD1C;AAhDD,4CAgDC;AAED,MAAa,uCAAwC,SAAQ,4CAA6B;CAEzF;AAFD,0FAEC;AAED,MAAa,qBAAqB;CAEjC;AAFD,sDAEC;AAED,MAAa,sBAAuB,SAAQ,qBAAqB;CAEhE;AAFD,wDAEC;AAED,MAAa,oCAAqC,SAAQ,6BAAe;CAUxE;AAVD,oFAUC;AAED,MAAa,qCAAsC,SAAQ,oCAAoC;CAM9F;AAND,sFAMC;AAED,MAAa,wBAAyB,SAAQ,iCAAsB;CAMnE;AAND,4DAMC;AAED,MAAa,kBAAmB,SAAQ,2BAAc;CAYrD;AAZD,gDAYC;AAED,MAAa,0BAA0B;CActC;AAdD,gEAcC;AAED,MAAa,yBAAyB;CAIrC;AAJD,8DAIC"}
@@ -1,7 +1,8 @@
1
1
  import { DateInput } from '@bondsports/date-time';
2
2
  import { ResourceIdAndTypeDto } from '../../dto/general.dto';
3
+ import { ProgramSeason } from '../../programs-seasons/entities/ProgramSeason';
3
4
  import { GenderEnum, OrderByEnum, ResourceNameTypeEnum } from '../../services/enums.service';
4
- import { IId } from '../../services/interfaces.service';
5
+ import { IBasicSpaceAndSlotCreator, IId } from '../../services/interfaces.service';
5
6
  import { IPagination } from '../../util/models/interfaces/general.interfaces';
6
7
  import { PunchPassOrderByEnum, PunchPassSearchByEnum } from './enums';
7
8
  export interface IPunchPassHoldersIds {
@@ -54,3 +55,26 @@ export interface IRedemptionQuantityPerDuration {
54
55
  duration: number;
55
56
  quantity: number;
56
57
  }
58
+ export interface IGetUserPunchPassEventRedemptionOptions {
59
+ endDate: DateInput;
60
+ includeDeleted?: boolean;
61
+ itemsPerPage: number;
62
+ orderBy?: OrderByEnum;
63
+ startDate: DateInput;
64
+ }
65
+ export interface IEventRedemptionRawData {
66
+ attendeeId: number;
67
+ eventId: number;
68
+ parentId: number;
69
+ endDate: Date;
70
+ occurAt: string;
71
+ parentType: string;
72
+ punch: number;
73
+ quantity: number;
74
+ redeemedAt: string;
75
+ resources?: IBasicSpaceAndSlotCreator[];
76
+ session?: ProgramSeason;
77
+ startDate: Date;
78
+ timezone: string;
79
+ title: string;
80
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bondsports/types",
3
- "version": "2.3.31-team-c-6",
3
+ "version": "2.3.31-team-c-8",
4
4
  "description": "backend types module for Bond-Sports",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -1,85 +0,0 @@
1
- import { SimpleEventDto } from '../../dto/events.dto';
2
- import { SimpleFacilityDto } from '../../dto/facilities.dto';
3
- import { PaginationQuery, SimpleResourceDto } from '../../dto/general.dto';
4
- import { SimpleProductUserDto } from '../../dto/product-user';
5
- import { PaymentIdDto } from '../../payment/dto/payment.dto';
6
- import { PaymentStatusEnum } from '../../payment/types/enums/payment.enums';
7
- import { SimpleProductDto } from '../../product-pricing/dto/product.dto';
8
- import { SimpleProgramDto } from '../../programs/dto/program.dto';
9
- import { SimpleSessionDto } from '../../programs-seasons/dto/program-seasons.dto';
10
- import { OrderByEnum } from '../../services/enums.service';
11
- import { ByOrganizationAndUserDto, SimpleUserDto } from '../../user/dto/user.dto';
12
- import { PunchPassFilterByEnum, PunchPassOrderByEnum, PunchPassSearchByEnum } from '../types/enums';
13
- /**
14
- */
15
- export declare class PunchPassFinancialInfoDto {
16
- price: number;
17
- invoiceId: number;
18
- paymentId: number;
19
- paymentStatus: PaymentStatusEnum;
20
- isRefunded: boolean;
21
- isVoided: boolean;
22
- purchasedOn: Date;
23
- }
24
- /**
25
- */
26
- export declare class PunchPassInfoDto {
27
- id: number;
28
- organizationId: number;
29
- passesLeft: number;
30
- totalPasses: number;
31
- user: SimpleUserDto;
32
- program: SimpleProgramDto;
33
- session: SimpleSessionDto;
34
- product: SimpleProductDto;
35
- resources: SimpleResourceDto[];
36
- facility: SimpleFacilityDto;
37
- financialInfo: PunchPassFinancialInfoDto;
38
- payment?: PaymentIdDto;
39
- productUser?: SimpleProductUserDto;
40
- }
41
- /**
42
- */
43
- export declare class PunchPassEventDto extends SimpleEventDto {
44
- attendeeId: number;
45
- redeemedOn: Date;
46
- punch: number;
47
- deletedAt?: Date;
48
- }
49
- /**
50
- */
51
- export declare class GetPassesOptionsDto extends PaginationQuery {
52
- searchText?: string;
53
- searchBy?: PunchPassSearchByEnum;
54
- orderBy?: PunchPassOrderByEnum;
55
- filters?: PunchPassFilterByEnum[];
56
- startDate?: Date;
57
- endDate?: Date;
58
- includeFinancialInfo?: boolean;
59
- }
60
- /**
61
- */
62
- export declare class GetPassEventsDto {
63
- startDate: number;
64
- endDate: number;
65
- itemsPerPage: number;
66
- includeResources?: boolean;
67
- orderBy?: OrderByEnum;
68
- includeDeleted?: boolean;
69
- }
70
- /**
71
- */
72
- export declare class ByPassIdOrganizationIdUserIdDto extends ByOrganizationAndUserDto {
73
- passId: number;
74
- }
75
- /**
76
- */
77
- export declare class PunchPassUserProductInfoDto extends SimpleProductUserDto {
78
- id: number;
79
- organizationId: number;
80
- productName: string;
81
- productQuantityLeft: number;
82
- productQuantity: number;
83
- user: SimpleUserDto;
84
- product: SimpleProductDto;
85
- }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PunchPassUserProductInfoDto = exports.ByPassIdOrganizationIdUserIdDto = exports.GetPassEventsDto = exports.GetPassesOptionsDto = exports.PunchPassEventDto = exports.PunchPassInfoDto = exports.PunchPassFinancialInfoDto = void 0;
4
- const events_dto_1 = require("../../dto/events.dto");
5
- const general_dto_1 = require("../../dto/general.dto");
6
- const product_user_1 = require("../../dto/product-user");
7
- const user_dto_1 = require("../../user/dto/user.dto");
8
- /**
9
- */
10
- class PunchPassFinancialInfoDto {
11
- }
12
- exports.PunchPassFinancialInfoDto = PunchPassFinancialInfoDto;
13
- /**
14
- */
15
- class PunchPassInfoDto {
16
- }
17
- exports.PunchPassInfoDto = PunchPassInfoDto;
18
- /**
19
- */
20
- class PunchPassEventDto extends events_dto_1.SimpleEventDto {
21
- }
22
- exports.PunchPassEventDto = PunchPassEventDto;
23
- /**
24
- */
25
- class GetPassesOptionsDto extends general_dto_1.PaginationQuery {
26
- }
27
- exports.GetPassesOptionsDto = GetPassesOptionsDto;
28
- /**
29
- */
30
- class GetPassEventsDto {
31
- }
32
- exports.GetPassEventsDto = GetPassEventsDto;
33
- /**
34
- */
35
- class ByPassIdOrganizationIdUserIdDto extends user_dto_1.ByOrganizationAndUserDto {
36
- }
37
- exports.ByPassIdOrganizationIdUserIdDto = ByPassIdOrganizationIdUserIdDto;
38
- /**
39
- */
40
- class PunchPassUserProductInfoDto extends product_user_1.SimpleProductUserDto {
41
- }
42
- exports.PunchPassUserProductInfoDto = PunchPassUserProductInfoDto;
43
- //# sourceMappingURL=punch-pass.dto.deprecated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"punch-pass.dto.deprecated.js","sourceRoot":"","sources":["../../../../src/types/punch-pass/dto/punch-pass.dto.deprecated.ts"],"names":[],"mappings":";;;AACA,qDAAsD;AAEtD,uDAA2E;AAC3E,yDAA8D;AAO9D,sDAAkF;AAGlF;GACG;AACH,MAAa,yBAAyB;CAcrC;AAdD,8DAcC;AAED;GACG;AACH,MAAa,gBAAgB;CA0B5B;AA1BD,4CA0BC;AAED;GACG;AACH,MAAa,iBAAkB,SAAQ,2BAAc;CAQpD;AARD,8CAQC;AAED;GACG;AACH,MAAa,mBAAoB,SAAQ,6BAAe;CAcvD;AAdD,kDAcC;AAED;GACG;AACH,MAAa,gBAAgB;CAY5B;AAZD,4CAYC;AAED;GACG;AACH,MAAa,+BAAgC,SAAQ,mCAAwB;CAE5E;AAFD,0EAEC;AAED;GACG;AACH,MAAa,2BAA4B,SAAQ,mCAAoB;CAcpE;AAdD,kEAcC"}