@explorins/pers-shared 2.1.104 → 2.1.105

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 (53) hide show
  1. package/dist/cjs/shared-lib/dto/transaction/transaction-bulk-data.request.dto.d.ts +3 -3
  2. package/dist/cjs/shared-lib/dto/transaction/transaction-bulk-data.request.dto.js +9 -9
  3. package/dist/cjs/shared-lib/dto/user/userUploadData.dto.d.ts +3 -3
  4. package/dist/cjs/shared-lib/dto/user/userUploadData.dto.js +14 -14
  5. package/dist/cjs/shared-lib/dto/webhook/webhook.dto.d.ts +6 -6
  6. package/dist/cjs/shared-lib/dto/webhook/webhook.dto.js +52 -52
  7. package/dist/cjs/shared-lib/enum/entity-types.enum.d.ts +100 -0
  8. package/dist/cjs/shared-lib/enum/entity-types.enum.d.ts.map +1 -0
  9. package/dist/cjs/shared-lib/enum/entity-types.enum.js +61 -0
  10. package/dist/cjs/shared-lib/enum/entity-types.enum.js.map +1 -0
  11. package/dist/cjs/shared-lib/enum/index.d.ts +1 -0
  12. package/dist/cjs/shared-lib/enum/index.d.ts.map +1 -1
  13. package/dist/cjs/shared-lib/enum/index.js +2 -0
  14. package/dist/cjs/shared-lib/enum/index.js.map +1 -1
  15. package/dist/cjs/shared-lib/errors/error-codes.d.ts +2 -26
  16. package/dist/cjs/shared-lib/errors/error-codes.d.ts.map +1 -1
  17. package/dist/cjs/shared-lib/errors/error-codes.js +3 -22
  18. package/dist/cjs/shared-lib/errors/error-codes.js.map +1 -1
  19. package/dist/cjs/shared-lib/value-objects/token-balance.value-object.js +2 -2
  20. package/dist/cjs/shared-lib/value-objects/token-balance.value-object.js.map +1 -1
  21. package/dist/cjs/shared-patterns/functions/{helper.functions.d.ts → token-metadata.functions.d.ts} +13 -24
  22. package/dist/cjs/shared-patterns/functions/token-metadata.functions.d.ts.map +1 -0
  23. package/dist/cjs/shared-patterns/functions/{helper.functions.js → token-metadata.functions.js} +14 -58
  24. package/dist/cjs/shared-patterns/functions/token-metadata.functions.js.map +1 -0
  25. package/dist/esm/shared-lib/dto/transaction/transaction-bulk-data.request.dto.d.ts +3 -3
  26. package/dist/esm/shared-lib/dto/transaction/transaction-bulk-data.request.dto.js +8 -8
  27. package/dist/esm/shared-lib/dto/user/userUploadData.dto.d.ts +3 -3
  28. package/dist/esm/shared-lib/dto/user/userUploadData.dto.js +10 -10
  29. package/dist/esm/shared-lib/dto/webhook/webhook.dto.d.ts +6 -6
  30. package/dist/esm/shared-lib/dto/webhook/webhook.dto.js +46 -46
  31. package/dist/esm/shared-lib/enum/entity-types.enum.d.ts +100 -0
  32. package/dist/esm/shared-lib/enum/entity-types.enum.d.ts.map +1 -0
  33. package/dist/esm/shared-lib/enum/entity-types.enum.js +58 -0
  34. package/dist/esm/shared-lib/enum/entity-types.enum.js.map +1 -0
  35. package/dist/esm/shared-lib/enum/index.d.ts +1 -0
  36. package/dist/esm/shared-lib/enum/index.d.ts.map +1 -1
  37. package/dist/esm/shared-lib/enum/index.js +2 -0
  38. package/dist/esm/shared-lib/enum/index.js.map +1 -1
  39. package/dist/esm/shared-lib/errors/error-codes.d.ts +2 -26
  40. package/dist/esm/shared-lib/errors/error-codes.d.ts.map +1 -1
  41. package/dist/esm/shared-lib/errors/error-codes.js +2 -22
  42. package/dist/esm/shared-lib/errors/error-codes.js.map +1 -1
  43. package/dist/esm/shared-lib/value-objects/token-balance.value-object.js +1 -1
  44. package/dist/esm/shared-lib/value-objects/token-balance.value-object.js.map +1 -1
  45. package/dist/esm/shared-patterns/functions/{helper.functions.d.ts → token-metadata.functions.d.ts} +13 -24
  46. package/dist/esm/shared-patterns/functions/token-metadata.functions.d.ts.map +1 -0
  47. package/dist/esm/shared-patterns/functions/{helper.functions.js → token-metadata.functions.js} +13 -54
  48. package/dist/esm/shared-patterns/functions/token-metadata.functions.js.map +1 -0
  49. package/package.json +1 -1
  50. package/dist/cjs/shared-patterns/functions/helper.functions.d.ts.map +0 -1
  51. package/dist/cjs/shared-patterns/functions/helper.functions.js.map +0 -1
  52. package/dist/esm/shared-patterns/functions/helper.functions.d.ts.map +0 -1
  53. package/dist/esm/shared-patterns/functions/helper.functions.js.map +0 -1
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuditEntityTypes = exports.ErrorDomains = exports.EntityTypes = void 0;
4
+ /**
5
+ * Core Entity Types
6
+ *
7
+ * Single source of truth for entity type identifiers used across the system.
8
+ * Other type consts (ErrorDomains, AuditEntityTypes) extend from this base.
9
+ */
10
+ exports.EntityTypes = {
11
+ // Core entities
12
+ USER: 'user',
13
+ ADMIN: 'admin',
14
+ TENANT: 'tenant',
15
+ // Token entities
16
+ TOKEN: 'token',
17
+ TOKEN_METADATA: 'token_metadata',
18
+ TOKEN_TYPE: 'token_type',
19
+ // Financial entities
20
+ WALLET: 'wallet',
21
+ BALANCE: 'balance',
22
+ TRANSACTION: 'transaction',
23
+ PURCHASE: 'purchase',
24
+ // Business entities
25
+ BUSINESS: 'business',
26
+ BUSINESS_TYPE: 'business_type',
27
+ // Campaign entities
28
+ CAMPAIGN: 'campaign',
29
+ CAMPAIGN_TRIGGER: 'campaign_trigger',
30
+ // Redemption entities
31
+ REDEMPTION: 'redemption',
32
+ REDEMPTION_TYPE: 'redemption_type',
33
+ // Infrastructure entities
34
+ CONTRACT: 'contract',
35
+ SIGNING_ACCOUNT: 'signing_account',
36
+ API_KEY: 'api_key',
37
+ WEBHOOK: 'webhook',
38
+ };
39
+ /**
40
+ * Error-specific domains (extends EntityTypes)
41
+ *
42
+ * Includes entity types plus error-specific classification domains.
43
+ */
44
+ exports.ErrorDomains = {
45
+ ...exports.EntityTypes,
46
+ // Error-specific domains (not entities, but error classifications)
47
+ VALIDATION: 'validation',
48
+ SYSTEM: 'system',
49
+ AUTHENTICATION: 'authentication',
50
+ EXTERNAL: 'external',
51
+ };
52
+ /**
53
+ * Auditable Entity Types (extends EntityTypes)
54
+ *
55
+ * All entities that can be audited. Currently same as EntityTypes,
56
+ * but can be extended with audit-specific entities if needed.
57
+ */
58
+ exports.AuditEntityTypes = {
59
+ ...exports.EntityTypes,
60
+ };
61
+ //# sourceMappingURL=entity-types.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-types.enum.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/entity-types.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,WAAW,GAAG;IACzB,gBAAgB;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAEhB,iBAAiB;IACjB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,gBAAgB;IAChC,UAAU,EAAE,YAAY;IAExB,qBAAqB;IACrB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IAEpB,oBAAoB;IACpB,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,eAAe;IAE9B,oBAAoB;IACpB,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,kBAAkB;IAEpC,sBAAsB;IACtB,UAAU,EAAE,YAAY;IACxB,eAAe,EAAE,iBAAiB;IAElC,0BAA0B;IAC1B,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,iBAAiB;IAClC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACV,CAAC;AAOX;;;;GAIG;AACU,QAAA,YAAY,GAAG;IAC1B,GAAG,mBAAW;IACd,mEAAmE;IACnE,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,UAAU;CACZ,CAAC;AAOX;;;;;GAKG;AACU,QAAA,gBAAgB,GAAG;IAC9B,GAAG,mBAAW;CACN,CAAC"}
@@ -26,5 +26,6 @@ export * from './ai-operation-type.enum';
26
26
  export * from './ai-trigger-process-type.enum';
