@xoxno/types 1.0.263 → 1.0.265

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.
@@ -64,7 +64,6 @@ __decorate([
64
64
  }),
65
65
  (0, class_validator_1.IsInt)(),
66
66
  (0, class_validator_1.Min)(0),
67
- (0, class_validator_1.IsOptional)(),
68
67
  __metadata("design:type", Object)
69
68
  ], RegistrationDetailsDto.prototype, "maxLimit", void 0);
70
69
  __decorate([
@@ -74,7 +73,6 @@ __decorate([
74
73
  }),
75
74
  (0, class_validator_1.IsInt)(),
76
75
  (0, class_validator_1.Min)(0),
77
- (0, class_validator_1.IsOptional)(),
78
76
  __metadata("design:type", Object)
79
77
  ], RegistrationDetailsDto.prototype, "userLimit", void 0);
80
78
  __decorate([
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventReferralConfigCreateDto = void 0;
4
4
  const swagger_1 = require("@nestjs/swagger");
5
5
  const event_referral_config_doc_1 = require("./event-referral-config.doc");
6
- class EventReferralConfigCreateDto extends (0, swagger_1.PickType)(event_referral_config_doc_1.EventReferralConfigDoc, ['appliedVoucher', 'rewardDetails', 'isSelfService', 'isActive']) {
6
+ class EventReferralConfigCreateDto extends (0, swagger_1.PickType)(event_referral_config_doc_1.EventReferralConfigDoc, ['isSelfService', 'isActive', 'appliedVoucher', 'rewardDetails']) {
7
7
  }
8
8
  exports.EventReferralConfigCreateDto = EventReferralConfigCreateDto;
9
9
 
@@ -30,6 +30,7 @@ __decorate([
30
30
  enum: event_referral_enum_1.EventReferralEnum,
31
31
  enumName: 'EventReferralEnum',
32
32
  }),
33
+ (0, class_validator_1.IsEnum)(event_referral_enum_1.EventReferralEnum),
33
34
  __metadata("design:type", String)
34
35
  ], RewardDetails.prototype, "rewardType", void 0);
35
36
  __decorate([
@@ -38,6 +39,7 @@ __decorate([
38
39
  enum: event_referral_config_doc_1.ReferralConditionType,
39
40
  enumName: 'ReferralConditionType',
40
41
  }),
42
+ (0, class_validator_1.IsEnum)(event_referral_config_doc_1.ReferralConditionType),
41
43
  __metadata("design:type", String)
42
44
  ], RewardDetails.prototype, "conditionType", void 0);
43
45
  __decorate([
@@ -54,6 +56,8 @@ __decorate([
54
56
  description: 'Currency type in case of conditionType = revenueCount',
55
57
  required: false,
56
58
  }),
59
+ (0, class_validator_1.IsOptional)(),
60
+ (0, class_validator_1.IsString)(),
57
61
  __metadata("design:type", String)
58
62
  ], RewardDetails.prototype, "currency", void 0);
59
63
  __decorate([
@@ -62,6 +66,9 @@ __decorate([
62
66
  description: 'Voucher details that will be issued when the condition is met.',
63
67
  type: short_voucher_doc_1.ShortVoucherDoc,
64
68
  }),
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_validator_1.ValidateNested)(),
71
+ (0, class_transformer_1.Type)(() => short_voucher_doc_1.ShortVoucherDoc),
65
72
  __metadata("design:type", short_voucher_doc_1.ShortVoucherDoc)
66
73
  ], RewardDetails.prototype, "voucherInfo", void 0);
