@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.
Files changed (203) hide show
  1. package/dist/cjs/shared-lib/dto/user/user.dto.d.ts +9 -0
  2. package/dist/cjs/shared-lib/dto/user/user.dto.d.ts.map +1 -1
  3. package/dist/cjs/shared-lib/dto/user/user.dto.js +35 -0
  4. package/dist/cjs/shared-lib/dto/user/user.dto.js.map +1 -1
  5. package/dist/cjs/shared-lib/dto/user-status-type.dto.d.ts +1 -2
  6. package/dist/cjs/shared-lib/dto/user-status-type.dto.d.ts.map +1 -1
  7. package/dist/cjs/shared-lib/dto/user-status-type.dto.js +12 -16
  8. package/dist/cjs/shared-lib/dto/user-status-type.dto.js.map +1 -1
  9. package/dist/cjs/shared-lib/enum/balance-migration-type.enum.d.ts +13 -0
  10. package/dist/cjs/shared-lib/enum/balance-migration-type.enum.d.ts.map +1 -0
  11. package/dist/cjs/shared-lib/enum/balance-migration-type.enum.js +17 -0
  12. package/dist/cjs/shared-lib/enum/balance-migration-type.enum.js.map +1 -0
  13. package/dist/cjs/shared-lib/enum/index.d.ts +1 -0
  14. package/dist/cjs/shared-lib/enum/index.d.ts.map +1 -1
  15. package/dist/cjs/shared-lib/enum/index.js +1 -0
  16. package/dist/cjs/shared-lib/enum/index.js.map +1 -1
  17. package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.d.ts +43 -0
  18. package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.d.ts.map +1 -0
  19. package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.js +3 -0
  20. package/dist/cjs/shared-lib/interfaces/balance-filter-options.interface.js.map +1 -0
  21. package/dist/cjs/shared-lib/interfaces/index.d.ts +1 -0
  22. package/dist/cjs/shared-lib/interfaces/index.d.ts.map +1 -1
  23. package/dist/cjs/shared-lib/interfaces/index.js +1 -0
  24. package/dist/cjs/shared-lib/interfaces/index.js.map +1 -1
  25. package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.d.ts +5 -1
  26. package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.d.ts.map +1 -1
  27. package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.js +4 -0
  28. package/dist/cjs/shared-lib/interfaces/token-storage-data.interface.js.map +1 -1
  29. package/dist/cjs/shared-lib/types/index.d.ts +1 -0
  30. package/dist/cjs/shared-lib/types/index.d.ts.map +1 -1
  31. package/dist/cjs/shared-lib/types/index.js +1 -0
  32. package/dist/cjs/shared-lib/types/index.js.map +1 -1
  33. package/dist/cjs/shared-lib/types/user-include-relation.type.d.ts +11 -0
  34. package/dist/cjs/shared-lib/types/user-include-relation.type.d.ts.map +1 -0
  35. package/dist/cjs/shared-lib/types/user-include-relation.type.js +16 -0
  36. package/dist/cjs/shared-lib/types/user-include-relation.type.js.map +1 -0
  37. package/dist/cjs/shared-lib/value-objects/token-balance.value-object.d.ts +18 -1
  38. package/dist/cjs/shared-lib/value-objects/token-balance.value-object.d.ts.map +1 -1
  39. package/dist/cjs/shared-lib/value-objects/token-balance.value-object.js +24 -2
  40. package/dist/cjs/shared-lib/value-objects/token-balance.value-object.js.map +1 -1
  41. package/dist/cjs/shared-patterns/functions/helper.functions.d.ts +71 -0
  42. package/dist/cjs/shared-patterns/functions/helper.functions.d.ts.map +1 -0
  43. package/dist/cjs/shared-patterns/functions/helper.functions.js +185 -0
  44. package/dist/cjs/shared-patterns/functions/helper.functions.js.map +1 -0
  45. package/dist/esm/browser.js +2 -2
  46. package/dist/esm/index.js +5 -5
  47. package/dist/esm/shared-lib/decorators/index.js +1 -1
  48. package/dist/esm/shared-lib/dto/account-selector.dto.js +2 -2
  49. package/dist/esm/shared-lib/dto/account-token-balances.dto.js +1 -1
  50. package/dist/esm/shared-lib/dto/admin/admin-create.request.dto.js +2 -2
  51. package/dist/esm/shared-lib/dto/admin/admin.dto.js +2 -2
  52. package/dist/esm/shared-lib/dto/admin/index.js +2 -2
  53. package/dist/esm/shared-lib/dto/ai/ai-generation-log.dto.js +2 -2
  54. package/dist/esm/shared-lib/dto/ai/ai-prompt-config.dto.js +1 -1
  55. package/dist/esm/shared-lib/dto/ai/index.js +2 -2
  56. package/dist/esm/shared-lib/dto/analytics/ai-analytics.dto.js +4 -4
  57. package/dist/esm/shared-lib/dto/analytics/base-analytics.dto.js +1 -1
  58. package/dist/esm/shared-lib/dto/analytics/business-ranking-analytics.dto.js +3 -3
  59. package/dist/esm/shared-lib/dto/analytics/campaign-claim-analytics-request.dto.js +5 -5
  60. package/dist/esm/shared-lib/dto/analytics/campaign-claim-analytics.dto.js +5 -5
  61. package/dist/esm/shared-lib/dto/analytics/group-by-expression.dto.js +2 -2
  62. package/dist/esm/shared-lib/dto/analytics/index.js +9 -9
  63. package/dist/esm/shared-lib/dto/analytics/retention-analytics.dto.js +3 -3
  64. package/dist/esm/shared-lib/dto/analytics/transaction-analytics.request.dto.js +6 -6
  65. package/dist/esm/shared-lib/dto/analytics/user-analytics.dto.js +1 -1
  66. package/dist/esm/shared-lib/dto/analytics/user-ranking-analytics.dto.js +3 -3
  67. package/dist/esm/shared-lib/dto/api-key/api-key-verification.dto.js +1 -1
  68. package/dist/esm/shared-lib/dto/api-key/api-key.dto.js +1 -1
  69. package/dist/esm/shared-lib/dto/api-key/index.js +3 -3
  70. package/dist/esm/shared-lib/dto/auth/auth.dto.js +5 -5
  71. package/dist/esm/shared-lib/dto/auth/index.js +2 -2
  72. package/dist/esm/shared-lib/dto/business/business-create.request.dto.js +1 -1
  73. package/dist/esm/shared-lib/dto/business/business-membership.dto.js +4 -4
  74. package/dist/esm/shared-lib/dto/business/business-type.dto.js +1 -1
  75. package/dist/esm/shared-lib/dto/business/business-update.request.dto.js +1 -1
  76. package/dist/esm/shared-lib/dto/business/business.dto.js +3 -3
  77. package/dist/esm/shared-lib/dto/business/businessToggleActive.request.dto.js +1 -1
  78. package/dist/esm/shared-lib/dto/business/businessTypeCreate.request.dto.js +1 -1
  79. package/dist/esm/shared-lib/dto/business/index.js +8 -8
  80. package/dist/esm/shared-lib/dto/campaign/campaign-business-engagement.request.dto.js +1 -1
  81. package/dist/esm/shared-lib/dto/campaign/campaign.dto.js +5 -5
  82. package/dist/esm/shared-lib/dto/campaign/campaignClaim.request.dto.js +1 -1
  83. package/dist/esm/shared-lib/dto/campaign/campaignCreate.request.dto.js +1 -1
  84. package/dist/esm/shared-lib/dto/campaign/campaignTrigger.dto.js +4 -4
  85. package/dist/esm/shared-lib/dto/campaign/campaignTriggerCondition.dto.js +1 -1
  86. package/dist/esm/shared-lib/dto/campaign/campaignUpdate.request.dto.js +1 -1
  87. package/dist/esm/shared-lib/dto/campaign/campaignUserClaim.dto.js +6 -6
  88. package/dist/esm/shared-lib/dto/campaign/trigger-source.dto.js +2 -2
  89. package/dist/esm/shared-lib/dto/error-response.dto.js +2 -2
  90. package/dist/esm/shared-lib/dto/file/entity-storage-url.dto.js +3 -3
  91. package/dist/esm/shared-lib/dto/file/index.js +2 -2
  92. package/dist/esm/shared-lib/dto/index.js +36 -36
  93. package/dist/esm/shared-lib/dto/pagination/index.js +2 -2
  94. package/dist/esm/shared-lib/dto/pagination/pagination.request.dto.js +2 -2
  95. package/dist/esm/shared-lib/dto/purchase/index.js +9 -9
  96. package/dist/esm/shared-lib/dto/purchase/purchase.dto.js +1 -1
  97. package/dist/esm/shared-lib/dto/purchase/purchaseCreate.request.dto.js +1 -1
  98. package/dist/esm/shared-lib/dto/purchase/purchaseCreate.response.dto.js +1 -1
  99. package/dist/esm/shared-lib/dto/purchase/purchaseTokenUpdate.request.dto.js +1 -1
  100. package/dist/esm/shared-lib/dto/purchase/purchaseType.dto.js +1 -1
  101. package/dist/esm/shared-lib/dto/redemption/index.js +5 -5
  102. package/dist/esm/shared-lib/dto/redemption/redemption.dto.js +4 -4
  103. package/dist/esm/shared-lib/dto/redemption/redemptionCreate.request.dto.js +1 -1
  104. package/dist/esm/shared-lib/dto/redemption/redemptionRedeem.dto.js +5 -5
  105. package/dist/esm/shared-lib/dto/redemption/redemptionRedeem.request.dto.js +1 -1
  106. package/dist/esm/shared-lib/dto/redemption/redemptionType.dto.js +1 -1
  107. package/dist/esm/shared-lib/dto/signing-account/create-signing-account-request.dto.js +4 -4
  108. package/dist/esm/shared-lib/dto/signing-account/index.js +5 -5
  109. package/dist/esm/shared-lib/dto/signing-account/signing-account.dto.js +1 -1
  110. package/dist/esm/shared-lib/dto/signing-account/update-signing-account.dto.js +1 -1
  111. package/dist/esm/shared-lib/dto/tenant/index.js +4 -4
  112. package/dist/esm/shared-lib/dto/tenant/tenant.dto.js +1 -1
  113. package/dist/esm/shared-lib/dto/tenant/tenantUpdate.request.dto.js +1 -1
  114. package/dist/esm/shared-lib/dto/token/index.js +7 -7
  115. package/dist/esm/shared-lib/dto/token/token-balance.dto.js +1 -1
  116. package/dist/esm/shared-lib/dto/token/token-metadata.dto.js +3 -3
  117. package/dist/esm/shared-lib/dto/token/token-selector.dto.js +1 -1
  118. package/dist/esm/shared-lib/dto/token/token-type.dto.js +2 -2
  119. package/dist/esm/shared-lib/dto/token/token-unit.dto.js +2 -2
  120. package/dist/esm/shared-lib/dto/token/token.dto.js +2 -2
  121. package/dist/esm/shared-lib/dto/token/token.request.dto.js +2 -2
  122. package/dist/esm/shared-lib/dto/transaction/index.js +8 -8
  123. package/dist/esm/shared-lib/dto/transaction/transaction-bulk-data.request.dto.js +2 -2
  124. package/dist/esm/shared-lib/dto/transaction/transaction-pagination.request.dto.js +4 -4
  125. package/dist/esm/shared-lib/dto/transaction/transaction-trigger-process.dto.js +1 -1
  126. package/dist/esm/shared-lib/dto/transaction/transaction.dto.js +6 -6
  127. package/dist/esm/shared-lib/dto/transaction/transaction.request.dto.js +9 -9
  128. package/dist/esm/shared-lib/dto/user/index.js +3 -3
  129. package/dist/esm/shared-lib/dto/user/user.dto.d.ts +9 -0
  130. package/dist/esm/shared-lib/dto/user/user.dto.d.ts.map +1 -1
  131. package/dist/esm/shared-lib/dto/user/user.dto.js +37 -3
  132. package/dist/esm/shared-lib/dto/user/user.dto.js.map +1 -1
  133. package/dist/esm/shared-lib/dto/user/user.request.dto.js +1 -1
  134. package/dist/esm/shared-lib/dto/user/userUploadData.dto.js +1 -1
  135. package/dist/esm/shared-lib/dto/user-status-type.dto.d.ts +1 -2
  136. package/dist/esm/shared-lib/dto/user-status-type.dto.d.ts.map +1 -1
  137. package/dist/esm/shared-lib/dto/user-status-type.dto.js +12 -15
  138. package/dist/esm/shared-lib/dto/user-status-type.dto.js.map +1 -1
  139. package/dist/esm/shared-lib/dto/wallet.dto.js +2 -2
  140. package/dist/esm/shared-lib/dto/web3-contract.dto.js +3 -3
  141. package/dist/esm/shared-lib/enum/balance-migration-type.enum.d.ts +13 -0
  142. package/dist/esm/shared-lib/enum/balance-migration-type.enum.d.ts.map +1 -0
  143. package/dist/esm/shared-lib/enum/balance-migration-type.enum.js +14 -0
  144. package/dist/esm/shared-lib/enum/balance-migration-type.enum.js.map +1 -0
  145. package/dist/esm/shared-lib/enum/campaign/index.js +3 -3
  146. package/dist/esm/shared-lib/enum/index.d.ts +1 -0
  147. package/dist/esm/shared-lib/enum/index.d.ts.map +1 -1
  148. package/dist/esm/shared-lib/enum/index.js +28 -27
  149. package/dist/esm/shared-lib/enum/index.js.map +1 -1
  150. package/dist/esm/shared-lib/enum/purchase/index.js +2 -2
  151. package/dist/esm/shared-lib/errors/base-business-error.js +1 -1
  152. package/dist/esm/shared-lib/errors/domains/authentication-errors.js +3 -3
  153. package/dist/esm/shared-lib/errors/domains/balance-errors.js +2 -2
  154. package/dist/esm/shared-lib/errors/domains/business-errors.js +2 -2
  155. package/dist/esm/shared-lib/errors/domains/campaign-errors.js +2 -2
  156. package/dist/esm/shared-lib/errors/domains/contract-errors.js +2 -2
  157. package/dist/esm/shared-lib/errors/domains/signing-account-errors.js +2 -2
  158. package/dist/esm/shared-lib/errors/domains/system-errors.js +2 -2
  159. package/dist/esm/shared-lib/errors/domains/tenant-errors.js +2 -2
  160. package/dist/esm/shared-lib/errors/domains/token-errors.js +2 -2
  161. package/dist/esm/shared-lib/errors/domains/transaction-errors.js +2 -2
  162. package/dist/esm/shared-lib/errors/domains/trigger-source-errors.js +2 -2
  163. package/dist/esm/shared-lib/errors/domains/user-errors.js +2 -2
  164. package/dist/esm/shared-lib/errors/domains/validation-errors.js +2 -2
  165. package/dist/esm/shared-lib/errors/domains/wallet-errors.js +2 -2
  166. package/dist/esm/shared-lib/errors/index.js +18 -18
  167. package/dist/esm/shared-lib/errors/technical-errors.js +2 -2
  168. package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.d.ts +43 -0
  169. package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.d.ts.map +1 -0
  170. package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.js +2 -0
  171. package/dist/esm/shared-lib/interfaces/balance-filter-options.interface.js.map +1 -0
  172. package/dist/esm/shared-lib/interfaces/campaign/index.js +1 -1
  173. package/dist/esm/shared-lib/interfaces/index.d.ts +1 -0
  174. package/dist/esm/shared-lib/interfaces/index.d.ts.map +1 -1
  175. package/dist/esm/shared-lib/interfaces/index.js +21 -20
  176. package/dist/esm/shared-lib/interfaces/index.js.map +1 -1
  177. package/dist/esm/shared-lib/interfaces/token-storage-data.interface.d.ts +5 -1
  178. package/dist/esm/shared-lib/interfaces/token-storage-data.interface.d.ts.map +1 -1
  179. package/dist/esm/shared-lib/interfaces/token-storage-data.interface.js +4 -0
  180. package/dist/esm/shared-lib/interfaces/token-storage-data.interface.js.map +1 -1
  181. package/dist/esm/shared-lib/types/index.d.ts +1 -0
  182. package/dist/esm/shared-lib/types/index.d.ts.map +1 -1
  183. package/dist/esm/shared-lib/types/index.js +15 -14
  184. package/dist/esm/shared-lib/types/index.js.map +1 -1
  185. package/dist/esm/shared-lib/types/user-include-relation.type.d.ts +11 -0
  186. package/dist/esm/shared-lib/types/user-include-relation.type.d.ts.map +1 -0
  187. package/dist/esm/shared-lib/types/user-include-relation.type.js +12 -0
  188. package/dist/esm/shared-lib/types/user-include-relation.type.js.map +1 -0
  189. package/dist/esm/shared-lib/value-objects/account-selector.vo.js +3 -3
  190. package/dist/esm/shared-lib/value-objects/address.value-object.js +1 -1
  191. package/dist/esm/shared-lib/value-objects/index.js +8 -8
  192. package/dist/esm/shared-lib/value-objects/token-balance.value-object.d.ts +18 -1
  193. package/dist/esm/shared-lib/value-objects/token-balance.value-object.d.ts.map +1 -1
  194. package/dist/esm/shared-lib/value-objects/token-balance.value-object.js +24 -2
  195. package/dist/esm/shared-lib/value-objects/token-balance.value-object.js.map +1 -1
  196. package/dist/esm/shared-lib/value-objects/token-transaction-entity-reference-input.vo.js +2 -2
  197. package/dist/esm/shared-lib/value-objects/token-transaction-input.vo.js +2 -2
  198. package/dist/esm/shared-patterns/errors/error-factory.js +13 -13
  199. package/dist/esm/shared-patterns/functions/helper.functions.d.ts +71 -0
  200. package/dist/esm/shared-patterns/functions/helper.functions.d.ts.map +1 -0
  201. package/dist/esm/shared-patterns/functions/helper.functions.js +174 -0
  202. package/dist/esm/shared-patterns/functions/helper.functions.js.map +1 -0
  203. package/package.json +1 -1
