@timothyw/pat-common 1.0.154 → 1.0.155
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.
|
@@ -176,29 +176,6 @@ export declare const notificationTemplateSchema: z.ZodObject<{
|
|
|
176
176
|
};
|
|
177
177
|
active: boolean;
|
|
178
178
|
}>;
|
|
179
|
-
export declare const notificationDesyncSchema: z.ZodObject<{
|
|
180
|
-
_id: z.ZodEffects<z.ZodString, import("./id-types").NotificationSyncId, string>;
|
|
181
|
-
userId: z.ZodEffects<z.ZodString, import("./id-types").UserId, string>;
|
|
182
|
-
targetId: z.ZodString;
|
|
183
|
-
createdAt: z.ZodDate;
|
|
184
|
-
updatedAt: z.ZodDate;
|
|
185
|
-
}, "strip", z.ZodTypeAny, {
|
|
186
|
-
_id: string & {
|
|
187
|
-
readonly __brand: "NotificationSyncId";
|
|
188
|
-
};
|
|
189
|
-
createdAt: Date;
|
|
190
|
-
updatedAt: Date;
|
|
191
|
-
userId: string & {
|
|
192
|
-
readonly __brand: "UserId";
|
|
193
|
-
};
|
|
194
|
-
targetId: string;
|
|
195
|
-
}, {
|
|
196
|
-
_id: string;
|
|
197
|
-
createdAt: Date;
|
|
198
|
-
updatedAt: Date;
|
|
199
|
-
userId: string;
|
|
200
|
-
targetId: string;
|
|
201
|
-
}>;
|
|
202
179
|
export declare const createNotificationTemplateRequestSchema: z.ZodObject<{
|
|
203
180
|
targetLevel: z.ZodNativeEnum<typeof NotificationTemplateLevel>;
|
|
204
181
|
targetEntityType: z.ZodNativeEnum<typeof NotificationEntityType>;
|
|
@@ -364,33 +341,56 @@ export declare const updateNotificationTemplateRequestSchema: z.ZodObject<{
|
|
|
364
341
|
} | undefined;
|
|
365
342
|
active?: boolean | undefined;
|
|
366
343
|
}>;
|
|
344
|
+
export declare const notificationEntityDesyncSchema: z.ZodObject<{
|
|
345
|
+
_id: z.ZodEffects<z.ZodString, import("./id-types").NotificationSyncId, string>;
|
|
346
|
+
userId: z.ZodEffects<z.ZodString, import("./id-types").UserId, string>;
|
|
347
|
+
entityId: z.ZodString;
|
|
348
|
+
createdAt: z.ZodDate;
|
|
349
|
+
updatedAt: z.ZodDate;
|
|
350
|
+
}, "strip", z.ZodTypeAny, {
|
|
351
|
+
_id: string & {
|
|
352
|
+
readonly __brand: "NotificationSyncId";
|
|
353
|
+
};
|
|
354
|
+
createdAt: Date;
|
|
355
|
+
updatedAt: Date;
|
|
356
|
+
userId: string & {
|
|
357
|
+
readonly __brand: "UserId";
|
|
358
|
+
};
|
|
359
|
+
entityId: string;
|
|
360
|
+
}, {
|
|
361
|
+
_id: string;
|
|
362
|
+
createdAt: Date;
|
|
363
|
+
updatedAt: Date;
|
|
364
|
+
userId: string;
|
|
365
|
+
entityId: string;
|
|
366
|
+
}>;
|
|
367
367
|
export declare const getEntitySyncRequestSchema: z.ZodObject<{
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
entityType: z.ZodNativeEnum<typeof NotificationEntityType>;
|
|
369
|
+
entityId: z.ZodString;
|
|
370
370
|
}, "strip", z.ZodTypeAny, {
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
entityId: string;
|
|
372
|
+
entityType: NotificationEntityType;
|
|
373
373
|
}, {
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
entityId: string;
|
|
375
|
+
entityType: NotificationEntityType;
|
|
376
376
|
}>;
|
|
377
377
|
export declare const setEntitySyncRequestSchema: z.ZodObject<{
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
entityType: z.ZodNativeEnum<typeof NotificationEntityType>;
|
|
379
|
+
entityId: z.ZodString;
|
|
380
380
|
synced: z.ZodBoolean;
|
|
381
381
|
}, "strip", z.ZodTypeAny, {
|
|
382
382
|
synced: boolean;
|
|
383
|
-
|
|
384
|
-
|
|
383
|
+
entityId: string;
|
|
384
|
+
entityType: NotificationEntityType;
|
|
385
385
|
}, {
|
|
386
386
|
synced: boolean;
|
|
387
|
-
|
|
388
|
-
|
|
387
|
+
entityId: string;
|
|
388
|
+
entityType: NotificationEntityType;
|
|
389
389
|
}>;
|
|
390
390
|
export type NotificationTemplateData = z.infer<typeof notificationTemplateSchema>;
|
|
391
|
-
export type NotificationDesyncData = z.infer<typeof notificationDesyncSchema>;
|
|
392
391
|
export type CreateNotificationTemplateRequest = z.infer<typeof createNotificationTemplateRequestSchema>;
|
|
393
392
|
export type UpdateNotificationTemplateRequest = z.infer<typeof updateNotificationTemplateRequestSchema>;
|
|
393
|
+
export type NotificationDesyncData = z.infer<typeof notificationEntityDesyncSchema>;
|
|
394
394
|
export type GetEntitySyncRequest = z.infer<typeof getEntitySyncRequestSchema>;
|
|
395
395
|
export type SetEntitySyncRequest = z.infer<typeof setEntitySyncRequestSchema>;
|
|
396
396
|
export interface CreateNotificationTemplateResponse {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setEntitySyncRequestSchema = exports.getEntitySyncRequestSchema = exports.
|
|
3
|
+
exports.setEntitySyncRequestSchema = exports.getEntitySyncRequestSchema = exports.notificationEntityDesyncSchema = exports.updateNotificationTemplateRequestSchema = exports.createNotificationTemplateRequestSchema = exports.notificationTemplateSchema = exports.notificationVariantDataSchema = exports.notificationSchedulerDataSchema = exports.ENTITY_TYPE_VARIANT_MAP = exports.NotificationVariantType = exports.NotificationSchedulerType = exports.NotificationEntityType = exports.NotificationTemplateLevel = exports.NotificationTemplateSyncState = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const id_types_1 = require("./id-types");
|
|
6
6
|
var NotificationTemplateSyncState;
|
|
@@ -79,13 +79,6 @@ exports.notificationTemplateSchema = zod_1.z.object({
|
|
|
79
79
|
createdAt: zod_1.z.date(),
|
|
80
80
|
updatedAt: zod_1.z.date()
|
|
81
81
|
});
|
|
82
|
-
exports.notificationDesyncSchema = zod_1.z.object({
|
|
83
|
-
_id: id_types_1.notificationDesyncIdSchema,
|
|
84
|
-
userId: id_types_1.userIdSchema,
|
|
85
|
-
targetId: zod_1.z.string(),
|
|
86
|
-
createdAt: zod_1.z.date(),
|
|
87
|
-
updatedAt: zod_1.z.date()
|
|
88
|
-
});
|
|
89
82
|
exports.createNotificationTemplateRequestSchema = zod_1.z.object({
|
|
90
83
|
targetLevel: zod_1.z.nativeEnum(NotificationTemplateLevel),
|
|
91
84
|
targetEntityType: zod_1.z.nativeEnum(NotificationEntityType),
|
|
@@ -99,12 +92,19 @@ exports.updateNotificationTemplateRequestSchema = zod_1.z.object({
|
|
|
99
92
|
variantData: exports.notificationVariantDataSchema.optional(),
|
|
100
93
|
active: zod_1.z.boolean().optional()
|
|
101
94
|
});
|
|
95
|
+
exports.notificationEntityDesyncSchema = zod_1.z.object({
|
|
96
|
+
_id: id_types_1.notificationDesyncIdSchema,
|
|
97
|
+
userId: id_types_1.userIdSchema,
|
|
98
|
+
entityId: zod_1.z.string(),
|
|
99
|
+
createdAt: zod_1.z.date(),
|
|
100
|
+
updatedAt: zod_1.z.date()
|
|
101
|
+
});
|
|
102
102
|
exports.getEntitySyncRequestSchema = zod_1.z.object({
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
entityType: zod_1.z.nativeEnum(NotificationEntityType),
|
|
104
|
+
entityId: zod_1.z.string()
|
|
105
105
|
});
|
|
106
106
|
exports.setEntitySyncRequestSchema = zod_1.z.object({
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
entityType: zod_1.z.nativeEnum(NotificationEntityType),
|
|
108
|
+
entityId: zod_1.z.string(),
|
|
109
109
|
synced: zod_1.z.boolean()
|
|
110
110
|
});
|
package/package.json
CHANGED
|
@@ -90,14 +90,6 @@ export const notificationTemplateSchema = z.object({
|
|
|
90
90
|
updatedAt: z.date()
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
export const notificationDesyncSchema = z.object({
|
|
94
|
-
_id: notificationDesyncIdSchema,
|
|
95
|
-
userId: userIdSchema,
|
|
96
|
-
targetId: z.string(),
|
|
97
|
-
createdAt: z.date(),
|
|
98
|
-
updatedAt: z.date()
|
|
99
|
-
});
|
|
100
|
-
|
|
101
93
|
export const createNotificationTemplateRequestSchema = z.object({
|
|
102
94
|
targetLevel: z.nativeEnum(NotificationTemplateLevel),
|
|
103
95
|
targetEntityType: z.nativeEnum(NotificationEntityType),
|
|
@@ -113,23 +105,31 @@ export const updateNotificationTemplateRequestSchema = z.object({
|
|
|
113
105
|
active: z.boolean().optional()
|
|
114
106
|
});
|
|
115
107
|
|
|
108
|
+
export const notificationEntityDesyncSchema = z.object({
|
|
109
|
+
_id: notificationDesyncIdSchema,
|
|
110
|
+
userId: userIdSchema,
|
|
111
|
+
entityId: z.string(),
|
|
112
|
+
createdAt: z.date(),
|
|
113
|
+
updatedAt: z.date()
|
|
114
|
+
});
|
|
115
|
+
|
|
116
116
|
export const getEntitySyncRequestSchema = z.object({
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
entityType: z.nativeEnum(NotificationEntityType),
|
|
118
|
+
entityId: z.string()
|
|
119
119
|
});
|
|
120
120
|
|
|
121
121
|
export const setEntitySyncRequestSchema = z.object({
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
entityType: z.nativeEnum(NotificationEntityType),
|
|
123
|
+
entityId: z.string(),
|
|
124
124
|
synced: z.boolean()
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
export type NotificationTemplateData = z.infer<typeof notificationTemplateSchema>;
|
|
128
|
-
export type NotificationDesyncData = z.infer<typeof notificationDesyncSchema>;
|
|
129
|
-
|
|
130
128
|
export type CreateNotificationTemplateRequest = z.infer<typeof createNotificationTemplateRequestSchema>;
|
|
131
129
|
export type UpdateNotificationTemplateRequest = z.infer<typeof updateNotificationTemplateRequestSchema>;
|
|
132
130
|
|
|
131
|
+
export type NotificationDesyncData = z.infer<typeof notificationEntityDesyncSchema>;
|
|
132
|
+
|
|
133
133
|
export type GetEntitySyncRequest = z.infer<typeof getEntitySyncRequestSchema>;
|
|
134
134
|
export type SetEntitySyncRequest = z.infer<typeof setEntitySyncRequestSchema>;
|
|
135
135
|
|