27
27
  export * from './ai-analytics-metric.enum';
28
28
  export * from './webhook.enum';
29
+ export * from './entity-types.enum';
29
30
  export { ErrorCategory } from '../errors/base/error-classification-enums';
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -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;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,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,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,cAAc,gBAAgB,CAAC;AAG/B,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC"}
@@ -45,6 +45,8 @@ __exportStar(require("./ai-trigger-process-type.enum"), exports);
45
45
  __exportStar(require("./ai-analytics-metric.enum"), exports);
46
46
  // Webhook enums
47
47
  __exportStar(require("./webhook.enum"), exports);
48
+ // Entity type system (base + domain-specific extensions)
49
+ __exportStar(require("./entity-types.enum"), exports);
48
50
  // Error classification enum
49
51
  var error_classification_enums_1 = require("../errors/base/error-classification-enums");
50
52
  Object.defineProperty(exports, "ErrorCategory", { enumerable: true, get: function () { return error_classification_enums_1.ErrorCategory; } });
@@ -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;AAC3C,gEAA8C;AAE9C,6CAA2B;AAE3B,6CAA2B;AAE3B,2DAAyC;AACzC,iEAA+C;AAC/C,6DAA2C;AAE3C,gBAAgB;AAChB,iDAA+B;AAE/B,4BAA4B;AAC5B,wFAA0E;AAAjE,2HAAA,aAAa,OAAA"}
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,gBAAgB;AAChB,iDAA+B;AAE/B,yDAAyD;AACzD,sDAAoC;AAEpC,4BAA4B;AAC5B,wFAA0E;AAAjE,2HAAA,aAAa,OAAA"}
@@ -86,30 +86,6 @@ export declare const CommonErrorCodes: {
86
86
  * but with better performance through the object pattern.
87
87
  */
88
88
  export type CommonErrorCode = typeof CommonErrorCodes[keyof typeof CommonErrorCodes];
89
- /**
90
- * Domain names used in error classification
91
- *
92
- * Centralized domain strings to ensure consistency across all error classes
93
- * and prevent typos in domain names.
94
- */
95
- export declare const ErrorDomains: {
96
- readonly USER: "user";
97
- readonly TOKEN: "token";
98
- readonly WALLET: "wallet";
99
- readonly BUSINESS: "business";
100
- readonly BALANCE: "balance";
101
- readonly CONTRACT: "contract";
102
- readonly TRANSACTION: "transaction";
103
- readonly VALIDATION: "validation";
104
- readonly SYSTEM: "system";
105
- readonly CAMPAIGN: "campaign";
106
- readonly AUTHENTICATION: "authentication";
107
- readonly EXTERNAL: "external";
108
- readonly TENANT: "tenant";
109
- readonly WEBHOOK: "webhook";
110
- };
111
- /**
112
- * Type-safe union of all domain names
113
- */
114
- export type ErrorDomain = typeof ErrorDomains[keyof typeof ErrorDomains];
89
+ export { ErrorDomains } from '../enum/entity-types.enum';
90
+ export type { ErrorDomain } from '../enum/entity-types.enum';
115
91
  //# sourceMappingURL=error-codes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/errors/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGnB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;CAef,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/errors/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGnB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAGrF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
@@ -101,26 +101,7 @@ exports.CommonErrorCodes = {
101
101
  REQUEST_TIMEOUT: 'REQUEST_TIMEOUT',
102
102
  GATEWAY_TIMEOUT: 'GATEWAY_TIMEOUT'
103
103
  };
104
- /**
105
- * Domain names used in error classification
106
- *
107
- * Centralized domain strings to ensure consistency across all error classes
108
- * and prevent typos in domain names.
109
- */
110
- exports.ErrorDomains = {
111
- USER: 'user',
112
- TOKEN: 'token',
113
- WALLET: 'wallet',
114
- BUSINESS: 'business',
115
- BALANCE: 'balance',
116
- CONTRACT: 'contract',
117
- TRANSACTION: 'transaction',
118
- VALIDATION: 'validation',
119
- SYSTEM: 'system',
120
- CAMPAIGN: 'campaign',
121
- AUTHENTICATION: 'authentication',
122
- EXTERNAL: 'external',
123
- TENANT: 'tenant',
124
- WEBHOOK: 'webhook'
125
- };
104
+ // Re-export ErrorDomains from centralized entity types
105
+ var entity_types_enum_1 = require("../enum/entity-types.enum");
106
+ Object.defineProperty(exports, "ErrorDomains", { enumerable: true, get: function () { return entity_types_enum_1.ErrorDomains; } });
126
107
  //# sourceMappingURL=error-codes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../../../../src/shared-lib/errors/error-codes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEU,QAAA,gBAAgB,GAAG;IAC9B,cAAc;IACd,cAAc,EAAE,gBAAgB;IAChC,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;IAE1C,eAAe;IACf,eAAe,EAAE,iBAAiB;IAClC,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exports, "__esModule", { value: true });
3
3
  exports.TokenBalance = void 0;
4
- const helper_functions_1 = require("../../shared-patterns/functions/helper.functions");
4
+ const token_metadata_functions_1 = require("../../shared-patterns/functions/token-metadata.functions");
5
5
  /**
6
6
  * Value object representing the token balance details.
7
7
  */
@@ -120,7 +120,7 @@ class TokenBalance {
120
120
  * Returns false if no expiry date (never expires).
121
121
  */
122
122
  isExpired() {
123
- return (0, helper_functions_1.isTokenExpired)(this.expiryDate) ?? false;
123
+ return (0, token_metadata_functions_1.isTokenExpired)(this.expiryDate) ?? false;
124
124
  }
125
125
  /**
126
126
  * Returns a string representation of the TokenBalance.
@@ -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":";;;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,aAA0B,IAAI;QAE9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GA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C,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,EAAE,CAAC;YACjE,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,UAAU,EAAE;YACnC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,UAAU,EAAE;YACnC,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,YAAY,EAAE;YACvC,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,cAAc,EAAE;YAC3C,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,YAAY,EAAE,CAAC;IAChD,CAAC;CACJ;AAlKD,oCAkKC"}
1
+ {"version":3,"file":"token-balance.value-object.js","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/token-balance.value-object.ts"],"names":[],"mappings":";;;AAGA,uGAA0F;AAE1F;;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,aAA0B,IAAI;QAE9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,C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AAK,CAAC,uBAAuB,EAAE,CAAC;YACjE,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,UAAU,EAAE;YACnC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,UAAU,EAAE;YACnC,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,YAAY,EAAE;YACvC,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,cAAc,EAAE;YAC3C,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,YAAY,EAAE,CAAC;IAChD,CAAC;CACJ;AAlKD,oCAkKC"}
@@ -1,14 +1,19 @@
1
+ /**
2
+ * Token Metadata Functions
3
+ *
4
+ * Utilities for working with NFT/blockchain token metadata,
5
+ * validity computation, and attribute extraction.
6
+ */
1
7
  import { type TokenValidityType } from '../../shared-lib/enum/token-validity-type.enum';
2
8
  import { TokenStorageData } from '../../shared-lib/interfaces/token-storage-data.interface';
3
9
  /**
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
+ * Checks if a token ID is a URI (IPFS or HTTP).
11
+ * Used for determining how to resolve token metadata.
12
+ *
13
+ * @param tokenId - The token ID to check
14
+ * @returns true if the tokenId is a valid URI
15
+ */
10
16
  export declare const checkIfTokenIdIsUri: (tokenId: string | null) => boolean;
11
- export declare const compareVersions: (version1: string, version2: string) => number;
12
17
  /**
13
18
  * Computes the expiry date based on validity configuration.
14
19
  *
@@ -27,22 +32,6 @@ export declare const computeExpiryDate: (validityType?: TokenValidityType, valid
27
32
  * @returns true if expired, false if still valid, undefined if no expiry date
28
33
  */
29
34
  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
35
  /**
47
36
  * Extracts the expiry_date attribute from token metadata (OpenSea standard format).
48
37
  * This is the inverse operation of computeExpiryDate - it reads the expiry that was
@@ -80,4 +69,4 @@ export declare const extractTagsFromMetadata: (metadata: TokenStorageData | null
80
69
  * extractBusinessIdsFromMetadata(metadata); // Returns ['uuid-1', 'uuid-2']
81
70
  */
82
71
  export declare const extractBusinessIdsFromMetadata: (metadata: TokenStorageData | null) => string[];
83
- //# sourceMappingURL=helper.functions.d.ts.map
72
+ //# sourceMappingURL=token-metadata.functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-metadata.functions.d.ts","sourceRoot":"","sources":["../../../../src/shared-patterns/functions/token-metadata.functions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAC5G,OAAO,EAAE,gBAAgB,EAAkC,MAAM,0DAA0D,CAAC;AAE5H;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,GAAG,IAAI,KAAG,OAM5D,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;;;;;;;;;;;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;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,GAAI,UAAU,gBAAgB,GAAG,IAAI,KAAG,MAAM,EAmBxF,CAAA"}
@@ -1,20 +1,21 @@
1
1
  "use strict";
2
+ /**
3
+ * Token Metadata Functions
4
+ *
5
+ * Utilities for working with NFT/blockchain token metadata,
6
+ * validity computation, and attribute extraction.
7
+ */
2
8
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractBusinessIdsFromMetadata = exports.extractTagsFromMetadata = exports.extractExpiryDateFromMetadata = exports.normalizeTags = exports.isTokenExpired = exports.computeExpiryDate = exports.compareVersions = exports.checkIfTokenIdIsUri = exports.parseCommaSeparatedStringToStringArray = void 0;
9
+ exports.extractBusinessIdsFromMetadata = exports.extractTagsFromMetadata = exports.extractExpiryDateFromMetadata = exports.isTokenExpired = exports.computeExpiryDate = exports.checkIfTokenIdIsUri = void 0;
4
10
  const token_validity_type_enum_1 = require("../../shared-lib/enum/token-validity-type.enum");
5
11
  const token_storage_data_interface_1 = require("../../shared-lib/interfaces/token-storage-data.interface");
6
12
  /**
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;
13
+ * Checks if a token ID is a URI (IPFS or HTTP).
14
+ * Used for determining how to resolve token metadata.
15
+ *
16
+ * @param tokenId - The token ID to check
17
+ * @returns true if the tokenId is a valid URI
18
+ */
18
19
  const checkIfTokenIdIsUri = (tokenId) => {
19
20
  const uriRegex = /^(https?|ipfs):\/\/.*/;
20
21
  if (!tokenId || !uriRegex.test(tokenId)) {
@@ -23,20 +24,6 @@ const checkIfTokenIdIsUri = (tokenId) => {
23
24
  return true;
24
25
  };
25
26
  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
27
  /**
41
28
  * Computes the expiry date based on validity configuration.
42
29
  *
@@ -102,37 +89,6 @@ const isTokenExpired = (expiryDate, referenceDate = new Date()) => {
102
89
  return new Date(expiryDate) < referenceDate;
103
90
  };
104
91
  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
92
  /**
137
93
  * Extracts the expiry_date attribute from token metadata (OpenSea standard format).
138
94
  * This is the inverse operation of computeExpiryDate - it reads the expiry that was
@@ -211,4 +167,4 @@ const extractBusinessIdsFromMetadata = (metadata) => {
211
167
  return [];
212
168
  };
213
169
  exports.extractBusinessIdsFromMetadata = extractBusinessIdsFromMetadata;
214
- //# sourceMappingURL=helper.functions.js.map
170
+ //# sourceMappingURL=token-metadata.functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-metadata.functions.js","sourceRoot":"","sources":["../../../../src/shared-patterns/functions/token-metadata.functions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6FAA4G;AAC5G,2GAA4H;AAE5H;;;;;;GAMG;AACI,MAAM,mBAAmB,GAAG,CAAC,OAAsB,EAAW,EAAE;IACrE,MAAM,QAAQ,GAAG,uBAAuB,CAAC;IACzC,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAA;AANY,QAAA,mBAAmB,uBAM/B;AAED;;;;;;;;GAQG;AACI,MAAM,iBAAiB,GAAG,CAC/B,YAAgC,EAChC,gBAAyB,EACzB,eAAsB,EACtB,eAAqB,IAAI,IAAI,EAAE,EACb,EAAE;IACpB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,8DAA8D;QAC9D,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,6CAAkB,CAAC,UAAU;YAChC,OAAO,eAAe,CAAC;QAEzB,KAAK,6CAAkB,CAAC,kBAAkB;YACxC,IAAI,CAAC,gBAAgB,IAAI,gBAAgB,IAAI,CAAC;gBAAE,OAAO,SAAS,CAAC;YACjE,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;YAC1C,UA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8B,CAAC,IAAI,CAAC,WAAW,EAAE,CAC5F,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;AAED;;;;;;;;;;GAUG;AACI,MAAM,8BAA8B,GAAG,CAAC,QAAiC,EAAY,EAAE;IAC5F,IAAI,CAAC,QAAQ,EAAE,UAAU;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,CACnD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,6DAA8B,CAAC,YAAY,CAAC,WAAW,EAAE,CACpG,CAAC;IAEF,IAAI,oBAAoB,EAAE,KAAK,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,uCAAuC;QACzC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAA;AAnBY,QAAA,8BAA8B,kCAmB1C"}
@@ -1,12 +1,12 @@
1
- import { UserUploadDataDto } from "../user/userUploadData.dto";
2
- export declare class TransactionBulkUserUploadDataDto extends UserUploadDataDto {
1
+ import { UserUploadDataDTO } from "../user/userUploadData.dto";
2
+ export declare class TransactionBulkUserUploadDataDTO extends UserUploadDataDTO {
3
3
  amount?: number;
4
4
  tokenAddress?: string;
5
5
  chainId?: number;
6
6
  tokenMetadataIncrementalId?: string | null;
7
7
  }
8
8
  export declare class TransactionBulkDataRequestDTO {
9
- userData: TransactionBulkUserUploadDataDto[];
9
+ userData: TransactionBulkUserUploadDataDTO[];
10
10
  amount?: number;
11
11
  tokenAddress?: string;
12
12
  tokenMetadataIncrementalId?: string | null;
@@ -4,12 +4,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { UserUploadDataDto } from "../user/userUploadData.dto.js";
7
+ import { UserUploadDataDTO } from "../user/userUploadData.dto.js";
8
8
  import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
9
9
  import { Type } from 'class-transformer';
10
10
  import { IsArray, ValidateNested, IsNumber, IsString, MinLength, ArrayMinSize } from 'class-validator';
11
11
  import { OptionalStrip, OptionalStripNumber } from '../../decorators/index.js';
12
- export class TransactionBulkUserUploadDataDto extends UserUploadDataDto {
12
+ export class TransactionBulkUserUploadDataDTO extends UserUploadDataDTO {
13
13
  amount;
14
14
  tokenAddress;
15
15
  chainId;
@@ -22,7 +22,7 @@ __decorate([
22
22
  }),
23
23
  OptionalStripNumber(),
24
24
  IsNumber()
25
- ], TransactionBulkUserUploadDataDto.prototype, "amount", void 0);
25
+ ], TransactionBulkUserUploadDataDTO.prototype, "amount", void 0);
26
26
  __decorate([
27
27
  ApiPropertyOptional({
28
28
  description: 'Token address for this specific user. Overrides global tokenAddress.',
@@ -31,7 +31,7 @@ __decorate([
31
31
  OptionalStrip(),
32
32
  IsString(),
33
33
  MinLength(1)
34
- ], TransactionBulkUserUploadDataDto.prototype, "tokenAddress", void 0);
34
+ ], TransactionBulkUserUploadDataDTO.prototype, "tokenAddress", void 0);
35
35
  __decorate([
36
36
  ApiPropertyOptional({
37
37
  description: 'Chain ID for this specific user. Overrides global chainId.',
@@ -39,7 +39,7 @@ __decorate([
39
39
  }),
40
40
  OptionalStripNumber(),
41
41
  IsNumber()
42
- ], TransactionBulkUserUploadDataDto.prototype, "chainId", void 0);
42
+ ], TransactionBulkUserUploadDataDTO.prototype, "chainId", void 0);
43
43
  __decorate([
44
44
  ApiPropertyOptional({
45
45
  description: 'Token metadata incremental ID for this specific user. Overrides global tokenMetadataIncrementalId.',
@@ -48,7 +48,7 @@ __decorate([
48
48
  OptionalStrip(),
49
49
  IsString(),
50
50
  MinLength(1)
51
- ], TransactionBulkUserUploadDataDto.prototype, "tokenMetadataIncrementalId", void 0);
51
+ ], TransactionBulkUserUploadDataDTO.prototype, "tokenMetadataIncrementalId", void 0);
52
52
  export class TransactionBulkDataRequestDTO {
53
53
  userData;
54
54
  amount;
@@ -60,13 +60,13 @@ export class TransactionBulkDataRequestDTO {
60
60
  __decorate([
61
61
  ApiProperty({
62
62
  description: 'Array of user data objects for bulk minting. Each object must conform to the UserUploadDataDto structure.',
63
- type: [TransactionBulkUserUploadDataDto], // Use the specific DTO for Swagger
63
+ type: [TransactionBulkUserUploadDataDTO], // Use the specific DTO for Swagger
64
64
  }),
65
65
  IsArray(),
66
66
  ArrayMinSize(1) // Ensure there's at least one user data object
67
67
  ,
68
68
  ValidateNested({ each: true }),
69
- Type(() => TransactionBulkUserUploadDataDto) // Use the specific DTO for class-transformer and validation
69
+ Type(() => TransactionBulkUserUploadDataDTO) // Use the specific DTO for class-transformer and validation
70
70
  ], TransactionBulkDataRequestDTO.prototype, "userData", void 0);
71
71
  __decorate([
72
72
  ApiPropertyOptional({ description: 'Default transaction amount if not specified in individual user data objects. If neither this nor user-specific amount is provided, the transaction for that user may fail or be skipped.' }),
@@ -1,12 +1,12 @@
1
1
  import { UserIdentifierParamsObject as IUserIdentifierObject } from '../../types/unique-user-identifier-keys';
2
- export declare class UserIdentifierObjectDto implements IUserIdentifierObject {
2
+ export declare class UserIdentifierObjectDTO implements IUserIdentifierObject {
3
3
  email?: string;
4
4
  externalId?: string;
5
5
  id?: string;
6
6
  instagramAccountId?: string;
7
7
  wildcard?: string;
8
8
  }
9
- export declare class UserUploadDataDto {
10
- user: UserIdentifierObjectDto;
9
+ export declare class UserUploadDataDTO {
10
+ user: UserIdentifierObjectDTO;
11
11
  }
12
12
  //# sourceMappingURL=userUploadData.dto.d.ts.map
@@ -10,7 +10,7 @@ import { Type } from 'class-transformer';
10
10
  import { OptionalStrip } from '../../decorators/index.js';
11
11
  // This DTO represents the user identification part.
12
12
  // It implements IUserIdentifierObject to align with the shared library type structure.
13
- export class UserIdentifierObjectDto {
13
+ export class UserIdentifierObjectDTO {
14
14
  email;
15
15
  externalId;
16
16
  id;
@@ -21,25 +21,25 @@ __decorate([
21
21
  ApiPropertyOptional({ description: 'User email', example: 'user@example.com' }),
22
22
  OptionalStrip(),
23
23
  IsEmail()
24
- ], UserIdentifierObjectDto.prototype, "email", void 0);
24
+ ], UserIdentifierObjectDTO.prototype, "email", void 0);
25
25
  __decorate([
26
26
  ApiPropertyOptional({ description: 'External User ID' }),
27
27
  OptionalStrip(),
28
28
  IsString(),
29
29
  MinLength(1)
30
- ], UserIdentifierObjectDto.prototype, "externalId", void 0);
30
+ ], UserIdentifierObjectDTO.prototype, "externalId", void 0);
31
31
  __decorate([
32
32
  ApiPropertyOptional({ description: 'User ID (from uniqueUserIdentifierKeys)' }),
33
33
  OptionalStrip(),
34
34
  IsString(),
35
35
  MinLength(1)
36
- ], UserIdentifierObjectDto.prototype, "id", void 0);
36
+ ], UserIdentifierObjectDTO.prototype, "id", void 0);
37
37
  __decorate([
38
38
  ApiPropertyOptional({ description: 'Instagram Account ID (from uniqueUserIdentifierKeys)' }),
39
39
  OptionalStrip(),
40
40
  IsString(),
41
41
  MinLength(1)
42
- ], UserIdentifierObjectDto.prototype, "instagramAccountId", void 0);
42
+ ], UserIdentifierObjectDTO.prototype, "instagramAccountId", void 0);
43
43
  __decorate([
44
44
  ApiPropertyOptional({
45
45
  description: 'Wildcard value for auto-detection of identifier type',
@@ -47,18 +47,18 @@ __decorate([
47
47
  }),
48
48
  OptionalStrip(),
49
49
  IsString()
50
- ], UserIdentifierObjectDto.prototype, "wildcard", void 0);
50
+ ], UserIdentifierObjectDTO.prototype, "wildcard", void 0);
51
51
  // This DTO represents the data for a single user in a bulk upload scenario.
52
- export class UserUploadDataDto {
52
+ export class UserUploadDataDTO {
53
53
  user;
54
54
  }
55
55
  __decorate([
56
56
  ApiProperty({
57
57
  description: 'User identifier object. At least one identifier (e.g., email, id) must be provided. If only wildcard is provided, the system will attempt to detect the identifier type.',
58
- type: () => UserIdentifierObjectDto
58
+ type: () => UserIdentifierObjectDTO
59
59
  }),
60
60
  IsObject(),
61
61
  ValidateNested(),
62
- Type(() => UserIdentifierObjectDto)
63
- ], UserUploadDataDto.prototype, "user", void 0);
62
+ Type(() => UserIdentifierObjectDTO)
63
+ ], UserUploadDataDTO.prototype, "user", void 0);
64
64
  //# sourceMappingURL=userUploadData.dto.js.map
@@ -3,7 +3,7 @@ export { WebhookAuthType, WebhookMethod, WebhookSource, WebhookExecutionStatus,
3
3
  /**
4
4
  * DTO for creating a webhook
5
5
  */
6
- export declare class CreateWebhookDto {
6
+ export declare class CreateWebhookDTO {
7
7
  name: string;
8
8
  description?: string;
9
9
  targetUrl: string;
@@ -15,16 +15,16 @@ export declare class CreateWebhookDto {
15
15
  inboundSecret?: string;
16
16
  timeoutMs?: number;
17
17
  }
18
- declare const UpdateWebhookDto_base: import("@nestjs/common").Type<Partial<CreateWebhookDto>>;
18
+ declare const UpdateWebhookDTO_base: import("@nestjs/common").Type<Partial<CreateWebhookDTO>>;
19
19
  /**
20
20
  * DTO for updating a webhook (all fields optional)
21
21
  */
22
- export declare class UpdateWebhookDto extends UpdateWebhookDto_base {
22
+ export declare class UpdateWebhookDTO extends UpdateWebhookDTO_base {
23
23
  }
24
24
  /**
25
25
  * DTO for webhook list responses (hides sensitive fields)
26
26
  */
27
- export declare class WebhookDto {
27
+ export declare class WebhookDTO {
28
28
  id: string;
29
29
  name: string;
30
30
  description?: string | null;
@@ -43,7 +43,7 @@ export declare class WebhookDto {
43
43
  /**
44
44
  * DTO for webhook execution history
45
45
  */
46
- export declare class WebhookExecutionDto {
46
+ export declare class WebhookExecutionDTO {
47
47
  id: string;
48
48
  webhookId: string;
49
49
  method: string;
@@ -62,7 +62,7 @@ export declare class WebhookExecutionDto {
62
62
  /**
63
63
  * DTO for webhook callback requests from external systems (e.g., n8n workflow completion)
64
64
  */
65
- export declare class WebhookCallbackDto {
65
+ export declare class WebhookCallbackDTO {
66
66
  status: WebhookCallbackStatus;
67
67
  result?: Record<string, unknown>;
68
68
  error?: string;