@explorins/pers-shared 2.1.97 → 2.1.98
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/cjs/shared-lib/dto/user/user.dto.d.ts +9 -0
- package/dist/cjs/shared-lib/dto/user/user.dto.d.ts.map +1 -1
- package/dist/cjs/shared-lib/dto/user/user.dto.js +35 -0
- package/dist/cjs/shared-lib/dto/user/user.dto.js.map +1 -1
- package/dist/cjs/shared-lib/dto/user-status-type.dto.d.ts +1 -2
- package/dist/cjs/shared-lib/dto/user-status-type.dto.d.ts.map +1 -1
- package/dist/cjs/shared-lib/dto/user-status-type.dto.js +12 -16
- package/dist/cjs/shared-lib/dto/user-status-type.dto.js.map +1 -1
- package/dist/cjs/shared-lib/enum/balance-migration-type.enum.d.ts +13 -0
- package/dist/cjs/shared-lib/enum/balance-migration-type.enum.d.ts.map +1 -0
- package/dist/cjs/shared-lib/enum/balance-migration-type.enum.js +17 -0
- package/dist/cjs/shared-lib/enum/balance-migration-type.enum.js.map +1 -0
- package/dist/cjs/shared-lib/enum/index.d.ts +1 -0
- package/dist/cjs/shared-lib/enum/index.d.ts.map +1 -1
- package/dist/cjs/shared-lib/enum/index.js +1 -0
- package/dist/cjs/shared-lib/enum/index.js.map +1 -1
- package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.d.ts +43 -0
- package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.d.ts.map +1 -0
- package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.js +3 -0
- package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.js.map +1 -0
- package/dist/cjs/shared-lib/interfaces/index.d.ts +1 -0
- package/dist/cjs/shared-lib/interfaces/index.d.ts.map +1 -1
- package/dist/cjs/shared-lib/interfaces/index.js +1 -0
- package/dist/cjs/shared-lib/interfaces/index.js.map +1 -1
- package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.d.ts +5 -1
- package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.d.ts.map +1 -1
- package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.js +4 -0
- package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.js.map +1 -1
- package/dist/cjs/shared-lib/types/index.d.ts +1 -0
- package/dist/cjs/shared-lib/types/index.d.ts.map +1 -1
- package/dist/cjs/shared-lib/types/index.js +1 -0
- package/dist/cjs/shared-lib/types/index.js.map +1 -1
- package/dist/cjs/shared-lib/types/user-include-relation.type.d.ts +11 -0
- package/dist/cjs/shared-lib/types/user-include-relation.type.d.ts.map +1 -0
- package/dist/cjs/shared-lib/types/user-include-relation.type.js +16 -0
- package/dist/cjs/shared-lib/types/user-include-relation.type.js.map +1 -0
- package/dist/cjs/shared-lib/value-objects/token-balance.value-object.d.ts +18 -1
- package/dist/cjs/shared-lib/value-objects/token-balance.value-object.d.ts.map +1 -1
- package/dist/cjs/shared-lib/value-objects/token-balance.value-object.js +24 -2
- package/dist/cjs/shared-lib/value-objects/token-balance.value-object.js.map +1 -1
- package/dist/cjs/shared-patterns/functions/helper.functions.d.ts +71 -0
- package/dist/cjs/shared-patterns/functions/helper.functions.d.ts.map +1 -0
- package/dist/cjs/shared-patterns/functions/helper.functions.js +185 -0
- package/dist/cjs/shared-patterns/functions/helper.functions.js.map +1 -0
- package/dist/esm/browser.js +2 -2
- package/dist/esm/index.js +5 -5
- package/dist/esm/shared-lib/decorators/index.js +1 -1
- package/dist/esm/shared-lib/dto/account-selector.dto.js +2 -2
- package/dist/esm/shared-lib/dto/account-token-balances.dto.js +1 -1
- package/dist/esm/shared-lib/dto/admin/admin-create.request.dto.js +2 -2
- package/dist/esm/shared-lib/dto/admin/admin.dto.js +2 -2
- package/dist/esm/shared-lib/dto/admin/index.js +2 -2
- package/dist/esm/shared-lib/dto/ai/ai-generation-log.dto.js +2 -2
- package/dist/esm/shared-lib/dto/ai/ai-prompt-config.dto.js +1 -1
- package/dist/esm/shared-lib/dto/ai/index.js +2 -2
- package/dist/esm/shared-lib/dto/analytics/ai-analytics.dto.js +4 -4
- package/dist/esm/shared-lib/dto/analytics/base-analytics.dto.js +1 -1
- package/dist/esm/shared-lib/dto/analytics/business-ranking-analytics.dto.js +3 -3
- package/dist/esm/shared-lib/dto/analytics/campaign-claim-analytics-request.dto.js +5 -5
- package/dist/esm/shared-lib/dto/analytics/campaign-claim-analytics.dto.js +5 -5
- package/dist/esm/shared-lib/dto/analytics/group-by-expression.dto.js +2 -2
- package/dist/esm/shared-lib/dto/analytics/index.js +9 -9
- package/dist/esm/shared-lib/dto/analytics/retention-analytics.dto.js +3 -3
- package/dist/esm/shared-lib/dto/analytics/transaction-analytics.request.dto.js +6 -6
- package/dist/esm/shared-lib/dto/analytics/user-analytics.dto.js +1 -1
- package/dist/esm/shared-lib/dto/analytics/user-ranking-analytics.dto.js +3 -3
- package/dist/esm/shared-lib/dto/api-key/api-key-verification.dto.js +1 -1
- package/dist/esm/shared-lib/dto/api-key/api-key.dto.js +1 -1
- package/dist/esm/shared-lib/dto/api-key/index.js +3 -3
- package/dist/esm/shared-lib/dto/auth/auth.dto.js +5 -5
- package/dist/esm/shared-lib/dto/auth/index.js +2 -2
- package/dist/esm/shared-lib/dto/business/business-create.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/business/business-membership.dto.js +4 -4
- package/dist/esm/shared-lib/dto/business/business-type.dto.js +1 -1
- package/dist/esm/shared-lib/dto/business/business-update.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/business/business.dto.js +3 -3
- package/dist/esm/shared-lib/dto/business/businessToggleActive.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/business/businessTypeCreate.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/business/index.js +8 -8
- package/dist/esm/shared-lib/dto/campaign/campaign-business-engagement.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/campaign/campaign.dto.js +5 -5
- package/dist/esm/shared-lib/dto/campaign/campaignClaim.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/campaign/campaignCreate.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/campaign/campaignTrigger.dto.js +4 -4
- package/dist/esm/shared-lib/dto/campaign/campaignTriggerCondition.dto.js +1 -1
- package/dist/esm/shared-lib/dto/campaign/campaignUpdate.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/campaign/campaignUserClaim.dto.js +6 -6
- package/dist/esm/shared-lib/dto/campaign/trigger-source.dto.js +2 -2
- package/dist/esm/shared-lib/dto/error-response.dto.js +2 -2
- package/dist/esm/shared-lib/dto/file/entity-storage-url.dto.js +3 -3
- package/dist/esm/shared-lib/dto/file/index.js +2 -2
- package/dist/esm/shared-lib/dto/index.js +36 -36
- package/dist/esm/shared-lib/dto/pagination/index.js +2 -2
- package/dist/esm/shared-lib/dto/pagination/pagination.request.dto.js +2 -2
- package/dist/esm/shared-lib/dto/purchase/index.js +9 -9
- package/dist/esm/shared-lib/dto/purchase/purchase.dto.js +1 -1
- package/dist/esm/shared-lib/dto/purchase/purchaseCreate.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/purchase/purchaseCreate.response.dto.js +1 -1
- package/dist/esm/shared-lib/dto/purchase/purchaseTokenUpdate.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/purchase/purchaseType.dto.js +1 -1
- package/dist/esm/shared-lib/dto/redemption/index.js +5 -5
- package/dist/esm/shared-lib/dto/redemption/redemption.dto.js +4 -4
- package/dist/esm/shared-lib/dto/redemption/redemptionCreate.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/redemption/redemptionRedeem.dto.js +5 -5
- package/dist/esm/shared-lib/dto/redemption/redemptionRedeem.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/redemption/redemptionType.dto.js +1 -1
- package/dist/esm/shared-lib/dto/signing-account/create-signing-account-request.dto.js +4 -4
- package/dist/esm/shared-lib/dto/signing-account/index.js +5 -5
- package/dist/esm/shared-lib/dto/signing-account/signing-account.dto.js +1 -1
- package/dist/esm/shared-lib/dto/signing-account/update-signing-account.dto.js +1 -1
- package/dist/esm/shared-lib/dto/tenant/index.js +4 -4
- package/dist/esm/shared-lib/dto/tenant/tenant.dto.js +1 -1
- package/dist/esm/shared-lib/dto/tenant/tenantUpdate.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/token/index.js +7 -7
- package/dist/esm/shared-lib/dto/token/token-balance.dto.js +1 -1
- package/dist/esm/shared-lib/dto/token/token-metadata.dto.js +3 -3
- package/dist/esm/shared-lib/dto/token/token-selector.dto.js +1 -1
- package/dist/esm/shared-lib/dto/token/token-type.dto.js +2 -2
- package/dist/esm/shared-lib/dto/token/token-unit.dto.js +2 -2
- package/dist/esm/shared-lib/dto/token/token.dto.js +2 -2
- package/dist/esm/shared-lib/dto/token/token.request.dto.js +2 -2
- package/dist/esm/shared-lib/dto/transaction/index.js +8 -8
- package/dist/esm/shared-lib/dto/transaction/transaction-bulk-data.request.dto.js +2 -2
- package/dist/esm/shared-lib/dto/transaction/transaction-pagination.request.dto.js +4 -4
- package/dist/esm/shared-lib/dto/transaction/transaction-trigger-process.dto.js +1 -1
- package/dist/esm/shared-lib/dto/transaction/transaction.dto.js +6 -6
- package/dist/esm/shared-lib/dto/transaction/transaction.request.dto.js +9 -9
- package/dist/esm/shared-lib/dto/user/index.js +3 -3
- package/dist/esm/shared-lib/dto/user/user.dto.d.ts +9 -0
- package/dist/esm/shared-lib/dto/user/user.dto.d.ts.map +1 -1
- package/dist/esm/shared-lib/dto/user/user.dto.js +37 -3
- package/dist/esm/shared-lib/dto/user/user.dto.js.map +1 -1
- package/dist/esm/shared-lib/dto/user/user.request.dto.js +1 -1
- package/dist/esm/shared-lib/dto/user/userUploadData.dto.js +1 -1
- package/dist/esm/shared-lib/dto/user-status-type.dto.d.ts +1 -2
- package/dist/esm/shared-lib/dto/user-status-type.dto.d.ts.map +1 -1
- package/dist/esm/shared-lib/dto/user-status-type.dto.js +12 -15
- package/dist/esm/shared-lib/dto/user-status-type.dto.js.map +1 -1
- package/dist/esm/shared-lib/dto/wallet.dto.js +2 -2
- package/dist/esm/shared-lib/dto/web3-contract.dto.js +3 -3
- package/dist/esm/shared-lib/enum/balance-migration-type.enum.d.ts +13 -0
- package/dist/esm/shared-lib/enum/balance-migration-type.enum.d.ts.map +1 -0
- package/dist/esm/shared-lib/enum/balance-migration-type.enum.js +14 -0
- package/dist/esm/shared-lib/enum/balance-migration-type.enum.js.map +1 -0
- package/dist/esm/shared-lib/enum/campaign/index.js +3 -3
- package/dist/esm/shared-lib/enum/index.d.ts +1 -0
- package/dist/esm/shared-lib/enum/index.d.ts.map +1 -1
- package/dist/esm/shared-lib/enum/index.js +28 -27
- package/dist/esm/shared-lib/enum/index.js.map +1 -1
- package/dist/esm/shared-lib/enum/purchase/index.js +2 -2
- package/dist/esm/shared-lib/errors/base-business-error.js +1 -1
- package/dist/esm/shared-lib/errors/domains/authentication-errors.js +3 -3
- package/dist/esm/shared-lib/errors/domains/balance-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/business-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/campaign-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/contract-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/signing-account-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/system-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/tenant-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/token-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/transaction-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/trigger-source-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/user-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/validation-errors.js +2 -2
- package/dist/esm/shared-lib/errors/domains/wallet-errors.js +2 -2
- package/dist/esm/shared-lib/errors/index.js +18 -18
- package/dist/esm/shared-lib/errors/technical-errors.js +2 -2
- package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.d.ts +43 -0
- package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.d.ts.map +1 -0
- package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.js +2 -0
- package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.js.map +1 -0
- package/dist/esm/shared-lib/interfaces/campaign/index.js +1 -1
- package/dist/esm/shared-lib/interfaces/index.d.ts +1 -0
- package/dist/esm/shared-lib/interfaces/index.d.ts.map +1 -1
- package/dist/esm/shared-lib/interfaces/index.js +21 -20
- package/dist/esm/shared-lib/interfaces/index.js.map +1 -1
- package/dist/esm/shared-lib/interfaces/token-storage-data.interface.d.ts +5 -1
- package/dist/esm/shared-lib/interfaces/token-storage-data.interface.d.ts.map +1 -1
- package/dist/esm/shared-lib/interfaces/token-storage-data.interface.js +4 -0
- package/dist/esm/shared-lib/interfaces/token-storage-data.interface.js.map +1 -1
- package/dist/esm/shared-lib/types/index.d.ts +1 -0
- package/dist/esm/shared-lib/types/index.d.ts.map +1 -1
- package/dist/esm/shared-lib/types/index.js +15 -14
- package/dist/esm/shared-lib/types/index.js.map +1 -1
- package/dist/esm/shared-lib/types/user-include-relation.type.d.ts +11 -0
- package/dist/esm/shared-lib/types/user-include-relation.type.d.ts.map +1 -0
- package/dist/esm/shared-lib/types/user-include-relation.type.js +12 -0
- package/dist/esm/shared-lib/types/user-include-relation.type.js.map +1 -0
- package/dist/esm/shared-lib/value-objects/account-selector.vo.js +3 -3
- package/dist/esm/shared-lib/value-objects/address.value-object.js +1 -1
- package/dist/esm/shared-lib/value-objects/index.js +8 -8
- package/dist/esm/shared-lib/value-objects/token-balance.value-object.d.ts +18 -1
- package/dist/esm/shared-lib/value-objects/token-balance.value-object.d.ts.map +1 -1
- package/dist/esm/shared-lib/value-objects/token-balance.value-object.js +24 -2
- package/dist/esm/shared-lib/value-objects/token-balance.value-object.js.map +1 -1
- package/dist/esm/shared-lib/value-objects/token-transaction-entity-reference-input.vo.js +2 -2
- package/dist/esm/shared-lib/value-objects/token-transaction-input.vo.js +2 -2
- package/dist/esm/shared-patterns/errors/error-factory.js +13 -13
- package/dist/esm/shared-patterns/functions/helper.functions.d.ts +71 -0
- package/dist/esm/shared-patterns/functions/helper.functions.d.ts.map +1 -0
- package/dist/esm/shared-patterns/functions/helper.functions.js +174 -0
- package/dist/esm/shared-patterns/functions/helper.functions.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PublicWalletDTO } from "../wallet.dto";
|
|
2
2
|
import { AccountTokenBalancesDTO } from "../account-token-balances.dto";
|
|
3
|
+
import { UserStatusTypeDTO } from "../user-status-type.dto";
|
|
3
4
|
export declare class UserDTO {
|
|
4
5
|
id: string;
|
|
5
6
|
email: string | null;
|
|
@@ -24,6 +25,10 @@ export declare class UserDTO {
|
|
|
24
25
|
wallets: PublicWalletDTO[];
|
|
25
26
|
createdAt: Date | null;
|
|
26
27
|
updatedAt: Date | null;
|
|
28
|
+
included?: {
|
|
29
|
+
statusTypes?: UserStatusTypeDTO[];
|
|
30
|
+
tokenBalances?: AccountTokenBalancesDTO[];
|
|
31
|
+
};
|
|
27
32
|
}
|
|
28
33
|
export declare class PublicUserDTO {
|
|
29
34
|
id: string;
|
|
@@ -31,6 +36,10 @@ export declare class PublicUserDTO {
|
|
|
31
36
|
[key: string]: any;
|
|
32
37
|
};
|
|
33
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use UserDTO with include=balances pattern instead.
|
|
41
|
+
* Will be removed in future version.
|
|
42
|
+
*/
|
|
34
43
|
export declare class UserTokenBalancesDTO extends UserDTO {
|
|
35
44
|
tokenBalances: AccountTokenBalancesDTO[];
|
|
36
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/user/user.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"user.d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AAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAM;CAC7C;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,OAAO;IAK7C,aAAa,EAAE,uBAAuB,EAAE,CAAM;CACjD;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC"}
|
|
@@ -13,7 +13,11 @@ exports.UserTokenBalancesDTO = exports.PublicUserDTO = exports.UserDTO = void 0;
|
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const wallet_dto_1 = require("../wallet.dto");
|
|
15
15
|
const account_token_balances_dto_1 = require("../account-token-balances.dto");
|
|
16
|
+
const user_status_type_dto_1 = require("../user-status-type.dto");
|
|
16
17
|
class UserDTO {
|
|
18
|
+
// =====================================
|
|
19
|
+
// SCALAR FIELDS
|
|
20
|
+
// =====================================
|
|
17
21
|
id = '';
|
|
18
22
|
// @IsDefined()
|
|
19
23
|
email = null;
|
|
@@ -38,6 +42,12 @@ class UserDTO {
|
|
|
38
42
|
wallets = [];
|
|
39
43
|
createdAt = null;
|
|
40
44
|
updatedAt = null;
|
|
45
|
+
// =====================================
|
|
46
|
+
// OPTIONAL INCLUDED ENTITIES
|
|
47
|
+
// =====================================
|
|
48
|
+
// Only populated when include query param is specified
|
|
49
|
+
// e.g., GET /users/me?include=status,balances
|
|
50
|
+
included;
|
|
41
51
|
}
|
|
42
52
|
exports.UserDTO = UserDTO;
|
|
43
53
|
__decorate([
|
|
@@ -140,6 +150,27 @@ __decorate([
|
|
|
140
150
|
}),
|
|
141
151
|
__metadata("design:type", Object)
|
|
142
152
|
], UserDTO.prototype, "updatedAt", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
155
|
+
description: 'Included related entities. Only populated when include parameter is specified.',
|
|
156
|
+
required: false,
|
|
157
|
+
nullable: true,
|
|
158
|
+
type: 'object',
|
|
159
|
+
properties: {
|
|
160
|
+
statusTypes: {
|
|
161
|
+
description: 'User status types earned based on token balances (via ?include=status)',
|
|
162
|
+
type: 'array',
|
|
163
|
+
items: { $ref: (0, swagger_1.getSchemaPath)(user_status_type_dto_1.UserStatusTypeDTO) }
|
|
164
|
+
},
|
|
165
|
+
tokenBalances: {
|
|
166
|
+
description: 'Token balances for user wallets (via ?include=balances)',
|
|
167
|
+
type: 'array',
|
|
168
|
+
items: { $ref: (0, swagger_1.getSchemaPath)(account_token_balances_dto_1.AccountTokenBalancesDTO) }
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}),
|
|
172
|
+
__metadata("design:type", Object)
|
|
173
|
+
], UserDTO.prototype, "included", void 0);
|
|
143
174
|
class PublicUserDTO {
|
|
144
175
|
id = '';
|
|
145
176
|
publicProfile = {};
|
|
@@ -153,6 +184,10 @@ __decorate([
|
|
|
153
184
|
(0, swagger_1.ApiProperty)({ description: 'Public profile data' }),
|
|
154
185
|
__metadata("design:type", Object)
|
|
155
186
|
], PublicUserDTO.prototype, "publicProfile", void 0);
|
|
187
|
+
/**
|
|
188
|
+
* @deprecated Use UserDTO with include=balances pattern instead.
|
|
189
|
+
* Will be removed in future version.
|
|
190
|
+
*/
|
|
156
191
|
class UserTokenBalancesDTO extends UserDTO {
|
|
157
192
|
tokenBalances = [];
|
|
158
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/user/user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"user.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/user/user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAkF;AAClF,8CAAgD;AAChD,8EAAwE;AACxE,kEAA4D;AAG5D,MAAa,OAAO;IAEhB,wCAAwC;IACxC,gBAAgB;IAChB,wCAAwC;IAGxC,EAAE,GAAY,EAAE,CAAC;IAEjB,eAAe;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,EAAE,IAAA,uBAAa,EAAC,wCAAiB,CAAC,EAAE;aACpD;YACD,aAAa,EAAE;gBACX,WAAW,EAAE,yDAAyD;gBACtE,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,oDAAuB,CAAC,EAAE;aAC1D;SACJ;KACJ,CAAC;;yCAIA;AAGN,MAAa,aAAa;IAEtB,EAAE,GAAY,EAAE,CAAC;IAKjB,aAAa,GAA0B,EAAE,CAAC;CAC7C;AARD,sCAQC;AANG;IADC,IAAA,qBAAW,GAAE;;yCACG;AAKjB;IAHC,IAAA,qBAAW,EACR,EAAC,WAAW,EAAE,qBAAqB,EAAC,CACvC;;oDACyC;AAG9C;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,OAAO;IAK7C,aAAa,GAA8B,EAAE,CAAC;CACjD;AAND,oDAMC;AADG;IAJC,IAAA,qBAAW,EAAC;QACT,IAAI,EAAE,GAAG,EAAE,CAAC,oDAAuB;QACnC,OAAO,EAAE,IAAI;KAChB,CAAC;;2DAC4C"}
|
|
@@ -4,11 +4,10 @@ export declare class UserStatusTypeCreateRequestDTO {
|
|
|
4
4
|
minTokenBalance: number;
|
|
5
5
|
discountPercentage: number;
|
|
6
6
|
imageUrl?: string;
|
|
7
|
+
eligibleTokenAddresses?: string[];
|
|
7
8
|
tags?: string[];
|
|
8
9
|
}
|
|
9
10
|
export declare class UserStatusTypeDTO extends UserStatusTypeCreateRequestDTO {
|
|
10
11
|
id: number;
|
|
11
|
-
eligibleTokenAddresses: string[];
|
|
12
|
-
tags: string[];
|
|
13
12
|
}
|
|
14
13
|
//# sourceMappingURL=user-status-type.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-status-type.dto.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/dto/user-status-type.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,8BAA8B;IAMvC,IAAI,EAAE,MAAM,CAAM;IAOlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAOrB,eAAe,EAAE,MAAM,CAAK;IAO5B,kBAAkB,EAAE,MAAM,CAAK;IAO/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAUlB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,qBAAa,iBAAkB,SAAQ,8BAA8B;IAIjE,EAAE,EAAE,MAAM,CAAK;
|
|
1
|
+
{"version":3,"file":"user-status-type.dto.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/dto/user-status-type.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,8BAA8B;IAMvC,IAAI,EAAE,MAAM,CAAM;IAOlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAOrB,eAAe,EAAE,MAAM,CAAK;IAO5B,kBAAkB,EAAE,MAAM,CAAK;IAO/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAUlB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAUlC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,qBAAa,iBAAkB,SAAQ,8BAA8B;IAIjE,EAAE,EAAE,MAAM,CAAK;CAClB"}
|
|
@@ -19,6 +19,7 @@ class UserStatusTypeCreateRequestDTO {
|
|
|
19
19
|
minTokenBalance = 0;
|
|
20
20
|
discountPercentage = 0;
|
|
21
21
|
imageUrl;
|
|
22
|
+
eligibleTokenAddresses;
|
|
22
23
|
tags;
|
|
23
24
|
}
|
|
24
25
|
exports.UserStatusTypeCreateRequestDTO = UserStatusTypeCreateRequestDTO;
|
|
@@ -62,6 +63,17 @@ __decorate([
|
|
|
62
63
|
(0, class_validator_1.IsUrl)(),
|
|
63
64
|
__metadata("design:type", String)
|
|
64
65
|
], UserStatusTypeCreateRequestDTO.prototype, "imageUrl", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
68
|
+
description: 'Eligible token contract addresses for this status type',
|
|
69
|
+
type: [String],
|
|
70
|
+
example: ['0x1234...', '0x5678...']
|
|
71
|
+
}),
|
|
72
|
+
(0, decorators_1.OptionalStrip)(),
|
|
73
|
+
(0, class_validator_1.IsArray)(),
|
|
74
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
75
|
+
__metadata("design:type", Array)
|
|
76
|
+
], UserStatusTypeCreateRequestDTO.prototype, "eligibleTokenAddresses", void 0);
|
|
65
77
|
__decorate([
|
|
66
78
|
(0, swagger_1.ApiPropertyOptional)({
|
|
67
79
|
description: 'Tags for categorization and filtering',
|
|
@@ -75,8 +87,6 @@ __decorate([
|
|
|
75
87
|
], UserStatusTypeCreateRequestDTO.prototype, "tags", void 0);
|
|
76
88
|
class UserStatusTypeDTO extends UserStatusTypeCreateRequestDTO {
|
|
77
89
|
id = 0;
|
|
78
|
-
eligibleTokenAddresses = [];
|
|
79
|
-
tags = [];
|
|
80
90
|
}
|
|
81
91
|
exports.UserStatusTypeDTO = UserStatusTypeDTO;
|
|
82
92
|
__decorate([
|
|
@@ -85,18 +95,4 @@ __decorate([
|
|
|
85
95
|
}),
|
|
86
96
|
__metadata("design:type", Number)
|
|
87
97
|
], UserStatusTypeDTO.prototype, "id", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, swagger_1.ApiProperty)({
|
|
90
|
-
description: 'User Status Type eligible Token Addresses',
|
|
91
|
-
}),
|
|
92
|
-
__metadata("design:type", Array)
|
|
93
|
-
], UserStatusTypeDTO.prototype, "eligibleTokenAddresses", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, swagger_1.ApiProperty)({
|
|
96
|
-
description: 'Tags for categorization and filtering',
|
|
97
|
-
type: [String],
|
|
98
|
-
default: []
|
|
99
|
-
}),
|
|
100
|
-
__metadata("design:type", Array)
|
|
101
|
-
], UserStatusTypeDTO.prototype, "tags", void 0);
|
|
102
98
|
//# sourceMappingURL=user-status-type.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-status-type.dto.js","sourceRoot":"","sources":["../../../../src/shared-lib/dto/user-status-type.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAAiF;AACjF,8CAA8C;AAE9C,MAAa,8BAA8B;IAMvC,IAAI,GAAW,EAAE,CAAC;IAOlB,WAAW,CAAU;IAOrB,eAAe,GAAW,CAAC,CAAC;IAO5B,kBAAkB,GAAW,CAAC,CAAC;IAO/B,QAAQ,CAAU;IAUlB,IAAI,CAAY;CACnB;
|
|
1
|
+
{"version":3,"file":"user-status-type.dto.js","sourceRoot":"","sources":["../../../../src/shared-lib/dto/user-status-type.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAAiF;AACjF,8CAA8C;AAE9C,MAAa,8BAA8B;IAMvC,IAAI,GAAW,EAAE,CAAC;IAOlB,WAAW,CAAU;IAOrB,eAAe,GAAW,CAAC,CAAC;IAO5B,kBAAkB,GAAW,CAAC,CAAC;IAO/B,QAAQ,CAAU;IAUlB,sBAAsB,CAAY;IAUlC,IAAI,CAAY;CACnB;AAvDD,wEAuDC;AAjDG;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,uBAAuB;KACvC,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACO;AAOlB;IALC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,8BAA8B;KAC9C,CAAC;IACD,IAAA,0BAAa,GAAE;IACf,IAAA,0BAAQ,GAAE;;mEACU;AAOrB;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,2CAA2C;KAC3D,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uEACiB;AAO5B;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,8CAA8C;KAC9D,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0EACoB;AAO/B;IALC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,4BAA4B;KAC5C,CAAC;IACD,IAAA,0BAAa,GAAE;IACf,IAAA,uBAAK,GAAE;;gEACU;AAUlB;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,wDAAwD;QACrE,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;KACtC,CAAC;IACD,IAAA,0BAAa,GAAE;IACf,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;8EACS;AAUlC;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC;KACtC,CAAC;IACD,IAAA,0BAAa,GAAE;IACf,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;4DACT;AAGpB,MAAa,iBAAkB,SAAQ,8BAA8B;IAIjE,EAAE,GAAW,CAAC,CAAC;CAClB;AALD,8CAKC;AADG;IAHC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,qBAAqB;KACrC,CAAC;;6CACa"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Balance Migration Type
|
|
3
|
+
*
|
|
4
|
+
* Defines how token balances should be migrated between accounts.
|
|
5
|
+
* Used during user merge operations and account balance transfers.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum BalanceMigrationType {
|
|
8
|
+
/** Replace: New balance = from balance - to balance (diff only) */
|
|
9
|
+
REPLACE = "replace",
|
|
10
|
+
/** Merge: New balance = from balance (full transfer) */
|
|
11
|
+
MERGE = "merge"
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=balance-migration-type.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balance-migration-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/enum/balance-migration-type.enum.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,oBAAoB;IAC5B,mEAAmE;IACnE,OAAO,YAAY;IACnB,wDAAwD;IACxD,KAAK,UAAU;CAClB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BalanceMigrationType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Balance Migration Type
|
|
6
|
+
*
|
|
7
|
+
* Defines how token balances should be migrated between accounts.
|
|
8
|
+
* Used during user merge operations and account balance transfers.
|
|
9
|
+
*/
|
|
10
|
+
var BalanceMigrationType;
|
|
11
|
+
(function (BalanceMigrationType) {
|
|
12
|
+
/** Replace: New balance = from balance - to balance (diff only) */
|
|
13
|
+
BalanceMigrationType["REPLACE"] = "replace";
|
|
14
|
+
/** Merge: New balance = from balance (full transfer) */
|
|
15
|
+
BalanceMigrationType["MERGE"] = "merge";
|
|
16
|
+
})(BalanceMigrationType || (exports.BalanceMigrationType = BalanceMigrationType = {}));
|
|
17
|
+
//# sourceMappingURL=balance-migration-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balance-migration-type.enum.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/balance-migration-type.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC5B,mEAAmE;IACnE,2CAAmB,CAAA;IACnB,wDAAwD;IACxD,uCAAe,CAAA;AACnB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B"}
|
|
@@ -19,6 +19,7 @@ export * from './process-record-status.enum';
|
|
|
19
19
|
export * from './file-upload-entity-type.enum';
|
|
20
20
|
export * from './signed-url-type.enum';
|
|
21
21
|
export * from './token-validity-type.enum';
|
|
22
|
+
export * from './balance-migration-type.enum';
|
|
22
23
|
export * from './purchase';
|
|
23
24
|
export * from './campaign';
|
|
24
25
|
export * from './ai-operation-type.enum';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/enum/index.ts"],"names":[],"mappings":"AACA,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/enum/index.ts"],"names":[],"mappings":"AACA,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAE9C,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -37,6 +37,7 @@ __exportStar(require("./process-record-status.enum"), exports);
|
|
|
37
37
|
__exportStar(require("./file-upload-entity-type.enum"), exports);
|
|
38
38
|
__exportStar(require("./signed-url-type.enum"), exports);
|
|
39
39
|
__exportStar(require("./token-validity-type.enum"), exports);
|
|
40
|
+
__exportStar(require("./balance-migration-type.enum"), exports);
|
|
40
41
|
__exportStar(require("./purchase"), exports);
|
|
41
42
|
__exportStar(require("./campaign"), exports);
|
|
42
43
|
__exportStar(require("./ai-operation-type.enum"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wCAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C;AAC1C,0EAAwD;AACxD,sDAAoC;AACpC,oDAAkC;AAClC,yDAAuC;AACvC,4DAA0C;AAC1C,oDAAkC;AAClC,qDAAmC;AACnC,yDAAuC;AACvC,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAC9C,gDAA8B;AAC9B,gDAA8B;AAC9B,oDAAkC;AAClC,+DAA6C;AAC7C,iEAA+C;AAC/C,yDAAuC;AACvC,6DAA2C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wCAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C;AAC1C,0EAAwD;AACxD,sDAAoC;AACpC,oDAAkC;AAClC,yDAAuC;AACvC,4DAA0C;AAC1C,oDAAkC;AAClC,qDAAmC;AACnC,yDAAuC;AACvC,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAC9C,gDAA8B;AAC9B,gDAA8B;AAC9B,oDAAkC;AAClC,+DAA6C;AAC7C,iEAA+C;AAC/C,yDAAuC;AACvC,6DAA2C;AAC3C,gEAA8C;AAE9C,6CAA2B;AAE3B,6CAA2B;AAE3B,2DAAyC;AACzC,iEAA+C;AAC/C,6DAA2C;AAE3C,4BAA4B;AAC5B,wFAA0E;AAAjE,2HAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { NativeTokenType } from '../types/native-token.type';
|
|
2
|
+
/**
|
|
3
|
+
* Filter options for retrieving token balances.
|
|
4
|
+
* Provides flexible filtering by token type, tags, contract addresses, and expiry status.
|
|
5
|
+
*/
|
|
6
|
+
export interface BalanceFilterOptions {
|
|
7
|
+
/** Only return balances for active tokens (default: true) */
|
|
8
|
+
activeOnly?: boolean;
|
|
9
|
+
/** Filter out tokens that have expired based on metadata expiry_date attribute */
|
|
10
|
+
excludeExpired?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Filter by token types.
|
|
13
|
+
* - If not specified (undefined), no type filtering is applied
|
|
14
|
+
* - Set to null to explicitly disable type filtering
|
|
15
|
+
* - Provide specific types like ['ERC721', 'ERC1155'] to filter by type
|
|
16
|
+
*
|
|
17
|
+
* Note: When tokenTypes is null and includeContractAddresses is set,
|
|
18
|
+
* ONLY the specified contract addresses will be returned (exclusive filter).
|
|
19
|
+
*/
|
|
20
|
+
tokenTypes?: NativeTokenType[] | null;
|
|
21
|
+
/**
|
|
22
|
+
* Filter by tags from on-chain metadata (IPFS).
|
|
23
|
+
* Applied AFTER fetching balances - filters by each token's IPFS metadata tags.
|
|
24
|
+
* - If not specified or empty, includes all tokens regardless of tags
|
|
25
|
+
* - If specified, only returns tokens that have at least one matching tag
|
|
26
|
+
*
|
|
27
|
+
* Note: This adds network calls to fetch metadata from IPFS for each token with balance.
|
|
28
|
+
*/
|
|
29
|
+
tags?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* Contract addresses to include in the results.
|
|
32
|
+
*
|
|
33
|
+
* Behavior depends on tokenTypes:
|
|
34
|
+
* - If tokenTypes is null: Acts as EXCLUSIVE filter - ONLY these addresses are returned
|
|
35
|
+
* - If tokenTypes has values: These addresses are ALWAYS included IN ADDITION to tokenTypes filter
|
|
36
|
+
*
|
|
37
|
+
* This allows two usage patterns:
|
|
38
|
+
* 1. Exclusive: { tokenTypes: null, includeContractAddresses: ['0x...'] } - Only specific contracts
|
|
39
|
+
* 2. Additive: { tokenTypes: ['ERC721'], includeContractAddresses: ['0x...'] } - ERC721 + specific contracts
|
|
40
|
+
*/
|
|
41
|
+
includeContractAddresses?: string[];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=balance-filter-options.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balance-filter-options.interface.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/balance-filter-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACjC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IACtC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;;;;;OAUG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balance-filter-options.interface.js","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/balance-filter-options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -18,4 +18,5 @@ export * from './transaction.interface';
|
|
|
18
18
|
export * from './counterfactual-wallet-response.interface';
|
|
19
19
|
export * from './campaign';
|
|
20
20
|
export * from './ai-prompt-config.interface';
|
|
21
|
+
export * from './balance-filter-options.interface';
|
|
21
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yBAAyB,CAAC;AAExC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,YAAY,CAAC;AAE3B,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yBAAyB,CAAC;AAExC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,YAAY,CAAC;AAE3B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC"}
|
|
@@ -35,4 +35,5 @@ __exportStar(require("./transaction.interface"), exports);
|
|
|
35
35
|
__exportStar(require("./counterfactual-wallet-response.interface"), exports);
|
|
36
36
|
__exportStar(require("./campaign"), exports);
|
|
37
37
|
__exportStar(require("./ai-prompt-config.interface"), exports);
|
|
38
|
+
__exportStar(require("./balance-filter-options.interface"), exports);
|
|
38
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAkD;AAClD,mEAAiD;AACjD,uEAAqD;AACrD,iEAA+C;AAC/C,iEAA+C;AAC/C,0DAAwC;AACxC,+DAA6C;AAC7C,2EAAyD;AACzD,iEAA+C;AAC/C,qDAAmC;AACnC,gEAA8C;AAC9C,kEAAgD;AAChD,sEAAoD;AACpD,8DAA4C;AAC5C,kEAAgD;AAChD,4EAA0D;AAC1D,mEAAiD;AAEjD,0DAAwC;AAExC,6EAA2D;AAE3D,6CAA2B;AAE3B,+DAA6C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAkD;AAClD,mEAAiD;AACjD,uEAAqD;AACrD,iEAA+C;AAC/C,iEAA+C;AAC/C,0DAAwC;AACxC,+DAA6C;AAC7C,2EAAyD;AACzD,iEAA+C;AAC/C,qDAAmC;AACnC,gEAA8C;AAC9C,kEAAgD;AAChD,sEAAoD;AACpD,8DAA4C;AAC5C,kEAAgD;AAChD,4EAA0D;AAC1D,mEAAiD;AAEjD,0DAAwC;AAExC,6EAA2D;AAE3D,6CAA2B;AAE3B,+DAA6C;AAC7C,qEAAmD"}
|
|
@@ -15,6 +15,10 @@ export interface TokenStorageDataAttribute {
|
|
|
15
15
|
export declare enum TokenStorageDataAttributesType {
|
|
16
16
|
EXPIRY_DATE = "expiry_date",
|
|
17
17
|
CREATOR_ACCOUNT_ADDRESS = "creator_account_address",
|
|
18
|
-
PREVIEW_URL = "preview_url"
|
|
18
|
+
PREVIEW_URL = "preview_url",
|
|
19
|
+
TAGS = "tags",
|
|
20
|
+
VALIDITY_TYPE = "validity_type",
|
|
21
|
+
VALIDITY_DURATION = "validity_duration",
|
|
22
|
+
TIMESTAMP = "timestamp"
|
|
19
23
|
}
|
|
20
24
|
//# sourceMappingURL=token-storage-data.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-storage-data.interface.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/token-storage-data.interface.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,oBAAY,8BAA8B;IACtC,WAAW,gBAAgB;IAC3B,uBAAuB,4BAA4B;IACnD,WAAW,gBAAgB;
|
|
1
|
+
{"version":3,"file":"token-storage-data.interface.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/token-storage-data.interface.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,oBAAY,8BAA8B;IACtC,WAAW,gBAAgB;IAC3B,uBAAuB,4BAA4B;IACnD,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC,SAAS,cAAc;CAC1B"}
|
|
@@ -6,5 +6,9 @@ var TokenStorageDataAttributesType;
|
|
|
6
6
|
TokenStorageDataAttributesType["EXPIRY_DATE"] = "expiry_date";
|
|
7
7
|
TokenStorageDataAttributesType["CREATOR_ACCOUNT_ADDRESS"] = "creator_account_address";
|
|
8
8
|
TokenStorageDataAttributesType["PREVIEW_URL"] = "preview_url";
|
|
9
|
+
TokenStorageDataAttributesType["TAGS"] = "tags";
|
|
10
|
+
TokenStorageDataAttributesType["VALIDITY_TYPE"] = "validity_type";
|
|
11
|
+
TokenStorageDataAttributesType["VALIDITY_DURATION"] = "validity_duration";
|
|
12
|
+
TokenStorageDataAttributesType["TIMESTAMP"] = "timestamp";
|
|
9
13
|
})(TokenStorageDataAttributesType || (exports.TokenStorageDataAttributesType = TokenStorageDataAttributesType = {}));
|
|
10
14
|
//# sourceMappingURL=token-storage-data.interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-storage-data.interface.js","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/token-storage-data.interface.ts"],"names":[],"mappings":";;;AAiBA,IAAY,
|
|
1
|
+
{"version":3,"file":"token-storage-data.interface.js","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/token-storage-data.interface.ts"],"names":[],"mappings":";;;AAiBA,IAAY,8BAQX;AARD,WAAY,8BAA8B;IACtC,6DAA2B,CAAA;IAC3B,qFAAmD,CAAA;IACnD,6DAA2B,CAAA;IAC3B,+CAAa,CAAA;IACb,iEAA+B,CAAA;IAC/B,yEAAuC,CAAA;IACvC,yDAAuB,CAAA;AAC3B,CAAC,EARW,8BAA8B,8CAA9B,8BAA8B,QAQzC"}
|
|
@@ -12,4 +12,5 @@ export * from './campaign-include-relation.type';
|
|
|
12
12
|
export * from './campaign-claim-include-relation.type';
|
|
13
13
|
export * from './redemption-redeem-include-relation.type';
|
|
14
14
|
export * from './business-membership-include-relation.type';
|
|
15
|
+
export * from './user-include-relation.type';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8BAA8B,CAAC"}
|
|
@@ -29,4 +29,5 @@ __exportStar(require("./campaign-include-relation.type"), exports);
|
|
|
29
29
|
__exportStar(require("./campaign-claim-include-relation.type"), exports);
|
|
30
30
|
__exportStar(require("./redemption-redeem-include-relation.type"), exports);
|
|
31
31
|
__exportStar(require("./business-membership-include-relation.type"), exports);
|
|
32
|
+
__exportStar(require("./user-include-relation.type"), exports);
|
|
32
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAmD;AACnD,mDAAiC;AACjC,gEAA8C;AAC9C,sDAAoC;AACpC,mDAAiC;AACjC,0DAAwC;AACxC,4CAA0B;AAC1B,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,yEAAuD;AACvD,4EAA0D;AAC1D,8EAA4D"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAmD;AACnD,mDAAiC;AACjC,gEAA8C;AAC9C,sDAAoC;AACpC,mDAAiC;AACjC,0DAAwC;AACxC,4CAA0B;AAC1B,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,yEAAuD;AACvD,4EAA0D;AAC1D,8EAA4D;AAC5D,+DAA6C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Valid include relations for User endpoints.
|
|
3
|
+
* These relations can be requested via ?include=status,balances query parameter.
|
|
4
|
+
*/
|
|
5
|
+
export declare const VALID_USER_RELATIONS: readonly ["status", "balances"];
|
|
6
|
+
export type UserIncludeRelation = typeof VALID_USER_RELATIONS[number];
|
|
7
|
+
/**
|
|
8
|
+
* Type guard to check if a string is a valid UserIncludeRelation
|
|
9
|
+
*/
|
|
10
|
+
export declare function isValidUserRelation(value: string): value is UserIncludeRelation;
|
|
11
|
+
//# sourceMappingURL=user-include-relation.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-include-relation.type.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/user-include-relation.type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iCAAkC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEtE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,mBAAmB,CAE/E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VALID_USER_RELATIONS = void 0;
|
|
4
|
+
exports.isValidUserRelation = isValidUserRelation;
|
|
5
|
+
/**
|
|
6
|
+
* Valid include relations for User endpoints.
|
|
7
|
+
* These relations can be requested via ?include=status,balances query parameter.
|
|
8
|
+
*/
|
|
9
|
+
exports.VALID_USER_RELATIONS = ['status', 'balances'];
|
|
10
|
+
/**
|
|
11
|
+
* Type guard to check if a string is a valid UserIncludeRelation
|
|
12
|
+
*/
|
|
13
|
+
function isValidUserRelation(value) {
|
|
14
|
+
return exports.VALID_USER_RELATIONS.includes(value);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=user-include-relation.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-include-relation.type.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/user-include-relation.type.ts"],"names":[],"mappings":";;;AAWA,kDAEC;AAbD;;;GAGG;AACU,QAAA,oBAAoB,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU,CAAC;AAIpE;;GAEG;AACH,SAAgB,mBAAmB,CAAC,KAAa;IAC7C,OAAO,4BAAoB,CAAC,QAAQ,CAAC,KAA4B,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -12,6 +12,7 @@ export declare class TokenBalance {
|
|
|
12
12
|
private readonly tokenName;
|
|
13
13
|
private readonly tokenSymbol;
|
|
14
14
|
private readonly tokenType;
|
|
15
|
+
private readonly expiryDate;
|
|
15
16
|
/**
|
|
16
17
|
* Constructs a new TokenBalance value object.
|
|
17
18
|
*
|
|
@@ -23,8 +24,10 @@ export declare class TokenBalance {
|
|
|
23
24
|
* @param {string} tokenName - The name of the token.
|
|
24
25
|
* @param {string} tokenSymbol - The symbol of the token.
|
|
25
26
|
* @param {NativeTokenType} tokenType - The type of the token (e.g., ERC20, ERC721).
|
|
27
|
+
* @param {Date | null} expiryDate - The expiry date of the token (optional).
|
|
26
28
|
*/
|
|
27
|
-
constructor(chainId: number, smartContractAddress: Address, tokenId: string | null | undefined, metadataUri: string | null | undefined, balance: number, tokenName: string, tokenSymbol: string, tokenType: NativeTokenType
|
|
29
|
+
constructor(chainId: number, smartContractAddress: Address, tokenId: string | null | undefined, metadataUri: string | null | undefined, balance: number, tokenName: string, tokenSymbol: string, tokenType: NativeTokenType, // = NativeTokenType.ERC20 // Default value set to ERC20
|
|
30
|
+
expiryDate?: Date | null);
|
|
28
31
|
/**
|
|
29
32
|
* Gets the chain ID.
|
|
30
33
|
*
|
|
@@ -73,6 +76,20 @@ export declare class TokenBalance {
|
|
|
73
76
|
* @returns {NativeTokenType} The type of the token (e.g., ERC20, ERC721).
|
|
74
77
|
*/
|
|
75
78
|
getTokenType(): NativeTokenType;
|
|
79
|
+
/**
|
|
80
|
+
* Gets the expiry date of the token.
|
|
81
|
+
*
|
|
82
|
+
* @returns {Date | null} The expiry date (or null if no expiry).
|
|
83
|
+
*/
|
|
84
|
+
getExpiryDate(): Date | null;
|
|
85
|
+
/**
|
|
86
|
+
* Checks if the token has expired.
|
|
87
|
+
* Uses shared isTokenExpired helper for consistent date comparison logic.
|
|
88
|
+
*
|
|
89
|
+
* @returns {boolean} True if the token has an expiry date and it has passed.
|
|
90
|
+
* Returns false if no expiry date (never expires).
|
|
91
|
+
*/
|
|
92
|
+
isExpired(): boolean;
|
|
76
93
|
/**
|
|
77
94
|
* Returns a string representation of the TokenBalance.
|
|
78
95
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-balance.value-object.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/token-balance.value-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"token-balance.value-object.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/token-balance.value-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGjD;;GAEG;AACH,qBA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,EAAE,YAAY,GAAG,OAAO;CAS9C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TokenBalance = void 0;
|
|
4
|
+
const helper_functions_1 = require("../../shared-patterns/functions/helper.functions");
|
|
4
5
|
/**
|
|
5
6
|
* Value object representing the token balance details.
|
|
6
7
|
*/
|
|
@@ -13,6 +14,7 @@ class TokenBalance {
|
|
|
13
14
|
tokenName;
|
|
14
15
|
tokenSymbol;
|
|
15
16
|
tokenType;
|
|
17
|
+
expiryDate;
|
|
16
18
|
/**
|
|
17
19
|
* Constructs a new TokenBalance value object.
|
|
18
20
|
*
|
|
@@ -24,9 +26,10 @@ class TokenBalance {
|
|
|
24
26
|
* @param {string} tokenName - The name of the token.
|
|
25
27
|
* @param {string} tokenSymbol - The symbol of the token.
|
|
26
28
|
* @param {NativeTokenType} tokenType - The type of the token (e.g., ERC20, ERC721).
|
|
29
|
+
* @param {Date | null} expiryDate - The expiry date of the token (optional).
|
|
27
30
|
*/
|
|
28
|
-
constructor(chainId, smartContractAddress, tokenId = null, metadataUri = null, balance, tokenName, tokenSymbol, tokenType // = NativeTokenType.ERC20 // Default value set to ERC20
|
|
29
|
-
) {
|
|
31
|
+
constructor(chainId, smartContractAddress, tokenId = null, metadataUri = null, balance, tokenName, tokenSymbol, tokenType, // = NativeTokenType.ERC20 // Default value set to ERC20
|
|
32
|
+
expiryDate = null) {
|
|
30
33
|
this.chainId = chainId;
|
|
31
34
|
this.smartContractAddress = smartContractAddress;
|
|
32
35
|
this.tokenId = tokenId;
|
|
@@ -35,6 +38,7 @@ class TokenBalance {
|
|
|
35
38
|
this.tokenName = tokenName;
|
|
36
39
|
this.tokenSymbol = tokenSymbol;
|
|
37
40
|
this.tokenType = tokenType;
|
|
41
|
+
this.expiryDate = expiryDate;
|
|
38
42
|
}
|
|
39
43
|
/**
|
|
40
44
|
* Gets the chain ID.
|
|
@@ -100,6 +104,24 @@ class TokenBalance {
|
|
|
100
104
|
getTokenType() {
|
|
101
105
|
return this.tokenType;
|
|
102
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Gets the expiry date of the token.
|
|
109
|
+
*
|
|
110
|
+
* @returns {Date | null} The expiry date (or null if no expiry).
|
|
111
|
+
*/
|
|
112
|
+
getExpiryDate() {
|
|
113
|
+
return this.expiryDate;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Checks if the token has expired.
|
|
117
|
+
* Uses shared isTokenExpired helper for consistent date comparison logic.
|
|
118
|
+
*
|
|
119
|
+
* @returns {boolean} True if the token has an expiry date and it has passed.
|
|
120
|
+
* Returns false if no expiry date (never expires).
|
|
121
|
+
*/
|
|
122
|
+
isExpired() {
|
|
123
|
+
return (0, helper_functions_1.isTokenExpired)(this.expiryDate) ?? false;
|
|
124
|
+
}
|
|
103
125
|
/**
|
|
104
126
|
* Returns a string representation of the TokenBalance.
|
|
105
127
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-balance.value-object.js","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/token-balance.value-object.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"token-balance.value-object.js","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/token-balance.value-object.ts"],"names":[],"mappings":";;;AAGA,uFAAkF;AAElF;;GAEG;AACH,MAAa,YAAY;IACJ,OAAO,CAAS;IAChB,oBAAoB,CAAU;IAC9B,OAAO,CAAgB;IACvB,WAAW,CAAgB;IAC3B,OAAO,CAAS;IAChB,SAAS,CAAS;IAClB,WAAW,CAAS;IACpB,SAAS,CAAkB;IAC3B,UAAU,CAAc;IAEzC;;;;;;;;;;;;OAYG;IACH,YACI,OAAe,EACf,oBAA6B,EAC7B,UAAyB,IAAI,EAC7B,cAA6B,IAAI,EACjC,OAAe,EACf,SAAiB,EACjB,WAAmB,EACnB,SAA0B,EAAE,wDAAwD;IACpF,aAA0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