@timothyw/pat-common 1.0.138 → 1.0.140

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.
@@ -102,9 +102,6 @@ export interface CreateAgendaItemResponse {
102
102
  export interface GetAgendaItemsResponse {
103
103
  agendaItems: Serialized<AgendaItemData>[];
104
104
  }
105
- export interface GetAgendaItemResponse {
106
- agendaItem: Serialized<AgendaItemData>;
107
- }
108
105
  export interface UpdateAgendaItemResponse {
109
106
  agendaItem: Serialized<AgendaItemData>;
110
107
  }
@@ -224,57 +224,49 @@ export declare const updateNotificationTemplateRequestSchema: z.ZodObject<{
224
224
  variantData?: any;
225
225
  active?: boolean | undefined;
226
226
  }>;
227
- export declare const entitySyncRequestSchema: z.ZodObject<{
227
+ export declare const getEntitySyncRequestSchema: z.ZodObject<{
228
228
  targetEntityType: z.ZodNativeEnum<typeof NotificationEntityType>;
229
229
  targetId: z.ZodString;
230
- synced: z.ZodBoolean;
231
230
  }, "strip", z.ZodTypeAny, {
232
231
  targetEntityType: NotificationEntityType;
233
232
  targetId: string;
234
- synced: boolean;
235
233
  }, {
236
234
  targetEntityType: NotificationEntityType;
237
235
  targetId: string;
238
- synced: boolean;
239
236
  }>;
240
- export declare const getEntitySyncRequestSchema: z.ZodObject<{
237
+ export declare const setEntitySyncRequestSchema: z.ZodObject<{
241
238
  targetEntityType: z.ZodNativeEnum<typeof NotificationEntityType>;
242
239
  targetId: z.ZodString;
240
+ synced: z.ZodBoolean;
243
241
  }, "strip", z.ZodTypeAny, {
244
242
  targetEntityType: NotificationEntityType;
245
243
  targetId: string;
244
+ synced: boolean;
246
245
  }, {
247
246
  targetEntityType: NotificationEntityType;
248
247
  targetId: string;
248
+ synced: boolean;
249
249
  }>;
250
250
  export type NotificationTrigger = z.infer<typeof notificationSchedulerDataSchema>;
251
251
  export type NotificationTemplateData = z.infer<typeof notificationTemplateSchema>;
252
252
  export type CreateNotificationTemplateRequest = z.infer<typeof createNotificationTemplateRequestSchema>;
253
253
  export type UpdateNotificationTemplateRequest = z.infer<typeof updateNotificationTemplateRequestSchema>;
254
- export type EntitySyncRequest = z.infer<typeof entitySyncRequestSchema>;
255
254
  export type GetEntitySyncRequest = z.infer<typeof getEntitySyncRequestSchema>;
255
+ export type SetEntitySyncRequest = z.infer<typeof setEntitySyncRequestSchema>;
256
256
  export interface CreateNotificationTemplateResponse {
257
257
  template: Serialized<NotificationTemplateData>;
258
258
  }
259
259
  export interface GetNotificationTemplatesResponse {
260
260
  templates: Serialized<NotificationTemplateData>[];
261
261
  }
262
- export interface GetNotificationTemplateResponse {
263
- template: Serialized<NotificationTemplateData>;
264
- }
265
262
  export interface UpdateNotificationTemplateResponse {
266
263
  template: Serialized<NotificationTemplateData>;
267
264
  }
268
265
  export interface DeleteNotificationTemplateResponse {
269
266
  }
270
- export interface EntitySyncResponse {
271
- success: boolean;
267
+ export interface GetEntitySyncResponse {
272
268
  synced: boolean;
273
- templates?: Serialized<NotificationTemplateData>[];
274
- error?: string;
275
269
  }
276
- export interface GetEntitySyncResponse {
277
- success: boolean;
270
+ export interface SetEntitySyncResponse {
278
271
  synced: boolean;
279
- error?: string;
280
272
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEntitySyncRequestSchema = exports.entitySyncRequestSchema = exports.updateNotificationTemplateRequestSchema = exports.createNotificationTemplateRequestSchema = exports.notificationTemplateSchema = exports.notificationSchedulerDataSchema = exports.NotificationVariantType = exports.NotificationSchedulerType = exports.NotificationEntityType = exports.NotificationTemplateLevel = void 0;
3
+ exports.setEntitySyncRequestSchema = exports.getEntitySyncRequestSchema = exports.updateNotificationTemplateRequestSchema = exports.createNotificationTemplateRequestSchema = exports.notificationTemplateSchema = exports.notificationSchedulerDataSchema = exports.NotificationVariantType = exports.NotificationSchedulerType = exports.NotificationEntityType = exports.NotificationTemplateLevel = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const id_types_1 = require("./id-types");
6
6
  var NotificationTemplateLevel;
@@ -61,12 +61,12 @@ exports.updateNotificationTemplateRequestSchema = zod_1.z.object({
61
61
  variantData: zod_1.z.any().optional(),
62
62
  active: zod_1.z.boolean().optional()
63
63
  });
64
- exports.entitySyncRequestSchema = zod_1.z.object({
65
- targetEntityType: zod_1.z.nativeEnum(NotificationEntityType),
66
- targetId: zod_1.z.string(),
67
- synced: zod_1.z.boolean()
68
- });
69
64
  exports.getEntitySyncRequestSchema = zod_1.z.object({
70
65
  targetEntityType: zod_1.z.nativeEnum(NotificationEntityType),
71
66
  targetId: zod_1.z.string()
72
67
  });
68
+ exports.setEntitySyncRequestSchema = zod_1.z.object({
69
+ targetEntityType: zod_1.z.nativeEnum(NotificationEntityType),
70
+ targetId: zod_1.z.string(),
71
+ synced: zod_1.z.boolean()
72
+ });
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.138",
5
+ "version": "1.0.140",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -52,10 +52,6 @@ export interface GetAgendaItemsResponse {
52
52
  agendaItems: Serialized<AgendaItemData>[];
53
53
  }
54
54
 
55
- export interface GetAgendaItemResponse {
56
- agendaItem: Serialized<AgendaItemData>;
57
- }
58
-
59
55
  export interface UpdateAgendaItemResponse {
60
56
  agendaItem: Serialized<AgendaItemData>;
61
57
  }
@@ -72,15 +72,15 @@ export const updateNotificationTemplateRequestSchema = z.object({
72
72
  active: z.boolean().optional()
73
73
  });
74
74
 
75
- export const entitySyncRequestSchema = z.object({
75
+ export const getEntitySyncRequestSchema = z.object({
76
76
  targetEntityType: z.nativeEnum(NotificationEntityType),
77
- targetId: z.string(),
78
- synced: z.boolean()
77
+ targetId: z.string()
79
78
  });
80
79
 
81
- export const getEntitySyncRequestSchema = z.object({
80
+ export const setEntitySyncRequestSchema = z.object({
82
81
  targetEntityType: z.nativeEnum(NotificationEntityType),
83
- targetId: z.string()
82
+ targetId: z.string(),
83
+ synced: z.boolean()
84
84
  });
85
85
 
86
86
  export type NotificationTrigger = z.infer<typeof notificationSchedulerDataSchema>;
@@ -88,8 +88,9 @@ export type NotificationTemplateData = z.infer<typeof notificationTemplateSchema
88
88
 
89
89
  export type CreateNotificationTemplateRequest = z.infer<typeof createNotificationTemplateRequestSchema>;
90
90
  export type UpdateNotificationTemplateRequest = z.infer<typeof updateNotificationTemplateRequestSchema>;
91
- export type EntitySyncRequest = z.infer<typeof entitySyncRequestSchema>;
91
+
92
92
  export type GetEntitySyncRequest = z.infer<typeof getEntitySyncRequestSchema>;
93
+ export type SetEntitySyncRequest = z.infer<typeof setEntitySyncRequestSchema>;
93
94
 
94
95
  export interface CreateNotificationTemplateResponse {
95
96
  template: Serialized<NotificationTemplateData>;
@@ -99,25 +100,16 @@ export interface GetNotificationTemplatesResponse {
99
100
  templates: Serialized<NotificationTemplateData>[];
100
101
  }
101
102
 
102
- export interface GetNotificationTemplateResponse {
103
- template: Serialized<NotificationTemplateData>;
104
- }
105
-
106
103
  export interface UpdateNotificationTemplateResponse {
107
104
  template: Serialized<NotificationTemplateData>;
108
105
  }
109
106
 
110
107
  export interface DeleteNotificationTemplateResponse {}
111
108
 
112
- export interface EntitySyncResponse {
113
- success: boolean;
109
+ export interface GetEntitySyncResponse {
114
110
  synced: boolean;
115
- templates?: Serialized<NotificationTemplateData>[];
116
- error?: string;
117
111
  }
118
112
 
119
- export interface GetEntitySyncResponse {
120
- success: boolean;
113
+ export interface SetEntitySyncResponse {
121
114
  synced: boolean;
122
- error?: string;
123
115
  }