@@ -0,0 +1,71 @@
1
+ import { type TokenValidityType } from '../../shared-lib/enum/token-validity-type.enum';
2
+ import { TokenStorageData } from '../../shared-lib/interfaces/token-storage-data.interface';
3
+ /**
4
+ * Parses a comma-separated string into an array of strings.
5
+ *
6
+ * @param commaSeparatedString - The string to parse.
7
+ * @returns An array of trimmed, non-empty strings.
8
+ */
9
+ export declare const parseCommaSeparatedStringToStringArray: (commaSeparatedString: string | null) => string[];
10
+ export declare const checkIfTokenIdIsUri: (tokenId: string | null) => boolean;
11
+ export declare const compareVersions: (version1: string, version2: string) => number;
12
+ /**
13
+ * Computes the expiry date based on validity configuration.
14
+ *
15
+ * @param validityType - The type of validity calculation
16
+ * @param validityDuration - Duration in days or hours (for relative types)
17
+ * @param fixedExpiryDate - Fixed expiry date (for fixed_date type)
18
+ * @param issuanceDate - The date of issuance (defaults to now)
19
+ * @returns The computed expiry date, or undefined if no validity is configured
20
+ */
21
+ export declare const computeExpiryDate: (validityType?: TokenValidityType, validityDuration?: number, fixedExpiryDate?: Date, issuanceDate?: Date) => Date | undefined;
22
+ /**
23
+ * Checks if a token has expired based on its expiry date.
24
+ *
25
+ * @param expiryDate - The expiry date to check
26
+ * @param referenceDate - The date to compare against (defaults to now)
27
+ * @returns true if expired, false if still valid, undefined if no expiry date
28
+ */
29
+ export declare const isTokenExpired: (expiryDate?: Date | null, referenceDate?: Date) => boolean | undefined;
30
+ /**
31
+ * Normalizes an array of tags for consistent storage.
32
+ * - Converts to lowercase
33
+ * - Trims whitespace
34
+ * - Replaces spaces with dashes
35
+ * - Removes duplicates
36
+ * - Filters out empty strings
37
+ *
38
+ * @param tags - Array of tag strings to normalize
39
+ * @returns Normalized, deduplicated array of tags
40
+ *
41
+ * @example
42
+ * normalizeTags(['Summer', ' VIP ', 'Black Friday', 'summer'])
43
+ * // Returns: ['summer', 'vip', 'black-friday']
44
+ */
45
+ export declare const normalizeTags: (tags?: string[] | null) => string[];
46
+ /**
47
+ * Extracts the expiry_date attribute from token metadata (OpenSea standard format).
48
+ * This is the inverse operation of computeExpiryDate - it reads the expiry that was
49
+ * stored in the metadata when the token was minted.
50
+ *
51
+ * @param metadata - The token metadata object containing attributes array
52
+ * @returns The expiry date if found, null otherwise
53
+ *
54
+ * @example
55
+ * const metadata = { attributes: [{ trait_type: 'expiry_date', value: '2024-12-31T23:59:59.000Z' }] };
56
+ * extractExpiryDateFromMetadata(metadata); // Returns Date object
57
+ */
58
+ export declare const extractExpiryDateFromMetadata: (metadata: TokenStorageData | null) => Date | null;
59
+ /**
60
+ * Extracts tags from token metadata (OpenSea standard format).
61
+ * Tags are stored as a comma-separated string in the 'Tags' attribute.
62
+ *
63
+ * @param metadata - The token metadata object containing attributes array
64
+ * @returns Array of tags found in the metadata, or empty array if none
65
+ *
66
+ * @example
67
+ * const metadata = { attributes: [{ trait_type: 'Tags', value: 'techno, mindfulness' }] };
68
+ * extractTagsFromMetadata(metadata); // Returns ['techno', 'mindfulness']
69
+ */
70
+ export declare const extractTagsFromMetadata: (metadata: TokenStorageData | null) => string[];
71
+ //# sourceMappingURL=helper.functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.functions.d.ts","sourceRoot":"","sources":["../../../../src/shared-patterns/functions/helper.functions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAC5G,OAAO,EAAE,gBAAgB,EAAkC,MAAM,0DAA0D,CAAC;AAE5H;;;;;KAKK;AACL,eAAO,MAAM,sCAAsC,GAAI,sBAAsB,MAAM,GAAG,IAAI,KAAG,MAAM,EAI9F,CAAA;AAGL,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,GAAG,IAAI,KAAG,OAM5D,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,KAAG,MAWpE,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,eAAe,iBAAiB,EAChC,mBAAmB,MAAM,EACzB,kBAAkB,IAAI,EACtB,eAAc,IAAiB,KAC9B,IAAI,GAAG,SA6CT,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,aAAa,IAAI,GAAG,IAAI,EACxB,gBAAe,IAAiB,KAC/B,OAAO,GAAG,SAGZ,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,GAAG,IAAI,KAAG,MAAM,EAgB5D,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,GAAI,UAAU,gBAAgB,GAAG,IAAI,KAAG,IAAI,GAAG,IAaxF,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,GAAI,UAAU,gBAAgB,GAAG,IAAI,KAAG,MAAM,EAiBjF,CAAA"}
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractTagsFromMetadata = exports.extractExpiryDateFromMetadata = exports.normalizeTags = exports.isTokenExpired = exports.computeExpiryDate = exports.compareVersions = exports.checkIfTokenIdIsUri = exports.parseCommaSeparatedStringToStringArray = void 0;
4
+ const token_validity_type_enum_1 = require("../../shared-lib/enum/token-validity-type.enum");
5
+ const token_storage_data_interface_1 = require("../../shared-lib/interfaces/token-storage-data.interface");
6
+ /**
7
+ * Parses a comma-separated string into an array of strings.
8
+ *
9
+ * @param commaSeparatedString - The string to parse.
10
+ * @returns An array of trimmed, non-empty strings.
11
+ */
12
+ const parseCommaSeparatedStringToStringArray = (commaSeparatedString) => {
13
+ return commaSeparatedString
14
+ ? commaSeparatedString.split(',').map((s) => s.trim()).filter(Boolean)
15
+ : [];
16
+ };
17
+ exports.parseCommaSeparatedStringToStringArray = parseCommaSeparatedStringToStringArray;
18
+ const checkIfTokenIdIsUri = (tokenId) => {
19
+ const uriRegex = /^(https?|ipfs):\/\/.*/;
20
+ if (!tokenId || !uriRegex.test(tokenId)) {
21
+ return false;
22
+ }
23
+ return true;
24
+ };
25
+ exports.checkIfTokenIdIsUri = checkIfTokenIdIsUri;
26
+ const compareVersions = (version1, version2) => {
27
+ const v1 = version1.split('.').map(Number);
28
+ const v2 = version2.split('.').map(Number);
29
+ for (let i = 0; i < Math.max(v1.length, v2.length); i++) {
30
+ const num1 = v1[i] || 0;
31
+ const num2 = v2[i] || 0;
32
+ if (num1 > num2)
33
+ return 1;
34
+ if (num1 < num2)
35
+ return -1;
36
+ }
37
+ return 0;
38
+ };
39
+ exports.compareVersions = compareVersions;
40
+ /**
41
+ * Computes the expiry date based on validity configuration.
42
+ *
43
+ * @param validityType - The type of validity calculation
44
+ * @param validityDuration - Duration in days or hours (for relative types)
45
+ * @param fixedExpiryDate - Fixed expiry date (for fixed_date type)
46
+ * @param issuanceDate - The date of issuance (defaults to now)
47
+ * @returns The computed expiry date, or undefined if no validity is configured
48
+ */
49
+ const computeExpiryDate = (validityType, validityDuration, fixedExpiryDate, issuanceDate = new Date()) => {
50
+ if (!validityType) {
51
+ // Fallback to fixed expiry date if no validity type specified
52
+ return fixedExpiryDate;
53
+ }
54
+ switch (validityType) {
55
+ case token_validity_type_enum_1.TokenValidityTypes.FIXED_DATE:
56
+ return fixedExpiryDate;
57
+ case token_validity_type_enum_1.TokenValidityTypes.DAYS_FROM_ISSUANCE:
58
+ if (!validityDuration || validityDuration <= 0)
59
+ return undefined;
60
+ const daysResult = new Date(issuanceDate);
61
+ daysResult.setDate(daysResult.getDate() + validityDuration);
62
+ return daysResult;
63
+ case token_validity_type_enum_1.TokenValidityTypes.HOURS_FROM_ISSUANCE:
64
+ if (!validityDuration || validityDuration <= 0)
65
+ return undefined;
66
+ const hoursResult = new Date(issuanceDate);
67
+ hoursResult.setHours(hoursResult.getHours() + validityDuration);
68
+ return hoursResult;
69
+ case token_validity_type_enum_1.TokenValidityTypes.MONTHS_FROM_ISSUANCE:
70
+ if (!validityDuration || validityDuration <= 0)
71
+ return undefined;
72
+ const monthsResult = new Date(issuanceDate);
73
+ monthsResult.setMonth(monthsResult.getMonth() + validityDuration);
74
+ return monthsResult;
75
+ case token_validity_type_enum_1.TokenValidityTypes.END_OF_MONTH:
76
+ const endOfMonth = new Date(issuanceDate);
77
+ endOfMonth.setMonth(endOfMonth.getMonth() + 1);
78
+ endOfMonth.setDate(0); // Last day of previous month (i.e., current month)
79
+ endOfMonth.setHours(23, 59, 59, 999);
80
+ return endOfMonth;
81
+ case token_validity_type_enum_1.TokenValidityTypes.END_OF_YEAR:
82
+ const endOfYear = new Date(issuanceDate);
83
+ endOfYear.setMonth(11); // December
84
+ endOfYear.setDate(31);
85
+ endOfYear.setHours(23, 59, 59, 999);
86
+ return endOfYear;
87
+ default:
88
+ return fixedExpiryDate;
89
+ }
90
+ };
91
+ exports.computeExpiryDate = computeExpiryDate;
92
+ /**
93
+ * Checks if a token has expired based on its expiry date.
94
+ *
95
+ * @param expiryDate - The expiry date to check
96
+ * @param referenceDate - The date to compare against (defaults to now)
97
+ * @returns true if expired, false if still valid, undefined if no expiry date
98
+ */
99
+ const isTokenExpired = (expiryDate, referenceDate = new Date()) => {
100
+ if (!expiryDate)
101
+ return undefined;
102
+ return new Date(expiryDate) < referenceDate;
103
+ };
104
+ exports.isTokenExpired = isTokenExpired;
105
+ /**
106
+ * Normalizes an array of tags for consistent storage.
107
+ * - Converts to lowercase
108
+ * - Trims whitespace
109
+ * - Replaces spaces with dashes
110
+ * - Removes duplicates
111
+ * - Filters out empty strings
112
+ *
113
+ * @param tags - Array of tag strings to normalize
114
+ * @returns Normalized, deduplicated array of tags
115
+ *
116
+ * @example
117
+ * normalizeTags(['Summer', ' VIP ', 'Black Friday', 'summer'])
118
+ * // Returns: ['summer', 'vip', 'black-friday']
119
+ */
120
+ const normalizeTags = (tags) => {
121
+ if (!tags || !Array.isArray(tags))
122
+ return [];
123
+ const normalized = tags
124
+ .map(tag => tag
125
+ .toLowerCase()
126
+ .trim()
127
+ .replace(/\s+/g, '-') // Replace spaces with dashes
128
+ .replace(/[^a-z0-9-]/g, '') // Remove special characters except dashes
129
+ .replace(/-+/g, '-') // Replace multiple dashes with single
130
+ .replace(/^-|-$/g, '') // Remove leading/trailing dashes
131
+ )
132
+ .filter(Boolean); // Remove empty strings
133
+ return [...new Set(normalized)]; // Remove duplicates
134
+ };
135
+ exports.normalizeTags = normalizeTags;
136
+ /**
137
+ * Extracts the expiry_date attribute from token metadata (OpenSea standard format).
138
+ * This is the inverse operation of computeExpiryDate - it reads the expiry that was
139
+ * stored in the metadata when the token was minted.
140
+ *
141
+ * @param metadata - The token metadata object containing attributes array
142
+ * @returns The expiry date if found, null otherwise
143
+ *
144
+ * @example
145
+ * const metadata = { attributes: [{ trait_type: 'expiry_date', value: '2024-12-31T23:59:59.000Z' }] };
146
+ * extractExpiryDateFromMetadata(metadata); // Returns Date object
147
+ */
148
+ const extractExpiryDateFromMetadata = (metadata) => {
149
+ if (!metadata?.attributes)
150
+ return null;
151
+ // Case-insensitive comparison to handle legacy formats
152
+ const expiryAttribute = metadata.attributes.find(attr => attr.trait_type.toLowerCase() === token_storage_data_interface_1.TokenStorageDataAttributesType.EXPIRY_DATE.toLowerCase());
153
+ if (expiryAttribute?.value) {
154
+ return new Date(expiryAttribute.value);
155
+ }
156
+ return null;
157
+ };
158
+ exports.extractExpiryDateFromMetadata = extractExpiryDateFromMetadata;
159
+ /**
160
+ * Extracts tags from token metadata (OpenSea standard format).
161
+ * Tags are stored as a comma-separated string in the 'Tags' attribute.
162
+ *
163
+ * @param metadata - The token metadata object containing attributes array
164
+ * @returns Array of tags found in the metadata, or empty array if none
165
+ *
166
+ * @example
167
+ * const metadata = { attributes: [{ trait_type: 'Tags', value: 'techno, mindfulness' }] };
168
+ * extractTagsFromMetadata(metadata); // Returns ['techno', 'mindfulness']
169
+ */
170
+ const extractTagsFromMetadata = (metadata) => {
171
+ if (!metadata?.attributes)
172
+ return [];
173
+ // Case-insensitive comparison to handle legacy formats ('Tags', 'tags', etc.)
174
+ const tagsAttribute = metadata.attributes.find(attr => attr.trait_type.toLowerCase() === token_storage_data_interface_1.TokenStorageDataAttributesType.TAGS.toLowerCase());
175
+ if (tagsAttribute?.value) {
176
+ // Tags are stored as comma-separated string, split and trim
177
+ return tagsAttribute.value
178
+ .split(',')
179
+ .map(tag => tag.trim())
180
+ .filter(Boolean);
181
+ }
182
+ return [];
183
+ };
184
+ exports.extractTagsFromMetadata = extractTagsFromMetadata;
185
+ //# sourceMappingURL=helper.functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.functions.js","sourceRoot":"","sources":["../../../../src/shared-patterns/functions/helper.functions.ts"],"names":[],"mappings":";;;AAEA,6FAA4G;AAC5G,2GAA4H;AAE5H;;;;;KAKK;AACE,MAAM,sCAAsC,GAAG,CAAC,oBAAmC,EAAY,EAAE;IACpG,OAAO,oBAAoB;QACzB,CAAC,CAAC,oBA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C5F,CAAC;IAEF,IAAI,aAAa,EAAE,KAAK,EAAE,CAAC;QACzB,4DAA4D;QAC5D,OAAO,aAAa,CAAC,KAAK;aACvB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACtB,MAAM,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAA;AAjBY,QAAA,uBAAuB,2BAiBnC"}
@@ -3,9 +3,9 @@
3
3
  * Uses barrel exports for automatic inclusion - no manual maintenance needed!
4
4
  */
5
5
  // Export enums - these are safe for browser use (barrel export)
6
- export * from './shared-lib/enum/index.js';
6
+ export * from './shared-lib/enum';
7
7
  // Export types and constants (runtime exports) - browser-safe only
8
- export * from './shared-lib/types/index.js';
8
+ export * from './shared-lib/types';
9
9
  // Re-export web3 types for convenience
10
10
  export * from '@explorins/web3-types';
11
11
  // Note: Backend-specific types (like TRANSACTION_FORMATS) are excluded from browser build
package/dist/esm/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  // PERS Shared Contracts Library - Pure Data Contracts and Domain Vocabulary
2
2
  // 🌐 PUBLIC: Safe for external consumption - contains only DTOs, interfaces, types, and enums
3
3
  // Core domain contracts
4
- export * from './shared-lib/enum/index.js';
5
- export * from './shared-lib/interfaces/index.js';
6
- export * from './shared-lib/types/index.js';
4
+ export * from './shared-lib/enum';
5
+ export * from './shared-lib/interfaces';
6
+ export * from './shared-lib/types';
7
7
  // Re-export web3 types for convenience
8
8
  export * from '@explorins/web3-types';
9
- export { ErrorCategory } from './shared-lib/errors/base/error-classification-enums.js';
9
+ export { ErrorCategory } from './shared-lib/errors/base/error-classification-enums';
10
10
  // Shared patterns (architecture components)