67
74
  class EventReferralConfigDoc {
@@ -6,7 +6,7 @@ export declare class EventVoucherDoc {
6
6
  code: string;
7
7
  type: VoucherType;
8
8
  amount: number;
9
- maxDiscountAmount?: number;
9
+ maxDiscountAmount: number;
10
10
  maxUses: number;
11
11
  maxUsesPerUser: number;
12
12
  usedCount: number;
@@ -18,6 +18,7 @@ const cosmos_db_paginated_response_dto_1 = require("../../cosmos-db-paginated-re
18
18
  class EventVoucherDoc {
19
19
  constructor(props) {
20
20
  this.dataType = ticketing_data_type_enum_1.TicketingDataType.VOUCHER;
21
+ this.maxDiscountAmount = 0;
21
22
  this.usedCount = 0;
22
23
  this.ticketTypeIds = [];
23
24
  this.isActive = true;
@@ -75,7 +76,7 @@ __decorate([
75
76
  }),
76
77
  (0, class_validator_1.IsNumber)(),
77
78
  (0, class_validator_1.Min)(0),
78
- __metadata("design:type", Number)
79
+ __metadata("design:type", Object)
79
80
  ], EventVoucherDoc.prototype, "maxDiscountAmount", void 0);
80
81
  __decorate([
81
82
  (0, swagger_1.ApiProperty)({
@@ -0,0 +1,14 @@
1
+ import { PerpEnum } from '../../enums/perp.enum';
2
+ export declare class L2BookPerpEvent {
3
+ type: PerpEnum;
4
+ coin: string;
5
+ sigFigs: number;
6
+ mantissa: number;
7
+ }
8
+ export declare class TradesPerpEvent {
9
+ type: PerpEnum;
10
+ coin: string;
11
+ }
12
+ export declare class PerpEvent {
13
+ event: L2BookPerpEvent | TradesPerpEvent;
14
+ }
@@ -0,0 +1,66 @@
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.PerpEvent = exports.TradesPerpEvent = exports.L2BookPerpEvent = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const perp_enum_1 = require("../../enums/perp.enum");
15
+ class L2BookPerpEvent {
16
+ constructor() {
17
+ this.type = perp_enum_1.PerpEnum.L2BOOK;
18
+ this.mantissa = 1;
19
+ }
20
+ }
21
+ exports.L2BookPerpEvent = L2BookPerpEvent;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)(),
24
+ __metadata("design:type", Object)
25
+ ], L2BookPerpEvent.prototype, "type", void 0);
26
+ __decorate([
27
+ (0, swagger_1.ApiProperty)(),
28
+ __metadata("design:type", String)
29
+ ], L2BookPerpEvent.prototype, "coin", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)(),
32
+ __metadata("design:type", Number)
33
+ ], L2BookPerpEvent.prototype, "sigFigs", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)(),
36
+ __metadata("design:type", Object)
37
+ ], L2BookPerpEvent.prototype, "mantissa", void 0);
38
+ class TradesPerpEvent {
39
+ constructor() {
40
+ this.type = perp_enum_1.PerpEnum.TRADES;
41
+ }
42
+ }
43
+ exports.TradesPerpEvent = TradesPerpEvent;
44
+ __decorate([
45
+ (0, swagger_1.ApiProperty)(),
46
+ __metadata("design:type", Object)
47
+ ], TradesPerpEvent.prototype, "type", void 0);
48
+ __decorate([
49
+ (0, swagger_1.ApiProperty)(),
50
+ __metadata("design:type", String)
51
+ ], TradesPerpEvent.prototype, "coin", void 0);
52
+ let PerpEvent = class PerpEvent {
53
+ };
54
+ exports.PerpEvent = PerpEvent;
55
+ __decorate([
56
+ (0, swagger_1.ApiProperty)({
57
+ oneOf: [
58
+ { $ref: (0, swagger_1.getSchemaPath)(L2BookPerpEvent) },
59
+ { $ref: (0, swagger_1.getSchemaPath)(TradesPerpEvent) },
60
+ ],
61
+ }),
62
+ __metadata("design:type", Object)
63
+ ], PerpEvent.prototype, "event", void 0);
64
+ exports.PerpEvent = PerpEvent = __decorate([
65
+ (0, swagger_1.ApiExtraModels)(L2BookPerpEvent, TradesPerpEvent)
66
+ ], PerpEvent);
@@ -41,6 +41,7 @@ export * from "./notification-template.enum";
41
41
  export * from "./offers.enum";
42
42
  export * from "./order-by-column.enum";
43
43
  export * from "./payment-provider.enum";
44
+ export * from "./perp.enum";
44
45
  export * from "./purchase-type.enum";
