@xoxno/types 1.0.219 → 1.0.221

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.
@@ -14,6 +14,10 @@ export declare class TransferPolicy {
14
14
  rules: Rule[];
15
15
  is_origin_byte: boolean;
16
16
  }
17
+ export declare class CollectionFeatures {
18
+ isCustomOffersDisabled?: boolean;
19
+ isGlobalOffersDisabled?: boolean;
20
+ }
17
21
  export declare class CollectionProfileDoc {
18
22
  dataType: CollectionDataType;
19
23
  collection: string;
@@ -40,6 +44,7 @@ export declare class CollectionProfileDoc {
40
44
  pinnedAtDrops?: number;
41
45
  pinnedAt?: number;
42
46
  customConfig?: XoxnoMarketplaceScCollectionConfig;
47
+ features?: CollectionFeatures;
43
48
  royalty?: number;
44
49
  collectionSize?: number;
45
50
  holdersCount?: number;
@@ -54,4 +59,9 @@ export declare type CollectionProfileEditDto = CollectionProfileEditDto_base ;
54
59
  declare const CollectionProfileEditDtoNest_base: import("@nestjs/common").Type<Partial<Pick<CollectionProfileDoc, "description" | "name" | "socials">>>;
55
60
  export declare class CollectionProfileEditDtoNest extends CollectionProfileEditDtoNest_base {
56
61
  }
62
+ declare type CollectionFeaturesEditDto_base = Partial<CollectionFeatures>;
63
+ export declare type CollectionFeaturesEditDto = CollectionFeaturesEditDto_base ;
64
+ declare const CollectionFeaturesEditDtoNest_base: import("@nestjs/common").Type<Partial<CollectionFeatures>>;
65
+ export declare class CollectionFeaturesEditDtoNest extends CollectionFeaturesEditDtoNest_base {
66
+ }
57
67
  export {};
@@ -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.CollectionProfileEditDto = exports.CollectionProfileDoc = exports.TransferPolicy = exports.Rule = void 0;
12
+ exports.CollectionFeaturesEditDto = exports.CollectionProfileEditDto = exports.CollectionProfileDoc = exports.CollectionFeatures = exports.TransferPolicy = exports.Rule = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
@@ -52,6 +52,21 @@ __decorate([
52
52
  (0, swagger_1.ApiProperty)({ description: 'Transfer policy is origin byte' }),
53
53
  __metadata("design:type", Boolean)
54
54
  ], TransferPolicy.prototype, "is_origin_byte", void 0);
55
+ class CollectionFeatures {
56
+ }
57
+ exports.CollectionFeatures = CollectionFeatures;
58
+ __decorate([
59
+ (0, swagger_1.ApiProperty)({ required: false }),
60
+ (0, class_validator_1.IsBoolean)(),
61
+ (0, class_validator_1.IsOptional)(),
62
+ __metadata("design:type", Boolean)
63
+ ], CollectionFeatures.prototype, "isCustomOffersDisabled", void 0);
64
+ __decorate([
65
+ (0, swagger_1.ApiProperty)({ required: false }),
66
+ (0, class_validator_1.IsBoolean)(),
67
+ (0, class_validator_1.IsOptional)(),
68
+ __metadata("design:type", Boolean)
69
+ ], CollectionFeatures.prototype, "isGlobalOffersDisabled", void 0);
55
70
  class CollectionProfileDoc {
56
71
  constructor(props) {
57
72
  this.dataType = collection_enum_1.CollectionDataType.CollectionProfile;
@@ -291,6 +306,14 @@ __decorate([
291
306
  }),
292
307
  __metadata("design:type", collectionConfig_1.XoxnoMarketplaceScCollectionConfig)
293
308
  ], CollectionProfileDoc.prototype, "customConfig", void 0);
309
+ __decorate([
310
+ (0, swagger_1.ApiProperty)({
311
+ description: 'Custom features for the collection',
312
+ required: false,
313
+ type: CollectionFeatures,
314
+ }),
315
+ __metadata("design:type", CollectionFeatures)
316
+ ], CollectionProfileDoc.prototype, "features", void 0);
294
317
  __decorate([
295
318
  (0, swagger_1.ApiProperty)({
296
319
  description: 'Royalty of the collection',
@@ -345,5 +368,10 @@ __decorate([
345
368
  class CollectionProfileEditDto extends (0, swagger_1.PartialType)((0, swagger_1.PickType)(CollectionProfileDoc, ['description', 'name', 'socials'])) {
346
369
  }
347
370
  exports.CollectionProfileEditDto = CollectionProfileEditDto;
371
+ class CollectionFeaturesEditDto extends (0, swagger_1.PartialType)(CollectionFeatures) {
372
+ }
373
+ exports.CollectionFeaturesEditDto = CollectionFeaturesEditDto;
348
374
 
349
375
  exports.CollectionProfileEditDtoNest = CollectionProfileEditDto;
376
+
377
+ exports.CollectionFeaturesEditDtoNest = CollectionFeaturesEditDto;
@@ -1,7 +1,7 @@
1
1
  import { CollectionProfileDoc } from '../collection/profile';
2
- declare type ShortNftCollectionInfoDoc_base = Pick<CollectionProfileDoc, "description" | "profile" | "chain" | "followCount" | "holdersCount" | "name" | "isVisible" | "isVerified" | "banner" | "roles" | "customConfig" | "collectionSize">;
2
+ declare type ShortNftCollectionInfoDoc_base = Pick<CollectionProfileDoc, "description" | "profile" | "chain" | "followCount" | "holdersCount" | "name" | "isVisible" | "isVerified" | "banner" | "roles" | "customConfig" | "features" | "collectionSize">;
3
3
  export declare type ShortNftCollectionInfoDoc = ShortNftCollectionInfoDoc_base ;
4
- declare const ShortNftCollectionInfoDocNest_base: import("@nestjs/common").Type<Pick<CollectionProfileDoc, "description" | "profile" | "chain" | "followCount" | "holdersCount" | "name" | "isVisible" | "isVerified" | "banner" | "roles" | "customConfig" | "collectionSize">>;
4
+ declare const ShortNftCollectionInfoDocNest_base: import("@nestjs/common").Type<Pick<CollectionProfileDoc, "description" | "profile" | "chain" | "followCount" | "holdersCount" | "name" | "isVisible" | "isVerified" | "banner" | "roles" | "customConfig" | "features" | "collectionSize">>;
5
5
  export declare class ShortNftCollectionInfoDocNest extends ShortNftCollectionInfoDocNest_base {
6
6
  }
7
7
  export {};
@@ -17,6 +17,7 @@ class ShortNftCollectionInfoDoc extends (0, swagger_1.PickType)(profile_1.Collec
17
17
  'customConfig',
18
18
  'roles',
19
19
  'banner',
20
+ 'features',
20
21
  ]) {
21
22
  }
22
23
  exports.ShortNftCollectionInfoDoc = ShortNftCollectionInfoDoc;
@@ -11,7 +11,7 @@ export declare class CreatorProfileDoc {
11
11
  banner: string;
12
12
  joinedDate: number;
13
13
  description?: string;
14
- socials?: SocialsDto;
14
+ socials: SocialsDto;
15
15
  id?: string;
16
16
  _ts?: number;
17
17
  constructor(props?: Partial<CreatorProfileDoc>);
@@ -13,12 +13,15 @@ exports.CreatorProfileDoc = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const user_data_type_enum_1 = require("../../../enums/user-data-type.enum");
15
15
  const socials_1 = require("../../../common/socials");
16
+ const class_validator_1 = require("class-validator");
17
+ const class_transformer_1 = require("class-transformer");
16
18
  class CreatorProfileDoc {
17
19
  constructor(props) {
18
20
  this.dataType = user_data_type_enum_1.UserDataType.CreatorProfile;
19
21
  this.profile = 'https://media.xoxno.com/utils/defaultProfilePic.webp';
20
22
  this.banner = 'https://media.xoxno.com/utils/defaultBanner.webp';
21
23
  this.joinedDate = Math.floor(Date.now() / 1000);
24
+ this.socials = new socials_1.SocialsDto();
22
25
  Object.assign(this, props);
23
26
  this.id = `${this.address}-${this.dataType}`;
24
27
  }
@@ -40,6 +43,8 @@ __decorate([
40
43
  example: 'Awesome Creator',
41
44
  description: 'Creator name (editable by creator)',
42
45
  }),
46
+ (0, class_validator_1.IsString)(),
47
+ (0, class_validator_1.Length)(1, 300),
43
48
  __metadata("design:type", String)
44
49
  ], CreatorProfileDoc.prototype, "name", void 0);
45
50
  __decorate([
@@ -92,10 +97,19 @@ __decorate([
92
97
  description: 'Creator description',
93
98
  required: false,
94
99
  }),
100
+ (0, class_validator_1.IsString)(),
101
+ (0, class_validator_1.Length)(1, 300),
102
+ (0, class_validator_1.IsOptional)(),
95
103
  __metadata("design:type", String)
96
104
  ], CreatorProfileDoc.prototype, "description", void 0);
97
105
  __decorate([
98
- (0, swagger_1.ApiProperty)({ description: 'Creator social media links', required: false }),
106
+ (0, swagger_1.ApiProperty)({
107
+ description: 'Social media links for the creator',
108
+ type: () => socials_1.SocialsDto,
109
+ }),
110
+ (0, class_validator_1.ValidateNested)(),
111
+ (0, class_transformer_1.Type)(() => socials_1.SocialsDto),
112
+ (0, class_validator_1.IsObject)(),
99
113
  __metadata("design:type", socials_1.SocialsDto)
100
114
  ], CreatorProfileDoc.prototype, "socials", void 0);
101
115
  __decorate([
@@ -1,6 +1,7 @@
1
- import { SocialsDto } from '../../common/socials';
2
- export declare class EditUserCreatorProfileDto {
3
- description?: string;
4
- socials?: SocialsDto;
5
- name?: string;
1
+ import { CreatorProfileDoc } from '../../cosmos-db/documents/user/user-creator-profile.doc';
2
+ declare type CreatorProfileEditDto_base = Partial<Pick<CreatorProfileDoc, "description" | "name" | "socials">>;
3
+ export declare type CreatorProfileEditDto = CreatorProfileEditDto_base ;
4
+ declare const CreatorProfileEditDtoNest_base: import("@nestjs/common").Type<Partial<Pick<CreatorProfileDoc, "description" | "name" | "socials">>>;
5
+ export declare class CreatorProfileEditDtoNest extends CreatorProfileEditDtoNest_base {
6
6
  }
7
+ export {};
@@ -1,50 +1,10 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.EditUserCreatorProfileDto = void 0;
3
+ exports.CreatorProfileEditDto = void 0;
13
4
  const swagger_1 = require("@nestjs/swagger");
14
- const socials_1 = require("../../common/socials");
15
- const class_validator_1 = require("class-validator");
16
- class EditUserCreatorProfileDto {
5
+ const user_creator_profile_doc_1 = require("../../cosmos-db/documents/user/user-creator-profile.doc");
6
+ class CreatorProfileEditDto extends (0, swagger_1.PartialType)((0, swagger_1.PickType)(user_creator_profile_doc_1.CreatorProfileDoc, ['name', 'description', 'socials'])) {
17
7
  }
18
- exports.EditUserCreatorProfileDto = EditUserCreatorProfileDto;
19
- __decorate([
20
- (0, swagger_1.ApiProperty)({
21
- description: 'User description',
22
- maxLength: 300,
23
- example: 'I am a creator',
24
- required: false,
25
- }),
26
- (0, class_validator_1.IsString)(),
27
- (0, class_validator_1.Length)(1, 300),
28
- (0, class_validator_1.IsOptional)(),
29
- __metadata("design:type", String)
30
- ], EditUserCreatorProfileDto.prototype, "description", void 0);
31
- __decorate([
32
- (0, swagger_1.ApiProperty)({
33
- description: 'Social media profiles',
34
- required: false,
35
- }),
36
- (0, class_validator_1.IsObject)({ each: true }),
37
- (0, class_validator_1.IsOptional)(),
38
- __metadata("design:type", socials_1.SocialsDto)
39
- ], EditUserCreatorProfileDto.prototype, "socials", void 0);
40
- __decorate([
41
- (0, swagger_1.ApiProperty)({
42
- description: 'Creator name',
43
- maxLength: 30,
44
- example: 'Creator Name',
45
- required: false,
46
- }),
47
- (0, class_validator_1.IsString)(),
48
- (0, class_validator_1.Length)(1, 300),
49
- __metadata("design:type", String)
50
- ], EditUserCreatorProfileDto.prototype, "name", void 0);
8
+ exports.CreatorProfileEditDto = CreatorProfileEditDto;
9
+
10
+ exports.CreatorProfileEditDtoNest = CreatorProfileEditDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.219",
3
+ "version": "1.0.221",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {