@heliofi/common 0.0.7 → 0.0.8

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 (140) hide show
  1. package/package.json +2 -2
  2. package/src/__tests__/index.test.ts +0 -5
  3. package/src/domain/constants/index.ts +0 -2
  4. package/src/domain/index.ts +0 -3
  5. package/src/domain/model/apiKey/dtos/createApiKeyDto.ts +0 -15
  6. package/src/domain/model/apiKey/dtos/index.ts +0 -2
  7. package/src/domain/model/apiKey/dtos/updateApiKeyDto.ts +0 -11
  8. package/src/domain/model/apiKey/entities/ApiKey.ts +0 -11
  9. package/src/domain/model/apiKey/entities/index.ts +0 -1
  10. package/src/domain/model/apiKey/index.ts +0 -2
  11. package/src/domain/model/approve-transaction/dtos/approveTransactionDto.ts +0 -62
  12. package/src/domain/model/approve-transaction/dtos/index.ts +0 -1
  13. package/src/domain/model/approve-transaction/index.ts +0 -1
  14. package/src/domain/model/attachment/dtos/createAttachmentDto.ts +0 -22
  15. package/src/domain/model/attachment/dtos/index.ts +0 -1
  16. package/src/domain/model/attachment/entities/Attachment.ts +0 -6
  17. package/src/domain/model/attachment/entities/AttachmentType.enum.ts +0 -3
  18. package/src/domain/model/attachment/entities/BaseAttachment.ts +0 -11
  19. package/src/domain/model/attachment/entities/ShallowEnrichedAttachment.ts +0 -6
  20. package/src/domain/model/attachment/entities/index.ts +0 -4
  21. package/src/domain/model/attachment/index.ts +0 -2
  22. package/src/domain/model/auth/dtos/index.ts +0 -1
  23. package/src/domain/model/auth/dtos/signOnDto.ts +0 -14
  24. package/src/domain/model/auth/entities/AuthResponse.ts +0 -9
  25. package/src/domain/model/auth/entities/AuthUser.ts +0 -13
  26. package/src/domain/model/auth/entities/index.ts +0 -2
  27. package/src/domain/model/auth/index.ts +0 -2
  28. package/src/domain/model/blockchain/constants/Cluster.ts +0 -5
  29. package/src/domain/model/blockchain/constants/index.ts +0 -1
  30. package/src/domain/model/blockchain/dtos/blockchainDto.ts +0 -11
  31. package/src/domain/model/blockchain/dtos/index.ts +0 -1
  32. package/src/domain/model/blockchain/entities/Blockchain.ts +0 -9
  33. package/src/domain/model/blockchain/entities/index.ts +0 -1
  34. package/src/domain/model/blockchain/index.ts +0 -3
  35. package/src/domain/model/company/dtos/createCompanyDto.ts +0 -29
  36. package/src/domain/model/company/dtos/index.ts +0 -2
  37. package/src/domain/model/company/dtos/updateCompanyDto.ts +0 -29
  38. package/src/domain/model/company/entities/Company.ts +0 -18
  39. package/src/domain/model/company/entities/index.ts +0 -1
  40. package/src/domain/model/company/index.ts +0 -2
  41. package/src/domain/model/content/dtos/contentDto.ts +0 -11
  42. package/src/domain/model/content/dtos/index.ts +0 -1
  43. package/src/domain/model/content/entities/Content.ts +0 -7
  44. package/src/domain/model/content/entities/index.ts +0 -1
  45. package/src/domain/model/content/index.ts +0 -2
  46. package/src/domain/model/currency/dtos/createCurrency.ts +0 -33
  47. package/src/domain/model/currency/dtos/index.ts +0 -2
  48. package/src/domain/model/currency/dtos/updateCurrency.ts +0 -39
  49. package/src/domain/model/currency/entities/BaseCurrency.ts +0 -17
  50. package/src/domain/model/currency/entities/Currency.ts +0 -6
  51. package/src/domain/model/currency/entities/index.ts +0 -2
  52. package/src/domain/model/currency/index.ts +0 -2
  53. package/src/domain/model/customer-details/dtos/CustomerDetailsDto.ts +0 -32
  54. package/src/domain/model/customer-details/dtos/index.ts +0 -1
  55. package/src/domain/model/customer-details/entities/CustomerDetails.ts +0 -17
  56. package/src/domain/model/customer-details/entities/index.ts +0 -1
  57. package/src/domain/model/customer-details/index.ts +0 -2
  58. package/src/domain/model/discordDetails/dtos/createDiscordDetails.ts +0 -21
  59. package/src/domain/model/discordDetails/dtos/index.ts +0 -2
  60. package/src/domain/model/discordDetails/dtos/updateDiscordDetails.ts +0 -19
  61. package/src/domain/model/discordDetails/entities/BaseDiscordDetails.ts +0 -11
  62. package/src/domain/model/discordDetails/entities/DiscordDetails.ts +0 -6
  63. package/src/domain/model/discordDetails/entities/index.ts +0 -2
  64. package/src/domain/model/discordDetails/index.ts +0 -2
  65. package/src/domain/model/email/dtos/emailDto.ts +0 -46
  66. package/src/domain/model/email/dtos/index.ts +0 -1
  67. package/src/domain/model/email/index.ts +0 -1
  68. package/src/domain/model/entity/Entity.ts +0 -15
  69. package/src/domain/model/entity/index.ts +0 -1
  70. package/src/domain/model/index.ts +0 -21
  71. package/src/domain/model/link-features/dtos/index.ts +0 -1
  72. package/src/domain/model/link-features/dtos/linkFeaturesDto.ts +0 -39
  73. package/src/domain/model/link-features/entities/LinkFeatures.ts +0 -7
  74. package/src/domain/model/link-features/entities/index.ts +0 -1
  75. package/src/domain/model/link-features/index.ts +0 -2
  76. package/src/domain/model/paylink/dtos/createPaylinkDto.ts +0 -81
  77. package/src/domain/model/paylink/dtos/index.ts +0 -2
  78. package/src/domain/model/paylink/dtos/updatePaylinkDto.ts +0 -80
  79. package/src/domain/model/paylink/entities/BasePaylink.ts +0 -9
  80. package/src/domain/model/paylink/entities/OnlyContentPaylink.ts +0 -6
  81. package/src/domain/model/paylink/entities/Paylink.ts +0 -9
  82. package/src/domain/model/paylink/entities/ShallowEnrichedPaylink.ts +0 -9
  83. package/src/domain/model/paylink/entities/index.ts +0 -4
  84. package/src/domain/model/paylink/index.ts +0 -2
  85. package/src/domain/model/paylink-tx/dtos/createPaylinkTxDto.ts +0 -24
  86. package/src/domain/model/paylink-tx/dtos/index.ts +0 -2
  87. package/src/domain/model/paylink-tx/dtos/updatePaylinkTxDto.ts +0 -7
  88. package/src/domain/model/paylink-tx/entities/BasePaylinkTx.ts +0 -9
  89. package/src/domain/model/paylink-tx/entities/PaylinkTx.ts +0 -9
  90. package/src/domain/model/paylink-tx/entities/PaylinkTxWithShallowEnrichedPaylink.ts +0 -15
  91. package/src/domain/model/paylink-tx/entities/ShallowEnrichedPaylinkTx.ts +0 -9
  92. package/src/domain/model/paylink-tx/entities/index.ts +0 -4
  93. package/src/domain/model/paylink-tx/index.ts +0 -2
  94. package/src/domain/model/payment-request/entities/BasePaymentRequest.ts +0 -21
  95. package/src/domain/model/payment-request/entities/PaymentRequest.ts +0 -15
  96. package/src/domain/model/payment-request/entities/ShallowEnrichedPaymentRequest.ts +0 -15
  97. package/src/domain/model/payment-request/entities/index.ts +0 -3
  98. package/src/domain/model/payment-request/index.ts +0 -1
  99. package/src/domain/model/payment-request-features/entities/PaymentRequestFeatures.ts +0 -17
  100. package/src/domain/model/payment-request-features/entities/index.ts +0 -1
  101. package/src/domain/model/payment-request-features/index.ts +0 -1
  102. package/src/domain/model/role/dtos/createRoleDto.ts +0 -20
  103. package/src/domain/model/role/dtos/index.ts +0 -2
  104. package/src/domain/model/role/dtos/updateRoleDto.ts +0 -10
  105. package/src/domain/model/role/entities/BaseRole.ts +0 -8
  106. package/src/domain/model/role/entities/Role.ts +0 -9
  107. package/src/domain/model/role/entities/RoleType.ts +0 -5
  108. package/src/domain/model/role/entities/ShallowEnrichedRole.ts +0 -9
  109. package/src/domain/model/role/entities/index.ts +0 -4
  110. package/src/domain/model/role/index.ts +0 -2
  111. package/src/domain/model/slug/dtos/index.ts +0 -1
  112. package/src/domain/model/slug/dtos/slug.ts +0 -20
  113. package/src/domain/model/slug/entities/Slug.ts +0 -15
  114. package/src/domain/model/slug/entities/SlugObjectType.ts +0 -5
  115. package/src/domain/model/slug/entities/index.ts +0 -2
  116. package/src/domain/model/slug/index.ts +0 -2
  117. package/src/domain/model/transaction-meta/dtos/CreateTransactionMetaDto.ts +0 -34
  118. package/src/domain/model/transaction-meta/dtos/index.ts +0 -1
  119. package/src/domain/model/transaction-meta/entities/BaseTransactionMeta.ts +0 -16
  120. package/src/domain/model/transaction-meta/entities/ShallowEnrichedTransactionMeta.ts +0 -6
  121. package/src/domain/model/transaction-meta/entities/TransactionMeta.ts +0 -6
  122. package/src/domain/model/transaction-meta/entities/index.ts +0 -3
  123. package/src/domain/model/transaction-meta/index.ts +0 -2
  124. package/src/domain/model/user/dtos/CreateUserDto.ts +0 -19
  125. package/src/domain/model/user/dtos/UpdateUserDto.ts +0 -24
  126. package/src/domain/model/user/dtos/index.ts +0 -2
  127. package/src/domain/model/user/entities/BaseUser.ts +0 -13
  128. package/src/domain/model/user/entities/ShallowEnrichedUser.ts +0 -9
  129. package/src/domain/model/user/entities/User.ts +0 -9
  130. package/src/domain/model/user/entities/index.ts +0 -3
  131. package/src/domain/model/user/index.ts +0 -2
  132. package/src/domain/model/wallet/dtos/UpdateWalletDto.ts +0 -8
  133. package/src/domain/model/wallet/dtos/index.ts +0 -1
  134. package/src/domain/model/wallet/entities/BaseWallet.ts +0 -7
  135. package/src/domain/model/wallet/entities/Wallet.ts +0 -6
  136. package/src/domain/model/wallet/entities/index.ts +0 -2
  137. package/src/domain/model/wallet/index.ts +0 -2
  138. package/src/domain/services/EmailService.ts +0 -6
  139. package/src/domain/services/index.ts +0 -1
  140. package/src/index.ts +0 -1