11
- // export * from './shared-patterns/index.js';
11
+ // export * from './shared-patterns/index';
12
12
  // External consumers should only use the type exports and documented public APIs
13
13
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export * from './validation.decorators.js';
1
+ export * from './validation.decorators';
2
2
  //# sourceMappingURL=index.js.map
@@ -6,8 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
8
8
  import { IsString, IsEnum } from "class-validator";
9
- import { AccountOwnerType } from "../enum/index.js";
10
- import { OptionalStrip } from '../decorators/index.js';
9
+ import { AccountOwnerType } from "../enum";
10
+ import { OptionalStrip } from '../decorators';
11
11
  /**
12
12
  * Standard Account Identification for Transaction Participants
13
13
  * Supports multiple identification methods with auto-detection
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { ApiProperty } from "@nestjs/swagger";
8
- import { TokenBalanceDTO, TokenMetadataBalanceDTO } from "./token/token-balance.dto.js";
8
+ import { TokenBalanceDTO, TokenMetadataBalanceDTO } from "./token/token-balance.dto";
9
9
  export class AccountTokenBalancesDTO {
10
10
  accountAddress = '';
11
11
  tokenBalances = [];
@@ -6,8 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
8
8
  import { IsNotEmpty, IsEmail, IsString, IsEnum } from 'class-validator';
9
- import { AdminType } from './../../enum/admin-type.enum.js';
10
- import { OptionalStrip } from '../../decorators/index.js';
9
+ import { AdminType } from './../../enum/admin-type.enum';
10
+ import { OptionalStrip } from '../../decorators';
11
11
  export class AdminCreateRequestDTO {
12
12
  email = '';
13
13
  displayName;
@@ -5,8 +5,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
8
- import { AdminType } from "../../enum/admin-type.enum.js";
9
- import { TenantDTO } from "./../tenant/index.js";
8
+ import { AdminType } from "../../enum/admin-type.enum";
9
+ import { TenantDTO } from "./../tenant";
10
10
  export class AdminDTO {
11
11
  id = '';
12
12
  email = '';
@@ -1,3 +1,3 @@
1
- export * from './admin-create.request.dto.js';
2
- export * from './admin.dto.js';
1
+ export * from './admin-create.request.dto';
2
+ export * from './admin.dto';
3
3
  //# sourceMappingURL=index.js.map
@@ -5,8 +5,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
8
- import { AiOperationType } from '../../enum/ai-operation-type.enum.js';
9
- import { AiTriggerProcessType } from '../../enum/ai-trigger-process-type.enum.js';
8
+ import { AiOperationType } from '../../enum/ai-operation-type.enum';
9
+ import { AiTriggerProcessType } from '../../enum/ai-trigger-process-type.enum';
10
10
  /**
11
11
  * AI Generation Log DTO
12
12
  *
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ApiProperty } from '@nestjs/swagger';
8
8
  import { IsEnum, IsString, MaxLength } from 'class-validator';
9
- import { AiOperationType } from '../../enum/ai-operation-type.enum.js';
9
+ import { AiOperationType } from '../../enum/ai-operation-type.enum';
10
10
  /**
11
11
  * DTO for a single AI prompt operation configuration.
12
12
  * Implements AiPromptConfig interface with validation decorators.
@@ -1,4 +1,4 @@
1
1
  // AI DTOs Barrel
2
- export * from './ai-generation-log.dto.js';
3
- export * from './ai-prompt-config.dto.js';
2
+ export * from './ai-generation-log.dto';
3
+ export * from './ai-prompt-config.dto';
4
4
  //# sourceMappingURL=index.js.map
@@ -7,10 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
8
8
  import { IsDate, IsOptional, IsString, IsBoolean, IsArray, IsNumber, IsEnum } from 'class-validator';
9
9
  import { Type } from 'class-transformer';
10
- import { SortOrder } from '../../enum/sort-order.enum.js';
11
- import { AiTriggerProcessType } from '../../enum/ai-trigger-process-type.enum.js';
12
- import { AiOperationType } from '../../enum/ai-operation-type.enum.js';
13
- import { AiAnalyticsMetric, AiAnalyticsGroupBy } from '../../enum/ai-analytics-metric.enum.js';
10
+ import { SortOrder } from '../../enum/sort-order.enum';
11
+ import { AiTriggerProcessType } from '../../enum/ai-trigger-process-type.enum';
12
+ import { AiOperationType } from '../../enum/ai-operation-type.enum';
13
+ import { AiAnalyticsMetric, AiAnalyticsGroupBy } from '../../enum/ai-analytics-metric.enum';
14
14
  /**
15
15
  * AI Usage Summary Request DTO
16
16
  *
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ApiPropertyOptional } from '@nestjs/swagger';
8
8
  import { IsDateString } from 'class-validator';
9
- import { OptionalStrip } from '../../decorators/index.js';
9
+ import { OptionalStrip } from '../../decorators';
10
10
  /**
11
11
  * BASE ANALYTICS REQUEST
12
12
  *
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { IsEnum, IsInt, Min, Max, IsDateString, ValidateNested, IsString } from 'class-validator';
8
8
  import { Type } from 'class-transformer';
9
9
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
10
- import { SortOrder } from '../../../index.js';
11
- import { NativeTokenTypes } from '../../types/native-token.type.js';
12
- import { OptionalStrip, OptionalStripNumber } from '../../decorators/index.js';
10
+ import { SortOrder } from '../../..';
11
+ import { NativeTokenTypes } from '../../types/native-token.type';
12
+ import { OptionalStrip, OptionalStripNumber } from '../../decorators';
13
13
  /**
14
14
  * BUSINESS RANKING ANALYTICS DTOs
15
15
  *
@@ -7,11 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { IsNumber, Min, Max, IsArray, IsString, ValidateNested, IsEnum, IsIn, IsDateString } from 'class-validator';
8
8
  import { Transform, Type } from 'class-transformer';
9
9
  import { ApiProperty, ApiPropertyOptional, OmitType, PartialType } from '@nestjs/swagger';
10
- import { CampaignClaimAnalyticsDTO } from '../analytics/campaign-claim-analytics.dto.js';
11
- import { SortOrder } from '../../enum/index.js';
12
- import { ANALYTICS_METRIC_TYPES } from '../../types/analytics.type.js';
13
- import { GroupByExpressionDTO } from '../analytics/group-by-expression.dto.js';
14
- import { OptionalStrip, OptionalStripNumber } from '../../decorators/index.js';
10
+ import { CampaignClaimAnalyticsDTO } from '../analytics/campaign-claim-analytics.dto';
11
+ import { SortOrder } from '../../enum';
12
+ import { ANALYTICS_METRIC_TYPES } from '../../types/analytics.type';
13
+ import { GroupByExpressionDTO } from '../analytics/group-by-expression.dto';
14
+ import { OptionalStrip, OptionalStripNumber } from '../../decorators';
15
15
  /**
16
16
  * SCALABLE ANALYTICS REQUEST PATTERN
17
17
  *
@@ -5,11 +5,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
8
- import { ProcessRecordStatus } from "../../enum/index.js";
9
- import { UserDTO } from "../user/user.dto.js";
10
- import { CampaignDTO } from "../campaign/campaign.dto.js";
11
- import { BusinessDTO } from "../business/business.dto.js";
12
- import { TriggerSourceDTO } from "../campaign/trigger-source.dto.js";
8
+ import { ProcessRecordStatus } from "../../enum";
9
+ import { UserDTO } from "../user/user.dto";
10
+ import { CampaignDTO } from "../campaign/campaign.dto";
11
+ import { BusinessDTO } from "../business/business.dto";
12
+ import { TriggerSourceDTO } from "../campaign/trigger-source.dto";
13
13
  /**
14
14
  * Campaign Claim Analytics DTO
15
15
  *
@@ -6,8 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
8
8
  import { IsString } from "class-validator";
9
- import { AccountOwnerType } from "../../enum/index.js";
10
- import { OptionalStrip } from '../../decorators/index.js';
9
+ import { AccountOwnerType } from "../../enum";
10
+ import { OptionalStrip } from '../../decorators';
11
11
  export class GroupByExpressionDTO {
12
12
  expression;
13
13
  alias;
@@ -1,10 +1,10 @@
1
- export * from './base-analytics.dto.js';
2
- export * from './business-ranking-analytics.dto.js';
3
- export * from './campaign-claim-analytics.dto.js';
4
- export * from './campaign-claim-analytics-request.dto.js';
5
- export * from './group-by-expression.dto.js';
6
- export * from './retention-analytics.dto.js';
7
- export * from './tag-analytics.dto.js';
8
- export * from './user-ranking-analytics.dto.js';
9
- export * from './ai-analytics.dto.js';
1
+ export * from './base-analytics.dto';
2
+ export * from './business-ranking-analytics.dto';
3
+ export * from './campaign-claim-analytics.dto';
4
+ export * from './campaign-claim-analytics-request.dto';
5
+ export * from './group-by-expression.dto';
6
+ export * from './retention-analytics.dto';
7
+ export * from './tag-analytics.dto';
8
+ export * from './user-ranking-analytics.dto';
9
+ export * from './ai-analytics.dto';
10
10
  //# sourceMappingURL=index.js.map
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { IsEnum, IsInt, Min, Max, IsDateString, ValidateNested } from 'class-validator';
8
8
  import { Type } from 'class-transformer';
9
9
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
10
- import { NativeTokenTypes } from '../../types/native-token.type.js';
11
- import { OptionalStrip, OptionalStripNumber } from '../../decorators/index.js';
12
- import { TransactionTriggerProcessType } from '../../enum/index.js';
10
+ import { NativeTokenTypes } from '../../types/native-token.type';
11
+ import { OptionalStrip, OptionalStripNumber } from '../../decorators';
12
+ import { TransactionTriggerProcessType } from '../../enum';
13
13
  /**
14
14
  * RETENTION ANALYTICS DTOs
15
15
  *
@@ -7,12 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { IsIn, IsNumber, IsString, IsObject, IsDateString, Min, Max, IsArray, ValidateNested, IsEnum } from 'class-validator';
8
8
  import { Transform, Type } from 'class-transformer';
9
9
  import { ApiProperty, ApiPropertyOptional, OmitType, PartialType } from '@nestjs/swagger';
10
- import { TransactionDTO } from '../transaction/transaction.dto.js';
11
- import { SortOrder, AccountOwnerType } from '../../enum/index.js';
12
- import { ANALYTICS_METRIC_TYPES } from '../../types/analytics.type.js';
13
- import { GroupByExpressionDTO } from './group-by-expression.dto.js';
14
- import { NativeTokenTypes } from '../../types/native-token.type.js';
15
- import { OptionalStrip, OptionalStripNumber } from '../../decorators/index.js';
10
+ import { TransactionDTO } from '../transaction/transaction.dto';
11
+ import { SortOrder, AccountOwnerType } from '../../enum';
12
+ import { ANALYTICS_METRIC_TYPES } from '../../types/analytics.type';
13
+ import { GroupByExpressionDTO } from './group-by-expression.dto';
14
+ import { NativeTokenTypes } from '../../types/native-token.type';
15
+ import { OptionalStrip, OptionalStripNumber } from '../../decorators';
16
16
  /**
17
17
  * Type-safe filters for transaction analytics
18
18
  * All fields optional via PartialType
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
8
8
  import { IsDateString, ValidateNested } from 'class-validator';
9
9
  import { Type } from 'class-transformer';
10
- import { OptionalStrip } from '../../decorators/index.js';
10
+ import { OptionalStrip } from '../../decorators';
11
11
  /**
12
12
  * USER ANALYTICS FILTERS DTO
13
13
  *
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
8
8
  import { IsDateString, IsEnum, IsNumber, ValidateNested, Min, Max } from 'class-validator';
9
9
  import { Type } from 'class-transformer';
10
- import { SortOrder } from '../../enum/index.js';
11
- import { NativeTokenTypes } from '../../types/native-token.type.js';
12
- import { OptionalStrip, OptionalStripNumber } from '../../decorators/index.js';
10
+ import { SortOrder } from '../../enum';
11
+ import { NativeTokenTypes } from '../../types/native-token.type';
12
+ import { OptionalStrip, OptionalStripNumber } from '../../decorators';
13
13
  /**
14
14
  * USER RANKING FILTERS DTO
15
15
  *
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
8
8
  import { Type } from "class-transformer";
9
9
  import { IsBoolean, IsOptional, ValidateNested } from "class-validator";
10
- import { ApiKeyDTO } from "./api-key.dto.js";
10
+ import { ApiKeyDTO } from "./api-key.dto";
11
11
  export class ApiKeyVerificationRequestDTO {
12
12
  /** JWT token to verify */
