alepha 0.11.6 → 0.11.7

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.
@@ -3,34 +3,33 @@ import { Alepha, Descriptor, KIND, Static, StaticEncode, TObject } from "alepha"
3
3
  import * as _alepha_batch0 from "alepha/batch";
4
4
  import { DateTimeProvider } from "alepha/datetime";
5
5
  import * as _alepha_logger0 from "alepha/logger";
6
- import * as _alepha_postgres50 from "alepha/postgres";
6
+ import * as _alepha_postgres0 from "alepha/postgres";
7
7
  import * as _alepha_queue0 from "alepha/queue";
8
8
  import { EmailProvider } from "alepha/email";
9
- import * as typebox64 from "typebox";
10
- import * as dayjs14 from "dayjs";
9
+ import * as typebox0 from "typebox";
11
10
 
12
11
  //#region src/controllers/NotificationController.d.ts
13
12
  declare class NotificationController {}
14
13
  //#endregion
15
14
  //#region src/entities/notifications.d.ts
16
- declare const notifications: _alepha_postgres50.EntityDescriptor<typebox64.TObject<{
17
- id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
18
- version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
19
- createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
20
- updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
21
- type: typebox64.TUnsafe<"email" | "sms">;
22
- template: typebox64.TString;
23
- category: typebox64.TOptional<typebox64.TString>;
24
- critical: typebox64.TOptional<typebox64.TBoolean>;
25
- sensitive: typebox64.TOptional<typebox64.TBoolean>;
26
- contact: typebox64.TString;
27
- variables: typebox64.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
28
- scheduledAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
29
- sentAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
30
- error: typebox64.TOptional<typebox64.TObject<{
31
- at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
32
- name: typebox64.TString;
33
- message: typebox64.TString;
15
+ declare const notifications: _alepha_postgres0.EntityDescriptor<typebox0.TObject<{
16
+ id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
17
+ version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
18
+ createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
19
+ updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
20
+ type: typebox0.TUnsafe<"email" | "sms">;
21
+ template: typebox0.TString;
22
+ category: typebox0.TOptional<typebox0.TString>;
23
+ critical: typebox0.TOptional<typebox0.TBoolean>;
24
+ sensitive: typebox0.TOptional<typebox0.TBoolean>;
25
+ contact: typebox0.TString;
26
+ variables: typebox0.TOptional<typebox0.TRecord<"^.*$", typebox0.TAny>>;
27
+ scheduledAt: typebox0.TOptional<typebox0.TString>;
28
+ sentAt: typebox0.TOptional<typebox0.TString>;
29
+ error: typebox0.TOptional<typebox0.TObject<{
30
+ at: typebox0.TString;
31
+ name: typebox0.TString;
32
+ message: typebox0.TString;
34
33
  }>>;
35
34
  }>>;
36
35
  type NotificationEntity = Static<typeof notifications.schema>;
@@ -48,24 +47,24 @@ interface SmsSendOptions {
48
47
  declare class NotificationSenderService {
49
48
  protected readonly alepha: Alepha;
50
49
  protected readonly log: _alepha_logger0.Logger;
51
- protected readonly notificationRepository: _alepha_postgres50.Repository<typebox64.TObject<{
52
- id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
53
- version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
54
- createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
55
- updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
56
- type: typebox64.TUnsafe<"email" | "sms">;
57
- template: typebox64.TString;
58
- category: typebox64.TOptional<typebox64.TString>;
59
- critical: typebox64.TOptional<typebox64.TBoolean>;
60
- sensitive: typebox64.TOptional<typebox64.TBoolean>;
61
- contact: typebox64.TString;
62
- variables: typebox64.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
63
- scheduledAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
64
- sentAt: typebox64.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
65
- error: typebox64.TOptional<typebox64.TObject<{
66
- at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
67
- name: typebox64.TString;
68
- message: typebox64.TString;
50
+ protected readonly notificationRepository: _alepha_postgres0.Repository<typebox0.TObject<{
51
+ id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
52
+ version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
53
+ createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
54
+ updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
55
+ type: typebox0.TUnsafe<"email" | "sms">;
56
+ template: typebox0.TString;
57
+ category: typebox0.TOptional<typebox0.TString>;
58
+ critical: typebox0.TOptional<typebox0.TBoolean>;
59
+ sensitive: typebox0.TOptional<typebox0.TBoolean>;
60
+ contact: typebox0.TString;
61
+ variables: typebox0.TOptional<typebox0.TRecord<"^.*$", typebox0.TAny>>;
62
+ scheduledAt: typebox0.TOptional<typebox0.TString>;
63
+ sentAt: typebox0.TOptional<typebox0.TString>;
64
+ error: typebox0.TOptional<typebox0.TObject<{
65
+ at: typebox0.TString;
66
+ name: typebox0.TString;
67
+ message: typebox0.TString;
69
68
  }>>;
70
69
  }>>;
71
70
  protected readonly dateTimeProvider: DateTimeProvider;
@@ -82,7 +81,7 @@ declare class NotificationSenderService {
82
81
  body: string;
83
82
  };
84
83
  protected load(notification: NotificationEntity): {
85
- template: NotificationDescriptor<typebox64.TObject<typebox64.TProperties>>;
84
+ template: NotificationDescriptor<typebox0.TObject<typebox0.TProperties>>;
86
85
  variables: Record<string, any>;
87
86
  contact: string;
88
87
  };
@@ -91,17 +90,17 @@ declare class NotificationSenderService {
91
90
  //#region src/queues/NotificationQueues.d.ts
92
91
  declare class NotificationQueues {
93
92
  protected readonly notificationSenderService: NotificationSenderService;
94
- readonly processNotification: _alepha_queue0.QueueDescriptor<typebox64.TObject<{
95
- notificationId: typebox64.TString;
93
+ readonly processNotification: _alepha_queue0.QueueDescriptor<typebox0.TObject<{
94
+ notificationId: typebox0.TString;
96
95
  }>>;
97
96
  }
98
97
  //#endregion
99
98
  //#region src/schemas/notificationCreateSchema.d.ts
100
- declare const notificationCreateSchema: typebox64.TObject<{
101
- type: typebox64.TUnsafe<"email" | "sms">;
102
- template: typebox64.TString;
103
- contact: typebox64.TString;
104
- variables: typebox64.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
99
+ declare const notificationCreateSchema: typebox0.TObject<{
100
+ type: typebox0.TUnsafe<"email" | "sms">;
101
+ template: typebox0.TString;
102
+ contact: typebox0.TString;
103
+ variables: typebox0.TOptional<typebox0.TRecord<"^.*$", typebox0.TAny>>;
105
104
  }>;
106
105
  type NotificationCreate = Static<typeof notificationCreateSchema>;
107
106
  //#endregion
@@ -118,72 +117,72 @@ declare class NotificationService {
118
117
  protected readonly env: {
119
118
  NOTIFICATION_IMMEDIATE?: boolean | undefined;
120
119
  };
121
- protected readonly notificationRepository: _alepha_postgres50.Repository<_alepha_core1.TObject<{
122
- id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
123
- version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
124
- createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
125
- updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
126
- type: typebox64.TUnsafe<"email" | "sms">;
127
- template: typebox64.TString;
128
- category: _alepha_core1.TOptional<typebox64.TString>;
120
+ protected readonly notificationRepository: _alepha_postgres0.Repository<_alepha_core1.TObject<{
121
+ id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
122
+ version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
123
+ createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
124
+ updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
125
+ type: typebox0.TUnsafe<"email" | "sms">;
126
+ template: typebox0.TString;
127
+ category: _alepha_core1.TOptional<typebox0.TString>;
129
128
  critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
130
129
  sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
131
- contact: typebox64.TString;
132
- variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
133
- scheduledAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
134
- sentAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
130
+ contact: typebox0.TString;
131
+ variables: _alepha_core1.TOptional<typebox0.TRecord<"^.*$", typebox0.TAny>>;
132
+ scheduledAt: _alepha_core1.TOptional<typebox0.TString>;
133
+ sentAt: _alepha_core1.TOptional<typebox0.TString>;
135
134
  error: _alepha_core1.TOptional<_alepha_core1.TObject<{
136
- at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
137
- name: typebox64.TString;
138
- message: typebox64.TString;
135
+ at: typebox0.TString;
136
+ name: typebox0.TString;
137
+ message: typebox0.TString;
139
138
  }>>;
140
139
  }>>;
141
140
  protected readonly dateTimeProvider: DateTimeProvider;
142
141
  protected readonly notificationQueues: NotificationQueues;
143
142
  protected readonly notificationSenderService: NotificationSenderService;
144
143
  readonly notificationBatch: _alepha_batch0.BatchDescriptor<_alepha_core1.TObject<{
145
- type: typebox64.TUnsafe<"email" | "sms">;
146
- template: typebox64.TString;
147
- contact: typebox64.TString;
148
- variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
144
+ type: typebox0.TUnsafe<"email" | "sms">;
145
+ template: typebox0.TString;
146
+ contact: typebox0.TString;
147
+ variables: _alepha_core1.TOptional<typebox0.TRecord<"^.*$", typebox0.TAny>>;
149
148
  }>, Promise<void>>;
150
- findNotificationById(id: string): Promise<_alepha_postgres50.PgStatic<_alepha_core1.TObject<{
151
- id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
152
- version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
153
- createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
154
- updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
155
- type: typebox64.TUnsafe<"email" | "sms">;
156
- template: typebox64.TString;
157
- category: _alepha_core1.TOptional<typebox64.TString>;
149
+ findNotificationById(id: string): Promise<_alepha_postgres0.PgStatic<_alepha_core1.TObject<{
150
+ id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
151
+ version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
152
+ createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
153
+ updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
154
+ type: typebox0.TUnsafe<"email" | "sms">;
155
+ template: typebox0.TString;
156
+ category: _alepha_core1.TOptional<typebox0.TString>;
158
157
  critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
159
158
  sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
160
- contact: typebox64.TString;
161
- variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
162
- scheduledAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
163
- sentAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
159
+ contact: typebox0.TString;
160
+ variables: _alepha_core1.TOptional<typebox0.TRecord<"^.*$", typebox0.TAny>>;
161
+ scheduledAt: _alepha_core1.TOptional<typebox0.TString>;
162
+ sentAt: _alepha_core1.TOptional<typebox0.TString>;
164
163
  error: _alepha_core1.TOptional<_alepha_core1.TObject<{
165
- at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
166
- name: typebox64.TString;
167
- message: typebox64.TString;
164
+ at: typebox0.TString;
165
+ name: typebox0.TString;
166
+ message: typebox0.TString;
168
167
  }>>;
169
- }>, _alepha_postgres50.PgRelationMap<_alepha_core1.TObject<{
170
- id: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TString, typeof _alepha_postgres50.PG_PRIMARY_KEY>, typeof _alepha_postgres50.PG_DEFAULT>;
171
- version: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TInteger, typeof _alepha_postgres50.PG_VERSION>, typeof _alepha_postgres50.PG_DEFAULT>;
172
- createdAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_CREATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
173
- updatedAt: _alepha_postgres50.PgAttr<_alepha_postgres50.PgAttr<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>, typeof _alepha_postgres50.PG_UPDATED_AT>, typeof _alepha_postgres50.PG_DEFAULT>;
174
- type: typebox64.TUnsafe<"email" | "sms">;
175
- template: typebox64.TString;
176
- category: _alepha_core1.TOptional<typebox64.TString>;
168
+ }>, _alepha_postgres0.PgRelationMap<_alepha_core1.TObject<{
169
+ id: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_PRIMARY_KEY>, typeof _alepha_postgres0.PG_DEFAULT>;
170
+ version: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TInteger, typeof _alepha_postgres0.PG_VERSION>, typeof _alepha_postgres0.PG_DEFAULT>;
171
+ createdAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_CREATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
172
+ updatedAt: _alepha_postgres0.PgAttr<_alepha_postgres0.PgAttr<typebox0.TString, typeof _alepha_postgres0.PG_UPDATED_AT>, typeof _alepha_postgres0.PG_DEFAULT>;
173
+ type: typebox0.TUnsafe<"email" | "sms">;
174
+ template: typebox0.TString;
175
+ category: _alepha_core1.TOptional<typebox0.TString>;
177
176
  critical: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
178
177
  sensitive: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
179
- contact: typebox64.TString;
180
- variables: _alepha_core1.TOptional<typebox64.TRecord<"^.*$", typebox64.TAny>>;
181
- scheduledAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
182
- sentAt: _alepha_core1.TOptional<typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>>;
178
+ contact: typebox0.TString;
179
+ variables: _alepha_core1.TOptional<typebox0.TRecord<"^.*$", typebox0.TAny>>;
180
+ scheduledAt: _alepha_core1.TOptional<typebox0.TString>;
181
+ sentAt: _alepha_core1.TOptional<typebox0.TString>;
183
182
  error: _alepha_core1.TOptional<_alepha_core1.TObject<{
184
- at: typebox64.TCodec<typebox64.TString, dayjs14.Dayjs>;
185
- name: typebox64.TString;
186
- message: typebox64.TString;
183
+ at: typebox0.TString;
184
+ name: typebox0.TString;
185
+ message: typebox0.TString;
187
186
  }>>;
188
187
  }>>>>;
189
188
  /**
@@ -243,9 +242,9 @@ declare class MemorySmsProvider extends SmsProvider {
243
242
  }
244
243
  //#endregion
245
244
  //#region src/schemas/notificationContactPreferencesSchema.d.ts
246
- declare const notificationContactPreferencesSchema: typebox64.TObject<{
247
- language: typebox64.TOptional<typebox64.TString>;
248
- exclude: typebox64.TArray<typebox64.TString>;
245
+ declare const notificationContactPreferencesSchema: typebox0.TObject<{
246
+ language: typebox0.TOptional<typebox0.TString>;
247
+ exclude: typebox0.TArray<typebox0.TString>;
249
248
  }>;
250
249
  type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
251
250
  //#endregion