@@ -1,5 +0,0 @@
1
- export enum RoleType {
2
- ADMIN = 'ADMIN',
3
- WRITE = 'WRITE',
4
- READ = 'READ',
5
- }
@@ -1,9 +0,0 @@
1
- import type { Company } from '../../company';
2
- import { BaseRole } from './BaseRole';
3
- import type { BaseUser } from '../../user';
4
-
5
- export class ShallowEnrichedRole extends BaseRole {
6
- company: Company;
7
-
8
- user: BaseUser;
9
- }
@@ -1,4 +0,0 @@
1
- export * from './RoleType';
2
- export * from './Role';
3
- export * from './BaseRole';
4
- export * from './ShallowEnrichedRole';
@@ -1,2 +0,0 @@
1
- export * from './entities';
2
- export * from './dtos';
@@ -1 +0,0 @@
1
- export * from './slug';
@@ -1,20 +0,0 @@
1
- import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
2
- import { ApiProperty } from '@nestjs/swagger';
3
- import { SlugObjectType } from '../entities';
4
-
5
- export class SlugDto {
6
- @ApiProperty()
7
- @IsString()
8
- @IsNotEmpty()
9
- slug: string;
10
-
11
- @ApiProperty()
12
- @IsEnum(SlugObjectType)
13
- @IsNotEmpty()
14
- objectType: SlugObjectType;
15
-
16
- @ApiProperty()
17
- @IsString()
18
- @IsNotEmpty()
19
- objectId: string;
20
- }
@@ -1,15 +0,0 @@
1
- import { Entity } from '../../entity';
2
-
3
- export class Slug extends Entity {
4
- id: string;
5
-
6
- slug: string;
7
-
8
- objectType: string;
9
-
10
- objectId: string;
11
-
12
- active?: boolean;
13
-
14
- inactiveDate?: number;
15
- }
@@ -1,5 +0,0 @@
1
- export enum SlugObjectType {
2
- PAYLINK = 'PAYLINK',
3
- PAYSTREAM = 'PAYSTREAM',
4
- USER = 'USER',
5
- }
@@ -1,2 +0,0 @@
1
- export * from './Slug';
2
- export * from './SlugObjectType';
@@ -1,2 +0,0 @@
1
- export * from './dtos';
2
- export * from './entities';
@@ -1,34 +0,0 @@
1
- import { Type } from 'class-transformer';
2
- import {
3
- IsNotEmpty,
4
- IsNotEmptyObject,
5
- IsString,
6
- ValidateNested,
7
- } from 'class-validator';
8
- import { CustomerDetailsDto } from '../../customer-details';
9
-
10
- export class CreateTransactionMetaDto {
11
- @IsString()
12
- @IsNotEmpty()
13
- transactionSignature: string;
14
-
15
- @IsNotEmpty()
16
- amount: bigint;
17
-
18
- @IsString()
19
- @IsNotEmpty()
20
- currency: string;
21
-
22
- @IsString()
23
- @IsNotEmpty()
24
- recipientPK: string;
25
-
26
- @IsString()
27
- @IsNotEmpty()
28
- senderPK: string;
29
-
30
- @IsNotEmptyObject()
31
- @Type(() => CustomerDetailsDto)
32
- @ValidateNested()
33
- customerDetails: CustomerDetailsDto;
34
- }
@@ -1 +0,0 @@
1
- export * from './CreateTransactionMetaDto';
@@ -1,16 +0,0 @@
1
- import { CustomerDetails } from '../../customer-details';
2
- import { Entity } from '../../entity';
3
-
4
- export class BaseTransactionMeta extends Entity {
5
- id: string;
6
-
7
- transactionSignature: string;
8
-
9
- amount: bigint;
10
-
11
- recipientPK: string;
12
-
13
- senderPK: string;
14
-
15
- customerDetails: CustomerDetails;
16
- }
@@ -1,6 +0,0 @@
1
- import { BaseTransactionMeta } from './BaseTransactionMeta';
2
- import type { BaseCurrency } from '../../currency';
3
-
4
- export class ShallowEnrichedTransactionMeta extends BaseTransactionMeta {
5
- currency: BaseCurrency;
6
- }
@@ -1,6 +0,0 @@
1
- import type { Currency } from '../../currency';
2
- import { BaseTransactionMeta } from './BaseTransactionMeta';
3
-
4
- export class TransactionMeta extends BaseTransactionMeta {
5
- currency: Currency;
6
- }
@@ -1,3 +0,0 @@
1
- export * from './TransactionMeta';
2
- export * from './BaseTransactionMeta';
3
- export * from './ShallowEnrichedTransactionMeta';
@@ -1,2 +0,0 @@
1
- export * from './entities';
2
- export * from './dtos';
@@ -1,19 +0,0 @@
1
- import { IsEmail, IsOptional, IsString } from 'class-validator';
2
-
3
- export class CreateUserDto {
4
- @IsEmail()
5
- @IsOptional()
6
- email?: string;
7
-
8
- @IsString()
9
- @IsOptional()
10
- name?: string;
11
-
12
- @IsString()
13
- @IsOptional()
14
- discordUsername?: string;
15
-
16
- @IsString()
17
- @IsOptional()
18
- twitterUsername?: string;
19
- }
@@ -1,24 +0,0 @@
1
- import { IsEmail, IsOptional, IsString } from 'class-validator';
2
- import { ApiProperty } from '@nestjs/swagger';
3
-
4
- export class UpdateUserDto {
5
- @ApiProperty()
6
- @IsEmail()
7
- @IsOptional()
8
- email?: string;
9
-
10
- @ApiProperty()
11
- @IsString()
12
- @IsOptional()
13
- name?: string;
14
-
15
- @ApiProperty()
16
- @IsString()
17
- @IsOptional()
18
- discordUsername?: string;
19
-
20
- @ApiProperty()
21
- @IsString()
22
- @IsOptional()
23
- twitterUsername?: string;
24
- }
@@ -1,2 +0,0 @@
1
- export * from './UpdateUserDto';
2
- export * from './CreateUserDto';
@@ -1,13 +0,0 @@
1
- import { Entity } from '../../entity';
2
-
3
- export class BaseUser extends Entity {
4
- id: string;
5
-
6
- name?: string;
7
-
8
- email?: string;
9
-
10
- discordUsername?: string;
11
-
12
- twitterUsername?: string;
13
- }
@@ -1,9 +0,0 @@
1
- import { BaseUser } from './BaseUser';
2
- import type { BaseRole } from '../../role';
3
- import type { BaseWallet } from '../../wallet';
4
-
5
- export class ShallowEnrichedUser extends BaseUser {
6
- roles: BaseRole[];
7
-
8
- wallets: BaseWallet[];
9
- }
@@ -1,9 +0,0 @@
1
- import type { Role } from '../../role';
2
- import type { Wallet } from '../../wallet';
3
- import { BaseUser } from './BaseUser';
4
-
5
- export class User extends BaseUser {
6
- roles: Role[];
7
-
8
- wallets: Wallet[];
9
- }
@@ -1,3 +0,0 @@
1
- export * from './User';
2
- export * from './BaseUser';
3
- export * from './ShallowEnrichedUser';
@@ -1,2 +0,0 @@
1
- export * from './dtos';
2
- export * from './entities';
@@ -1,8 +0,0 @@
1
- import { IsString } from 'class-validator';
2
- import { ApiProperty } from '@nestjs/swagger';
3
-
4
- export class UpdateWalletDto {
5
- @ApiProperty()
6
- @IsString()
7
- name: string;
8
- }
@@ -1 +0,0 @@
1
- export * from './UpdateWalletDto';
@@ -1,7 +0,0 @@
1
- import { Entity } from '../../entity';
2
-
3
- export class BaseWallet extends Entity {
4
- id: string;
5
-
6
- publicKey: string;
7
- }
@@ -1,6 +0,0 @@
1
- import type { Blockchain } from '../../blockchain';
2
- import { BaseWallet } from './BaseWallet';
3
-
4
- export class Wallet extends BaseWallet {
5
- blockchain: Blockchain;
6
- }
@@ -1,2 +0,0 @@
1
- export * from './Wallet';
2
- export * from './BaseWallet';
@@ -1,2 +0,0 @@
1
- export * from './dtos';
2
- export * from './entities';
@@ -1,6 +0,0 @@
1
- export class CurrencyService {
2
- static fromMinimalUnits(decimals: number, amount: number): number {
3
- const decimalsValue = Number.isNaN(decimals) ? 0 : decimals;
4
- return Math.round(amount / 10 ** decimalsValue);
5
- }
6
- }
@@ -1 +0,0 @@
1
- export * from './EmailService';
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './domain';