@heliofi/common 0.0.6 → 0.0.7

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.
Files changed (145) hide show
  1. package/dist/src/domain/model/paylink-tx/entities/BasePaylinkTx.d.ts +1 -0
  2. package/dist/src/domain/model/paylink-tx/entities/BasePaylinkTx.js.map +1 -1
  3. package/dist/src/domain/model/paylink-tx/entities/PaylinkTxWithShallowEnrichedPaylink.d.ts +3 -0
  4. package/dist/src/domain/model/paylink-tx/entities/PaylinkTxWithShallowEnrichedPaylink.js.map +1 -1
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/package.json +2 -2
  7. package/src/__tests__/index.test.ts +5 -0
  8. package/src/domain/constants/index.ts +2 -0
  9. package/src/domain/index.ts +3 -0
  10. package/src/domain/model/apiKey/dtos/createApiKeyDto.ts +15 -0
  11. package/src/domain/model/apiKey/dtos/index.ts +2 -0
  12. package/src/domain/model/apiKey/dtos/updateApiKeyDto.ts +11 -0
  13. package/src/domain/model/apiKey/entities/ApiKey.ts +11 -0
  14. package/src/domain/model/apiKey/entities/index.ts +1 -0
  15. package/src/domain/model/apiKey/index.ts +2 -0
  16. package/src/domain/model/approve-transaction/dtos/approveTransactionDto.ts +62 -0
  17. package/src/domain/model/approve-transaction/dtos/index.ts +1 -0
  18. package/src/domain/model/approve-transaction/index.ts +1 -0
  19. package/src/domain/model/attachment/dtos/createAttachmentDto.ts +22 -0
  20. package/src/domain/model/attachment/dtos/index.ts +1 -0
  21. package/src/domain/model/attachment/entities/Attachment.ts +6 -0
  22. package/src/domain/model/attachment/entities/AttachmentType.enum.ts +3 -0
  23. package/src/domain/model/attachment/entities/BaseAttachment.ts +11 -0
  24. package/src/domain/model/attachment/entities/ShallowEnrichedAttachment.ts +6 -0
  25. package/src/domain/model/attachment/entities/index.ts +4 -0
  26. package/src/domain/model/attachment/index.ts +2 -0
  27. package/src/domain/model/auth/dtos/index.ts +1 -0
  28. package/src/domain/model/auth/dtos/signOnDto.ts +14 -0
  29. package/src/domain/model/auth/entities/AuthResponse.ts +9 -0
  30. package/src/domain/model/auth/entities/AuthUser.ts +13 -0
  31. package/src/domain/model/auth/entities/index.ts +2 -0
  32. package/src/domain/model/auth/index.ts +2 -0
  33. package/src/domain/model/blockchain/constants/Cluster.ts +5 -0
  34. package/src/domain/model/blockchain/constants/index.ts +1 -0
  35. package/src/domain/model/blockchain/dtos/blockchainDto.ts +11 -0
  36. package/src/domain/model/blockchain/dtos/index.ts +1 -0
  37. package/src/domain/model/blockchain/entities/Blockchain.ts +9 -0
  38. package/src/domain/model/blockchain/entities/index.ts +1 -0
  39. package/src/domain/model/blockchain/index.ts +3 -0
  40. package/src/domain/model/company/dtos/createCompanyDto.ts +29 -0
  41. package/src/domain/model/company/dtos/index.ts +2 -0
  42. package/src/domain/model/company/dtos/updateCompanyDto.ts +29 -0
  43. package/src/domain/model/company/entities/Company.ts +18 -0
  44. package/src/domain/model/company/entities/index.ts +1 -0
  45. package/src/domain/model/company/index.ts +2 -0
  46. package/src/domain/model/content/dtos/contentDto.ts +11 -0
  47. package/src/domain/model/content/dtos/index.ts +1 -0
  48. package/src/domain/model/content/entities/Content.ts +7 -0
  49. package/src/domain/model/content/entities/index.ts +1 -0
  50. package/src/domain/model/content/index.ts +2 -0
  51. package/src/domain/model/currency/dtos/createCurrency.ts +33 -0
  52. package/src/domain/model/currency/dtos/index.ts +2 -0
  53. package/src/domain/model/currency/dtos/updateCurrency.ts +39 -0
  54. package/src/domain/model/currency/entities/BaseCurrency.ts +17 -0
  55. package/src/domain/model/currency/entities/Currency.ts +6 -0
  56. package/src/domain/model/currency/entities/index.ts +2 -0
  57. package/src/domain/model/currency/index.ts +2 -0
  58. package/src/domain/model/customer-details/dtos/CustomerDetailsDto.ts +32 -0
  59. package/src/domain/model/customer-details/dtos/index.ts +1 -0
  60. package/src/domain/model/customer-details/entities/CustomerDetails.ts +17 -0
  61. package/src/domain/model/customer-details/entities/index.ts +1 -0
  62. package/src/domain/model/customer-details/index.ts +2 -0
  63. package/src/domain/model/discordDetails/dtos/createDiscordDetails.ts +21 -0
  64. package/src/domain/model/discordDetails/dtos/index.ts +2 -0
  65. package/src/domain/model/discordDetails/dtos/updateDiscordDetails.ts +19 -0
  66. package/src/domain/model/discordDetails/entities/BaseDiscordDetails.ts +11 -0
  67. package/src/domain/model/discordDetails/entities/DiscordDetails.ts +6 -0
  68. package/src/domain/model/discordDetails/entities/index.ts +2 -0
  69. package/src/domain/model/discordDetails/index.ts +2 -0
  70. package/src/domain/model/email/dtos/emailDto.ts +46 -0
  71. package/src/domain/model/email/dtos/index.ts +1 -0
  72. package/src/domain/model/email/index.ts +1 -0
  73. package/src/domain/model/entity/Entity.ts +15 -0
  74. package/src/domain/model/entity/index.ts +1 -0
  75. package/src/domain/model/index.ts +21 -0
  76. package/src/domain/model/link-features/dtos/index.ts +1 -0
  77. package/src/domain/model/link-features/dtos/linkFeaturesDto.ts +39 -0
  78. package/src/domain/model/link-features/entities/LinkFeatures.ts +7 -0
  79. package/src/domain/model/link-features/entities/index.ts +1 -0
  80. package/src/domain/model/link-features/index.ts +2 -0
  81. package/src/domain/model/paylink/dtos/createPaylinkDto.ts +81 -0
  82. package/src/domain/model/paylink/dtos/index.ts +2 -0
  83. package/src/domain/model/paylink/dtos/updatePaylinkDto.ts +80 -0
  84. package/src/domain/model/paylink/entities/BasePaylink.ts +9 -0
  85. package/src/domain/model/paylink/entities/OnlyContentPaylink.ts +6 -0
  86. package/src/domain/model/paylink/entities/Paylink.ts +9 -0
  87. package/src/domain/model/paylink/entities/ShallowEnrichedPaylink.ts +9 -0
  88. package/src/domain/model/paylink/entities/index.ts +4 -0
  89. package/src/domain/model/paylink/index.ts +2 -0
  90. package/src/domain/model/paylink-tx/dtos/createPaylinkTxDto.ts +24 -0
  91. package/src/domain/model/paylink-tx/dtos/index.ts +2 -0
  92. package/src/domain/model/paylink-tx/dtos/updatePaylinkTxDto.ts +7 -0
  93. package/src/domain/model/paylink-tx/entities/BasePaylinkTx.ts +9 -0
  94. package/src/domain/model/paylink-tx/entities/PaylinkTx.ts +9 -0
  95. package/src/domain/model/paylink-tx/entities/PaylinkTxWithShallowEnrichedPaylink.ts +15 -0
  96. package/src/domain/model/paylink-tx/entities/ShallowEnrichedPaylinkTx.ts +9 -0
  97. package/src/domain/model/paylink-tx/entities/index.ts +4 -0
  98. package/src/domain/model/paylink-tx/index.ts +2 -0
  99. package/src/domain/model/payment-request/entities/BasePaymentRequest.ts +21 -0
  100. package/src/domain/model/payment-request/entities/PaymentRequest.ts +15 -0
  101. package/src/domain/model/payment-request/entities/ShallowEnrichedPaymentRequest.ts +15 -0
  102. package/src/domain/model/payment-request/entities/index.ts +3 -0
  103. package/src/domain/model/payment-request/index.ts +1 -0
  104. package/src/domain/model/payment-request-features/entities/PaymentRequestFeatures.ts +17 -0
  105. package/src/domain/model/payment-request-features/entities/index.ts +1 -0
  106. package/src/domain/model/payment-request-features/index.ts +1 -0
  107. package/src/domain/model/role/dtos/createRoleDto.ts +20 -0
  108. package/src/domain/model/role/dtos/index.ts +2 -0
  109. package/src/domain/model/role/dtos/updateRoleDto.ts +10 -0
  110. package/src/domain/model/role/entities/BaseRole.ts +8 -0
  111. package/src/domain/model/role/entities/Role.ts +9 -0
  112. package/src/domain/model/role/entities/RoleType.ts +5 -0
  113. package/src/domain/model/role/entities/ShallowEnrichedRole.ts +9 -0
  114. package/src/domain/model/role/entities/index.ts +4 -0
  115. package/src/domain/model/role/index.ts +2 -0
  116. package/src/domain/model/slug/dtos/index.ts +1 -0
  117. package/src/domain/model/slug/dtos/slug.ts +20 -0
  118. package/src/domain/model/slug/entities/Slug.ts +15 -0
  119. package/src/domain/model/slug/entities/SlugObjectType.ts +5 -0
  120. package/src/domain/model/slug/entities/index.ts +2 -0
  121. package/src/domain/model/slug/index.ts +2 -0
  122. package/src/domain/model/transaction-meta/dtos/CreateTransactionMetaDto.ts +34 -0
  123. package/src/domain/model/transaction-meta/dtos/index.ts +1 -0
  124. package/src/domain/model/transaction-meta/entities/BaseTransactionMeta.ts +16 -0
  125. package/src/domain/model/transaction-meta/entities/ShallowEnrichedTransactionMeta.ts +6 -0
  126. package/src/domain/model/transaction-meta/entities/TransactionMeta.ts +6 -0
  127. package/src/domain/model/transaction-meta/entities/index.ts +3 -0
  128. package/src/domain/model/transaction-meta/index.ts +2 -0
  129. package/src/domain/model/user/dtos/CreateUserDto.ts +19 -0
  130. package/src/domain/model/user/dtos/UpdateUserDto.ts +24 -0
  131. package/src/domain/model/user/dtos/index.ts +2 -0
  132. package/src/domain/model/user/entities/BaseUser.ts +13 -0
  133. package/src/domain/model/user/entities/ShallowEnrichedUser.ts +9 -0
  134. package/src/domain/model/user/entities/User.ts +9 -0
  135. package/src/domain/model/user/entities/index.ts +3 -0
  136. package/src/domain/model/user/index.ts +2 -0
  137. package/src/domain/model/wallet/dtos/UpdateWalletDto.ts +8 -0
  138. package/src/domain/model/wallet/dtos/index.ts +1 -0
  139. package/src/domain/model/wallet/entities/BaseWallet.ts +7 -0
  140. package/src/domain/model/wallet/entities/Wallet.ts +6 -0
  141. package/src/domain/model/wallet/entities/index.ts +2 -0
  142. package/src/domain/model/wallet/index.ts +2 -0
  143. package/src/domain/services/EmailService.ts +6 -0
  144. package/src/domain/services/index.ts +1 -0
  145. package/src/index.ts +1 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@heliofi/common",
