@timothyw/pat-common 1.0.126 → 1.0.128

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.
@@ -6,13 +6,10 @@ export interface NotificationContext<T = any> {
6
6
  entityData: T;
7
7
  userId: string;
8
8
  }
9
- export declare enum TargetType {
9
+ export declare enum NotificationTemplateLevel {
10
10
  PARENT = "parent",
11
11
  ENTITY = "entity"
12
12
  }
13
- export declare enum NotificationParentType {
14
- AGENDA_PANEL = "agenda_panel"
15
- }
16
13
  export declare enum NotificationEntityType {
17
14
  INBOX_PANEL = "inbox_panel",
18
15
  AGENDA_PANEL = "agenda_item",
@@ -34,7 +31,7 @@ export declare const notificationTriggerSchema: z.ZodObject<{
34
31
  export declare const notificationTemplateSchema: z.ZodObject<{
35
32
  _id: z.ZodEffects<z.ZodString, import("./id-types").NotificationTemplateId, string>;
36
33
  userId: z.ZodEffects<z.ZodString, import("./id-types").UserId, string>;
37
- targetType: z.ZodNativeEnum<typeof TargetType>;
34
+ targetType: z.ZodNativeEnum<typeof NotificationTemplateLevel>;
38
35
  targetId: z.ZodString;
39
36
  trigger: z.ZodObject<{
40
37
  type: z.ZodNativeEnum<typeof NotificationTriggerType>;
@@ -55,7 +52,7 @@ export declare const notificationTemplateSchema: z.ZodObject<{
55
52
  userId: string & {
56
53
  readonly __brand: "UserId";
57
54
  };
58
- targetType: TargetType;
55
+ targetType: NotificationTemplateLevel;
59
56
  targetId: string;
60
57
  trigger: {
61
58
  type: NotificationTriggerType;
@@ -66,7 +63,7 @@ export declare const notificationTemplateSchema: z.ZodObject<{
66
63
  createdAt: Date;
67
64
  updatedAt: Date;
68
65
  userId: string;
69
- targetType: TargetType;
66
+ targetType: NotificationTemplateLevel;
70
67
  targetId: string;
71
68
  trigger: {
72
69
  type: NotificationTriggerType;
@@ -1,17 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEntitySyncRequestSchema = exports.entitySyncRequestSchema = exports.updateNotificationTemplateRequestSchema = exports.createNotificationTemplateRequestSchema = exports.notificationTemplateSchema = exports.notificationTriggerSchema = exports.notificationTriggerTypeSchema = exports.NotificationTriggerType = exports.NotificationEntityType = exports.NotificationParentType = exports.TargetType = void 0;
3
+ exports.getEntitySyncRequestSchema = exports.entitySyncRequestSchema = exports.updateNotificationTemplateRequestSchema = exports.createNotificationTemplateRequestSchema = exports.notificationTemplateSchema = exports.notificationTriggerSchema = exports.notificationTriggerTypeSchema = exports.NotificationTriggerType = exports.NotificationEntityType = exports.NotificationTemplateLevel = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const id_types_1 = require("./id-types");
6
- var TargetType;
7
- (function (TargetType) {
8
- TargetType["PARENT"] = "parent";
9
- TargetType["ENTITY"] = "entity";
10
- })(TargetType || (exports.TargetType = TargetType = {}));
11
- var NotificationParentType;
12
- (function (NotificationParentType) {
13
- NotificationParentType["AGENDA_PANEL"] = "agenda_panel";
14
- })(NotificationParentType || (exports.NotificationParentType = NotificationParentType = {}));
6
+ var NotificationTemplateLevel;
7
+ (function (NotificationTemplateLevel) {
8
+ NotificationTemplateLevel["PARENT"] = "parent";
9
+ NotificationTemplateLevel["ENTITY"] = "entity";
10
+ })(NotificationTemplateLevel || (exports.NotificationTemplateLevel = NotificationTemplateLevel = {}));
15
11
  var NotificationEntityType;
16
12
  (function (NotificationEntityType) {
17
13
  NotificationEntityType["INBOX_PANEL"] = "inbox_panel";
@@ -31,7 +27,7 @@ exports.notificationTriggerSchema = zod_1.z.object({
31
27
  exports.notificationTemplateSchema = zod_1.z.object({
32
28
  _id: id_types_1.notificationTemplateIdSchema,
33
29
  userId: id_types_1.userIdSchema,
34
- targetType: zod_1.z.nativeEnum(TargetType),
30
+ targetType: zod_1.z.nativeEnum(NotificationTemplateLevel),
35
31
  targetId: zod_1.z.string(),
36
32
  // entityType: z.nativeEnum(NotificationEntityType),
37
33
  // entityId: z.string().optional(),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@timothyw/pat-common",
3
3
  "description": "",
4
4
  "author": "Timothy Washburn",
5
- "version": "1.0.126",
5
+ "version": "1.0.128",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -9,15 +9,11 @@ export interface NotificationContext<T = any> {
9
9
  userId: string;
10
10
  }
11
11
 
12
- export enum TargetType {
12
+ export enum NotificationTemplateLevel {
13
13
  PARENT = 'parent',
14
14
  ENTITY = 'entity'
15
15
  }
16
16
 
17
- export enum NotificationParentType {
18
- AGENDA_PANEL = 'agenda_panel',
19
- }
20
-
21
17
  export enum NotificationEntityType {
22
18
  INBOX_PANEL = 'inbox_panel',
23
19
  AGENDA_PANEL = 'agenda_item',
@@ -39,7 +35,7 @@ export const notificationTriggerSchema = z.object({
39
35
  export const notificationTemplateSchema = z.object({
40
36
  _id: notificationTemplateIdSchema,
41
37
  userId: userIdSchema,
42
- targetType: z.nativeEnum(TargetType),
38
+ targetType: z.nativeEnum(NotificationTemplateLevel),
43
39
  targetId: z.string(),
44
40
  // entityType: z.nativeEnum(NotificationEntityType),
45
41
  // entityId: z.string().optional(),