@plyaz/types 1.13.3 → 1.13.4

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 (55) hide show
  1. package/dist/api/client/types.d.ts +3 -3
  2. package/dist/api/config/types.d.ts +62 -5
  3. package/dist/api/debugger/enums.d.ts +12 -0
  4. package/dist/api/debugger/types.d.ts +1 -1
  5. package/dist/api/errors/types.d.ts +46 -238
  6. package/dist/api/events/factories/errors/types.d.ts +26 -27
  7. package/dist/api/index.cjs +1437 -669
  8. package/dist/api/index.cjs.map +1 -1
  9. package/dist/api/index.d.ts +5 -2
  10. package/dist/api/index.js +1365 -603
  11. package/dist/api/index.js.map +1 -1
  12. package/dist/db/DatabaseAdapter.d.ts +2 -2
  13. package/dist/db/DatabaseService.d.ts +3 -3
  14. package/dist/db/config.types.d.ts +1 -1
  15. package/dist/db/database.types.d.ts +2 -2
  16. package/dist/db/index.cjs.map +1 -1
  17. package/dist/db/index.d.ts +1 -1
  18. package/dist/db/index.js.map +1 -1
  19. package/dist/errors/codes.d.ts +251 -0
  20. package/dist/errors/enums.d.ts +199 -0
  21. package/dist/errors/index.cjs +1287 -0
  22. package/dist/errors/index.cjs.map +1 -1
  23. package/dist/errors/index.d.ts +1 -0
  24. package/dist/errors/index.js +1264 -1
  25. package/dist/errors/index.js.map +1 -1
  26. package/dist/errors/types.d.ts +630 -14
  27. package/dist/index.cjs +2161 -1217
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.ts +43 -1
  30. package/dist/index.js +1829 -911
  31. package/dist/index.js.map +1 -1
  32. package/dist/notifications/enums.d.ts +140 -0
  33. package/dist/notifications/index.cjs +4353 -0
  34. package/dist/notifications/index.cjs.map +1 -0
  35. package/dist/notifications/index.js +145 -0
  36. package/dist/notifications/index.js.map +1 -0
  37. package/dist/notifications/schemas.d.ts +73 -0
  38. package/dist/notifications/types.d.ts +1937 -0
  39. package/dist/payments/base-error/enum.d.ts +79 -0
  40. package/dist/payments/base-error/index.d.ts +2 -0
  41. package/dist/payments/base-error/types.d.ts +180 -0
  42. package/dist/payments/currency/enums.d.ts +37 -0
  43. package/dist/payments/currency/index.d.ts +1 -37
  44. package/dist/payments/index.cjs +40 -40
  45. package/dist/payments/index.cjs.map +1 -1
  46. package/dist/payments/index.d.ts +2 -1
  47. package/dist/payments/index.js +40 -40
  48. package/dist/payments/index.js.map +1 -1
  49. package/dist/payments/transaction/types.d.ts +3 -3
  50. package/dist/store/index.d.ts +1 -1
  51. package/dist/store/types.d.ts +2 -3
  52. package/package.json +6 -1
  53. package/dist/api/errors/enum.d.ts +0 -214
  54. package/dist/api/errors/index.d.ts +0 -6
  55. /package/dist/db/{enhanced-config.types.d.ts → features-config.types.d.ts} +0 -0
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Notification Constants and Enums
3
+ *
4
+ * Type-level constants and enum values for the notifications system.
5
+ * Configuration defaults have been moved to @plyaz/config/notifications.
6
+ *
7
+ * @module notifications/enums
8
+ */
9
+ /**
10
+ * Notification Providers
11
+ * Standard provider names to ensure consistency across the package
12
+ */
13
+ export declare const NOTIFICATION_PROVIDERS: {
14
+ /** Infobip omnichannel provider (Email, SMS, WhatsApp) - PRIMARY */
15
+ readonly INFOBIP: "Infobip";
16
+ /** SendGrid email provider - FALLBACK */
17
+ readonly SENDGRID: "SendGrid";
18
+ /** Mock email provider for testing */
19
+ readonly MOCK_EMAIL: "MockEmail";
20
+ /** Mock SMS provider for testing */
21
+ readonly MOCK_SMS: "MockSMS";
22
+ /** Mock push provider for testing */
23
+ readonly MOCK_PUSH: "MockPush";
24
+ };
25
+ /**
26
+ * Notification Channels
27
+ * Available notification delivery channels
28
+ */
29
+ export declare const NOTIFICATION_CHANNELS: {
30
+ readonly EMAIL: "email";
31
+ readonly SMS: "sms";
32
+ readonly PUSH: "push";
33
+ };
34
+ /**
35
+ * Notification Categories (FR-4.3)
36
+ * Determines opt-out behavior for compliance
37
+ */
38
+ export declare const NOTIFICATION_CATEGORIES: {
39
+ /** Cannot be opted out - compliance requirement (password resets, order confirmations) */
40
+ readonly TRANSACTIONAL: "transactional";
41
+ /** User can opt-out (newsletters, promotions) */
42
+ readonly MARKETING: "marketing";
43
+ /** User can opt-out (likes, comments, follows) */
44
+ readonly SOCIAL: "social";
45
+ /** System alerts and notifications (security alerts, system status) */
46
+ readonly SYSTEM: "system";
47
+ /** Promotional offers and campaigns */
48
+ readonly PROMOTIONAL: "promotional";
49
+ };
50
+ /**
51
+ * Signature verification method for webhooks
52
+ */
53
+ export declare enum SIGNATURE_METHOD {
54
+ HmacSha256 = "hmac-sha256",
55
+ HmacSha1 = "hmac-sha1",
56
+ HmacSha512 = "hmac-sha512",
57
+ Custom = "custom"
58
+ }
59
+ /**
60
+ * Webhook event types mapped to internal notification events
61
+ */
62
+ export declare enum WEBHOOK_EVENT_TYPE {
63
+ Delivered = "delivered",
64
+ Bounced = "bounced",
65
+ Deferred = "deferred",
66
+ Dropped = "dropped",
67
+ Opened = "opened",
68
+ Clicked = "clicked",
69
+ SpamReport = "spam_report",
70
+ Unsubscribed = "unsubscribed",
71
+ SmsDelivered = "sms_delivered",
72
+ SmsFailed = "sms_failed",
73
+ PushDelivered = "push_delivered",
74
+ PushFailed = "push_failed",
75
+ Unknown = "unknown"
76
+ }
77
+ /**
78
+ * Webhook encryption method for PII-safe IDs
79
+ */
80
+ export declare enum WEBHOOK_ENCRYPTION_METHOD {
81
+ /** HMAC-SHA256 hashing (recommended for IDs) */
82
+ HmacSha256 = "hmac-sha256",
83
+ /** HMAC-SHA512 hashing (stronger) */
84
+ HmacSha512 = "hmac-sha512",
85
+ /** No encryption (not recommended) */
86
+ None = "none"
87
+ }
88
+ /**
89
+ * Common MIME types for attachments
90
+ */
91
+ export declare const MIME_TYPES: {
92
+ readonly PDF: "application/pdf";
93
+ readonly DOC: "application/msword";
94
+ readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
95
+ readonly XLS: "application/vnd.ms-excel";
96
+ readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
97
+ readonly PPT: "application/vnd.ms-powerpoint";
98
+ readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
99
+ readonly TXT: "text/plain";
100
+ readonly CSV: "text/csv";
101
+ readonly PNG: "image/png";
102
+ readonly JPG: "image/jpeg";
103
+ readonly JPEG: "image/jpeg";
104
+ readonly GIF: "image/gif";
105
+ readonly SVG: "image/svg+xml";
106
+ readonly WEBP: "image/webp";
107
+ readonly ZIP: "application/zip";
108
+ readonly RAR: "application/x-rar-compressed";
109
+ readonly TAR: "application/x-tar";
110
+ readonly GZIP: "application/gzip";
111
+ readonly JSON: "application/json";
112
+ readonly XML: "application/xml";
113
+ };
114
+ /**
115
+ * Common file extensions for attachments
116
+ */
117
+ export declare const FILE_EXTENSIONS: {
118
+ readonly PDF: ".pdf";
119
+ readonly DOC: ".doc";
120
+ readonly DOCX: ".docx";
121
+ readonly XLS: ".xls";
122
+ readonly XLSX: ".xlsx";
123
+ readonly PPT: ".ppt";
124
+ readonly PPTX: ".pptx";
125
+ readonly TXT: ".txt";
126
+ readonly CSV: ".csv";
127
+ readonly PNG: ".png";
128
+ readonly JPG: ".jpg";
129
+ readonly JPEG: ".jpeg";
130
+ readonly GIF: ".gif";
131
+ readonly SVG: ".svg";
132
+ readonly WEBP: ".webp";
133
+ readonly ZIP: ".zip";
134
+ readonly RAR: ".rar";
135
+ readonly TAR: ".tar";
136
+ readonly GZ: ".gz";
137
+ readonly GZIP: ".gzip";
138
+ readonly JSON: ".json";
139
+ readonly XML: ".xml";
140
+ };