@xoxno/types 1.0.68 → 1.0.72
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/cosmos-db/documents/notification/notification-data-type.enum.d.ts +4 -1
- package/dist/cosmos-db/documents/notification/notification-data-type.enum.js +3 -0
- package/dist/cosmos-db/documents/ticketing/event-registration.dto.d.ts +24 -0
- package/dist/cosmos-db/documents/ticketing/event-registration.dto.js +81 -0
- package/dist/cosmos-db/paginated-responses.d.ts +3 -0
- package/dist/cosmos-db/paginated-responses.js +4 -1
- package/dist/entities/notification-data/device-tag-storage.doc.d.ts +15 -0
- package/dist/entities/notification-data/device-tag-storage.doc.js +69 -0
- package/dist/entities/notification-data/event-notification.dto.d.ts +16 -0
- package/dist/entities/notification-data/event-notification.dto.js +132 -0
- package/dist/entities/notification-data/mobile-device-registration.dto.d.ts +13 -0
- package/dist/entities/notification-data/mobile-device-registration.dto.js +97 -0
- package/dist/entities/notification-data/mobile-device.doc.d.ts +23 -0
- package/dist/entities/notification-data/mobile-device.doc.js +110 -0
- package/dist/entities/notification-data/notification-success-response.dto.d.ts +4 -0
- package/dist/entities/notification-data/notification-success-response.dto.js +30 -0
- package/dist/entities/notification-data/notification-template.d.ts +36 -0
- package/dist/entities/notification-data/notification-template.js +206 -0
- package/dist/entities/notification-data/push-notification.doc.d.ts +64 -0
- package/dist/entities/notification-data/push-notification.doc.js +202 -0
- package/dist/entities/notification-data/tag-priority.d.ts +28 -0
- package/dist/entities/notification-data/tag-priority.js +97 -0
- package/dist/entities/transactions/transaction-create.d.ts +18 -0
- package/dist/entities/transactions/transaction-create.js +132 -0
- package/dist/entities/transactions/transaction-process-status.d.ts +6 -0
- package/dist/entities/transactions/transaction-process-status.js +36 -0
- package/dist/entities/transactions/transaction-send-result.d.ts +14 -0
- package/dist/entities/transactions/transaction-send-result.js +65 -0
- package/dist/entities/transactions/transaction.status.d.ts +7 -0
- package/dist/entities/transactions/transaction.status.js +11 -0
- package/dist/entities/xoxno-liquid-egld-sc/xoxno-egld-liquid-sc-event-name.enum.d.ts +24 -0
- package/dist/entities/xoxno-liquid-egld-sc/xoxno-egld-liquid-sc-event-name.enum.js +90 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/requests/collection/collection-attributes-map.d.ts +1 -2
- package/dist/requests/collection/collection-attributes-map.js +4 -1
- package/package.json +1 -1
|
@@ -4,4 +4,7 @@ exports.NotificationDataType = void 0;
|
|
|
4
4
|
var NotificationDataType;
|
|
5
5
|
(function (NotificationDataType) {
|
|
6
6
|
NotificationDataType["Notification"] = "notification";
|
|
7
|
+
NotificationDataType["PushNotification"] = "pushNotification";
|
|
8
|
+
NotificationDataType["MobileDevice"] = "mobileDevice";
|
|
9
|
+
NotificationDataType["DeviceTagStorage"] = "deviceTagStorage";
|
|
7
10
|
})(NotificationDataType || (exports.NotificationDataType = NotificationDataType = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventGuestDoc } from './event-guest.doc';
|
|
2
|
+
import { PaymentProvider } from '../external-payment/payment-provider.enum';
|
|
3
|
+
declare class TwispayPaymentFormData {
|
|
4
|
+
base64JsonRequest: string;
|
|
5
|
+
base64Checksum: PromiseLike<ArrayBuffer>;
|
|
6
|
+
}
|
|
7
|
+
declare class StripePaymentFormData {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
publicKey: string;
|
|
10
|
+
}
|
|
11
|
+
declare class FiatPaymentForm {
|
|
12
|
+
type: PaymentProvider;
|
|
13
|
+
data: TwispayPaymentFormData | StripePaymentFormData;
|
|
14
|
+
}
|
|
15
|
+
declare class CryptoPaymentResult {
|
|
16
|
+
signature: string;
|
|
17
|
+
data: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class EventRegistrationResponseDto {
|
|
20
|
+
guestDoc: EventGuestDoc;
|
|
21
|
+
fiatPaymentForm?: FiatPaymentForm;
|
|
22
|
+
cryptoPayment?: CryptoPaymentResult;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
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.EventRegistrationResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const event_guest_doc_1 = require("./event-guest.doc");
|
|
15
|
+
const payment_provider_enum_1 = require("../external-payment/payment-provider.enum");
|
|
16
|
+
class TwispayPaymentFormData {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], TwispayPaymentFormData.prototype, "base64JsonRequest", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)(),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], TwispayPaymentFormData.prototype, "base64Checksum", void 0);
|
|
26
|
+
class StripePaymentFormData {
|
|
27
|
+
}
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], StripePaymentFormData.prototype, "sessionId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], StripePaymentFormData.prototype, "publicKey", void 0);
|
|
36
|
+
let FiatPaymentForm = class FiatPaymentForm {
|
|
37
|
+
};
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
enum: payment_provider_enum_1.PaymentProvider,
|
|
41
|
+
enumName: 'PaymentProvider',
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], FiatPaymentForm.prototype, "type", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({
|
|
47
|
+
oneOf: [
|
|
48
|
+
{ $ref: '#/components/schemas/TwispayPaymentFormData' },
|
|
49
|
+
{ $ref: '#/components/schemas/StripePaymentFormData' },
|
|
50
|
+
],
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], FiatPaymentForm.prototype, "data", void 0);
|
|
54
|
+
FiatPaymentForm = __decorate([
|
|
55
|
+
(0, swagger_1.ApiExtraModels)(TwispayPaymentFormData, StripePaymentFormData)
|
|
56
|
+
], FiatPaymentForm);
|
|
57
|
+
class CryptoPaymentResult {
|
|
58
|
+
}
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiProperty)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], CryptoPaymentResult.prototype, "signature", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiProperty)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CryptoPaymentResult.prototype, "data", void 0);
|
|
67
|
+
class EventRegistrationResponseDto {
|
|
68
|
+
}
|
|
69
|
+
exports.EventRegistrationResponseDto = EventRegistrationResponseDto;
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, swagger_1.ApiProperty)({ type: () => event_guest_doc_1.EventGuestDoc }),
|
|
72
|
+
__metadata("design:type", event_guest_doc_1.EventGuestDoc)
|
|
73
|
+
], EventRegistrationResponseDto.prototype, "guestDoc", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiPropertyOptional)({ type: () => FiatPaymentForm }),
|
|
76
|
+
__metadata("design:type", FiatPaymentForm)
|
|
77
|
+
], EventRegistrationResponseDto.prototype, "fiatPaymentForm", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, swagger_1.ApiPropertyOptional)({ type: () => CryptoPaymentResult }),
|
|
80
|
+
__metadata("design:type", CryptoPaymentResult)
|
|
81
|
+
], EventRegistrationResponseDto.prototype, "cryptoPayment", void 0);
|
|
@@ -9,6 +9,7 @@ import { GlobalOfferDocHydrated } from './documents/collection/globalOffer';
|
|
|
9
9
|
import { CollectionMintProfileDocHydrated } from './documents/collection/mintProfile';
|
|
10
10
|
import { CollectionProfileDoc } from './documents/collection/profile';
|
|
11
11
|
import { CollectionStatsDocHydrated } from './documents/collection/stats';
|
|
12
|
+
import { NotificationDoc } from './documents/notification/notification.doc';
|
|
12
13
|
import { EventReferralConfigDoc } from './documents/ticketing/event-referral-config.doc';
|
|
13
14
|
import { EventReferralDoc } from './documents/ticketing/event-referral.doc';
|
|
14
15
|
import { NftHydrated } from './documents/token/nft-details.doc';
|
|
@@ -19,6 +20,8 @@ export declare class EventReferralPaginated extends CosmosPaginatedResponse<Even
|
|
|
19
20
|
}
|
|
20
21
|
export declare class GlobalSearchResourcesPaginated extends CosmosPaginatedSingleResponse<GlobalSearchResourcesDto> {
|
|
21
22
|
}
|
|
23
|
+
export declare class NotificationPaginated extends CosmosPaginatedResponse<NotificationDoc> {
|
|
24
|
+
}
|
|
22
25
|
export declare class UserBlockPaginated extends CosmosPaginatedResponse<UserBlockDocHydrated> {
|
|
23
26
|
}
|
|
24
27
|
export declare class UserConversationPaginated extends CosmosPaginatedResponse<UserConversationDocHydrated> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NftOfferPaginated = exports.CollectionStatsPaginated = exports.GlobalOfferPaginated = exports.CollectionMintProfilePaginated = exports.CollectionProfilePaginated = exports.NftPaginated = exports.NftActivityPaginated = exports.ChatMessagePaginated = exports.UserConversationPaginated = exports.UserBlockPaginated = exports.GlobalSearchResourcesPaginated = exports.EventReferralPaginated = exports.EventReferralConfigPaginated = void 0;
|
|
3
|
+
exports.NftOfferPaginated = exports.CollectionStatsPaginated = exports.GlobalOfferPaginated = exports.CollectionMintProfilePaginated = exports.CollectionProfilePaginated = exports.NftPaginated = exports.NftActivityPaginated = exports.ChatMessagePaginated = exports.UserConversationPaginated = exports.UserBlockPaginated = exports.NotificationPaginated = exports.GlobalSearchResourcesPaginated = exports.EventReferralPaginated = exports.EventReferralConfigPaginated = void 0;
|
|
4
4
|
const cosmos_db_paginated_response_dto_1 = require("./cosmos-db-paginated-response.dto");
|
|
5
5
|
class EventReferralConfigPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
6
6
|
}
|
|
@@ -11,6 +11,9 @@ exports.EventReferralPaginated = EventReferralPaginated;
|
|
|
11
11
|
class GlobalSearchResourcesPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedSingleResponse {
|
|
12
12
|
}
|
|
13
13
|
exports.GlobalSearchResourcesPaginated = GlobalSearchResourcesPaginated;
|
|
14
|
+
class NotificationPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
15
|
+
}
|
|
16
|
+
exports.NotificationPaginated = NotificationPaginated;
|
|
14
17
|
class UserBlockPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
15
18
|
}
|
|
16
19
|
exports.UserBlockPaginated = UserBlockPaginated;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PrioritizedTag } from './tag-priority';
|
|
2
|
+
export declare class DeviceTagStorageDoc {
|
|
3
|
+
dataType: string;
|
|
4
|
+
installationId: string;
|
|
5
|
+
web2UserId: string;
|
|
6
|
+
allTags: PrioritizedTag[];
|
|
7
|
+
activeTags: string[];
|
|
8
|
+
droppedTags: string[];
|
|
9
|
+
lastOptimized: number;
|
|
10
|
+
tagCount: number;
|
|
11
|
+
id?: string;
|
|
12
|
+
pk?: string;
|
|
13
|
+
_ts?: number;
|
|
14
|
+
constructor(props: Partial<DeviceTagStorageDoc>);
|
|
15
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.DeviceTagStorageDoc = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const notification_data_type_enum_1 = require("../../cosmos-db/documents/notification/notification-data-type.enum");
|
|
15
|
+
class DeviceTagStorageDoc {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
this.dataType = notification_data_type_enum_1.NotificationDataType.DeviceTagStorage;
|
|
18
|
+
Object.assign(this, props);
|
|
19
|
+
this.id = this.installationId;
|
|
20
|
+
this.pk = this.web2UserId;
|
|
21
|
+
this.lastOptimized = Math.floor(Date.now() / 1000);
|
|
22
|
+
this.tagCount = this.allTags?.length || 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.DeviceTagStorageDoc = DeviceTagStorageDoc;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], DeviceTagStorageDoc.prototype, "dataType", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], DeviceTagStorageDoc.prototype, "installationId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], DeviceTagStorageDoc.prototype, "web2UserId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({ type: () => Object, isArray: true }),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], DeviceTagStorageDoc.prototype, "allTags", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({ type: [String] }),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], DeviceTagStorageDoc.prototype, "activeTags", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({ type: [String] }),
|
|
48
|
+
__metadata("design:type", Array)
|
|
49
|
+
], DeviceTagStorageDoc.prototype, "droppedTags", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiProperty)(),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], DeviceTagStorageDoc.prototype, "lastOptimized", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiProperty)(),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], DeviceTagStorageDoc.prototype, "tagCount", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], DeviceTagStorageDoc.prototype, "id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], DeviceTagStorageDoc.prototype, "pk", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], DeviceTagStorageDoc.prototype, "_ts", void 0);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class EventNotificationDto {
|
|
2
|
+
title: string;
|
|
3
|
+
message: string;
|
|
4
|
+
imageUrl?: string;
|
|
5
|
+
eventId?: string;
|
|
6
|
+
targetUsers?: string[];
|
|
7
|
+
targetAddresses?: string[];
|
|
8
|
+
metadata?: Record<string, any>;
|
|
9
|
+
}
|
|
10
|
+
export declare class CreatorMarketingNotificationDto {
|
|
11
|
+
title: string;
|
|
12
|
+
message: string;
|
|
13
|
+
imageUrl?: string;
|
|
14
|
+
creatorAddress: string;
|
|
15
|
+
metadata?: Record<string, any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
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.CreatorMarketingNotificationDto = exports.EventNotificationDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class EventNotificationDto {
|
|
16
|
+
}
|
|
17
|
+
exports.EventNotificationDto = EventNotificationDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'Notification title',
|
|
21
|
+
example: 'Event Update',
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], EventNotificationDto.prototype, "title", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({
|
|
28
|
+
description: 'Notification message',
|
|
29
|
+
example: 'The event location has been updated!',
|
|
30
|
+
}),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], EventNotificationDto.prototype, "message", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)({
|
|
36
|
+
description: 'Optional image URL for the notification',
|
|
37
|
+
example: 'https://example.com/image.jpg',
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], EventNotificationDto.prototype, "imageUrl", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiProperty)({
|
|
46
|
+
description: 'Event ID for event-specific notifications',
|
|
47
|
+
example: 'event-123-456',
|
|
48
|
+
required: false,
|
|
49
|
+
}),
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], EventNotificationDto.prototype, "eventId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiProperty)({
|
|
56
|
+
description: 'Target specific user IDs (Web2 Firebase UIDs)',
|
|
57
|
+
example: ['user123', 'user456'],
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
(0, class_validator_1.IsArray)(),
|
|
62
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
63
|
+
__metadata("design:type", Array)
|
|
64
|
+
], EventNotificationDto.prototype, "targetUsers", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiProperty)({
|
|
67
|
+
description: 'Target specific wallet addresses',
|
|
68
|
+
example: ['erd1abc...', 'erd1def...'],
|
|
69
|
+
required: false,
|
|
70
|
+
}),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
(0, class_validator_1.IsArray)(),
|
|
73
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
74
|
+
__metadata("design:type", Array)
|
|
75
|
+
], EventNotificationDto.prototype, "targetAddresses", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiProperty)({
|
|
78
|
+
description: 'Additional metadata for the notification',
|
|
79
|
+
required: false,
|
|
80
|
+
}),
|
|
81
|
+
(0, class_validator_1.IsOptional)()
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
83
|
+
,
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], EventNotificationDto.prototype, "metadata", void 0);
|
|
86
|
+
class CreatorMarketingNotificationDto {
|
|
87
|
+
}
|
|
88
|
+
exports.CreatorMarketingNotificationDto = CreatorMarketingNotificationDto;
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, swagger_1.ApiProperty)({
|
|
91
|
+
description: 'Notification title',
|
|
92
|
+
example: 'New Event from Your Favorite Creator!',
|
|
93
|
+
}),
|
|
94
|
+
(0, class_validator_1.IsString)(),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], CreatorMarketingNotificationDto.prototype, "title", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, swagger_1.ApiProperty)({
|
|
99
|
+
description: 'Notification message',
|
|
100
|
+
example: 'Join us for an exciting new event next month!',
|
|
101
|
+
}),
|
|
102
|
+
(0, class_validator_1.IsString)(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], CreatorMarketingNotificationDto.prototype, "message", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, swagger_1.ApiProperty)({
|
|
107
|
+
description: 'Optional image URL for the notification',
|
|
108
|
+
example: 'https://example.com/event-image.jpg',
|
|
109
|
+
required: false,
|
|
110
|
+
}),
|
|
111
|
+
(0, class_validator_1.IsOptional)(),
|
|
112
|
+
(0, class_validator_1.IsString)(),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], CreatorMarketingNotificationDto.prototype, "imageUrl", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, swagger_1.ApiProperty)({
|
|
117
|
+
description: 'Creator wallet address to target past attendees',
|
|
118
|
+
example: 'erd1creator123...',
|
|
119
|
+
}),
|
|
120
|
+
(0, class_validator_1.IsString)(),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], CreatorMarketingNotificationDto.prototype, "creatorAddress", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, swagger_1.ApiProperty)({
|
|
125
|
+
description: 'Additional metadata for the notification',
|
|
126
|
+
required: false,
|
|
127
|
+
}),
|
|
128
|
+
(0, class_validator_1.IsOptional)()
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
130
|
+
,
|
|
131
|
+
__metadata("design:type", Object)
|
|
132
|
+
], CreatorMarketingNotificationDto.prototype, "metadata", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DevicePlatform } from './mobile-device.doc';
|
|
2
|
+
export declare class MobileDeviceRegistrationDto {
|
|
3
|
+
deviceUUID: string;
|
|
4
|
+
platform: DevicePlatform;
|
|
5
|
+
pushChannel: string;
|
|
6
|
+
appVersion: string;
|
|
7
|
+
deviceModel?: string;
|
|
8
|
+
osVersion?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class DeviceNotificationSettingsUpdateDto {
|
|
11
|
+
enabledTags?: string[];
|
|
12
|
+
disabledTags?: string[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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.DeviceNotificationSettingsUpdateDto = exports.MobileDeviceRegistrationDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const mobile_device_doc_1 = require("./mobile-device.doc");
|
|
16
|
+
class MobileDeviceRegistrationDto {
|
|
17
|
+
}
|
|
18
|
+
exports.MobileDeviceRegistrationDto = MobileDeviceRegistrationDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: 'Unique device identifier',
|
|
22
|
+
example: 'abc123-def456-ghi789',
|
|
23
|
+
}),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], MobileDeviceRegistrationDto.prototype, "deviceUUID", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: 'Device platform',
|
|
30
|
+
enum: mobile_device_doc_1.DevicePlatform,
|
|
31
|
+
enumName: 'DevicePlatform',
|
|
32
|
+
example: mobile_device_doc_1.DevicePlatform.IOS,
|
|
33
|
+
}),
|
|
34
|
+
(0, class_validator_1.IsEnum)(mobile_device_doc_1.DevicePlatform),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], MobileDeviceRegistrationDto.prototype, "platform", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiProperty)({
|
|
39
|
+
description: 'FCM token for Android or APNs token for iOS',
|
|
40
|
+
example: 'fcm-token-or-apns-token-here',
|
|
41
|
+
}),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], MobileDeviceRegistrationDto.prototype, "pushChannel", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({
|
|
47
|
+
description: 'App version',
|
|
48
|
+
example: '1.0.0',
|
|
49
|
+
}),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], MobileDeviceRegistrationDto.prototype, "appVersion", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)({
|
|
55
|
+
description: 'Device model',
|
|
56
|
+
example: 'iPhone 14 Pro',
|
|
57
|
+
required: false,
|
|
58
|
+
}),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], MobileDeviceRegistrationDto.prototype, "deviceModel", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiProperty)({
|
|
65
|
+
description: 'Operating system version',
|
|
66
|
+
example: 'iOS 17.0',
|
|
67
|
+
required: false,
|
|
68
|
+
}),
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], MobileDeviceRegistrationDto.prototype, "osVersion", void 0);
|
|
73
|
+
class DeviceNotificationSettingsUpdateDto {
|
|
74
|
+
}
|
|
75
|
+
exports.DeviceNotificationSettingsUpdateDto = DeviceNotificationSettingsUpdateDto;
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiProperty)({
|
|
78
|
+
description: 'Array of notification tags to enable for this device',
|
|
79
|
+
example: ['pref:eventUpdates', 'pref:eventMarketing'],
|
|
80
|
+
required: false,
|
|
81
|
+
}),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsArray)(),
|
|
84
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
85
|
+
__metadata("design:type", Array)
|
|
86
|
+
], DeviceNotificationSettingsUpdateDto.prototype, "enabledTags", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiProperty)({
|
|
89
|
+
description: 'Array of notification tags to disable for this device',
|
|
90
|
+
example: ['pref:eventMarketing'],
|
|
91
|
+
required: false,
|
|
92
|
+
}),
|
|
93
|
+
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
(0, class_validator_1.IsArray)(),
|
|
95
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
96
|
+
__metadata("design:type", Array)
|
|
97
|
+
], DeviceNotificationSettingsUpdateDto.prototype, "disabledTags", void 0);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum DevicePlatform {
|
|
2
|
+
IOS = "ios",
|
|
3
|
+
ANDROID = "android"
|
|
4
|
+
}
|
|
5
|
+
export declare class MobileDeviceDoc {
|
|
6
|
+
dataType: string;
|
|
7
|
+
deviceUUID: string;
|
|
8
|
+
installationId: string;
|
|
9
|
+
platform: DevicePlatform;
|
|
10
|
+
pushChannel: string;
|
|
11
|
+
web2UserId: string;
|
|
12
|
+
linkedAddresses: string[];
|
|
13
|
+
appVersion: string;
|
|
14
|
+
deviceModel?: string;
|
|
15
|
+
osVersion?: string;
|
|
16
|
+
registeredAt: number;
|
|
17
|
+
lastActiveAt: number;
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
id?: string;
|
|
20
|
+
pk?: string;
|
|
21
|
+
_ts?: number;
|
|
22
|
+
constructor(props: Partial<MobileDeviceDoc>);
|
|
23
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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.MobileDeviceDoc = exports.DevicePlatform = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const notification_data_type_enum_1 = require("../../cosmos-db/documents/notification/notification-data-type.enum");
|
|
15
|
+
var DevicePlatform;
|
|
16
|
+
(function (DevicePlatform) {
|
|
17
|
+
DevicePlatform["IOS"] = "ios";
|
|
18
|
+
DevicePlatform["ANDROID"] = "android";
|
|
19
|
+
})(DevicePlatform || (exports.DevicePlatform = DevicePlatform = {}));
|
|
20
|
+
class MobileDeviceDoc {
|
|
21
|
+
constructor(props) {
|
|
22
|
+
this.dataType = notification_data_type_enum_1.NotificationDataType.MobileDevice;
|
|
23
|
+
this.isActive = true;
|
|
24
|
+
Object.assign(this, props);
|
|
25
|
+
this.id = `${this.web2UserId}-${this.deviceUUID}`;
|
|
26
|
+
this.pk = this.web2UserId;
|
|
27
|
+
this.installationId = this.id;
|
|
28
|
+
this.registeredAt = Math.floor(Date.now() / 1000);
|
|
29
|
+
this.lastActiveAt = this.registeredAt;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.MobileDeviceDoc = MobileDeviceDoc;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({ description: 'Document type identifier' }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], MobileDeviceDoc.prototype, "dataType", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiProperty)({ description: 'Unique device identifier' }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], MobileDeviceDoc.prototype, "deviceUUID", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({ description: 'Azure Notification Hubs installation ID' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], MobileDeviceDoc.prototype, "installationId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({
|
|
47
|
+
enum: DevicePlatform,
|
|
48
|
+
enumName: 'DevicePlatform',
|
|
49
|
+
description: 'Mobile platform (iOS or Android)',
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], MobileDeviceDoc.prototype, "platform", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)({
|
|
55
|
+
description: 'Platform-specific push token (FCM for Android, APNS for iOS)',
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], MobileDeviceDoc.prototype, "pushChannel", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiProperty)({ description: 'Firebase user ID' }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], MobileDeviceDoc.prototype, "web2UserId", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiProperty)({
|
|
65
|
+
type: [String],
|
|
66
|
+
description: 'Blockchain addresses linked to this device',
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Array)
|
|
69
|
+
], MobileDeviceDoc.prototype, "linkedAddresses", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, swagger_1.ApiProperty)({ description: 'Mobile app version' }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], MobileDeviceDoc.prototype, "appVersion", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiProperty)({
|
|
76
|
+
required: false,
|
|
77
|
+
description: 'Device model (e.g., iPhone 14, Pixel 7)',
|
|
78
|
+
}),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], MobileDeviceDoc.prototype, "deviceModel", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, swagger_1.ApiProperty)({ required: false, description: 'Operating system version' }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], MobileDeviceDoc.prototype, "osVersion", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, swagger_1.ApiProperty)({ description: 'Unix timestamp when device was registered' }),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], MobileDeviceDoc.prototype, "registeredAt", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, swagger_1.ApiProperty)({ description: 'Unix timestamp of last device activity' }),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], MobileDeviceDoc.prototype, "lastActiveAt", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, swagger_1.ApiProperty)({
|
|
95
|
+
description: 'Whether the device is active for notifications',
|
|
96
|
+
}),
|
|
97
|
+
__metadata("design:type", Object)
|
|
98
|
+
], MobileDeviceDoc.prototype, "isActive", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], MobileDeviceDoc.prototype, "id", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], MobileDeviceDoc.prototype, "pk", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
109
|
+
__metadata("design:type", Number)
|
|
110
|
+
], MobileDeviceDoc.prototype, "_ts", void 0);
|