45
46
  export * from "./push-notification.enum";
46
47
  export * from "./role.enum";
@@ -57,6 +57,7 @@ __exportStar(require("./notification-template.enum"), exports);
57
57
  __exportStar(require("./offers.enum"), exports);
58
58
  __exportStar(require("./order-by-column.enum"), exports);
59
59
  __exportStar(require("./payment-provider.enum"), exports);
60
+ __exportStar(require("./perp.enum"), exports);
60
61
  __exportStar(require("./purchase-type.enum"), exports);
61
62
  __exportStar(require("./push-notification.enum"), exports);
62
63
  __exportStar(require("./role.enum"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum PerpEnum {
2
+ L2BOOK = "l2Book",
3
+ TRADES = "trades"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PerpEnum = void 0;
4
+ var PerpEnum;
5
+ (function (PerpEnum) {
6
+ PerpEnum["L2BOOK"] = "l2Book";
7
+ PerpEnum["TRADES"] = "trades";
8
+ })(PerpEnum || (exports.PerpEnum = PerpEnum = {}));
package/dist/index.d.ts CHANGED
@@ -130,6 +130,7 @@ export * from './entities/notification-data/notification-success-response.dto';
130
130
  export * from './entities/notification-data/notification-template';
131
131
  export * from './entities/notification-data/push-notification.doc';
132
132
  export * from './entities/notification-data/tag-priority';
133
+ export * from './entities/perp/websocket';
133
134
  export * from './entities/search-data/collection-data-search.type';
134
135
  export * from './entities/search-data/event-guest-data-search.type';
135
136
  export * from './entities/search-data/event-guest-invitation-search.type';
package/dist/index.js CHANGED
@@ -146,6 +146,7 @@ __exportStar(require("./entities/notification-data/notification-success-response
146
146
  __exportStar(require("./entities/notification-data/notification-template"), exports);
147
147
  __exportStar(require("./entities/notification-data/push-notification.doc"), exports);
148
148
  __exportStar(require("./entities/notification-data/tag-priority"), exports);
149
+ __exportStar(require("./entities/perp/websocket"), exports);
149
150
  __exportStar(require("./entities/search-data/collection-data-search.type"), exports);
150
151
  __exportStar(require("./entities/search-data/event-guest-data-search.type"), exports);
151
152
  __exportStar(require("./entities/search-data/event-guest-invitation-search.type"), exports);
@@ -226,6 +227,7 @@ __exportStar(require("./enums/notification-template.enum"), exports);
226
227
  __exportStar(require("./enums/offers.enum"), exports);
227
228
  __exportStar(require("./enums/order-by-column.enum"), exports);
228
229
  __exportStar(require("./enums/payment-provider.enum"), exports);
230
+ __exportStar(require("./enums/perp.enum"), exports);
229
231
  __exportStar(require("./enums/purchase-type.enum"), exports);
230
232
  __exportStar(require("./enums/push-notification.enum"), exports);
231
233
  __exportStar(require("./enums/role.enum"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.263",
3
+ "version": "1.0.265",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {
@@ -47,6 +47,7 @@
47
47
  "@azure/cosmos": "^4.5.0",
48
48
  "@multiversx/sdk-nestjs-common": "^6.0.0",
49
49
  "@nestjs/common": "^11.1.5",
50
+ "@nestjs/core": "^11.1.6",
50
51
  "@nestjs/swagger": "^11.2.0",
51
52
  "@types/node": "^24.0.15",
52
53
  "@typescript-eslint/eslint-plugin": "^8.38.0",
@@ -58,8 +59,10 @@
58
59
  "eslint-plugin-prettier": "^5.5.3",
59
60
  "glob": "^11.0.3",
60
61
  "prettier": "^3.6.2",
62
+ "reflect-metadata": "^0.2.2",
61
63
  "rollup": "^4.45.1",
62
64
  "rollup-plugin-dts": "^6.2.1",
65
+ "rxjs": "^7.8.2",
63
66
  "typescript": "^5.8.3",
64
67
  "typescript-eslint": "^8.38.0",
65
68
  "uuid": "^11.1.0"