api-arreya-types 1.0.54 → 1.0.57
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.
- package/dist/alert.type.d.ts +114 -3
- package/dist/alert.type.js +26 -36
- package/package.json +1 -1
package/dist/alert.type.d.ts
CHANGED
|
@@ -2,25 +2,136 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const Alert: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
projectId: z.ZodString;
|
|
5
|
+
source: z.ZodString;
|
|
6
|
+
enabled: z.ZodBoolean;
|
|
5
7
|
title: z.ZodString;
|
|
6
8
|
message: z.ZodString;
|
|
9
|
+
textColor: z.ZodString;
|
|
10
|
+
backgroundColor: z.ZodString;
|
|
7
11
|
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
8
12
|
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
9
13
|
}, "strip", z.ZodTypeAny, {
|
|
10
14
|
message: string;
|
|
11
15
|
id: string;
|
|
12
16
|
projectId: string;
|
|
17
|
+
source: string;
|
|
18
|
+
enabled: boolean;
|
|
13
19
|
title: string;
|
|
20
|
+
textColor: string;
|
|
21
|
+
backgroundColor: string;
|
|
14
22
|
createdAt: Date;
|
|
15
23
|
updatedAt: Date;
|
|
16
24
|
}, {
|
|
17
25
|
message: string;
|
|
18
26
|
id: string;
|
|
19
27
|
projectId: string;
|
|
28
|
+
source: string;
|
|
29
|
+
enabled: boolean;
|
|
20
30
|
title: string;
|
|
31
|
+
textColor: string;
|
|
32
|
+
backgroundColor: string;
|
|
21
33
|
createdAt: string | Date;
|
|
22
34
|
updatedAt: string | Date;
|
|
23
35
|
}>;
|
|
36
|
+
export type Alert = z.infer<typeof Alert>;
|
|
37
|
+
export declare const CreateAlert: z.ZodObject<{
|
|
38
|
+
projectId: z.ZodString;
|
|
39
|
+
source: z.ZodString;
|
|
40
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
41
|
+
title: z.ZodString;
|
|
42
|
+
message: z.ZodString;
|
|
43
|
+
textColor: z.ZodString;
|
|
44
|
+
backgroundColor: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
message: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
source: string;
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
title: string;
|
|
51
|
+
textColor: string;
|
|
52
|
+
backgroundColor: string;
|
|
53
|
+
}, {
|
|
54
|
+
message: string;
|
|
55
|
+
projectId: string;
|
|
56
|
+
source: string;
|
|
57
|
+
title: string;
|
|
58
|
+
textColor: string;
|
|
59
|
+
backgroundColor: string;
|
|
60
|
+
enabled?: boolean | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const UpdateAlert: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
source: z.ZodString;
|
|
65
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
title: z.ZodOptional<z.ZodString>;
|
|
67
|
+
message: z.ZodOptional<z.ZodString>;
|
|
68
|
+
textColor: z.ZodOptional<z.ZodString>;
|
|
69
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
id: string;
|
|
72
|
+
source: string;
|
|
73
|
+
message?: string | undefined;
|
|
74
|
+
enabled?: boolean | undefined;
|
|
75
|
+
title?: string | undefined;
|
|
76
|
+
textColor?: string | undefined;
|
|
77
|
+
backgroundColor?: string | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
id: string;
|
|
80
|
+
source: string;
|
|
81
|
+
message?: string | undefined;
|
|
82
|
+
enabled?: boolean | undefined;
|
|
83
|
+
title?: string | undefined;
|
|
84
|
+
textColor?: string | undefined;
|
|
85
|
+
backgroundColor?: string | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
export type CreateAlert = z.infer<typeof CreateAlert>;
|
|
88
|
+
export type UpdateAlert = z.infer<typeof UpdateAlert>;
|
|
89
|
+
export declare const CreateAlertRequestBody: z.ZodObject<Omit<{
|
|
90
|
+
projectId: z.ZodString;
|
|
91
|
+
source: z.ZodString;
|
|
92
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
93
|
+
title: z.ZodString;
|
|
94
|
+
message: z.ZodString;
|
|
95
|
+
textColor: z.ZodString;
|
|
96
|
+
backgroundColor: z.ZodString;
|
|
97
|
+
}, "projectId" | "source">, "strip", z.ZodTypeAny, {
|
|
98
|
+
message: string;
|
|
99
|
+
enabled: boolean;
|
|
100
|
+
title: string;
|
|
101
|
+
textColor: string;
|
|
102
|
+
backgroundColor: string;
|
|
103
|
+
}, {
|
|
104
|
+
message: string;
|
|
105
|
+
title: string;
|
|
106
|
+
textColor: string;
|
|
107
|
+
backgroundColor: string;
|
|
108
|
+
enabled?: boolean | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
export declare const UpdateAlertRequestBody: z.ZodObject<Omit<{
|
|
111
|
+
id: z.ZodString;
|
|
112
|
+
source: z.ZodString;
|
|
113
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
title: z.ZodOptional<z.ZodString>;
|
|
115
|
+
message: z.ZodOptional<z.ZodString>;
|
|
116
|
+
textColor: z.ZodOptional<z.ZodString>;
|
|
117
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, "id">, "strip", z.ZodTypeAny, {
|
|
119
|
+
source: string;
|
|
120
|
+
message?: string | undefined;
|
|
121
|
+
enabled?: boolean | undefined;
|
|
122
|
+
title?: string | undefined;
|
|
123
|
+
textColor?: string | undefined;
|
|
124
|
+
backgroundColor?: string | undefined;
|
|
125
|
+
}, {
|
|
126
|
+
source: string;
|
|
127
|
+
message?: string | undefined;
|
|
128
|
+
enabled?: boolean | undefined;
|
|
129
|
+
title?: string | undefined;
|
|
130
|
+
textColor?: string | undefined;
|
|
131
|
+
backgroundColor?: string | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
export type CreateAlertRequestBody = z.infer<typeof CreateAlertRequestBody>;
|
|
134
|
+
export type UpdateAlertRequestBody = z.infer<typeof UpdateAlertRequestBody>;
|
|
24
135
|
export declare const BeepAlert: z.ZodObject<{
|
|
25
136
|
soundEffect: z.ZodLiteral<"beep">;
|
|
26
137
|
soundPitch: z.ZodNumber;
|
|
@@ -184,7 +295,7 @@ export declare const AudioFileAlert: z.ZodObject<{
|
|
|
184
295
|
}>;
|
|
185
296
|
export declare const AlertRequestParams: z.ZodObject<{
|
|
186
297
|
id: z.ZodString;
|
|
187
|
-
source: z.
|
|
298
|
+
source: z.ZodString;
|
|
188
299
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
300
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
301
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -211,6 +322,7 @@ export declare const AlertRequestParams: z.ZodObject<{
|
|
|
211
322
|
endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>>>;
|
|
212
323
|
}, "strip", z.ZodTypeAny, {
|
|
213
324
|
id: string;
|
|
325
|
+
source: string;
|
|
214
326
|
soundEffect: string;
|
|
215
327
|
soundPitch: string;
|
|
216
328
|
soundDelay: string;
|
|
@@ -222,7 +334,6 @@ export declare const AlertRequestParams: z.ZodObject<{
|
|
|
222
334
|
soundRate: string;
|
|
223
335
|
soundUrl: string;
|
|
224
336
|
soundAudioVolume: string;
|
|
225
|
-
source: "api";
|
|
226
337
|
sound: string;
|
|
227
338
|
schedule: string;
|
|
228
339
|
soundVoice: string;
|
|
@@ -238,6 +349,7 @@ export declare const AlertRequestParams: z.ZodObject<{
|
|
|
238
349
|
endTime?: Date | null | undefined;
|
|
239
350
|
}, {
|
|
240
351
|
id: string;
|
|
352
|
+
source: string;
|
|
241
353
|
soundEffect: string;
|
|
242
354
|
soundPitch: string;
|
|
243
355
|
soundDelay: string;
|
|
@@ -249,7 +361,6 @@ export declare const AlertRequestParams: z.ZodObject<{
|
|
|
249
361
|
soundRate: string;
|
|
250
362
|
soundUrl: string;
|
|
251
363
|
soundAudioVolume: string;
|
|
252
|
-
source: "api";
|
|
253
364
|
sound: string;
|
|
254
365
|
schedule: string;
|
|
255
366
|
soundVoice: string;
|
package/dist/alert.type.js
CHANGED
|
@@ -1,26 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlertRequestParams = exports.AudioFileAlert = exports.SpeechAlert = exports.ContinuousToneAlert = exports.IntermittentToneAlert = exports.FireAlert = exports.ClickAlert = exports.TapAlert = exports.BeepAlert = exports.Alert = void 0;
|
|
3
|
+
exports.AlertRequestParams = exports.AudioFileAlert = exports.SpeechAlert = exports.ContinuousToneAlert = exports.IntermittentToneAlert = exports.FireAlert = exports.ClickAlert = exports.TapAlert = exports.BeepAlert = exports.UpdateAlertRequestBody = exports.CreateAlertRequestBody = exports.UpdateAlert = exports.CreateAlert = exports.Alert = void 0;
|
|
4
4
|
var zod_1 = require("zod");
|
|
5
5
|
var zod_utils_1 = require("./zod-utils");
|
|
6
6
|
exports.Alert = zod_1.z.object({
|
|
7
7
|
id: zod_1.z.string(),
|
|
8
8
|
projectId: zod_1.z.string(),
|
|
9
|
+
source: zod_1.z.string(),
|
|
10
|
+
enabled: zod_1.z.boolean(),
|
|
9
11
|
title: zod_1.z.string(),
|
|
10
12
|
message: zod_1.z.string(),
|
|
13
|
+
textColor: zod_1.z.string(),
|
|
14
|
+
backgroundColor: zod_1.z.string(),
|
|
11
15
|
createdAt: zod_utils_1.zodDate,
|
|
12
16
|
updatedAt: zod_utils_1.zodDate,
|
|
13
17
|
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
exports.CreateAlert = zod_1.z.object({
|
|
19
|
+
projectId: zod_1.z.string(),
|
|
20
|
+
source: zod_1.z.string(),
|
|
21
|
+
enabled: zod_1.z.boolean().optional().default(true),
|
|
22
|
+
title: zod_1.z.string(),
|
|
23
|
+
message: zod_1.z.string(),
|
|
24
|
+
textColor: zod_1.z.string(),
|
|
25
|
+
backgroundColor: zod_1.z.string(),
|
|
26
|
+
});
|
|
27
|
+
exports.UpdateAlert = zod_1.z.object({
|
|
28
|
+
id: zod_1.z.string(),
|
|
29
|
+
source: zod_1.z.string(),
|
|
30
|
+
enabled: zod_1.z.boolean().optional(),
|
|
31
|
+
title: zod_1.z.string().optional(),
|
|
32
|
+
message: zod_1.z.string().optional(),
|
|
33
|
+
textColor: zod_1.z.string().optional(),
|
|
34
|
+
backgroundColor: zod_1.z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
exports.CreateAlertRequestBody = exports.CreateAlert.omit({ projectId: true, source: true });
|
|
37
|
+
exports.UpdateAlertRequestBody = exports.UpdateAlert.omit({ id: true });
|
|
24
38
|
// Legacy alert request params
|
|
25
39
|
var animations = [
|
|
26
40
|
'bounce',
|
|
@@ -182,7 +196,7 @@ exports.AudioFileAlert = zod_1.z.object({
|
|
|
182
196
|
});
|
|
183
197
|
exports.AlertRequestParams = zod_1.z.object({
|
|
184
198
|
id: zod_1.z.string(),
|
|
185
|
-
source: zod_1.z.
|
|
199
|
+
source: zod_1.z.string(),
|
|
186
200
|
icon: zod_1.z.string().nullable().optional(),
|
|
187
201
|
message: zod_1.z.string().nullable().optional(),
|
|
188
202
|
color: zod_1.z.string().nullable().optional(),
|
|
@@ -207,28 +221,4 @@ exports.AlertRequestParams = zod_1.z.object({
|
|
|
207
221
|
soundUrl: zod_1.z.string(),
|
|
208
222
|
startTime: zod_utils_1.zodDate.nullable().optional(),
|
|
209
223
|
endTime: zod_utils_1.zodDate.nullable().optional(),
|
|
210
|
-
// message.icon = req.param('icon'); // 'phone'
|
|
211
|
-
// message.message = req.param('message'); // 'MOORE AHSLEY (13199291968)'
|
|
212
|
-
// message.color = req.param('color'); // '#32a852'
|
|
213
|
-
// message.background = req.param('background');
|
|
214
|
-
// message.title = req.param('title'); // 'Incoming Call'
|
|
215
|
-
// message.timeout = req.param('timeout'); // 10
|
|
216
|
-
// message.animation = req.param('animation');
|
|
217
|
-
// message.timeoutUnit = req.param('timeoutUnit');
|
|
218
|
-
// // message.sound = req.param('sound');
|
|
219
|
-
// message.schedule = req.param('schedule');
|
|
220
|
-
// message.soundLoop = req.param('soundLoop');
|
|
221
|
-
// message.soundEffect = req.param('soundEffect');
|
|
222
|
-
// message.soundPitch = req.param('soundPitch');
|
|
223
|
-
// message.soundVoicePitch = req.param('soundVoicePitch');
|
|
224
|
-
// message.soundVolume = req.param('soundVolume');
|
|
225
|
-
// message.soundAudioVolume = req.param('soundAudioVolume');
|
|
226
|
-
// message.soundDelay = req.param('soundDelay');
|
|
227
|
-
// message.soundDuration = req.param('soundDuration');
|
|
228
|
-
// message.soundVoice = req.param('soundVoice');
|
|
229
|
-
// message.soundRate = req.param('soundRate');
|
|
230
|
-
// message.soundText = req.param('soundText');
|
|
231
|
-
// message.soundUrl = req.param('soundUrl');
|
|
232
|
-
// message.startTime = decodeURIComponent(req.param('startTime'));
|
|
233
|
-
// message.endTime = decodeURIComponent(req.param('endTime'));
|
|
234
224
|
});
|