3
3
  "private": false,
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "description": "Common package",
6
6
  "main": "dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -16,5 +16,5 @@
16
16
  "class-validator": "^0.13.2",
17
17
  "moment": "^2.29.4"
18
18
  },
19
- "gitHead": "b541a3ddd6422ba0ed738b87b542c9b71de80727"
19
+ "gitHead": "9eae10ae05d5c5c04aa816079f28ef5e4dee94f8"
20
20
  }
@@ -0,0 +1,5 @@
1
+ describe('test', () => {
2
+ it('should test', () => {
3
+ expect(true).toBe(true);
4
+ });
5
+ });
@@ -0,0 +1,2 @@
1
+ export const emailValidationRegExp =
2
+ /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/;
@@ -0,0 +1,3 @@
1
+ export * from './model';
2
+ export * from './constants';
3
+ export * from './services';
@@ -0,0 +1,15 @@
1
+ import { IsString, IsNumber, IsOptional, IsNotEmpty } from 'class-validator';
2
+
3
+ export class CreateApiKeyDto {
4
+ @IsString()
5
+ @IsNotEmpty()
6
+ secretHash: string;
7
+
8
+ @IsNumber()
9
+ @IsNotEmpty()
10
+ expiration: number;
11
+
12
+ @IsOptional()
13
+ @IsString()
14
+ publicKey?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ export * from './createApiKeyDto';
2
+ export * from './updateApiKeyDto';
@@ -0,0 +1,11 @@
1
+ import { IsString, IsNumber, IsOptional } from 'class-validator';
2
+
3
+ export class UpdateApiKeyDto {
4
+ @IsOptional()
5
+ @IsNumber()
6
+ expiration?: number;
7
+
8
+ @IsOptional()
9
+ @IsString()
10
+ publicKey?: string;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { Entity } from '../../entity';
2
+
3
+ export class ApiKey extends Entity {
4
+ id: string;
5
+
6
+ secretHash?: string;
7
+
8
+ expiration: number;
9
+
10
+ publicKey?: string;
11
+ }
@@ -0,0 +1 @@
1
+ export * from './ApiKey';
@@ -0,0 +1,2 @@
1
+ export * from './dtos';
2
+ export * from './entities';
@@ -0,0 +1,62 @@
1
+ import {
2
+ IsEmail,
3
+ IsNotEmpty,
4
+ IsNotEmptyObject,
5
+ IsNumber,
6
+ IsString,
7
+ ValidateNested,
8
+ } from 'class-validator';
9
+ import { ApiProperty } from '@nestjs/swagger';
10
+ import { Type } from 'class-transformer';
11
+ import { CustomerDetailsDto } from '../../customer-details';
12
+
13
+ export class ApproveTransactionDto {
14
+ @ApiProperty()
15
+ @IsString()
16
+ @IsNotEmpty()
17
+ transactionSignature: string;
18
+
19
+ @ApiProperty()
20
+ @IsString()
21
+ @IsNotEmpty()
22
+ paymentRequestId: string;
23
+
24
+ @ApiProperty()
25
+ @IsEmail()
26
+ @IsNotEmpty()
27
+ sender: string;
28
+
29
+ @ApiProperty()
30
+ @IsEmail()
31
+ @IsNotEmpty()
32
+ recipient: string;
33
+
34
+ @ApiProperty()
35
+ @IsNotEmpty()
36
+ amount: bigint;
37
+
38
+ @ApiProperty()
39
+ @IsNumber()
40
+ @IsNotEmpty()
41
+ quantity: number;
42
+
43
+ @ApiProperty()
44
+ @IsString()
45
+ @IsNotEmpty()
46
+ product: string;
47
+
48
+ @ApiProperty()
49
+ @IsString()
50
+ @IsNotEmpty()
51
+ currency: string;
52
+
53
+ @ApiProperty()
54
+ @IsString()
55
+ @IsNotEmpty()
56
+ time: string;
57
+
58
+ @IsNotEmptyObject()
59
+ @Type(() => CustomerDetailsDto)
60
+ @ValidateNested()
61
+ customerDetails: CustomerDetailsDto;
62
+ }
@@ -0,0 +1 @@
1
+ export { ApproveTransactionDto } from './approveTransactionDto';
@@ -0,0 +1 @@
1
+ export * from './dtos';
@@ -0,0 +1,22 @@
1
+ import { IsString, IsNotEmpty, IsOptional } from 'class-validator';
2
+ import { ApiProperty } from '@nestjs/swagger';
3
+
4
+ export class CreateAttachmentDto {
5
+ @ApiProperty()
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ name: string;
9
+
10
+ @ApiProperty({ type: 'string', format: 'binary' })
11
+ file: Express.Multer.File;
12
+
13
+ @ApiProperty()
14
+ @IsString()
15
+ @IsOptional()
16
+ attachableType: string;
17
+
18
+ @ApiProperty()
19
+ @IsString()
20
+ @IsOptional()
21
+ attachableId: string;
22
+ }
@@ -0,0 +1 @@
1
+ export * from './createAttachmentDto';
@@ -0,0 +1,6 @@
1
+ import type { User } from '../../user';
2
+ import { BaseAttachment } from './BaseAttachment';
3
+
4
+ export class Attachment extends BaseAttachment {
5
+ creator: User;
6
+ }
@@ -0,0 +1,3 @@
1
+ export enum AttachmentType {
2
+ IMAGE = 'IMAGE',
3
+ }
@@ -0,0 +1,11 @@
1
+ import { Entity } from '../../entity';
2
+
3
+ export class BaseAttachment extends Entity {
4
+ id: string;
5
+
6
+ name: string;
7
+
8
+ url: string;
9
+
10
+ type: string;
11
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseAttachment } from './BaseAttachment';
2
+ import type { BaseUser } from '../../user';
3
+
4
+ export class ShallowEnrichedAttachment extends BaseAttachment {
5
+ creator: BaseUser;
6
+ }
@@ -0,0 +1,4 @@
1
+ export * from './Attachment';
2
+ export * from './BaseAttachment';
3
+ export * from './ShallowEnrichedAttachment';
4
+ export * from './AttachmentType.enum';
@@ -0,0 +1,2 @@
1
+ export * from './entities';
2
+ export * from './dtos';
@@ -0,0 +1 @@
1
+ export * from './signOnDto';
@@ -0,0 +1,14 @@
1
+ import { IsNotEmpty, IsString } from 'class-validator';
2
+ import { ApiProperty } from '@nestjs/swagger';
3
+
4
+ export class SignOnDto {
5
+ @ApiProperty()
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ publicKey: string;
9
+
10
+ @ApiProperty()
11
+ @IsString()
12
+ @IsNotEmpty()
13
+ signature: string;
14
+ }
@@ -0,0 +1,9 @@
1
+ export class AuthResponse {
2
+ id: string;
3
+
4
+ token: string;
5
+
6
+ email?: string;
7
+
8
+ name?: string;
9
+ }
@@ -0,0 +1,13 @@
1
+ import { RoleType } from '../../role';
2
+
3
+ export interface JwtUserRole {
4
+ id: string;
5
+ company: string;
6
+ type: RoleType;
7
+ }
8
+
9
+ export interface AuthUser {
10
+ id: string;
11
+ roles: JwtUserRole[];
12
+ email?: string;
13
+ }
@@ -0,0 +1,2 @@
1
+ export * from './AuthResponse';
2
+ export * from './AuthUser';
@@ -0,0 +1,2 @@
1
+ export * from './dtos';
2
+ export * from './entities';
@@ -0,0 +1,5 @@
1
+ export enum Cluster {
2
+ DEV_NET = 'DEV_NET',
3
+ TEST_NET = 'TEST_NET',
4
+ MAIN_NET = 'MAIN_NET',
5
+ }
@@ -0,0 +1 @@
1
+ export * from './Cluster';
@@ -0,0 +1,11 @@
1
+ import { IsNotEmpty, IsString } from 'class-validator';
2
+
3
+ export class BlockchainDto {
4
+ @IsString()
5
+ @IsNotEmpty()
6
+ name: string;
7
+
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ symbol: string;
11
+ }
@@ -0,0 +1 @@
1
+ export * from './blockchainDto';
@@ -0,0 +1,9 @@
1
+ import { Entity } from '../../entity';
2
+
3
+ export class Blockchain extends Entity {
4
+ id: string;
5
+
6
+ name: string;
7
+
8
+ symbol: string;
9
+ }
@@ -0,0 +1 @@
1
+ export * from './Blockchain';
@@ -0,0 +1,3 @@
1
+ export * from './dtos';
2
+ export * from './entities';
3
+ export * from './constants';
@@ -0,0 +1,29 @@
1
+ import { IsString, IsOptional, IsNotEmpty } from 'class-validator';
2
+ import { ApiProperty } from '@nestjs/swagger';
3
+
4
+ export class CreateCompanyDto {
5
+ @ApiProperty()
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ name: string;
9
+
10
+ @ApiProperty()
11
+ @IsOptional()
12
+ @IsString()
13
+ logoId?: string;
14
+
15
+ @ApiProperty()
16
+ @IsOptional()
17
+ @IsString()
18
+ websiteUrl?: string;
19
+
20
+ @ApiProperty()
21
+ @IsOptional()
22
+ @IsString()
23
+ twitterUsername?: string;
24
+
25
+ @ApiProperty()
26
+ @IsOptional()
27
+ @IsString()
28
+ discordUsername?: string;
29
+ }
@@ -0,0 +1,2 @@
1
+ export * from './createCompanyDto';
2
+ export * from './updateCompanyDto';
@@ -0,0 +1,29 @@
1
+ import { IsOptional, IsString } from 'class-validator';
2
+ import { ApiProperty } from '@nestjs/swagger';
3
+
4
+ export class UpdateCompanyDto {
5
+ @ApiProperty()
6
+ @IsOptional()
7
+ @IsString()
8
+ name?: string;
9
+
10
+ @ApiProperty()
11
+ @IsOptional()
12
+ @IsString()
13
+ logoId?: string;
14
+
15
+ @ApiProperty()
16
+ @IsOptional()
17
+ @IsString()
18
+ websiteUrl?: string;
19
+
20
+ @ApiProperty()
21
+ @IsOptional()
22
+ @IsString()
23
+ twitterUsername?: string;
24
+
25
+ @ApiProperty()
26
+ @IsOptional()
27
+ @IsString()
28
+ discordUsername?: string;
29
+ }
@@ -0,0 +1,18 @@
1
+ import { ApiKey } from '../../apiKey';
2
+ import { Entity } from '../../entity';
3
+
4
+ export class Company extends Entity {
5
+ id: string;
6
+
7
+ name: string;
8
+
9
+ logoId?: string;
10
+
11
+ websiteUrl?: string;
12
+
13
+ twitterUsername?: string;
14
+
15
+ discordUsername?: string;
16
+
17
+ apiKeys?: ApiKey[];
18
+ }
@@ -0,0 +1 @@
1
+ export * from './Company';
@@ -0,0 +1,2 @@
1
+ export * from './dtos';
2
+ export * from './entities';
@@ -0,0 +1,11 @@
1
+ import { IsOptional, IsString } from 'class-validator';
2
+
3
+ export class ContentDto {
4
+ @IsString()
5
+ @IsOptional()
6
+ text?: string;
7
+
8
+ @IsString()
9
+ @IsOptional()
10
+ imageUrl?: string;
11
+ }
@@ -0,0 +1 @@
1
+ export * from './contentDto';
@@ -0,0 +1,7 @@
1
+ import { Entity } from '../../entity';
2
+
3
+ export class Content extends Entity {
4
+ text: string;
5
+
6
+ imageUrl: string;
7
+ }
@@ -0,0 +1 @@
1
+ export * from './Content';
@@ -0,0 +1,2 @@
1
+ export * from './dtos';
2
+ export * from './entities';
@@ -0,0 +1,33 @@
1
+ import { IsOptional, IsString, IsNumber } from 'class-validator';
2
+ import { ApiProperty } from '@nestjs/swagger';
3
+
4
+ export class CreateCurrencyDto {
5
+ @ApiProperty()
6
+ @IsString()
7
+ symbol: string;
8
+
9
+ @ApiProperty()
10
+ @IsString()
11
+ name: string;
12
+
13
+ @ApiProperty()
14
+ @IsString()
15
+ mintAddress: string;
16
+
17
+ @ApiProperty()
18
+ @IsString()
19
+ blockchain: string;
20
+
21
+ @ApiProperty()
22
+ @IsNumber()
23
+ decimals: number;
24
+
25
+ @ApiProperty()
26
+ @IsOptional()
27
+ @IsString()
28
+ symbolPrefix?: string;
29
+
30
+ @ApiProperty()
31
+ @IsNumber()
32
+ order: number;
33
+ }
@@ -0,0 +1,2 @@
1
+ export * from './createCurrency';
2
+ export * from './updateCurrency';
@@ -0,0 +1,39 @@
1
+ import { IsOptional, IsString, IsNumber } from 'class-validator';
2
+ import { ApiProperty } from '@nestjs/swagger';
3
+
4
+ export class UpdateCurrencyDto {
5
+ @ApiProperty()
6
+ @IsOptional()
7
+ @IsString()
8
+ symbol?: string;
9
+
10
+ @ApiProperty()
11
+ @IsOptional()
12
+ @IsString()
13
+ name?: string;
14
+
15
+ @ApiProperty()
16
+ @IsOptional()
17
+ @IsString()
18
+ mintAddress?: string;
19
+
20
+ @ApiProperty()
21
+ @IsOptional()
22
+ @IsString()
23
+ blockchain?: string;
24
+
25
+ @ApiProperty()
26
+ @IsOptional()
27
+ @IsNumber()
28
+ decimals?: number;
29
+
30
+ @ApiProperty()
31
+ @IsOptional()
32
+ @IsString()
33
+ symbolPrefix?: string;
34
+
35
+ @ApiProperty()
36
+ @IsOptional()
37
+ @IsNumber()
38
+ order?: number;
39
+ }
@@ -0,0 +1,17 @@
1
+ import { Entity } from '../../entity';
2
+
3
+ export class BaseCurrency extends Entity {
4
+ id: string;
5
+
6
+ symbol: string;
7
+
8
+ name: string;
9
+
10
+ mintAddress: string;
11
+
12
+ decimals: number;
13
+
14
+ symbolPrefix?: string;
15
+
16
+ order: number;
17
+ }
@@ -0,0 +1,6 @@
1
+ import { Blockchain } from '../../blockchain';
2
+ import { BaseCurrency } from './BaseCurrency';
3
+
4
+ export class Currency extends BaseCurrency {
5
+ blockchain: Blockchain;
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Currency';
2
+ export * from './BaseCurrency';
@@ -0,0 +1,2 @@
1
+ export * from './dtos';
2
+ export * from './entities';
@@ -0,0 +1,32 @@
1
+ import { IsEmail, IsOptional, IsString } from 'class-validator';
2
+
3
+ export class CustomerDetailsDto {
4
+ @IsString()
5
+ @IsOptional()
6
+ @IsEmail()
7
+ email?: string;
8
+
9
+ @IsString()
10
+ @IsOptional()
11
+ discordUsername?: string;
12
+
13
+ @IsString()
14
+ @IsOptional()
15
+ twitterUsername?: string;
16
+
17
+ @IsString()
18
+ @IsOptional()
19
+ fullName?: string;
20
+
21
+ @IsString()
22
+ @IsOptional()
23
+ country?: string;
24
+
25
+ @IsString()
26
+ @IsOptional()
27
+ deliveryAddress?: string;
28
+
29
+ @IsString()
30
+ @IsOptional()
31
+ phoneNumber?: string;
32
+ }
@@ -0,0 +1 @@
1
+ export * from './CustomerDetailsDto';
@@ -0,0 +1,17 @@
1
+ import { Entity } from '../../entity';
2
+
3
+ export class CustomerDetails extends Entity {
4
+ email?: string;
5
+
6
+ discordUsername?: string;
7
+
8
+ twitterUsername?: string;
9
+
10
+ fullName?: string;
11
+
12
+ country?: string;
13
+
14
+ deliveryAddress?: string;
15
+
16
+ phoneNumber?: string;
17
+ }
@@ -0,0 +1 @@
1
+ export * from './CustomerDetails';
@@ -0,0 +1,2 @@
1
+ export * from './entities';
2
+ export * from './dtos';
@@ -0,0 +1,21 @@
1
+ import { IsOptional, IsString, IsBoolean } from 'class-validator';
2
+ import { ApiProperty } from '@nestjs/swagger';
3
+
4
+ export class CreateDiscordDetailsDto {
5
+ @ApiProperty()
6
+ @IsString()
7
+ serverId: string;
8
+
9
+ @ApiProperty()
10
+ @IsString()
11
+ roleId: string;
12
+
13
+ @ApiProperty()
14
+ @IsBoolean()
15
+ @IsOptional()
16
+ active?: boolean;
17
+
18
+ @ApiProperty()
19
+ @IsString()
20
+ company?: string;
21
+ }
@@ -0,0 +1,2 @@
1
+ export * from './createDiscordDetails';
2
+ export * from './updateDiscordDetails';