@xoxno/types 1.0.58 → 1.0.60
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.
|
@@ -4,6 +4,12 @@ export declare class CosmosPaginatedResponse<T> {
|
|
|
4
4
|
resources: T[];
|
|
5
5
|
constructor(resources: T[], count: number | null, hasMoreResults: boolean);
|
|
6
6
|
}
|
|
7
|
+
export declare class CosmosPaginatedSingleResponse<T> {
|
|
8
|
+
count: number | null;
|
|
9
|
+
hasMoreResults: boolean;
|
|
10
|
+
resources: T;
|
|
11
|
+
constructor(resources: T, count: number | null, hasMoreResults: boolean);
|
|
12
|
+
}
|
|
7
13
|
export declare function createCosmosPaginatedResponse<T>(type: new () => T): {
|
|
8
14
|
new (resources: T[], count: number | null, hasMoreResults: boolean): {
|
|
9
15
|
resources: T[];
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CosmosPaginatedResponse = void 0;
|
|
12
|
+
exports.CosmosPaginatedSingleResponse = exports.CosmosPaginatedResponse = void 0;
|
|
13
13
|
exports.createCosmosPaginatedResponse = createCosmosPaginatedResponse;
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
15
|
class CosmosPaginatedResponse {
|
|
@@ -44,6 +44,36 @@ __decorate([
|
|
|
44
44
|
}),
|
|
45
45
|
__metadata("design:type", Array)
|
|
46
46
|
], CosmosPaginatedResponse.prototype, "resources", void 0);
|
|
47
|
+
class CosmosPaginatedSingleResponse {
|
|
48
|
+
constructor(resources, count, hasMoreResults) {
|
|
49
|
+
this.hasMoreResults = false;
|
|
50
|
+
this.resources = resources;
|
|
51
|
+
this.count = count;
|
|
52
|
+
this.hasMoreResults = hasMoreResults;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.CosmosPaginatedSingleResponse = CosmosPaginatedSingleResponse;
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)({
|
|
58
|
+
description: 'Total number of documents',
|
|
59
|
+
example: 100,
|
|
60
|
+
required: false,
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], CosmosPaginatedSingleResponse.prototype, "count", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, swagger_1.ApiProperty)({
|
|
66
|
+
description: 'Indicates if there are more documents available',
|
|
67
|
+
example: true,
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", Boolean)
|
|
70
|
+
], CosmosPaginatedSingleResponse.prototype, "hasMoreResults", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, swagger_1.ApiProperty)({
|
|
73
|
+
description: 'List of documents',
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], CosmosPaginatedSingleResponse.prototype, "resources", void 0);
|
|
47
77
|
function createCosmosPaginatedResponse(type) {
|
|
48
78
|
class PaginatedResponse extends CosmosPaginatedResponse {
|
|
49
79
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OwnerDto } from '../common/owner.dto';
|
|
2
2
|
import { GlobalSearchResourcesDto } from '../entities/search-data/search.dto';
|
|
3
|
-
import { CosmosPaginatedResponse } from './cosmos-db-paginated-response.dto';
|
|
3
|
+
import { CosmosPaginatedResponse, CosmosPaginatedSingleResponse } from './cosmos-db-paginated-response.dto';
|
|
4
4
|
import { NftActivityDocHydrated } from './documents/activity/nft-activity.doc';
|
|
5
5
|
import { ChatMessageDocHydrated } from './documents/chat/chat-message.doc';
|
|
6
6
|
import { UserBlockDocHydrated } from './documents/chat/user-block.doc';
|
|
@@ -17,7 +17,7 @@ export declare class EventReferralConfigPaginated extends CosmosPaginatedRespons
|
|
|
17
17
|
}
|
|
18
18
|
export declare class EventReferralPaginated extends CosmosPaginatedResponse<EventReferralDoc> {
|
|
19
19
|
}
|
|
20
|
-
export declare class GlobalSearchResourcesPaginated extends
|
|
20
|
+
export declare class GlobalSearchResourcesPaginated extends CosmosPaginatedSingleResponse<GlobalSearchResourcesDto> {
|
|
21
21
|
}
|
|
22
22
|
export declare class UserBlockPaginated extends CosmosPaginatedResponse<UserBlockDocHydrated> {
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@ export declare class UserConversationPaginated extends CosmosPaginatedResponse<U
|
|
|
26
26
|
export declare class ChatMessagePaginated extends CosmosPaginatedResponse<ChatMessageDocHydrated> {
|
|
27
27
|
receiver: OwnerDto;
|
|
28
28
|
}
|
|
29
|
-
export declare class
|
|
29
|
+
export declare class NftActivityPaginated extends CosmosPaginatedResponse<NftActivityDocHydrated> {
|
|
30
30
|
}
|
|
31
31
|
export declare class NftPaginated extends CosmosPaginatedResponse<NftHydrated> {
|
|
32
32
|
}
|
|
@@ -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.
|
|
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;
|
|
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
|
}
|
|
@@ -8,7 +8,7 @@ exports.EventReferralConfigPaginated = EventReferralConfigPaginated;
|
|
|
8
8
|
class EventReferralPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
9
9
|
}
|
|
10
10
|
exports.EventReferralPaginated = EventReferralPaginated;
|
|
11
|
-
class GlobalSearchResourcesPaginated extends cosmos_db_paginated_response_dto_1.
|
|
11
|
+
class GlobalSearchResourcesPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedSingleResponse {
|
|
12
12
|
}
|
|
13
13
|
exports.GlobalSearchResourcesPaginated = GlobalSearchResourcesPaginated;
|
|
14
14
|
class UserBlockPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
@@ -20,9 +20,9 @@ exports.UserConversationPaginated = UserConversationPaginated;
|
|
|
20
20
|
class ChatMessagePaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
21
21
|
}
|
|
22
22
|
exports.ChatMessagePaginated = ChatMessagePaginated;
|
|
23
|
-
class
|
|
23
|
+
class NftActivityPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
24
24
|
}
|
|
25
|
-
exports.
|
|
25
|
+
exports.NftActivityPaginated = NftActivityPaginated;
|
|
26
26
|
class NftPaginated extends cosmos_db_paginated_response_dto_1.CosmosPaginatedResponse {
|
|
27
27
|
}
|
|
28
28
|
exports.NftPaginated = NftPaginated;
|