@tstdl/base 0.93.106 → 0.93.107

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.
@@ -1,5 +1,6 @@
1
1
  import { DataStream } from '../../sse/data-stream.js';
2
2
  import { InAppNotificationView } from '../models/in-app-notification.model.js';
3
+ export type NotificationApiDefinition = typeof notificationApiDefinition;
3
4
  export declare const notificationApiDefinition: {
4
5
  resource: string;
5
6
  endpoints: {
@@ -77,4 +78,83 @@ export declare const notificationApiDefinition: {
77
78
  };
78
79
  };
79
80
  };
80
- export type NotificationApiDefinition = typeof notificationApiDefinition;
81
+ declare const _NotificationApiClient: import("../../api/client/index.js").ApiClient<{
82
+ resource: string;
83
+ endpoints: {
84
+ stream: {
85
+ resource: string;
86
+ method: "GET";
87
+ result: {
88
+ new (): DataStream<InAppNotificationView<Record<string, import("../models/notification-log.model.js").NotificationDefinition<import("../../types/types.js").ObjectLiteral, import("../../types/types.js").ObjectLiteral>>>>;
89
+ parse<T>(eventSource: import("../../sse/server-sent-events.js").ServerSentEvents): import("rxjs").Observable<T>;
90
+ };
91
+ credentials: true;
92
+ };
93
+ listInApp: {
94
+ resource: string;
95
+ method: "GET";
96
+ parameters: import("../../schema/index.js").ObjectSchema<{
97
+ offset?: number | undefined;
98
+ limit?: number | undefined;
99
+ includeArchived?: boolean | undefined;
100
+ }>;
101
+ result: import("../../schema/index.js").ArraySchema<InAppNotificationView<Record<string, import("../models/notification-log.model.js").NotificationDefinition<import("../../types/types.js").ObjectLiteral, import("../../types/types.js").ObjectLiteral>>>>;
102
+ credentials: true;
103
+ };
104
+ markRead: {
105
+ resource: string;
106
+ method: "POST";
107
+ parameters: import("../../schema/index.js").ObjectSchema<{
108
+ id: string;
109
+ }>;
110
+ result: import("../../schema/index.js").LiteralSchema<"ok">;
111
+ credentials: true;
112
+ };
113
+ archive: {
114
+ resource: string;
115
+ method: "POST";
116
+ parameters: import("../../schema/index.js").ObjectSchema<{
117
+ id: string;
118
+ }>;
119
+ result: import("../../schema/index.js").LiteralSchema<"ok">;
120
+ credentials: true;
121
+ };
122
+ getPreferences: {
123
+ resource: string;
124
+ method: "GET";
125
+ result: import("../../schema/index.js").ArraySchema<{
126
+ type: string;
127
+ enabled: boolean;
128
+ channel: "email" | "in-app" | "web-push";
129
+ }>;
130
+ credentials: true;
131
+ };
132
+ updatePreference: {
133
+ resource: string;
134
+ method: "POST";
135
+ parameters: import("../../schema/index.js").ObjectSchema<{
136
+ readonly type: string;
137
+ readonly channel: "email" | "in-app" | "web-push";
138
+ readonly enabled: boolean;
139
+ }>;
140
+ result: import("../../schema/index.js").LiteralSchema<"ok">;
141
+ credentials: true;
142
+ };
143
+ registerWebPush: {
144
+ resource: string;
145
+ method: "POST";
146
+ parameters: import("../../schema/index.js").ObjectSchema<{
147
+ readonly endpoint: string;
148
+ readonly keys: {
149
+ p256dhBase64: string;
150
+ authBase64: string;
151
+ };
152
+ }>;
153
+ result: import("../../schema/index.js").LiteralSchema<"ok">;
154
+ credentials: true;
155
+ };
156
+ };
157
+ }>;
158
+ export declare class NotificationApiClient extends _NotificationApiClient {
159
+ }
160
+ export {};
@@ -1,4 +1,12 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { compileClient } from '../../api/client/index.js';
1
8
  import { defineApi } from '../../api/types.js';
9
+ import { ReplaceClass } from '../../injector/decorators.js';
2
10
  import { array, boolean, enumeration, explicitObject, literal, number, object, optional, string } from '../../schema/index.js';
3
11
  import { DataStream } from '../../sse/data-stream.js';
4
12
  import { InAppNotificationView } from '../models/in-app-notification.model.js';
@@ -73,3 +81,10 @@ export const notificationApiDefinition = defineApi({
73
81
  },
74
82
  },
75
83
  });
84
+ const _NotificationApiClient = compileClient(notificationApiDefinition);
85
+ let NotificationApiClient = class NotificationApiClient extends _NotificationApiClient {
86
+ };
87
+ NotificationApiClient = __decorate([
88
+ ReplaceClass(_NotificationApiClient)
89
+ ], NotificationApiClient);
90
+ export { NotificationApiClient };
@@ -0,0 +1 @@
1
+ export * from './notification.api-controller.js';
@@ -0,0 +1 @@
1
+ export * from './notification.api-controller.js';
@@ -1,3 +1,4 @@
1
+ export * from './api/index.js';
1
2
  export * from './module.js';
2
3
  export * from './providers/index.js';
3
4
  export * from './schemas.js';
@@ -1,3 +1,4 @@
1
+ export * from './api/index.js';
1
2
  export * from './module.js';
2
3
  export * from './providers/index.js';
3
4
  export * from './schemas.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.93.106",
3
+ "version": "0.93.107",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -86,6 +86,8 @@
86
86
  "./message-bus": "./message-bus/index.js",
87
87
  "./migration": "./migration/index.js",
88
88
  "./module": "./module/index.js",
89
+ "./notification": "./notification/index.js",
90
+ "./notification/server": "./notification/server/index.js",
89
91
  "./object-storage": "./object-storage/index.js",
90
92
  "./object-storage/google": "./object-storage/google/index.js",
91
93
  "./object-storage/s3": "./object-storage/s3/index.js",
@@ -163,7 +165,7 @@
163
165
  "handlebars": "^4.7",
164
166
  "minio": "^8.0",
165
167
  "mjml": "^4.18",
166
- "nodemailer": "^7.0",
168
+ "nodemailer": "^8.0",
167
169
  "pg": "^8.18",
168
170
  "playwright": "^1.58",
169
171
  "preact": "^10.28",