13
13
  authToken;
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
8
8
  import { IsEnum, IsString, IsDateString, IsUUID, IsOptional } from 'class-validator';
9
- import { ApiKeyType } from './../../enum/api-key-type.enum.js';
9
+ import { ApiKeyType } from './../../enum/api-key-type.enum';
10
10
  /**
11
11
  * API Key DTO - Standard response format for API key information
12
12
  * Contains safe, non-sensitive API key metadata for client consumption
@@ -1,4 +1,4 @@
1
- export * from './api-key.dto.js';
2
- export * from './api-key.request.dto.js';
3
- export * from './api-key-verification.dto.js';
1
+ export * from './api-key.dto';
2
+ export * from './api-key.request.dto';
3
+ export * from './api-key-verification.dto';
4
4
  //# sourceMappingURL=index.js.map
@@ -7,11 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
8
8
  import { IsNotEmpty, IsString, ValidateNested, IsEnum } from "class-validator";
9
9
  import { Type } from "class-transformer";
10
- import { UserDTO } from "../user/user.dto.js";
11
- import { BusinessDTO } from "../business/index.js";
12
- import { AccountOwnerType } from "../../enum/index.js";
13
- import { AdminDTO } from "../admin/index.js";
14
- import { OptionalStrip } from '../../decorators/index.js';
10
+ import { UserDTO } from "../user/user.dto";
11
+ import { BusinessDTO } from "../business";
12
+ import { AccountOwnerType } from "../../enum";
13
+ import { AdminDTO } from "../admin";
14
+ import { OptionalStrip } from '../../decorators';
15
15
  /**
16
16
  * Auth Context DTO
17
17
  *
@@ -1,3 +1,3 @@
1
- export * from './auth-token-verification.dto.js';
2
- export * from './auth.dto.js';
1
+ export * from './auth-token-verification.dto';
2
+ export * from './auth.dto';
3
3
  //# sourceMappingURL=index.js.map