@explorins/pers-shared 2.1.170 → 2.1.172
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.
- package/dist/cjs/shared-lib/dto/booking/booking-requirement-config.dto.d.ts +20 -0
- package/dist/cjs/shared-lib/dto/booking/booking-requirement-config.dto.d.ts.map +1 -0
- package/dist/cjs/shared-lib/dto/booking/booking-requirement-config.dto.js +55 -0
- package/dist/cjs/shared-lib/dto/booking/booking-requirement-config.dto.js.map +1 -0
- package/dist/cjs/shared-lib/dto/booking/index.d.ts +1 -0
- package/dist/cjs/shared-lib/dto/booking/index.d.ts.map +1 -1
- package/dist/cjs/shared-lib/dto/booking/index.js +1 -0
- package/dist/cjs/shared-lib/dto/booking/index.js.map +1 -1
- package/dist/cjs/shared-lib/dto/redemption/redemption.dto.d.ts +11 -3
- package/dist/cjs/shared-lib/dto/redemption/redemption.dto.d.ts.map +1 -1
- package/dist/cjs/shared-lib/dto/redemption/redemption.dto.js +3 -4
- package/dist/cjs/shared-lib/dto/redemption/redemption.dto.js.map +1 -1
- package/dist/cjs/shared-lib/dto/redemption/redemptionType.dto.d.ts +3 -3
- package/dist/cjs/shared-lib/dto/redemption/redemptionType.dto.d.ts.map +1 -1
- package/dist/cjs/shared-lib/dto/redemption/redemptionType.dto.js +8 -7
- package/dist/cjs/shared-lib/dto/redemption/redemptionType.dto.js.map +1 -1
- package/dist/esm/shared-lib/dto/booking/booking-requirement-config.dto.d.ts +20 -0
- package/dist/esm/shared-lib/dto/booking/booking-requirement-config.dto.d.ts.map +1 -0
- package/dist/esm/shared-lib/dto/booking/booking-requirement-config.dto.js +45 -0
- package/dist/esm/shared-lib/dto/booking/booking-requirement-config.dto.js.map +1 -0
- package/dist/esm/shared-lib/dto/booking/index.d.ts +1 -0
- package/dist/esm/shared-lib/dto/booking/index.d.ts.map +1 -1
- package/dist/esm/shared-lib/dto/booking/index.js +1 -0
- package/dist/esm/shared-lib/dto/booking/index.js.map +1 -1
- package/dist/esm/shared-lib/dto/redemption/redemption.dto.d.ts +11 -3
- package/dist/esm/shared-lib/dto/redemption/redemption.dto.d.ts.map +1 -1
- package/dist/esm/shared-lib/dto/redemption/redemption.dto.js +3 -4
- package/dist/esm/shared-lib/dto/redemption/redemption.dto.js.map +1 -1
- package/dist/esm/shared-lib/dto/redemption/redemptionType.dto.d.ts +3 -3
- package/dist/esm/shared-lib/dto/redemption/redemptionType.dto.d.ts.map +1 -1
- package/dist/esm/shared-lib/dto/redemption/redemptionType.dto.js +9 -8
- package/dist/esm/shared-lib/dto/redemption/redemptionType.dto.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BookingRequirementType } from '../../types/booking.type';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for booking requirements on redemptions.
|
|
4
|
+
* Defines what type of booking a user must have and which businesses qualify.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BookingRequirementConfigDTO {
|
|
7
|
+
type: BookingRequirementType;
|
|
8
|
+
eligibleBusinessIds?: string[] | null;
|
|
9
|
+
eligibleBusinessTypeIds?: number[] | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Type alias for the booking requirement configuration.
|
|
13
|
+
* Used when the full DTO class isn't needed.
|
|
14
|
+
*/
|
|
15
|
+
export type BookingRequirementConfig = {
|
|
16
|
+
type: BookingRequirementType;
|
|
17
|
+
eligibleBusinessIds?: string[] | null;
|
|
18
|
+
eligibleBusinessTypeIds?: number[] | null;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=booking-requirement-config.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-requirement-config.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/booking-requirement-config.dto.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;;GAGG;AACH,qBAAa,2BAA2B;IAMpC,IAAI,EAAE,sBAAsB,CAAS;IAUrC,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAUtC,uBAAuB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACtC,uBAAuB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC7C,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BookingRequirementConfigDTO = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for booking requirements on redemptions.
|
|
17
|
+
* Defines what type of booking a user must have and which businesses qualify.
|
|
18
|
+
*/
|
|
19
|
+
class BookingRequirementConfigDTO {
|
|
20
|
+
type = 'any';
|
|
21
|
+
eligibleBusinessIds;
|
|
22
|
+
eligibleBusinessTypeIds;
|
|
23
|
+
}
|
|
24
|
+
exports.BookingRequirementConfigDTO = BookingRequirementConfigDTO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
description: 'Type of booking required for eligibility.',
|
|
28
|
+
enum: ['active', 'future', 'past', 'active_future', 'any']
|
|
29
|
+
}),
|
|
30
|
+
(0, class_validator_1.IsEnum)(['active', 'future', 'past', 'active_future', 'any']),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], BookingRequirementConfigDTO.prototype, "type", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
35
|
+
description: 'Specific business IDs where booking must be. `null` = any business allowed, `[]` = no businesses allowed (blocks all). Combined with eligibleBusinessTypeIds via OR.',
|
|
36
|
+
type: [String],
|
|
37
|
+
nullable: true
|
|
38
|
+
}),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsArray)(),
|
|
41
|
+
(0, class_validator_1.IsUUID)('4', { each: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], BookingRequirementConfigDTO.prototype, "eligibleBusinessIds", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
46
|
+
description: 'Business type IDs where booking must be. `null` = any type allowed, `[]` = no types allowed (blocks all). Combined with eligibleBusinessIds via OR.',
|
|
47
|
+
type: [Number],
|
|
48
|
+
nullable: true
|
|
49
|
+
}),
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsArray)(),
|
|
52
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], BookingRequirementConfigDTO.prototype, "eligibleBusinessTypeIds", void 0);
|
|
55
|
+
//# sourceMappingURL=booking-requirement-config.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-requirement-config.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/booking-requirement-config.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAA6E;AAG7E;;;GAGG;AACH,MAAa,2BAA2B;IAMpC,IAAI,GAA2B,KAAK,CAAC;IAUrC,mBAAmB,CAAmB;IAUtC,uBAAuB,CAAmB;CAC7C;AA3BD,kEA2BC;AArBG;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,2CAA2C;QACxD,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC;KAC7D,CAAC;IACD,IAAA,wBAAM,EAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;;yDACxB;AAUrC;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,sKAAsK;QACnL,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,IAAI;KACjB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,wBAAM,EAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;wEACU;AAUtC;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,qJAAqJ;QAClK,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,IAAI;KACjB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;4EACoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC"}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./booking.dto"), exports);
|
|
18
|
+
__exportStar(require("./booking-requirement-config.dto"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,mEAAiD"}
|
|
@@ -6,8 +6,8 @@ import type { DynamicContext } from "../../interfaces/dynamic-context.interface"
|
|
|
6
6
|
import { BusinessDTO } from "../business/business.dto";
|
|
7
7
|
import { CustomFieldDefinitionDTO } from "../user/custom-field-definition.dto";
|
|
8
8
|
import type { BuiltInFieldDefinition } from "../../types/custom-fields.type";
|
|
9
|
-
import type { BookingRequirementType } from "../../types/booking.type";
|
|
10
9
|
import type { BookingDTO } from "../booking/booking.dto";
|
|
10
|
+
import { BookingRequirementConfigDTO } from "../booking/booking-requirement-config.dto";
|
|
11
11
|
/** Base union type for required field definitions - can be either a custom field or built-in field */
|
|
12
12
|
export type RequiredFieldDefinition = CustomFieldDefinitionDTO | BuiltInFieldDefinition;
|
|
13
13
|
/** Field definition with user-specific status (includes isMissing flag when user context available) */
|
|
@@ -15,6 +15,12 @@ export type RequiredFieldDefinitionWithStatus = RequiredFieldDefinition & {
|
|
|
15
15
|
/** True if the current user is missing this field. Only set when include=requiredUserFieldDefinitions + user is authenticated. */
|
|
16
16
|
isMissing?: boolean;
|
|
17
17
|
};
|
|
18
|
+
/** Minimal business info for eligible businesses list */
|
|
19
|
+
export interface EligibleBusinessSummary {
|
|
20
|
+
id: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
imageUrl?: string | null;
|
|
23
|
+
}
|
|
18
24
|
export declare class RedemptionDTO {
|
|
19
25
|
id: string;
|
|
20
26
|
ownerBusinessId: string | null;
|
|
@@ -38,8 +44,8 @@ export declare class RedemptionDTO {
|
|
|
38
44
|
context?: DynamicContext;
|
|
39
45
|
specificRequiredUserFields: string[];
|
|
40
46
|
requiredUserFields: string[];
|
|
41
|
-
specificBookingRequirement?:
|
|
42
|
-
bookingRequirement?:
|
|
47
|
+
specificBookingRequirement?: BookingRequirementConfigDTO | null;
|
|
48
|
+
bookingRequirement?: BookingRequirementConfigDTO | null;
|
|
43
49
|
included?: {
|
|
44
50
|
redeemCount?: number;
|
|
45
51
|
ownerBusiness?: BusinessDTO;
|
|
@@ -56,6 +62,8 @@ export declare class RedemptionDTO {
|
|
|
56
62
|
data: BookingDTO | null;
|
|
57
63
|
/** True if user has valid booking meeting requirements. */
|
|
58
64
|
isValid: boolean;
|
|
65
|
+
/** Eligible businesses (only populated when isValid=false and eligibleBusinessIds/TypeIds is set). */
|
|
66
|
+
eligibleBusinesses?: EligibleBusinessSummary[];
|
|
59
67
|
};
|
|
60
68
|
};
|
|
61
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemption.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemption.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CA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F,gBAAgB,EAAE,iCAAiC,EAAE,CAAC;YACtD,4CAA4C;YAC5C,OAAO,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,wFAAwF;QACxF,OAAO,CAAC,EAAE;YACN,kDAAkD;YAClD,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;YACxB,2DAA2D;YAC3D,OAAO,EAAE,OAAO,CAAC;YACjB,sGAAsG;YACtG,kBAAkB,CAAC,EAAE,uBAAuB,EAAE,CAAC;SAClD,CAAC;KACL,CAAC;CACL"}
|
|
@@ -17,6 +17,7 @@ const user_status_type_dto_1 = require("../user-status-type.dto");
|
|
|
17
17
|
const item_supply_dto_1 = require("../item-supply.dto");
|
|
18
18
|
const business_dto_1 = require("../business/business.dto");
|
|
19
19
|
const custom_field_definition_dto_1 = require("../user/custom-field-definition.dto");
|
|
20
|
+
const booking_requirement_config_dto_1 = require("../booking/booking-requirement-config.dto");
|
|
20
21
|
class RedemptionDTO {
|
|
21
22
|
id = '';
|
|
22
23
|
ownerBusinessId = null;
|
|
@@ -221,8 +222,7 @@ __decorate([
|
|
|
221
222
|
__decorate([
|
|
222
223
|
(0, swagger_1.ApiPropertyOptional)({
|
|
223
224
|
description: 'Redemption-specific booking requirement override. Set to override type default. Omit or null = use type default.',
|
|
224
|
-
type:
|
|
225
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
225
|
+
type: () => booking_requirement_config_dto_1.BookingRequirementConfigDTO,
|
|
226
226
|
nullable: true
|
|
227
227
|
}),
|
|
228
228
|
__metadata("design:type", Object)
|
|
@@ -230,8 +230,7 @@ __decorate([
|
|
|
230
230
|
__decorate([
|
|
231
231
|
(0, swagger_1.ApiPropertyOptional)({
|
|
232
232
|
description: 'Effective booking requirement (specific override ?? type default). Use this for validation. Null = no booking required.',
|
|
233
|
-
type:
|
|
234
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
233
|
+
type: () => booking_requirement_config_dto_1.BookingRequirementConfigDTO,
|
|
235
234
|
nullable: true
|
|
236
235
|
}),
|
|
237
236
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemption.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemption.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAkF;AAClF,6DAAyD;AACzD,4DAAuD;AACvD,kEAA4D;AAC5D,wDAAgD;AAEhD,2DAAuD;AACvD,qFAA+E;
|
|
1
|
+
{"version":3,"file":"redemption.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemption.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAkF;AAClF,6DAAyD;AACzD,4DAAuD;AACvD,kEAA4D;AAC5D,wDAAgD;AAEhD,2DAAuD;AACvD,qFAA+E;AAG/E,8FAAwF;AAmBxF,MAAa,aAAa;IAKtB,EAAE,GAAW,EAAE,CAAC;IAOhB,eAAe,GAAkB,IAAI,CAAC;IAOtC,WAAW,GAAkB,IAAI,CAAC;IAOlC,IAAI,GAAkB,IAAI,CAAC;IAO3B,QAAQ,GAAkB,IAAI,CAAC;IAO/B,OAAO,GAAkB,IAAI,CAAC;IAO9B,KAAK,GAAkB,IAAI,CAAC;IAO5B,SAAS,GAAgB,IAAI,CAAC;IAO9B,OAAO,GAAgB,IAAI,CAAC;IAK5B,QAAQ,GAAY,KAAK,CAAC;IAK1B,iBAAiB,GAAW,CAAC,CAAC;IAO9B,IAAI,GAA6B,IAAI,CAAA;IAMrC,UAAU,GAAmB,EAAE,CAAC;IAOhC,KAAK,GAAkB,CAAC,CAAA;IAQxB,MAAM,GAAsB,IAAI,CAAA;IAKhC,UAAU,CAAgB;IAO1B,iBAAiB,GAA6B,IAAI,CAAA;IAOlD,uBAAuB,GAAoB,IAAI,CAAC;IAQhD,IAAI,GAAa,EAAE,CAAC;IAOpB,OAAO,CAAkB;IAOzB,0BAA0B,GAAa,EAAE,CAAC;IAO1C,kBAAkB,GAAa,EA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;gBACd,UAAU,EAAE;oBACR,gBAAgB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,sDAAwB,CAAC,EAAE,EAAE,WAAW,EAAE,yCAAyC,EAAE;oBACrJ,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;iBACpF;aACJ;YACD,OAAO,EAAE;gBACL,WAAW,EAAE,iHAAiH;gBAC9H,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,IAAI,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,sDAAwB,CAAC,EAAE,WAAW,EAAE,4CAA4C,EAAE;oBAClH,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,qDAAqD,EAAE;iBACnG;aACJ;SACJ;KACJ,CAAC;;+CAoBA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BookingRequirementConfigDTO } from '../booking/booking-requirement-config.dto';
|
|
2
2
|
export declare class RedemptionTypeCreateRequestDTO {
|
|
3
3
|
name: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
imageUrl?: string;
|
|
6
6
|
baseRequiredUserFields?: string[];
|
|
7
|
-
bookingRequirement?:
|
|
7
|
+
bookingRequirement?: BookingRequirementConfigDTO | null;
|
|
8
8
|
}
|
|
9
9
|
export declare class RedemptionTypeDTO extends RedemptionTypeCreateRequestDTO {
|
|
10
10
|
id: number;
|
|
11
11
|
baseRequiredUserFields: string[];
|
|
12
|
-
bookingRequirement:
|
|
12
|
+
bookingRequirement: BookingRequirementConfigDTO | null;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=redemptionType.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemptionType.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redemptionType.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAGxF,qBAAa,8BAA8B;IAMvC,IAAI,EAAE,MAAM,CAAM;IAOlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAOrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAUlB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAWlC,kBAAkB,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC3D;AACD,qBAAa,iBAAkB,SAAQ,8BAA8B;IAIjE,EAAE,EAAE,MAAM,CAAK;IAOf,sBAAsB,EAAE,MAAM,EAAE,CAAM;IAOtC,kBAAkB,EAAE,2BAA2B,GAAG,IAAI,CAAQ;CACjE"}
|
|
@@ -12,7 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.RedemptionTypeDTO = exports.RedemptionTypeCreateRequestDTO = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
16
|
const decorators_1 = require("../../decorators");
|
|
17
|
+
const booking_requirement_config_dto_1 = require("../booking/booking-requirement-config.dto");
|
|
16
18
|
class RedemptionTypeCreateRequestDTO {
|
|
17
19
|
name = '';
|
|
18
20
|
description;
|
|
@@ -58,13 +60,13 @@ __decorate([
|
|
|
58
60
|
], RedemptionTypeCreateRequestDTO.prototype, "baseRequiredUserFields", void 0);
|
|
59
61
|
__decorate([
|
|
60
62
|
(0, swagger_1.ApiPropertyOptional)({
|
|
61
|
-
description: 'Default booking requirement for all redemptions of this type. Individual redemptions can override
|
|
62
|
-
type:
|
|
63
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
63
|
+
description: 'Default booking requirement config for all redemptions of this type. Individual redemptions can override.',
|
|
64
|
+
type: () => booking_requirement_config_dto_1.BookingRequirementConfigDTO,
|
|
64
65
|
nullable: true
|
|
65
66
|
}),
|
|
66
67
|
(0, decorators_1.OptionalStrip)(),
|
|
67
|
-
(0, class_validator_1.
|
|
68
|
+
(0, class_validator_1.ValidateNested)(),
|
|
69
|
+
(0, class_transformer_1.Type)(() => booking_requirement_config_dto_1.BookingRequirementConfigDTO),
|
|
68
70
|
(0, class_validator_1.IsOptional)(),
|
|
69
71
|
__metadata("design:type", Object)
|
|
70
72
|
], RedemptionTypeCreateRequestDTO.prototype, "bookingRequirement", void 0);
|
|
@@ -90,9 +92,8 @@ __decorate([
|
|
|
90
92
|
], RedemptionTypeDTO.prototype, "baseRequiredUserFields", void 0);
|
|
91
93
|
__decorate([
|
|
92
94
|
(0, swagger_1.ApiPropertyOptional)({
|
|
93
|
-
description: 'Default booking requirement for all redemptions of this type. Individual redemptions can override
|
|
94
|
-
type:
|
|
95
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
95
|
+
description: 'Default booking requirement config for all redemptions of this type. Individual redemptions can override.',
|
|
96
|
+
type: () => booking_requirement_config_dto_1.BookingRequirementConfigDTO,
|
|
96
97
|
nullable: true
|
|
97
98
|
}),
|
|
98
99
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemptionType.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"redemptionType.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAAmG;AACnG,yDAAyC;AACzC,iDAAiD;AACjD,8FAAwF;AAGxF,MAAa,8BAA8B;IAMvC,IAAI,GAAW,EAAE,CAAC;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;CACjE;AAnBD,8CAmBC;AAfG;IAHC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,oBAAoB;KACpC,CAAC;;6CACa;AAOf;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,kJAAkJ;QAC/J,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,EAAE;KACd,CAAC;;iEACoC;AAOtC;IALC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,2GAA2G;QACxH,IAAI,EAAE,GAAG,EAAE,CAAC,4DAA2B;QACvC,QAAQ,EAAE,IAAI;KACjB,CAAC;;6DAC4D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BookingRequirementType } from '../../types/booking.type';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for booking requirements on redemptions.
|
|
4
|
+
* Defines what type of booking a user must have and which businesses qualify.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BookingRequirementConfigDTO {
|
|
7
|
+
type: BookingRequirementType;
|
|
8
|
+
eligibleBusinessIds?: string[] | null;
|
|
9
|
+
eligibleBusinessTypeIds?: number[] | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Type alias for the booking requirement configuration.
|
|
13
|
+
* Used when the full DTO class isn't needed.
|
|
14
|
+
*/
|
|
15
|
+
export type BookingRequirementConfig = {
|
|
16
|
+
type: BookingRequirementType;
|
|
17
|
+
eligibleBusinessIds?: string[] | null;
|
|
18
|
+
eligibleBusinessTypeIds?: number[] | null;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=booking-requirement-config.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-requirement-config.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/booking-requirement-config.dto.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;;GAGG;AACH,qBAAa,2BAA2B;IAMpC,IAAI,EAAE,sBAAsB,CAAS;IAUrC,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAUtC,uBAAuB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACtC,uBAAuB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC7C,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
8
|
+
import { IsArray, IsEnum, IsOptional, IsUUID, IsInt } from 'class-validator';
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for booking requirements on redemptions.
|
|
11
|
+
* Defines what type of booking a user must have and which businesses qualify.
|
|
12
|
+
*/
|
|
13
|
+
export class BookingRequirementConfigDTO {
|
|
14
|
+
type = 'any';
|
|
15
|
+
eligibleBusinessIds;
|
|
16
|
+
eligibleBusinessTypeIds;
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
ApiProperty({
|
|
20
|
+
description: 'Type of booking required for eligibility.',
|
|
21
|
+
enum: ['active', 'future', 'past', 'active_future', 'any']
|
|
22
|
+
}),
|
|
23
|
+
IsEnum(['active', 'future', 'past', 'active_future', 'any'])
|
|
24
|
+
], BookingRequirementConfigDTO.prototype, "type", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
ApiPropertyOptional({
|
|
27
|
+
description: 'Specific business IDs where booking must be. `null` = any business allowed, `[]` = no businesses allowed (blocks all). Combined with eligibleBusinessTypeIds via OR.',
|
|
28
|
+
type: [String],
|
|
29
|
+
nullable: true
|
|
30
|
+
}),
|
|
31
|
+
IsOptional(),
|
|
32
|
+
IsArray(),
|
|
33
|
+
IsUUID('4', { each: true })
|
|
34
|
+
], BookingRequirementConfigDTO.prototype, "eligibleBusinessIds", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
ApiPropertyOptional({
|
|
37
|
+
description: 'Business type IDs where booking must be. `null` = any type allowed, `[]` = no types allowed (blocks all). Combined with eligibleBusinessIds via OR.',
|
|
38
|
+
type: [Number],
|
|
39
|
+
nullable: true
|
|
40
|
+
}),
|
|
41
|
+
IsOptional(),
|
|
42
|
+
IsArray(),
|
|
43
|
+
IsInt({ each: true })
|
|
44
|
+
], BookingRequirementConfigDTO.prototype, "eligibleBusinessTypeIds", void 0);
|
|
45
|
+
//# sourceMappingURL=booking-requirement-config.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-requirement-config.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/booking-requirement-config.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG7E;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IAMpC,IAAI,GAA2B,KAAK,CAAC;IAUrC,mBAAmB,CAAmB;IAUtC,uBAAuB,CAAmB;CAC7C;AArBG;IALC,WAAW,CAAC;QACT,WAAW,EAAE,2CAA2C;QACxD,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC;KAC7D,CAAC;IACD,MAAM,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;yDACxB;AAUrC;IARC,mBAAmB,CAAC;QACjB,WAAW,EAAE,sKAAsK;QACnL,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,IAAI;KACjB,CAAC;IACD,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;wEACU;AAUtC;IARC,mBAAmB,CAAC;QACjB,WAAW,EAAE,qJAAqJ;QAClK,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,IAAI;KACjB,CAAC;IACD,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;4EACoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/booking/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC"}
|
|
@@ -6,8 +6,8 @@ import type { DynamicContext } from "../../interfaces/dynamic-context.interface"
|
|
|
6
6
|
import { BusinessDTO } from "../business/business.dto";
|
|
7
7
|
import { CustomFieldDefinitionDTO } from "../user/custom-field-definition.dto";
|
|
8
8
|
import type { BuiltInFieldDefinition } from "../../types/custom-fields.type";
|
|
9
|
-
import type { BookingRequirementType } from "../../types/booking.type";
|
|
10
9
|
import type { BookingDTO } from "../booking/booking.dto";
|
|
10
|
+
import { BookingRequirementConfigDTO } from "../booking/booking-requirement-config.dto";
|
|
11
11
|
/** Base union type for required field definitions - can be either a custom field or built-in field */
|
|
12
12
|
export type RequiredFieldDefinition = CustomFieldDefinitionDTO | BuiltInFieldDefinition;
|
|
13
13
|
/** Field definition with user-specific status (includes isMissing flag when user context available) */
|
|
@@ -15,6 +15,12 @@ export type RequiredFieldDefinitionWithStatus = RequiredFieldDefinition & {
|
|
|
15
15
|
/** True if the current user is missing this field. Only set when include=requiredUserFieldDefinitions + user is authenticated. */
|
|
16
16
|
isMissing?: boolean;
|
|
17
17
|
};
|
|
18
|
+
/** Minimal business info for eligible businesses list */
|
|
19
|
+
export interface EligibleBusinessSummary {
|
|
20
|
+
id: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
imageUrl?: string | null;
|
|
23
|
+
}
|
|
18
24
|
export declare class RedemptionDTO {
|
|
19
25
|
id: string;
|
|
20
26
|
ownerBusinessId: string | null;
|
|
@@ -38,8 +44,8 @@ export declare class RedemptionDTO {
|
|
|
38
44
|
context?: DynamicContext;
|
|
39
45
|
specificRequiredUserFields: string[];
|
|
40
46
|
requiredUserFields: string[];
|
|
41
|
-
specificBookingRequirement?:
|
|
42
|
-
bookingRequirement?:
|
|
47
|
+
specificBookingRequirement?: BookingRequirementConfigDTO | null;
|
|
48
|
+
bookingRequirement?: BookingRequirementConfigDTO | null;
|
|
43
49
|
included?: {
|
|
44
50
|
redeemCount?: number;
|
|
45
51
|
ownerBusiness?: BusinessDTO;
|
|
@@ -56,6 +62,8 @@ export declare class RedemptionDTO {
|
|
|
56
62
|
data: BookingDTO | null;
|
|
57
63
|
/** True if user has valid booking meeting requirements. */
|
|
58
64
|
isValid: boolean;
|
|
65
|
+
/** Eligible businesses (only populated when isValid=false and eligibleBusinessIds/TypeIds is set). */
|
|
66
|
+
eligibleBusinesses?: EligibleBusinessSummary[];
|
|
59
67
|
};
|
|
60
68
|
};
|
|
61
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemption.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemption.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"redemption.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemption.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,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UAAU,GAAG,IAAI,CAAO;IAKhC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAO1B,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAO;IAOlD,uBAAuB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAQ;IAQhD,IAAI,EAAE,MAAM,EAAE,CAAM;IAOpB,OAAO,CAAC,EAAE,cAAc,CAAC;IAOzB,0BAA0B,EAAE,MAAM,EAAE,CAAM;IAO1C,kBAAkB,EAAE,MAAM,EAAE,CAAM;IAOlC,0BAA0B,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAOhE,kBAAkB,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAwCxD,QAAQ,CAAC,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,WAAW,CAAC;QAC5B,yGAAyG;QACzG,gBAAgB,CAAC,EAAE;YACf,0FAA0F;YAC1F,gBAAgB,EAAE,iCAAiC,EAAE,CAAC;YACtD,4CAA4C;YAC5C,OAAO,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,wFAAwF;QACxF,OAAO,CAAC,EAAE;YACN,kDAAkD;YAClD,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;YACxB,2DAA2D;YAC3D,OAAO,EAAE,OAAO,CAAC;YACjB,sGAAsG;YACtG,kBAAkB,CAAC,EAAE,uBAAuB,EAAE,CAAC;SAClD,CAAC;KACL,CAAC;CACL"}
|
|
@@ -11,6 +11,7 @@ import { UserStatusTypeDTO } from "../user-status-type.dto.js";
|
|
|
11
11
|
import { ItemSupply } from "../item-supply.dto.js";
|
|
12
12
|
import { BusinessDTO } from "../business/business.dto.js";
|
|
13
13
|
import { CustomFieldDefinitionDTO } from "../user/custom-field-definition.dto.js";
|
|
14
|
+
import { BookingRequirementConfigDTO } from "../booking/booking-requirement-config.dto.js";
|
|
14
15
|
export class RedemptionDTO {
|
|
15
16
|
id = '';
|
|
16
17
|
ownerBusinessId = null;
|
|
@@ -192,16 +193,14 @@ __decorate([
|
|
|
192
193
|
__decorate([
|
|
193
194
|
ApiPropertyOptional({
|
|
194
195
|
description: 'Redemption-specific booking requirement override. Set to override type default. Omit or null = use type default.',
|
|
195
|
-
type:
|
|
196
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
196
|
+
type: () => BookingRequirementConfigDTO,
|
|
197
197
|
nullable: true
|
|
198
198
|
})
|
|
199
199
|
], RedemptionDTO.prototype, "specificBookingRequirement", void 0);
|
|
200
200
|
__decorate([
|
|
201
201
|
ApiPropertyOptional({
|
|
202
202
|
description: 'Effective booking requirement (specific override ?? type default). Use this for validation. Null = no booking required.',
|
|
203
|
-
type:
|
|
204
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
203
|
+
type: () => BookingRequirementConfigDTO,
|
|
205
204
|
nullable: true
|
|
206
205
|
})
|
|
207
206
|
], RedemptionDTO.prototype, "bookingRequirement", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemption.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemption.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"redemption.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemption.dto.ts"],"names":[],"mappings":";;;;;;A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9H,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,IAAI,EAAE,EAAE,IAAI,EAAE,aAAa,CAAC,wBAAwB,CAAC,EAAE,WAAW,EAAE,4CAA4C,EAAE;oBAClH,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,qDAAqD,EAAE;iBACnG;aACJ;SACJ;KACJ,CAAC;+CAoBA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BookingRequirementConfigDTO } from '../booking/booking-requirement-config.dto';
|
|
2
2
|
export declare class RedemptionTypeCreateRequestDTO {
|
|
3
3
|
name: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
imageUrl?: string;
|
|
6
6
|
baseRequiredUserFields?: string[];
|
|
7
|
-
bookingRequirement?:
|
|
7
|
+
bookingRequirement?: BookingRequirementConfigDTO | null;
|
|
8
8
|
}
|
|
9
9
|
export declare class RedemptionTypeDTO extends RedemptionTypeCreateRequestDTO {
|
|
10
10
|
id: number;
|
|
11
11
|
baseRequiredUserFields: string[];
|
|
12
|
-
bookingRequirement:
|
|
12
|
+
bookingRequirement: BookingRequirementConfigDTO | null;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=redemptionType.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemptionType.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redemptionType.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAGxF,qBAAa,8BAA8B;IAMvC,IAAI,EAAE,MAAM,CAAM;IAOlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAOrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAUlB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAWlC,kBAAkB,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC3D;AACD,qBAAa,iBAAkB,SAAQ,8BAA8B;IAIjE,EAAE,EAAE,MAAM,CAAK;IAOf,sBAAsB,EAAE,MAAM,EAAE,CAAM;IAOtC,kBAAkB,EAAE,2BAA2B,GAAG,IAAI,CAAQ;CACjE"}
|
|
@@ -5,8 +5,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
8
|
-
import { IsArray, IsNotEmpty, IsString, IsUrl,
|
|
8
|
+
import { IsArray, IsNotEmpty, IsString, IsUrl, IsOptional, ValidateNested } from 'class-validator';
|
|
9
|
+
import { Type } from 'class-transformer';
|
|
9
10
|
import { OptionalStrip } from '../../decorators/index.js';
|
|
11
|
+
import { BookingRequirementConfigDTO } from '../booking/booking-requirement-config.dto.js';
|
|
10
12
|
export class RedemptionTypeCreateRequestDTO {
|
|
11
13
|
name = '';
|
|
12
14
|
description;
|
|
@@ -47,13 +49,13 @@ __decorate([
|
|
|
47
49
|
], RedemptionTypeCreateRequestDTO.prototype, "baseRequiredUserFields", void 0);
|
|
48
50
|
__decorate([
|
|
49
51
|
ApiPropertyOptional({
|
|
50
|
-
description: 'Default booking requirement for all redemptions of this type. Individual redemptions can override
|
|
51
|
-
type:
|
|
52
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
52
|
+
description: 'Default booking requirement config for all redemptions of this type. Individual redemptions can override.',
|
|
53
|
+
type: () => BookingRequirementConfigDTO,
|
|
53
54
|
nullable: true
|
|
54
55
|
}),
|
|
55
56
|
OptionalStrip(),
|
|
56
|
-
|
|
57
|
+
ValidateNested(),
|
|
58
|
+
Type(() => BookingRequirementConfigDTO),
|
|
57
59
|
IsOptional()
|
|
58
60
|
], RedemptionTypeCreateRequestDTO.prototype, "bookingRequirement", void 0);
|
|
59
61
|
export class RedemptionTypeDTO extends RedemptionTypeCreateRequestDTO {
|
|
@@ -75,9 +77,8 @@ __decorate([
|
|
|
75
77
|
], RedemptionTypeDTO.prototype, "baseRequiredUserFields", void 0);
|
|
76
78
|
__decorate([
|
|
77
79
|
ApiPropertyOptional({
|
|
78
|
-
description: 'Default booking requirement for all redemptions of this type. Individual redemptions can override
|
|
79
|
-
type:
|
|
80
|
-
enum: ['active', 'future', 'past', 'active_future', 'any'],
|
|
80
|
+
description: 'Default booking requirement config for all redemptions of this type. Individual redemptions can override.',
|
|
81
|
+
type: () => BookingRequirementConfigDTO,
|
|
81
82
|
nullable: true
|
|
82
83
|
})
|
|
83
84
|
], RedemptionTypeDTO.prototype, "bookingRequirement", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemptionType.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"redemptionType.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/redemption/redemptionType.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnG,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAGxF,M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