@nxtedition/types 23.0.11 → 23.0.13

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.
Files changed (45) hide show
  1. package/dist/app.d.ts +61 -1
  2. package/dist/app.js +218 -10
  3. package/dist/common/file.d.ts +1 -1
  4. package/dist/common/file.js +32 -32
  5. package/dist/common/index.d.ts +1 -0
  6. package/dist/common/index.js +1 -0
  7. package/dist/common/settings.d.ts +34 -6
  8. package/dist/common/settings.js +1399 -535
  9. package/dist/common/user-notification.d.ts +8 -0
  10. package/dist/common/user-notification.js +85 -0
  11. package/dist/domains/asset.d.ts +23 -0
  12. package/dist/domains/asset.js +248 -0
  13. package/dist/domains/comment-reaction.d.ts +15 -0
  14. package/dist/domains/comment-reaction.js +115 -0
  15. package/dist/domains/comment-read-mark.d.ts +15 -0
  16. package/dist/domains/comment-read-mark.js +115 -0
  17. package/dist/domains/comment.d.ts +153 -0
  18. package/dist/domains/comment.js +5729 -0
  19. package/dist/domains/connection.d.ts +1 -1
  20. package/dist/domains/connection.js +118 -118
  21. package/dist/domains/deepstream.d.ts +14 -0
  22. package/dist/domains/deepstream.js +139 -0
  23. package/dist/domains/edit.d.ts +17 -0
  24. package/dist/domains/edit.js +224 -0
  25. package/dist/domains/index.d.ts +17 -1
  26. package/dist/domains/index.js +8 -0
  27. package/dist/domains/planning.d.ts +1 -1
  28. package/dist/domains/planning.js +29 -23
  29. package/dist/domains/publish.d.ts +1 -0
  30. package/dist/domains/publish.js +142 -46
  31. package/dist/domains/published.d.ts +2 -1
  32. package/dist/domains/published.js +50 -10
  33. package/dist/domains/settings.js +1401 -534
  34. package/dist/domains/subtitle-style.d.ts +13 -0
  35. package/dist/domains/subtitle-style.js +123 -0
  36. package/dist/domains/user-notification-status.d.ts +55 -0
  37. package/dist/domains/user-notification-status.js +715 -0
  38. package/dist/domains/user-notification.d.ts +118 -0
  39. package/dist/domains/user-notification.js +3040 -0
  40. package/dist/domains/user.d.ts +42 -8
  41. package/dist/domains/user.js +352 -12
  42. package/dist/index.d.ts +23 -1
  43. package/dist/index.js +30 -13
  44. package/dist/schema.json +1438 -35
  45. package/package.json +1 -1
@@ -0,0 +1,3040 @@
1
+ import __typia from "typia";
2
+ export const isUserNotificationCommon = input => {
3
+ const $io0 = input => "string" === typeof input.userId && "string" === typeof input.type && ("object" === typeof input.payload && null !== input.payload && true) && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
4
+ return "object" === typeof input && null !== input && $io0(input);
5
+ };
6
+ export const assertUserNotificationCommon = (input, errorFactory) => {
7
+ const __is = input => {
8
+ const $io0 = input => "string" === typeof input.userId && "string" === typeof input.type && ("object" === typeof input.payload && null !== input.payload && true) && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
9
+ return "object" === typeof input && null !== input && $io0(input);
10
+ };
11
+ if (false === __is(input))
12
+ ((input, _path, _exceptionable = true) => {
13
+ const $guard = __typia.createAssert.guard;
14
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.userId || $guard(_exceptionable, {
15
+ path: _path + ".userId",
16
+ expected: "string",
17
+ value: input.userId
18
+ }, errorFactory)) && ("string" === typeof input.type || $guard(_exceptionable, {
19
+ path: _path + ".type",
20
+ expected: "string",
21
+ value: input.type
22
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload && false === Array.isArray(input.payload) || $guard(_exceptionable, {
23
+ path: _path + ".payload",
24
+ expected: "object",
25
+ value: input.payload
26
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
27
+ path: _path + ".payload",
28
+ expected: "object",
29
+ value: input.payload
30
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
31
+ path: _path + ".timestamp",
32
+ expected: "string",
33
+ value: input.timestamp
34
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
35
+ path: _path + ".reasons",
36
+ expected: "Array<NotificationReason>",
37
+ value: input.reasons
38
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
39
+ path: _path + ".reasons[" + _index1 + "]",
40
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
41
+ value: elem
42
+ }, errorFactory)) || $guard(_exceptionable, {
43
+ path: _path + ".reasons",
44
+ expected: "Array<NotificationReason>",
45
+ value: input.reasons
46
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
47
+ path: _path + ".triggerId",
48
+ expected: "(string | undefined)",
49
+ value: input.triggerId
50
+ }, errorFactory));
51
+ const $ao1 = (input, _path, _exceptionable = true) => true;
52
+ return ("object" === typeof input && null !== input || $guard(true, {
53
+ path: _path + "",
54
+ expected: "UserNotificationCommon",
55
+ value: input
56
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
57
+ path: _path + "",
58
+ expected: "UserNotificationCommon",
59
+ value: input
60
+ }, errorFactory);
61
+ })(input, "$input", true);
62
+ return input;
63
+ };
64
+ export const randomUserNotificationCommon = generator => {
65
+ const $generator = __typia.createRandom.generator;
66
+ const $pick = __typia.createRandom.pick;
67
+ const $ro0 = (_recursive = false, _depth = 0) => ({
68
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
69
+ type: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
70
+ payload: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
71
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
72
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
73
+ () => "mentioned",
74
+ () => "assigned",
75
+ () => "author",
76
+ () => "participated",
77
+ () => "always"
78
+ ])()),
79
+ triggerId: $pick([
80
+ () => undefined,
81
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
82
+ ])()
83
+ });
84
+ const $ro1 = (_recursive = false, _depth = 0) => {};
85
+ return $ro0();
86
+ };
87
+ export const assertGuardUserNotificationCommon = (input, errorFactory) => {
88
+ const __is = input => {
89
+ const $io0 = input => "string" === typeof input.userId && "string" === typeof input.type && ("object" === typeof input.payload && null !== input.payload && true) && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
90
+ return "object" === typeof input && null !== input && $io0(input);
91
+ };
92
+ if (false === __is(input))
93
+ ((input, _path, _exceptionable = true) => {
94
+ const $guard = __typia.createAssertGuard.guard;
95
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.userId || $guard(_exceptionable, {
96
+ path: _path + ".userId",
97
+ expected: "string",
98
+ value: input.userId
99
+ }, errorFactory)) && ("string" === typeof input.type || $guard(_exceptionable, {
100
+ path: _path + ".type",
101
+ expected: "string",
102
+ value: input.type
103
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload && false === Array.isArray(input.payload) || $guard(_exceptionable, {
104
+ path: _path + ".payload",
105
+ expected: "object",
106
+ value: input.payload
107
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
108
+ path: _path + ".payload",
109
+ expected: "object",
110
+ value: input.payload
111
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
112
+ path: _path + ".timestamp",
113
+ expected: "string",
114
+ value: input.timestamp
115
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
116
+ path: _path + ".reasons",
117
+ expected: "Array<NotificationReason>",
118
+ value: input.reasons
119
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
120
+ path: _path + ".reasons[" + _index1 + "]",
121
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
122
+ value: elem
123
+ }, errorFactory)) || $guard(_exceptionable, {
124
+ path: _path + ".reasons",
125
+ expected: "Array<NotificationReason>",
126
+ value: input.reasons
127
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
128
+ path: _path + ".triggerId",
129
+ expected: "(string | undefined)",
130
+ value: input.triggerId
131
+ }, errorFactory));
132
+ const $ao1 = (input, _path, _exceptionable = true) => true;
133
+ return ("object" === typeof input && null !== input || $guard(true, {
134
+ path: _path + "",
135
+ expected: "UserNotificationCommon",
136
+ value: input
137
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
138
+ path: _path + "",
139
+ expected: "UserNotificationCommon",
140
+ value: input
141
+ }, errorFactory);
142
+ })(input, "$input", true);
143
+ };
144
+ export const stringifyUserNotificationCommon = input => {
145
+ const $io1 = input => true;
146
+ const $string = __typia.json.createStringify.string;
147
+ const $throws = __typia.json.createStringify.throws;
148
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"userId":${$string(input.userId)},"type":${$string(input.type)},"payload":{},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
149
+ if ("string" === typeof elem)
150
+ return $string(elem);
151
+ if ("string" === typeof elem)
152
+ return "\"" + elem + "\"";
153
+ $throws({
154
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
155
+ value: elem
156
+ });
157
+ })()).join(",")}]`}}`;
158
+ return $so0(input);
159
+ };
160
+ export const assertStringifyUserNotificationCommon = (input, errorFactory) => { const assert = (input, errorFactory) => {
161
+ const __is = input => {
162
+ const $io0 = input => "string" === typeof input.userId && "string" === typeof input.type && ("object" === typeof input.payload && null !== input.payload && true) && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
163
+ return "object" === typeof input && null !== input && $io0(input);
164
+ };
165
+ if (false === __is(input))
166
+ ((input, _path, _exceptionable = true) => {
167
+ const $guard = __typia.json.createAssertStringify.guard;
168
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.userId || $guard(_exceptionable, {
169
+ path: _path + ".userId",
170
+ expected: "string",
171
+ value: input.userId
172
+ }, errorFactory)) && ("string" === typeof input.type || $guard(_exceptionable, {
173
+ path: _path + ".type",
174
+ expected: "string",
175
+ value: input.type
176
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload && false === Array.isArray(input.payload) || $guard(_exceptionable, {
177
+ path: _path + ".payload",
178
+ expected: "object",
179
+ value: input.payload
180
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
181
+ path: _path + ".payload",
182
+ expected: "object",
183
+ value: input.payload
184
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
185
+ path: _path + ".timestamp",
186
+ expected: "string",
187
+ value: input.timestamp
188
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
189
+ path: _path + ".reasons",
190
+ expected: "Array<NotificationReason>",
191
+ value: input.reasons
192
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
193
+ path: _path + ".reasons[" + _index1 + "]",
194
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
195
+ value: elem
196
+ }, errorFactory)) || $guard(_exceptionable, {
197
+ path: _path + ".reasons",
198
+ expected: "Array<NotificationReason>",
199
+ value: input.reasons
200
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
201
+ path: _path + ".triggerId",
202
+ expected: "(string | undefined)",
203
+ value: input.triggerId
204
+ }, errorFactory));
205
+ const $ao1 = (input, _path, _exceptionable = true) => true;
206
+ return ("object" === typeof input && null !== input || $guard(true, {
207
+ path: _path + "",
208
+ expected: "UserNotificationCommon",
209
+ value: input
210
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
211
+ path: _path + "",
212
+ expected: "UserNotificationCommon",
213
+ value: input
214
+ }, errorFactory);
215
+ })(input, "$input", true);
216
+ return input;
217
+ }; const stringify = input => {
218
+ const $io1 = input => true;
219
+ const $string = __typia.json.createAssertStringify.string;
220
+ const $throws = __typia.json.createAssertStringify.throws;
221
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"userId":${$string(input.userId)},"type":${$string(input.type)},"payload":{},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
222
+ if ("string" === typeof elem)
223
+ return $string(elem);
224
+ if ("string" === typeof elem)
225
+ return "\"" + elem + "\"";
226
+ $throws({
227
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
228
+ value: elem
229
+ });
230
+ })()).join(",")}]`}}`;
231
+ return $so0(input);
232
+ }; return stringify(assert(input, errorFactory)); };
233
+ export const isUserNotificationAssigned = input => {
234
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
235
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
236
+ return "object" === typeof input && null !== input && $io0(input);
237
+ };
238
+ export const assertUserNotificationAssigned = (input, errorFactory) => {
239
+ const __is = input => {
240
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
241
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
242
+ return "object" === typeof input && null !== input && $io0(input);
243
+ };
244
+ if (false === __is(input))
245
+ ((input, _path, _exceptionable = true) => {
246
+ const $guard = __typia.createAssert.guard;
247
+ const $ao0 = (input, _path, _exceptionable = true) => ("assigned" === input.type || $guard(_exceptionable, {
248
+ path: _path + ".type",
249
+ expected: "\"assigned\"",
250
+ value: input.type
251
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
252
+ path: _path + ".payload",
253
+ expected: "__type",
254
+ value: input.payload
255
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
256
+ path: _path + ".payload",
257
+ expected: "__type",
258
+ value: input.payload
259
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
260
+ path: _path + ".userId",
261
+ expected: "string",
262
+ value: input.userId
263
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
264
+ path: _path + ".timestamp",
265
+ expected: "string",
266
+ value: input.timestamp
267
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
268
+ path: _path + ".reasons",
269
+ expected: "Array<NotificationReason>",
270
+ value: input.reasons
271
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
272
+ path: _path + ".reasons[" + _index1 + "]",
273
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
274
+ value: elem
275
+ }, errorFactory)) || $guard(_exceptionable, {
276
+ path: _path + ".reasons",
277
+ expected: "Array<NotificationReason>",
278
+ value: input.reasons
279
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
280
+ path: _path + ".triggerId",
281
+ expected: "(string | undefined)",
282
+ value: input.triggerId
283
+ }, errorFactory));
284
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
285
+ path: _path + ".assetId",
286
+ expected: "string",
287
+ value: input.assetId
288
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
289
+ path: _path + ".actionBy",
290
+ expected: "(string | undefined)",
291
+ value: input.actionBy
292
+ }, errorFactory));
293
+ return ("object" === typeof input && null !== input || $guard(true, {
294
+ path: _path + "",
295
+ expected: "UserNotificationAssigned",
296
+ value: input
297
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
298
+ path: _path + "",
299
+ expected: "UserNotificationAssigned",
300
+ value: input
301
+ }, errorFactory);
302
+ })(input, "$input", true);
303
+ return input;
304
+ };
305
+ export const randomUserNotificationAssigned = generator => {
306
+ const $generator = __typia.createRandom.generator;
307
+ const $pick = __typia.createRandom.pick;
308
+ const $ro0 = (_recursive = false, _depth = 0) => ({
309
+ type: "assigned",
310
+ payload: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
311
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
312
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
313
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
314
+ () => "mentioned",
315
+ () => "assigned",
316
+ () => "author",
317
+ () => "participated",
318
+ () => "always"
319
+ ])()),
320
+ triggerId: $pick([
321
+ () => undefined,
322
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
323
+ ])()
324
+ });
325
+ const $ro1 = (_recursive = false, _depth = 0) => ({
326
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
327
+ actionBy: $pick([
328
+ () => undefined,
329
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
330
+ ])()
331
+ });
332
+ return $ro0();
333
+ };
334
+ export const assertGuardUserNotificationAssigned = (input, errorFactory) => {
335
+ const __is = input => {
336
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
337
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
338
+ return "object" === typeof input && null !== input && $io0(input);
339
+ };
340
+ if (false === __is(input))
341
+ ((input, _path, _exceptionable = true) => {
342
+ const $guard = __typia.createAssertGuard.guard;
343
+ const $ao0 = (input, _path, _exceptionable = true) => ("assigned" === input.type || $guard(_exceptionable, {
344
+ path: _path + ".type",
345
+ expected: "\"assigned\"",
346
+ value: input.type
347
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
348
+ path: _path + ".payload",
349
+ expected: "__type",
350
+ value: input.payload
351
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
352
+ path: _path + ".payload",
353
+ expected: "__type",
354
+ value: input.payload
355
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
356
+ path: _path + ".userId",
357
+ expected: "string",
358
+ value: input.userId
359
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
360
+ path: _path + ".timestamp",
361
+ expected: "string",
362
+ value: input.timestamp
363
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
364
+ path: _path + ".reasons",
365
+ expected: "Array<NotificationReason>",
366
+ value: input.reasons
367
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
368
+ path: _path + ".reasons[" + _index1 + "]",
369
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
370
+ value: elem
371
+ }, errorFactory)) || $guard(_exceptionable, {
372
+ path: _path + ".reasons",
373
+ expected: "Array<NotificationReason>",
374
+ value: input.reasons
375
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
376
+ path: _path + ".triggerId",
377
+ expected: "(string | undefined)",
378
+ value: input.triggerId
379
+ }, errorFactory));
380
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
381
+ path: _path + ".assetId",
382
+ expected: "string",
383
+ value: input.assetId
384
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
385
+ path: _path + ".actionBy",
386
+ expected: "(string | undefined)",
387
+ value: input.actionBy
388
+ }, errorFactory));
389
+ return ("object" === typeof input && null !== input || $guard(true, {
390
+ path: _path + "",
391
+ expected: "UserNotificationAssigned",
392
+ value: input
393
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
394
+ path: _path + "",
395
+ expected: "UserNotificationAssigned",
396
+ value: input
397
+ }, errorFactory);
398
+ })(input, "$input", true);
399
+ };
400
+ export const stringifyUserNotificationAssigned = input => {
401
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
402
+ const $string = __typia.json.createStringify.string;
403
+ const $throws = __typia.json.createStringify.throws;
404
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
405
+ if ("string" === typeof input.type)
406
+ return $string(input.type);
407
+ if ("string" === typeof input.type)
408
+ return "\"" + input.type + "\"";
409
+ $throws({
410
+ expected: "\"assigned\"",
411
+ value: input.type
412
+ });
413
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
414
+ if ("string" === typeof elem)
415
+ return $string(elem);
416
+ if ("string" === typeof elem)
417
+ return "\"" + elem + "\"";
418
+ $throws({
419
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
420
+ value: elem
421
+ });
422
+ })()).join(",")}]`}}`;
423
+ const $so1 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
424
+ return $so0(input);
425
+ };
426
+ export const assertStringifyUserNotificationAssigned = (input, errorFactory) => { const assert = (input, errorFactory) => {
427
+ const __is = input => {
428
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
429
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
430
+ return "object" === typeof input && null !== input && $io0(input);
431
+ };
432
+ if (false === __is(input))
433
+ ((input, _path, _exceptionable = true) => {
434
+ const $guard = __typia.json.createAssertStringify.guard;
435
+ const $ao0 = (input, _path, _exceptionable = true) => ("assigned" === input.type || $guard(_exceptionable, {
436
+ path: _path + ".type",
437
+ expected: "\"assigned\"",
438
+ value: input.type
439
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
440
+ path: _path + ".payload",
441
+ expected: "__type",
442
+ value: input.payload
443
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
444
+ path: _path + ".payload",
445
+ expected: "__type",
446
+ value: input.payload
447
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
448
+ path: _path + ".userId",
449
+ expected: "string",
450
+ value: input.userId
451
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
452
+ path: _path + ".timestamp",
453
+ expected: "string",
454
+ value: input.timestamp
455
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
456
+ path: _path + ".reasons",
457
+ expected: "Array<NotificationReason>",
458
+ value: input.reasons
459
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
460
+ path: _path + ".reasons[" + _index1 + "]",
461
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
462
+ value: elem
463
+ }, errorFactory)) || $guard(_exceptionable, {
464
+ path: _path + ".reasons",
465
+ expected: "Array<NotificationReason>",
466
+ value: input.reasons
467
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
468
+ path: _path + ".triggerId",
469
+ expected: "(string | undefined)",
470
+ value: input.triggerId
471
+ }, errorFactory));
472
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
473
+ path: _path + ".assetId",
474
+ expected: "string",
475
+ value: input.assetId
476
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
477
+ path: _path + ".actionBy",
478
+ expected: "(string | undefined)",
479
+ value: input.actionBy
480
+ }, errorFactory));
481
+ return ("object" === typeof input && null !== input || $guard(true, {
482
+ path: _path + "",
483
+ expected: "UserNotificationAssigned",
484
+ value: input
485
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
486
+ path: _path + "",
487
+ expected: "UserNotificationAssigned",
488
+ value: input
489
+ }, errorFactory);
490
+ })(input, "$input", true);
491
+ return input;
492
+ }; const stringify = input => {
493
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
494
+ const $string = __typia.json.createAssertStringify.string;
495
+ const $throws = __typia.json.createAssertStringify.throws;
496
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
497
+ if ("string" === typeof input.type)
498
+ return $string(input.type);
499
+ if ("string" === typeof input.type)
500
+ return "\"" + input.type + "\"";
501
+ $throws({
502
+ expected: "\"assigned\"",
503
+ value: input.type
504
+ });
505
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
506
+ if ("string" === typeof elem)
507
+ return $string(elem);
508
+ if ("string" === typeof elem)
509
+ return "\"" + elem + "\"";
510
+ $throws({
511
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
512
+ value: elem
513
+ });
514
+ })()).join(",")}]`}}`;
515
+ const $so1 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
516
+ return $so0(input);
517
+ }; return stringify(assert(input, errorFactory)); };
518
+ export const isUserNotificationUnassigned = input => {
519
+ const $io0 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
520
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
521
+ return "object" === typeof input && null !== input && $io0(input);
522
+ };
523
+ export const assertUserNotificationUnassigned = (input, errorFactory) => {
524
+ const __is = input => {
525
+ const $io0 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
526
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
527
+ return "object" === typeof input && null !== input && $io0(input);
528
+ };
529
+ if (false === __is(input))
530
+ ((input, _path, _exceptionable = true) => {
531
+ const $guard = __typia.createAssert.guard;
532
+ const $ao0 = (input, _path, _exceptionable = true) => ("unassigned" === input.type || $guard(_exceptionable, {
533
+ path: _path + ".type",
534
+ expected: "\"unassigned\"",
535
+ value: input.type
536
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
537
+ path: _path + ".payload",
538
+ expected: "__type",
539
+ value: input.payload
540
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
541
+ path: _path + ".payload",
542
+ expected: "__type",
543
+ value: input.payload
544
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
545
+ path: _path + ".userId",
546
+ expected: "string",
547
+ value: input.userId
548
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
549
+ path: _path + ".timestamp",
550
+ expected: "string",
551
+ value: input.timestamp
552
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
553
+ path: _path + ".reasons",
554
+ expected: "Array<NotificationReason>",
555
+ value: input.reasons
556
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
557
+ path: _path + ".reasons[" + _index1 + "]",
558
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
559
+ value: elem
560
+ }, errorFactory)) || $guard(_exceptionable, {
561
+ path: _path + ".reasons",
562
+ expected: "Array<NotificationReason>",
563
+ value: input.reasons
564
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
565
+ path: _path + ".triggerId",
566
+ expected: "(string | undefined)",
567
+ value: input.triggerId
568
+ }, errorFactory));
569
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
570
+ path: _path + ".assetId",
571
+ expected: "string",
572
+ value: input.assetId
573
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
574
+ path: _path + ".actionBy",
575
+ expected: "(string | undefined)",
576
+ value: input.actionBy
577
+ }, errorFactory));
578
+ return ("object" === typeof input && null !== input || $guard(true, {
579
+ path: _path + "",
580
+ expected: "UserNotificationUnassigned",
581
+ value: input
582
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
583
+ path: _path + "",
584
+ expected: "UserNotificationUnassigned",
585
+ value: input
586
+ }, errorFactory);
587
+ })(input, "$input", true);
588
+ return input;
589
+ };
590
+ export const randomUserNotificationUnassigned = generator => {
591
+ const $generator = __typia.createRandom.generator;
592
+ const $pick = __typia.createRandom.pick;
593
+ const $ro0 = (_recursive = false, _depth = 0) => ({
594
+ type: "unassigned",
595
+ payload: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
596
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
597
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
598
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
599
+ () => "mentioned",
600
+ () => "assigned",
601
+ () => "author",
602
+ () => "participated",
603
+ () => "always"
604
+ ])()),
605
+ triggerId: $pick([
606
+ () => undefined,
607
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
608
+ ])()
609
+ });
610
+ const $ro1 = (_recursive = false, _depth = 0) => ({
611
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
612
+ actionBy: $pick([
613
+ () => undefined,
614
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
615
+ ])()
616
+ });
617
+ return $ro0();
618
+ };
619
+ export const assertGuardUserNotificationUnassigned = (input, errorFactory) => {
620
+ const __is = input => {
621
+ const $io0 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
622
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
623
+ return "object" === typeof input && null !== input && $io0(input);
624
+ };
625
+ if (false === __is(input))
626
+ ((input, _path, _exceptionable = true) => {
627
+ const $guard = __typia.createAssertGuard.guard;
628
+ const $ao0 = (input, _path, _exceptionable = true) => ("unassigned" === input.type || $guard(_exceptionable, {
629
+ path: _path + ".type",
630
+ expected: "\"unassigned\"",
631
+ value: input.type
632
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
633
+ path: _path + ".payload",
634
+ expected: "__type",
635
+ value: input.payload
636
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
637
+ path: _path + ".payload",
638
+ expected: "__type",
639
+ value: input.payload
640
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
641
+ path: _path + ".userId",
642
+ expected: "string",
643
+ value: input.userId
644
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
645
+ path: _path + ".timestamp",
646
+ expected: "string",
647
+ value: input.timestamp
648
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
649
+ path: _path + ".reasons",
650
+ expected: "Array<NotificationReason>",
651
+ value: input.reasons
652
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
653
+ path: _path + ".reasons[" + _index1 + "]",
654
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
655
+ value: elem
656
+ }, errorFactory)) || $guard(_exceptionable, {
657
+ path: _path + ".reasons",
658
+ expected: "Array<NotificationReason>",
659
+ value: input.reasons
660
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
661
+ path: _path + ".triggerId",
662
+ expected: "(string | undefined)",
663
+ value: input.triggerId
664
+ }, errorFactory));
665
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
666
+ path: _path + ".assetId",
667
+ expected: "string",
668
+ value: input.assetId
669
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
670
+ path: _path + ".actionBy",
671
+ expected: "(string | undefined)",
672
+ value: input.actionBy
673
+ }, errorFactory));
674
+ return ("object" === typeof input && null !== input || $guard(true, {
675
+ path: _path + "",
676
+ expected: "UserNotificationUnassigned",
677
+ value: input
678
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
679
+ path: _path + "",
680
+ expected: "UserNotificationUnassigned",
681
+ value: input
682
+ }, errorFactory);
683
+ })(input, "$input", true);
684
+ };
685
+ export const stringifyUserNotificationUnassigned = input => {
686
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
687
+ const $string = __typia.json.createStringify.string;
688
+ const $throws = __typia.json.createStringify.throws;
689
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
690
+ if ("string" === typeof input.type)
691
+ return $string(input.type);
692
+ if ("string" === typeof input.type)
693
+ return "\"" + input.type + "\"";
694
+ $throws({
695
+ expected: "\"unassigned\"",
696
+ value: input.type
697
+ });
698
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
699
+ if ("string" === typeof elem)
700
+ return $string(elem);
701
+ if ("string" === typeof elem)
702
+ return "\"" + elem + "\"";
703
+ $throws({
704
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
705
+ value: elem
706
+ });
707
+ })()).join(",")}]`}}`;
708
+ const $so1 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
709
+ return $so0(input);
710
+ };
711
+ export const assertStringifyUserNotificationUnassigned = (input, errorFactory) => { const assert = (input, errorFactory) => {
712
+ const __is = input => {
713
+ const $io0 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
714
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
715
+ return "object" === typeof input && null !== input && $io0(input);
716
+ };
717
+ if (false === __is(input))
718
+ ((input, _path, _exceptionable = true) => {
719
+ const $guard = __typia.json.createAssertStringify.guard;
720
+ const $ao0 = (input, _path, _exceptionable = true) => ("unassigned" === input.type || $guard(_exceptionable, {
721
+ path: _path + ".type",
722
+ expected: "\"unassigned\"",
723
+ value: input.type
724
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
725
+ path: _path + ".payload",
726
+ expected: "__type",
727
+ value: input.payload
728
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
729
+ path: _path + ".payload",
730
+ expected: "__type",
731
+ value: input.payload
732
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
733
+ path: _path + ".userId",
734
+ expected: "string",
735
+ value: input.userId
736
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
737
+ path: _path + ".timestamp",
738
+ expected: "string",
739
+ value: input.timestamp
740
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
741
+ path: _path + ".reasons",
742
+ expected: "Array<NotificationReason>",
743
+ value: input.reasons
744
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
745
+ path: _path + ".reasons[" + _index1 + "]",
746
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
747
+ value: elem
748
+ }, errorFactory)) || $guard(_exceptionable, {
749
+ path: _path + ".reasons",
750
+ expected: "Array<NotificationReason>",
751
+ value: input.reasons
752
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
753
+ path: _path + ".triggerId",
754
+ expected: "(string | undefined)",
755
+ value: input.triggerId
756
+ }, errorFactory));
757
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
758
+ path: _path + ".assetId",
759
+ expected: "string",
760
+ value: input.assetId
761
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
762
+ path: _path + ".actionBy",
763
+ expected: "(string | undefined)",
764
+ value: input.actionBy
765
+ }, errorFactory));
766
+ return ("object" === typeof input && null !== input || $guard(true, {
767
+ path: _path + "",
768
+ expected: "UserNotificationUnassigned",
769
+ value: input
770
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
771
+ path: _path + "",
772
+ expected: "UserNotificationUnassigned",
773
+ value: input
774
+ }, errorFactory);
775
+ })(input, "$input", true);
776
+ return input;
777
+ }; const stringify = input => {
778
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
779
+ const $string = __typia.json.createAssertStringify.string;
780
+ const $throws = __typia.json.createAssertStringify.throws;
781
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
782
+ if ("string" === typeof input.type)
783
+ return $string(input.type);
784
+ if ("string" === typeof input.type)
785
+ return "\"" + input.type + "\"";
786
+ $throws({
787
+ expected: "\"unassigned\"",
788
+ value: input.type
789
+ });
790
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
791
+ if ("string" === typeof elem)
792
+ return $string(elem);
793
+ if ("string" === typeof elem)
794
+ return "\"" + elem + "\"";
795
+ $throws({
796
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
797
+ value: elem
798
+ });
799
+ })()).join(",")}]`}}`;
800
+ const $so1 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
801
+ return $so0(input);
802
+ }; return stringify(assert(input, errorFactory)); };
803
+ export const isUserNotificationComment = input => {
804
+ const $io0 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
805
+ return "object" === typeof input && null !== input && $io0(input);
806
+ };
807
+ export const assertUserNotificationComment = (input, errorFactory) => {
808
+ const __is = input => {
809
+ const $io0 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
810
+ return "object" === typeof input && null !== input && $io0(input);
811
+ };
812
+ if (false === __is(input))
813
+ ((input, _path, _exceptionable = true) => {
814
+ const $guard = __typia.createAssert.guard;
815
+ const $ao0 = (input, _path, _exceptionable = true) => ("comment" === input.type || $guard(_exceptionable, {
816
+ path: _path + ".type",
817
+ expected: "\"comment\"",
818
+ value: input.type
819
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
820
+ path: _path + ".payload",
821
+ expected: "__type",
822
+ value: input.payload
823
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
824
+ path: _path + ".payload",
825
+ expected: "__type",
826
+ value: input.payload
827
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
828
+ path: _path + ".userId",
829
+ expected: "string",
830
+ value: input.userId
831
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
832
+ path: _path + ".timestamp",
833
+ expected: "string",
834
+ value: input.timestamp
835
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
836
+ path: _path + ".reasons",
837
+ expected: "Array<NotificationReason>",
838
+ value: input.reasons
839
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
840
+ path: _path + ".reasons[" + _index1 + "]",
841
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
842
+ value: elem
843
+ }, errorFactory)) || $guard(_exceptionable, {
844
+ path: _path + ".reasons",
845
+ expected: "Array<NotificationReason>",
846
+ value: input.reasons
847
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
848
+ path: _path + ".triggerId",
849
+ expected: "(string | undefined)",
850
+ value: input.triggerId
851
+ }, errorFactory));
852
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.commentId || $guard(_exceptionable, {
853
+ path: _path + ".commentId",
854
+ expected: "string",
855
+ value: input.commentId
856
+ }, errorFactory);
857
+ return ("object" === typeof input && null !== input || $guard(true, {
858
+ path: _path + "",
859
+ expected: "UserNotificationComment",
860
+ value: input
861
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
862
+ path: _path + "",
863
+ expected: "UserNotificationComment",
864
+ value: input
865
+ }, errorFactory);
866
+ })(input, "$input", true);
867
+ return input;
868
+ };
869
+ export const randomUserNotificationComment = generator => {
870
+ const $generator = __typia.createRandom.generator;
871
+ const $pick = __typia.createRandom.pick;
872
+ const $ro0 = (_recursive = false, _depth = 0) => ({
873
+ type: "comment",
874
+ payload: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
875
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
876
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
877
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
878
+ () => "mentioned",
879
+ () => "assigned",
880
+ () => "author",
881
+ () => "participated",
882
+ () => "always"
883
+ ])()),
884
+ triggerId: $pick([
885
+ () => undefined,
886
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
887
+ ])()
888
+ });
889
+ const $ro1 = (_recursive = false, _depth = 0) => ({
890
+ commentId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
891
+ });
892
+ return $ro0();
893
+ };
894
+ export const assertGuardUserNotificationComment = (input, errorFactory) => {
895
+ const __is = input => {
896
+ const $io0 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
897
+ return "object" === typeof input && null !== input && $io0(input);
898
+ };
899
+ if (false === __is(input))
900
+ ((input, _path, _exceptionable = true) => {
901
+ const $guard = __typia.createAssertGuard.guard;
902
+ const $ao0 = (input, _path, _exceptionable = true) => ("comment" === input.type || $guard(_exceptionable, {
903
+ path: _path + ".type",
904
+ expected: "\"comment\"",
905
+ value: input.type
906
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
907
+ path: _path + ".payload",
908
+ expected: "__type",
909
+ value: input.payload
910
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
911
+ path: _path + ".payload",
912
+ expected: "__type",
913
+ value: input.payload
914
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
915
+ path: _path + ".userId",
916
+ expected: "string",
917
+ value: input.userId
918
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
919
+ path: _path + ".timestamp",
920
+ expected: "string",
921
+ value: input.timestamp
922
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
923
+ path: _path + ".reasons",
924
+ expected: "Array<NotificationReason>",
925
+ value: input.reasons
926
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
927
+ path: _path + ".reasons[" + _index1 + "]",
928
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
929
+ value: elem
930
+ }, errorFactory)) || $guard(_exceptionable, {
931
+ path: _path + ".reasons",
932
+ expected: "Array<NotificationReason>",
933
+ value: input.reasons
934
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
935
+ path: _path + ".triggerId",
936
+ expected: "(string | undefined)",
937
+ value: input.triggerId
938
+ }, errorFactory));
939
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.commentId || $guard(_exceptionable, {
940
+ path: _path + ".commentId",
941
+ expected: "string",
942
+ value: input.commentId
943
+ }, errorFactory);
944
+ return ("object" === typeof input && null !== input || $guard(true, {
945
+ path: _path + "",
946
+ expected: "UserNotificationComment",
947
+ value: input
948
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
949
+ path: _path + "",
950
+ expected: "UserNotificationComment",
951
+ value: input
952
+ }, errorFactory);
953
+ })(input, "$input", true);
954
+ };
955
+ export const stringifyUserNotificationComment = input => {
956
+ const $io1 = input => "string" === typeof input.commentId;
957
+ const $string = __typia.json.createStringify.string;
958
+ const $throws = __typia.json.createStringify.throws;
959
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
960
+ if ("string" === typeof input.type)
961
+ return $string(input.type);
962
+ if ("string" === typeof input.type)
963
+ return "\"" + input.type + "\"";
964
+ $throws({
965
+ expected: "\"comment\"",
966
+ value: input.type
967
+ });
968
+ })()},"payload":${`{"commentId":${$string(input.payload.commentId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
969
+ if ("string" === typeof elem)
970
+ return $string(elem);
971
+ if ("string" === typeof elem)
972
+ return "\"" + elem + "\"";
973
+ $throws({
974
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
975
+ value: elem
976
+ });
977
+ })()).join(",")}]`}}`;
978
+ return $so0(input);
979
+ };
980
+ export const assertStringifyUserNotificationComment = (input, errorFactory) => { const assert = (input, errorFactory) => {
981
+ const __is = input => {
982
+ const $io0 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
983
+ return "object" === typeof input && null !== input && $io0(input);
984
+ };
985
+ if (false === __is(input))
986
+ ((input, _path, _exceptionable = true) => {
987
+ const $guard = __typia.json.createAssertStringify.guard;
988
+ const $ao0 = (input, _path, _exceptionable = true) => ("comment" === input.type || $guard(_exceptionable, {
989
+ path: _path + ".type",
990
+ expected: "\"comment\"",
991
+ value: input.type
992
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
993
+ path: _path + ".payload",
994
+ expected: "__type",
995
+ value: input.payload
996
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
997
+ path: _path + ".payload",
998
+ expected: "__type",
999
+ value: input.payload
1000
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1001
+ path: _path + ".userId",
1002
+ expected: "string",
1003
+ value: input.userId
1004
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1005
+ path: _path + ".timestamp",
1006
+ expected: "string",
1007
+ value: input.timestamp
1008
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1009
+ path: _path + ".reasons",
1010
+ expected: "Array<NotificationReason>",
1011
+ value: input.reasons
1012
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1013
+ path: _path + ".reasons[" + _index1 + "]",
1014
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1015
+ value: elem
1016
+ }, errorFactory)) || $guard(_exceptionable, {
1017
+ path: _path + ".reasons",
1018
+ expected: "Array<NotificationReason>",
1019
+ value: input.reasons
1020
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1021
+ path: _path + ".triggerId",
1022
+ expected: "(string | undefined)",
1023
+ value: input.triggerId
1024
+ }, errorFactory));
1025
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.commentId || $guard(_exceptionable, {
1026
+ path: _path + ".commentId",
1027
+ expected: "string",
1028
+ value: input.commentId
1029
+ }, errorFactory);
1030
+ return ("object" === typeof input && null !== input || $guard(true, {
1031
+ path: _path + "",
1032
+ expected: "UserNotificationComment",
1033
+ value: input
1034
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1035
+ path: _path + "",
1036
+ expected: "UserNotificationComment",
1037
+ value: input
1038
+ }, errorFactory);
1039
+ })(input, "$input", true);
1040
+ return input;
1041
+ }; const stringify = input => {
1042
+ const $io1 = input => "string" === typeof input.commentId;
1043
+ const $string = __typia.json.createAssertStringify.string;
1044
+ const $throws = __typia.json.createAssertStringify.throws;
1045
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
1046
+ if ("string" === typeof input.type)
1047
+ return $string(input.type);
1048
+ if ("string" === typeof input.type)
1049
+ return "\"" + input.type + "\"";
1050
+ $throws({
1051
+ expected: "\"comment\"",
1052
+ value: input.type
1053
+ });
1054
+ })()},"payload":${`{"commentId":${$string(input.payload.commentId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
1055
+ if ("string" === typeof elem)
1056
+ return $string(elem);
1057
+ if ("string" === typeof elem)
1058
+ return "\"" + elem + "\"";
1059
+ $throws({
1060
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1061
+ value: elem
1062
+ });
1063
+ })()).join(",")}]`}}`;
1064
+ return $so0(input);
1065
+ }; return stringify(assert(input, errorFactory)); };
1066
+ export const isUserNotificationAddedToSearch = input => {
1067
+ const $io0 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1068
+ return "object" === typeof input && null !== input && $io0(input);
1069
+ };
1070
+ export const assertUserNotificationAddedToSearch = (input, errorFactory) => {
1071
+ const __is = input => {
1072
+ const $io0 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1073
+ return "object" === typeof input && null !== input && $io0(input);
1074
+ };
1075
+ if (false === __is(input))
1076
+ ((input, _path, _exceptionable = true) => {
1077
+ const $guard = __typia.createAssert.guard;
1078
+ const $ao0 = (input, _path, _exceptionable = true) => ("added-to-search" === input.type || $guard(_exceptionable, {
1079
+ path: _path + ".type",
1080
+ expected: "\"added-to-search\"",
1081
+ value: input.type
1082
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1083
+ path: _path + ".payload",
1084
+ expected: "__type",
1085
+ value: input.payload
1086
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1087
+ path: _path + ".payload",
1088
+ expected: "__type",
1089
+ value: input.payload
1090
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1091
+ path: _path + ".userId",
1092
+ expected: "string",
1093
+ value: input.userId
1094
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1095
+ path: _path + ".timestamp",
1096
+ expected: "string",
1097
+ value: input.timestamp
1098
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1099
+ path: _path + ".reasons",
1100
+ expected: "Array<NotificationReason>",
1101
+ value: input.reasons
1102
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1103
+ path: _path + ".reasons[" + _index1 + "]",
1104
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1105
+ value: elem
1106
+ }, errorFactory)) || $guard(_exceptionable, {
1107
+ path: _path + ".reasons",
1108
+ expected: "Array<NotificationReason>",
1109
+ value: input.reasons
1110
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1111
+ path: _path + ".triggerId",
1112
+ expected: "(string | undefined)",
1113
+ value: input.triggerId
1114
+ }, errorFactory));
1115
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.searchId || $guard(_exceptionable, {
1116
+ path: _path + ".searchId",
1117
+ expected: "string",
1118
+ value: input.searchId
1119
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1120
+ path: _path + ".assetId",
1121
+ expected: "string",
1122
+ value: input.assetId
1123
+ }, errorFactory));
1124
+ return ("object" === typeof input && null !== input || $guard(true, {
1125
+ path: _path + "",
1126
+ expected: "UserNotificationAddedToSearch",
1127
+ value: input
1128
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1129
+ path: _path + "",
1130
+ expected: "UserNotificationAddedToSearch",
1131
+ value: input
1132
+ }, errorFactory);
1133
+ })(input, "$input", true);
1134
+ return input;
1135
+ };
1136
+ export const randomUserNotificationAddedToSearch = generator => {
1137
+ const $generator = __typia.createRandom.generator;
1138
+ const $pick = __typia.createRandom.pick;
1139
+ const $ro0 = (_recursive = false, _depth = 0) => ({
1140
+ type: "added-to-search",
1141
+ payload: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
1142
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1143
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1144
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
1145
+ () => "mentioned",
1146
+ () => "assigned",
1147
+ () => "author",
1148
+ () => "participated",
1149
+ () => "always"
1150
+ ])()),
1151
+ triggerId: $pick([
1152
+ () => undefined,
1153
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1154
+ ])()
1155
+ });
1156
+ const $ro1 = (_recursive = false, _depth = 0) => ({
1157
+ searchId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1158
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1159
+ });
1160
+ return $ro0();
1161
+ };
1162
+ export const assertGuardUserNotificationAddedToSearch = (input, errorFactory) => {
1163
+ const __is = input => {
1164
+ const $io0 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1165
+ return "object" === typeof input && null !== input && $io0(input);
1166
+ };
1167
+ if (false === __is(input))
1168
+ ((input, _path, _exceptionable = true) => {
1169
+ const $guard = __typia.createAssertGuard.guard;
1170
+ const $ao0 = (input, _path, _exceptionable = true) => ("added-to-search" === input.type || $guard(_exceptionable, {
1171
+ path: _path + ".type",
1172
+ expected: "\"added-to-search\"",
1173
+ value: input.type
1174
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1175
+ path: _path + ".payload",
1176
+ expected: "__type",
1177
+ value: input.payload
1178
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1179
+ path: _path + ".payload",
1180
+ expected: "__type",
1181
+ value: input.payload
1182
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1183
+ path: _path + ".userId",
1184
+ expected: "string",
1185
+ value: input.userId
1186
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1187
+ path: _path + ".timestamp",
1188
+ expected: "string",
1189
+ value: input.timestamp
1190
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1191
+ path: _path + ".reasons",
1192
+ expected: "Array<NotificationReason>",
1193
+ value: input.reasons
1194
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1195
+ path: _path + ".reasons[" + _index1 + "]",
1196
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1197
+ value: elem
1198
+ }, errorFactory)) || $guard(_exceptionable, {
1199
+ path: _path + ".reasons",
1200
+ expected: "Array<NotificationReason>",
1201
+ value: input.reasons
1202
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1203
+ path: _path + ".triggerId",
1204
+ expected: "(string | undefined)",
1205
+ value: input.triggerId
1206
+ }, errorFactory));
1207
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.searchId || $guard(_exceptionable, {
1208
+ path: _path + ".searchId",
1209
+ expected: "string",
1210
+ value: input.searchId
1211
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1212
+ path: _path + ".assetId",
1213
+ expected: "string",
1214
+ value: input.assetId
1215
+ }, errorFactory));
1216
+ return ("object" === typeof input && null !== input || $guard(true, {
1217
+ path: _path + "",
1218
+ expected: "UserNotificationAddedToSearch",
1219
+ value: input
1220
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1221
+ path: _path + "",
1222
+ expected: "UserNotificationAddedToSearch",
1223
+ value: input
1224
+ }, errorFactory);
1225
+ })(input, "$input", true);
1226
+ };
1227
+ export const stringifyUserNotificationAddedToSearch = input => {
1228
+ const $io1 = input => "string" === typeof input.searchId && "string" === typeof input.assetId;
1229
+ const $string = __typia.json.createStringify.string;
1230
+ const $throws = __typia.json.createStringify.throws;
1231
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
1232
+ if ("string" === typeof input.type)
1233
+ return $string(input.type);
1234
+ if ("string" === typeof input.type)
1235
+ return "\"" + input.type + "\"";
1236
+ $throws({
1237
+ expected: "\"added-to-search\"",
1238
+ value: input.type
1239
+ });
1240
+ })()},"payload":${`{"searchId":${$string(input.payload.searchId)},"assetId":${$string(input.payload.assetId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
1241
+ if ("string" === typeof elem)
1242
+ return $string(elem);
1243
+ if ("string" === typeof elem)
1244
+ return "\"" + elem + "\"";
1245
+ $throws({
1246
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1247
+ value: elem
1248
+ });
1249
+ })()).join(",")}]`}}`;
1250
+ return $so0(input);
1251
+ };
1252
+ export const assertStringifyUserNotificationAddedToSearch = (input, errorFactory) => { const assert = (input, errorFactory) => {
1253
+ const __is = input => {
1254
+ const $io0 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1255
+ return "object" === typeof input && null !== input && $io0(input);
1256
+ };
1257
+ if (false === __is(input))
1258
+ ((input, _path, _exceptionable = true) => {
1259
+ const $guard = __typia.json.createAssertStringify.guard;
1260
+ const $ao0 = (input, _path, _exceptionable = true) => ("added-to-search" === input.type || $guard(_exceptionable, {
1261
+ path: _path + ".type",
1262
+ expected: "\"added-to-search\"",
1263
+ value: input.type
1264
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1265
+ path: _path + ".payload",
1266
+ expected: "__type",
1267
+ value: input.payload
1268
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1269
+ path: _path + ".payload",
1270
+ expected: "__type",
1271
+ value: input.payload
1272
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1273
+ path: _path + ".userId",
1274
+ expected: "string",
1275
+ value: input.userId
1276
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1277
+ path: _path + ".timestamp",
1278
+ expected: "string",
1279
+ value: input.timestamp
1280
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1281
+ path: _path + ".reasons",
1282
+ expected: "Array<NotificationReason>",
1283
+ value: input.reasons
1284
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1285
+ path: _path + ".reasons[" + _index1 + "]",
1286
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1287
+ value: elem
1288
+ }, errorFactory)) || $guard(_exceptionable, {
1289
+ path: _path + ".reasons",
1290
+ expected: "Array<NotificationReason>",
1291
+ value: input.reasons
1292
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1293
+ path: _path + ".triggerId",
1294
+ expected: "(string | undefined)",
1295
+ value: input.triggerId
1296
+ }, errorFactory));
1297
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.searchId || $guard(_exceptionable, {
1298
+ path: _path + ".searchId",
1299
+ expected: "string",
1300
+ value: input.searchId
1301
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1302
+ path: _path + ".assetId",
1303
+ expected: "string",
1304
+ value: input.assetId
1305
+ }, errorFactory));
1306
+ return ("object" === typeof input && null !== input || $guard(true, {
1307
+ path: _path + "",
1308
+ expected: "UserNotificationAddedToSearch",
1309
+ value: input
1310
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1311
+ path: _path + "",
1312
+ expected: "UserNotificationAddedToSearch",
1313
+ value: input
1314
+ }, errorFactory);
1315
+ })(input, "$input", true);
1316
+ return input;
1317
+ }; const stringify = input => {
1318
+ const $io1 = input => "string" === typeof input.searchId && "string" === typeof input.assetId;
1319
+ const $string = __typia.json.createAssertStringify.string;
1320
+ const $throws = __typia.json.createAssertStringify.throws;
1321
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
1322
+ if ("string" === typeof input.type)
1323
+ return $string(input.type);
1324
+ if ("string" === typeof input.type)
1325
+ return "\"" + input.type + "\"";
1326
+ $throws({
1327
+ expected: "\"added-to-search\"",
1328
+ value: input.type
1329
+ });
1330
+ })()},"payload":${`{"searchId":${$string(input.payload.searchId)},"assetId":${$string(input.payload.assetId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
1331
+ if ("string" === typeof elem)
1332
+ return $string(elem);
1333
+ if ("string" === typeof elem)
1334
+ return "\"" + elem + "\"";
1335
+ $throws({
1336
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1337
+ value: elem
1338
+ });
1339
+ })()).join(",")}]`}}`;
1340
+ return $so0(input);
1341
+ }; return stringify(assert(input, errorFactory)); };
1342
+ export const isUserNotificationPublishSucceeded = input => {
1343
+ const $io0 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1344
+ const $io1 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1345
+ return "object" === typeof input && null !== input && $io0(input);
1346
+ };
1347
+ export const assertUserNotificationPublishSucceeded = (input, errorFactory) => {
1348
+ const __is = input => {
1349
+ const $io0 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1350
+ const $io1 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1351
+ return "object" === typeof input && null !== input && $io0(input);
1352
+ };
1353
+ if (false === __is(input))
1354
+ ((input, _path, _exceptionable = true) => {
1355
+ const $guard = __typia.createAssert.guard;
1356
+ const $ao0 = (input, _path, _exceptionable = true) => ("publishSucceeded" === input.type || $guard(_exceptionable, {
1357
+ path: _path + ".type",
1358
+ expected: "\"publishSucceeded\"",
1359
+ value: input.type
1360
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1361
+ path: _path + ".payload",
1362
+ expected: "__type",
1363
+ value: input.payload
1364
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1365
+ path: _path + ".payload",
1366
+ expected: "__type",
1367
+ value: input.payload
1368
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1369
+ path: _path + ".userId",
1370
+ expected: "string",
1371
+ value: input.userId
1372
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1373
+ path: _path + ".timestamp",
1374
+ expected: "string",
1375
+ value: input.timestamp
1376
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1377
+ path: _path + ".reasons",
1378
+ expected: "Array<NotificationReason>",
1379
+ value: input.reasons
1380
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1381
+ path: _path + ".reasons[" + _index1 + "]",
1382
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1383
+ value: elem
1384
+ }, errorFactory)) || $guard(_exceptionable, {
1385
+ path: _path + ".reasons",
1386
+ expected: "Array<NotificationReason>",
1387
+ value: input.reasons
1388
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1389
+ path: _path + ".triggerId",
1390
+ expected: "(string | undefined)",
1391
+ value: input.triggerId
1392
+ }, errorFactory));
1393
+ const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.userId || "string" === typeof input.userId || $guard(_exceptionable, {
1394
+ path: _path + ".userId",
1395
+ expected: "(string | undefined)",
1396
+ value: input.userId
1397
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1398
+ path: _path + ".assetId",
1399
+ expected: "string",
1400
+ value: input.assetId
1401
+ }, errorFactory)) && ("string" === typeof input.publishId || $guard(_exceptionable, {
1402
+ path: _path + ".publishId",
1403
+ expected: "string",
1404
+ value: input.publishId
1405
+ }, errorFactory)) && ("string" === typeof input.connectionId || $guard(_exceptionable, {
1406
+ path: _path + ".connectionId",
1407
+ expected: "string",
1408
+ value: input.connectionId
1409
+ }, errorFactory));
1410
+ return ("object" === typeof input && null !== input || $guard(true, {
1411
+ path: _path + "",
1412
+ expected: "UserNotificationPublishSucceeded",
1413
+ value: input
1414
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1415
+ path: _path + "",
1416
+ expected: "UserNotificationPublishSucceeded",
1417
+ value: input
1418
+ }, errorFactory);
1419
+ })(input, "$input", true);
1420
+ return input;
1421
+ };
1422
+ export const randomUserNotificationPublishSucceeded = generator => {
1423
+ const $generator = __typia.createRandom.generator;
1424
+ const $pick = __typia.createRandom.pick;
1425
+ const $ro0 = (_recursive = false, _depth = 0) => ({
1426
+ type: "publishSucceeded",
1427
+ payload: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
1428
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1429
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1430
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
1431
+ () => "mentioned",
1432
+ () => "assigned",
1433
+ () => "author",
1434
+ () => "participated",
1435
+ () => "always"
1436
+ ])()),
1437
+ triggerId: $pick([
1438
+ () => undefined,
1439
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1440
+ ])()
1441
+ });
1442
+ const $ro1 = (_recursive = false, _depth = 0) => ({
1443
+ userId: $pick([
1444
+ () => undefined,
1445
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1446
+ ])(),
1447
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1448
+ publishId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1449
+ connectionId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1450
+ });
1451
+ return $ro0();
1452
+ };
1453
+ export const assertGuardUserNotificationPublishSucceeded = (input, errorFactory) => {
1454
+ const __is = input => {
1455
+ const $io0 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1456
+ const $io1 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1457
+ return "object" === typeof input && null !== input && $io0(input);
1458
+ };
1459
+ if (false === __is(input))
1460
+ ((input, _path, _exceptionable = true) => {
1461
+ const $guard = __typia.createAssertGuard.guard;
1462
+ const $ao0 = (input, _path, _exceptionable = true) => ("publishSucceeded" === input.type || $guard(_exceptionable, {
1463
+ path: _path + ".type",
1464
+ expected: "\"publishSucceeded\"",
1465
+ value: input.type
1466
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1467
+ path: _path + ".payload",
1468
+ expected: "__type",
1469
+ value: input.payload
1470
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1471
+ path: _path + ".payload",
1472
+ expected: "__type",
1473
+ value: input.payload
1474
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1475
+ path: _path + ".userId",
1476
+ expected: "string",
1477
+ value: input.userId
1478
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1479
+ path: _path + ".timestamp",
1480
+ expected: "string",
1481
+ value: input.timestamp
1482
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1483
+ path: _path + ".reasons",
1484
+ expected: "Array<NotificationReason>",
1485
+ value: input.reasons
1486
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1487
+ path: _path + ".reasons[" + _index1 + "]",
1488
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1489
+ value: elem
1490
+ }, errorFactory)) || $guard(_exceptionable, {
1491
+ path: _path + ".reasons",
1492
+ expected: "Array<NotificationReason>",
1493
+ value: input.reasons
1494
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1495
+ path: _path + ".triggerId",
1496
+ expected: "(string | undefined)",
1497
+ value: input.triggerId
1498
+ }, errorFactory));
1499
+ const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.userId || "string" === typeof input.userId || $guard(_exceptionable, {
1500
+ path: _path + ".userId",
1501
+ expected: "(string | undefined)",
1502
+ value: input.userId
1503
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1504
+ path: _path + ".assetId",
1505
+ expected: "string",
1506
+ value: input.assetId
1507
+ }, errorFactory)) && ("string" === typeof input.publishId || $guard(_exceptionable, {
1508
+ path: _path + ".publishId",
1509
+ expected: "string",
1510
+ value: input.publishId
1511
+ }, errorFactory)) && ("string" === typeof input.connectionId || $guard(_exceptionable, {
1512
+ path: _path + ".connectionId",
1513
+ expected: "string",
1514
+ value: input.connectionId
1515
+ }, errorFactory));
1516
+ return ("object" === typeof input && null !== input || $guard(true, {
1517
+ path: _path + "",
1518
+ expected: "UserNotificationPublishSucceeded",
1519
+ value: input
1520
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1521
+ path: _path + "",
1522
+ expected: "UserNotificationPublishSucceeded",
1523
+ value: input
1524
+ }, errorFactory);
1525
+ })(input, "$input", true);
1526
+ };
1527
+ export const stringifyUserNotificationPublishSucceeded = input => {
1528
+ const $io1 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1529
+ const $string = __typia.json.createStringify.string;
1530
+ const $throws = __typia.json.createStringify.throws;
1531
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
1532
+ if ("string" === typeof input.type)
1533
+ return $string(input.type);
1534
+ if ("string" === typeof input.type)
1535
+ return "\"" + input.type + "\"";
1536
+ $throws({
1537
+ expected: "\"publishSucceeded\"",
1538
+ value: input.type
1539
+ });
1540
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
1541
+ if ("string" === typeof elem)
1542
+ return $string(elem);
1543
+ if ("string" === typeof elem)
1544
+ return "\"" + elem + "\"";
1545
+ $throws({
1546
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1547
+ value: elem
1548
+ });
1549
+ })()).join(",")}]`}}`;
1550
+ const $so1 = input => `{${undefined === input.userId ? "" : `"userId":${undefined !== input.userId ? $string(input.userId) : undefined},`}"assetId":${$string(input.assetId)},"publishId":${$string(input.publishId)},"connectionId":${$string(input.connectionId)}}`;
1551
+ return $so0(input);
1552
+ };
1553
+ export const assertStringifyUserNotificationPublishSucceeded = (input, errorFactory) => { const assert = (input, errorFactory) => {
1554
+ const __is = input => {
1555
+ const $io0 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1556
+ const $io1 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1557
+ return "object" === typeof input && null !== input && $io0(input);
1558
+ };
1559
+ if (false === __is(input))
1560
+ ((input, _path, _exceptionable = true) => {
1561
+ const $guard = __typia.json.createAssertStringify.guard;
1562
+ const $ao0 = (input, _path, _exceptionable = true) => ("publishSucceeded" === input.type || $guard(_exceptionable, {
1563
+ path: _path + ".type",
1564
+ expected: "\"publishSucceeded\"",
1565
+ value: input.type
1566
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1567
+ path: _path + ".payload",
1568
+ expected: "__type",
1569
+ value: input.payload
1570
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1571
+ path: _path + ".payload",
1572
+ expected: "__type",
1573
+ value: input.payload
1574
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1575
+ path: _path + ".userId",
1576
+ expected: "string",
1577
+ value: input.userId
1578
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1579
+ path: _path + ".timestamp",
1580
+ expected: "string",
1581
+ value: input.timestamp
1582
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1583
+ path: _path + ".reasons",
1584
+ expected: "Array<NotificationReason>",
1585
+ value: input.reasons
1586
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1587
+ path: _path + ".reasons[" + _index1 + "]",
1588
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1589
+ value: elem
1590
+ }, errorFactory)) || $guard(_exceptionable, {
1591
+ path: _path + ".reasons",
1592
+ expected: "Array<NotificationReason>",
1593
+ value: input.reasons
1594
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1595
+ path: _path + ".triggerId",
1596
+ expected: "(string | undefined)",
1597
+ value: input.triggerId
1598
+ }, errorFactory));
1599
+ const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.userId || "string" === typeof input.userId || $guard(_exceptionable, {
1600
+ path: _path + ".userId",
1601
+ expected: "(string | undefined)",
1602
+ value: input.userId
1603
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1604
+ path: _path + ".assetId",
1605
+ expected: "string",
1606
+ value: input.assetId
1607
+ }, errorFactory)) && ("string" === typeof input.publishId || $guard(_exceptionable, {
1608
+ path: _path + ".publishId",
1609
+ expected: "string",
1610
+ value: input.publishId
1611
+ }, errorFactory)) && ("string" === typeof input.connectionId || $guard(_exceptionable, {
1612
+ path: _path + ".connectionId",
1613
+ expected: "string",
1614
+ value: input.connectionId
1615
+ }, errorFactory));
1616
+ return ("object" === typeof input && null !== input || $guard(true, {
1617
+ path: _path + "",
1618
+ expected: "UserNotificationPublishSucceeded",
1619
+ value: input
1620
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1621
+ path: _path + "",
1622
+ expected: "UserNotificationPublishSucceeded",
1623
+ value: input
1624
+ }, errorFactory);
1625
+ })(input, "$input", true);
1626
+ return input;
1627
+ }; const stringify = input => {
1628
+ const $io1 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1629
+ const $string = __typia.json.createAssertStringify.string;
1630
+ const $throws = __typia.json.createAssertStringify.throws;
1631
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
1632
+ if ("string" === typeof input.type)
1633
+ return $string(input.type);
1634
+ if ("string" === typeof input.type)
1635
+ return "\"" + input.type + "\"";
1636
+ $throws({
1637
+ expected: "\"publishSucceeded\"",
1638
+ value: input.type
1639
+ });
1640
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
1641
+ if ("string" === typeof elem)
1642
+ return $string(elem);
1643
+ if ("string" === typeof elem)
1644
+ return "\"" + elem + "\"";
1645
+ $throws({
1646
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1647
+ value: elem
1648
+ });
1649
+ })()).join(",")}]`}}`;
1650
+ const $so1 = input => `{${undefined === input.userId ? "" : `"userId":${undefined !== input.userId ? $string(input.userId) : undefined},`}"assetId":${$string(input.assetId)},"publishId":${$string(input.publishId)},"connectionId":${$string(input.connectionId)}}`;
1651
+ return $so0(input);
1652
+ }; return stringify(assert(input, errorFactory)); };
1653
+ export const isUserNotificationRecord = input => {
1654
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1655
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
1656
+ const $io2 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io3(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1657
+ const $io3 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
1658
+ const $io4 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1659
+ const $io6 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1660
+ const $io8 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io9(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1661
+ const $io9 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1662
+ const $iu0 = input => (() => {
1663
+ if ("publishSucceeded" === input.type)
1664
+ return $io8(input);
1665
+ else if ("added-to-search" === input.type)
1666
+ return $io6(input);
1667
+ else if ("comment" === input.type)
1668
+ return $io4(input);
1669
+ else if ("unassigned" === input.type)
1670
+ return $io2(input);
1671
+ else if ("assigned" === input.type)
1672
+ return $io0(input);
1673
+ else
1674
+ return false;
1675
+ })();
1676
+ return "object" === typeof input && null !== input && $iu0(input);
1677
+ };
1678
+ export const assertUserNotificationRecord = (input, errorFactory) => {
1679
+ const __is = input => {
1680
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1681
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
1682
+ const $io2 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io3(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1683
+ const $io3 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
1684
+ const $io4 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1685
+ const $io6 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1686
+ const $io8 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io9(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
1687
+ const $io9 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
1688
+ const $iu0 = input => (() => {
1689
+ if ("publishSucceeded" === input.type)
1690
+ return $io8(input);
1691
+ else if ("added-to-search" === input.type)
1692
+ return $io6(input);
1693
+ else if ("comment" === input.type)
1694
+ return $io4(input);
1695
+ else if ("unassigned" === input.type)
1696
+ return $io2(input);
1697
+ else if ("assigned" === input.type)
1698
+ return $io0(input);
1699
+ else
1700
+ return false;
1701
+ })();
1702
+ return "object" === typeof input && null !== input && $iu0(input);
1703
+ };
1704
+ if (false === __is(input))
1705
+ ((input, _path, _exceptionable = true) => {
1706
+ const $guard = __typia.createAssert.guard;
1707
+ const $ao0 = (input, _path, _exceptionable = true) => ("assigned" === input.type || $guard(_exceptionable, {
1708
+ path: _path + ".type",
1709
+ expected: "\"assigned\"",
1710
+ value: input.type
1711
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1712
+ path: _path + ".payload",
1713
+ expected: "__type",
1714
+ value: input.payload
1715
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1716
+ path: _path + ".payload",
1717
+ expected: "__type",
1718
+ value: input.payload
1719
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1720
+ path: _path + ".userId",
1721
+ expected: "string",
1722
+ value: input.userId
1723
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1724
+ path: _path + ".timestamp",
1725
+ expected: "string",
1726
+ value: input.timestamp
1727
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1728
+ path: _path + ".reasons",
1729
+ expected: "Array<NotificationReason>",
1730
+ value: input.reasons
1731
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1732
+ path: _path + ".reasons[" + _index1 + "]",
1733
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1734
+ value: elem
1735
+ }, errorFactory)) || $guard(_exceptionable, {
1736
+ path: _path + ".reasons",
1737
+ expected: "Array<NotificationReason>",
1738
+ value: input.reasons
1739
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1740
+ path: _path + ".triggerId",
1741
+ expected: "(string | undefined)",
1742
+ value: input.triggerId
1743
+ }, errorFactory));
1744
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
1745
+ path: _path + ".assetId",
1746
+ expected: "string",
1747
+ value: input.assetId
1748
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
1749
+ path: _path + ".actionBy",
1750
+ expected: "(string | undefined)",
1751
+ value: input.actionBy
1752
+ }, errorFactory));
1753
+ const $ao2 = (input, _path, _exceptionable = true) => ("unassigned" === input.type || $guard(_exceptionable, {
1754
+ path: _path + ".type",
1755
+ expected: "\"unassigned\"",
1756
+ value: input.type
1757
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1758
+ path: _path + ".payload",
1759
+ expected: "__type.o1",
1760
+ value: input.payload
1761
+ }, errorFactory)) && $ao3(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1762
+ path: _path + ".payload",
1763
+ expected: "__type.o1",
1764
+ value: input.payload
1765
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1766
+ path: _path + ".userId",
1767
+ expected: "string",
1768
+ value: input.userId
1769
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1770
+ path: _path + ".timestamp",
1771
+ expected: "string",
1772
+ value: input.timestamp
1773
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1774
+ path: _path + ".reasons",
1775
+ expected: "Array<NotificationReason>",
1776
+ value: input.reasons
1777
+ }, errorFactory)) && input.reasons.every((elem, _index2) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1778
+ path: _path + ".reasons[" + _index2 + "]",
1779
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1780
+ value: elem
1781
+ }, errorFactory)) || $guard(_exceptionable, {
1782
+ path: _path + ".reasons",
1783
+ expected: "Array<NotificationReason>",
1784
+ value: input.reasons
1785
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1786
+ path: _path + ".triggerId",
1787
+ expected: "(string | undefined)",
1788
+ value: input.triggerId
1789
+ }, errorFactory));
1790
+ const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
1791
+ path: _path + ".assetId",
1792
+ expected: "string",
1793
+ value: input.assetId
1794
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
1795
+ path: _path + ".actionBy",
1796
+ expected: "(string | undefined)",
1797
+ value: input.actionBy
1798
+ }, errorFactory));
1799
+ const $ao4 = (input, _path, _exceptionable = true) => ("comment" === input.type || $guard(_exceptionable, {
1800
+ path: _path + ".type",
1801
+ expected: "\"comment\"",
1802
+ value: input.type
1803
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1804
+ path: _path + ".payload",
1805
+ expected: "__type.o2",
1806
+ value: input.payload
1807
+ }, errorFactory)) && $ao5(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1808
+ path: _path + ".payload",
1809
+ expected: "__type.o2",
1810
+ value: input.payload
1811
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1812
+ path: _path + ".userId",
1813
+ expected: "string",
1814
+ value: input.userId
1815
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1816
+ path: _path + ".timestamp",
1817
+ expected: "string",
1818
+ value: input.timestamp
1819
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1820
+ path: _path + ".reasons",
1821
+ expected: "Array<NotificationReason>",
1822
+ value: input.reasons
1823
+ }, errorFactory)) && input.reasons.every((elem, _index3) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1824
+ path: _path + ".reasons[" + _index3 + "]",
1825
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1826
+ value: elem
1827
+ }, errorFactory)) || $guard(_exceptionable, {
1828
+ path: _path + ".reasons",
1829
+ expected: "Array<NotificationReason>",
1830
+ value: input.reasons
1831
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1832
+ path: _path + ".triggerId",
1833
+ expected: "(string | undefined)",
1834
+ value: input.triggerId
1835
+ }, errorFactory));
1836
+ const $ao5 = (input, _path, _exceptionable = true) => "string" === typeof input.commentId || $guard(_exceptionable, {
1837
+ path: _path + ".commentId",
1838
+ expected: "string",
1839
+ value: input.commentId
1840
+ }, errorFactory);
1841
+ const $ao6 = (input, _path, _exceptionable = true) => ("added-to-search" === input.type || $guard(_exceptionable, {
1842
+ path: _path + ".type",
1843
+ expected: "\"added-to-search\"",
1844
+ value: input.type
1845
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1846
+ path: _path + ".payload",
1847
+ expected: "__type.o3",
1848
+ value: input.payload
1849
+ }, errorFactory)) && $ao7(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1850
+ path: _path + ".payload",
1851
+ expected: "__type.o3",
1852
+ value: input.payload
1853
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1854
+ path: _path + ".userId",
1855
+ expected: "string",
1856
+ value: input.userId
1857
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1858
+ path: _path + ".timestamp",
1859
+ expected: "string",
1860
+ value: input.timestamp
1861
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1862
+ path: _path + ".reasons",
1863
+ expected: "Array<NotificationReason>",
1864
+ value: input.reasons
1865
+ }, errorFactory)) && input.reasons.every((elem, _index4) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1866
+ path: _path + ".reasons[" + _index4 + "]",
1867
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1868
+ value: elem
1869
+ }, errorFactory)) || $guard(_exceptionable, {
1870
+ path: _path + ".reasons",
1871
+ expected: "Array<NotificationReason>",
1872
+ value: input.reasons
1873
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1874
+ path: _path + ".triggerId",
1875
+ expected: "(string | undefined)",
1876
+ value: input.triggerId
1877
+ }, errorFactory));
1878
+ const $ao7 = (input, _path, _exceptionable = true) => ("string" === typeof input.searchId || $guard(_exceptionable, {
1879
+ path: _path + ".searchId",
1880
+ expected: "string",
1881
+ value: input.searchId
1882
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1883
+ path: _path + ".assetId",
1884
+ expected: "string",
1885
+ value: input.assetId
1886
+ }, errorFactory));
1887
+ const $ao8 = (input, _path, _exceptionable = true) => ("publishSucceeded" === input.type || $guard(_exceptionable, {
1888
+ path: _path + ".type",
1889
+ expected: "\"publishSucceeded\"",
1890
+ value: input.type
1891
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
1892
+ path: _path + ".payload",
1893
+ expected: "__type.o4",
1894
+ value: input.payload
1895
+ }, errorFactory)) && $ao9(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
1896
+ path: _path + ".payload",
1897
+ expected: "__type.o4",
1898
+ value: input.payload
1899
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
1900
+ path: _path + ".userId",
1901
+ expected: "string",
1902
+ value: input.userId
1903
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
1904
+ path: _path + ".timestamp",
1905
+ expected: "string",
1906
+ value: input.timestamp
1907
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
1908
+ path: _path + ".reasons",
1909
+ expected: "Array<NotificationReason>",
1910
+ value: input.reasons
1911
+ }, errorFactory)) && input.reasons.every((elem, _index5) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
1912
+ path: _path + ".reasons[" + _index5 + "]",
1913
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
1914
+ value: elem
1915
+ }, errorFactory)) || $guard(_exceptionable, {
1916
+ path: _path + ".reasons",
1917
+ expected: "Array<NotificationReason>",
1918
+ value: input.reasons
1919
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
1920
+ path: _path + ".triggerId",
1921
+ expected: "(string | undefined)",
1922
+ value: input.triggerId
1923
+ }, errorFactory));
1924
+ const $ao9 = (input, _path, _exceptionable = true) => (undefined === input.userId || "string" === typeof input.userId || $guard(_exceptionable, {
1925
+ path: _path + ".userId",
1926
+ expected: "(string | undefined)",
1927
+ value: input.userId
1928
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
1929
+ path: _path + ".assetId",
1930
+ expected: "string",
1931
+ value: input.assetId
1932
+ }, errorFactory)) && ("string" === typeof input.publishId || $guard(_exceptionable, {
1933
+ path: _path + ".publishId",
1934
+ expected: "string",
1935
+ value: input.publishId
1936
+ }, errorFactory)) && ("string" === typeof input.connectionId || $guard(_exceptionable, {
1937
+ path: _path + ".connectionId",
1938
+ expected: "string",
1939
+ value: input.connectionId
1940
+ }, errorFactory));
1941
+ const $au0 = (input, _path, _exceptionable = true) => (() => {
1942
+ if ("publishSucceeded" === input.type)
1943
+ return $ao8(input, _path, true && _exceptionable);
1944
+ else if ("added-to-search" === input.type)
1945
+ return $ao6(input, _path, true && _exceptionable);
1946
+ else if ("comment" === input.type)
1947
+ return $ao4(input, _path, true && _exceptionable);
1948
+ else if ("unassigned" === input.type)
1949
+ return $ao2(input, _path, true && _exceptionable);
1950
+ else if ("assigned" === input.type)
1951
+ return $ao0(input, _path, true && _exceptionable);
1952
+ else
1953
+ return $guard(_exceptionable, {
1954
+ path: _path,
1955
+ expected: "(UserNotificationPublishSucceeded | UserNotificationAddedToSearch | UserNotificationComment | UserNotificationUnassigned | UserNotificationAssigned)",
1956
+ value: input
1957
+ }, errorFactory);
1958
+ })();
1959
+ return ("object" === typeof input && null !== input || $guard(true, {
1960
+ path: _path + "",
1961
+ expected: "(UserNotificationAddedToSearch | UserNotificationAssigned | UserNotificationComment | UserNotificationPublishSucceeded | UserNotificationUnassigned)",
1962
+ value: input
1963
+ }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
1964
+ path: _path + "",
1965
+ expected: "(UserNotificationAddedToSearch | UserNotificationAssigned | UserNotificationComment | UserNotificationPublishSucceeded | UserNotificationUnassigned)",
1966
+ value: input
1967
+ }, errorFactory);
1968
+ })(input, "$input", true);
1969
+ return input;
1970
+ };
1971
+ export const randomUserNotificationRecord = generator => {
1972
+ const $generator = __typia.createRandom.generator;
1973
+ const $pick = __typia.createRandom.pick;
1974
+ const $ro0 = (_recursive = false, _depth = 0) => ({
1975
+ type: "assigned",
1976
+ payload: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
1977
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1978
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1979
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
1980
+ () => "mentioned",
1981
+ () => "assigned",
1982
+ () => "author",
1983
+ () => "participated",
1984
+ () => "always"
1985
+ ])()),
1986
+ triggerId: $pick([
1987
+ () => undefined,
1988
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1989
+ ])()
1990
+ });
1991
+ const $ro1 = (_recursive = false, _depth = 0) => ({
1992
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1993
+ actionBy: $pick([
1994
+ () => undefined,
1995
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1996
+ ])()
1997
+ });
1998
+ const $ro2 = (_recursive = false, _depth = 0) => ({
1999
+ type: "unassigned",
2000
+ payload: $ro3(_recursive, _recursive ? 1 + _depth : _depth),
2001
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2002
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2003
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
2004
+ () => "mentioned",
2005
+ () => "assigned",
2006
+ () => "author",
2007
+ () => "participated",
2008
+ () => "always"
2009
+ ])()),
2010
+ triggerId: $pick([
2011
+ () => undefined,
2012
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2013
+ ])()
2014
+ });
2015
+ const $ro3 = (_recursive = false, _depth = 0) => ({
2016
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2017
+ actionBy: $pick([
2018
+ () => undefined,
2019
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2020
+ ])()
2021
+ });
2022
+ const $ro4 = (_recursive = false, _depth = 0) => ({
2023
+ type: "comment",
2024
+ payload: $ro5(_recursive, _recursive ? 1 + _depth : _depth),
2025
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2026
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2027
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
2028
+ () => "mentioned",
2029
+ () => "assigned",
2030
+ () => "author",
2031
+ () => "participated",
2032
+ () => "always"
2033
+ ])()),
2034
+ triggerId: $pick([
2035
+ () => undefined,
2036
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2037
+ ])()
2038
+ });
2039
+ const $ro5 = (_recursive = false, _depth = 0) => ({
2040
+ commentId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2041
+ });
2042
+ const $ro6 = (_recursive = false, _depth = 0) => ({
2043
+ type: "added-to-search",
2044
+ payload: $ro7(_recursive, _recursive ? 1 + _depth : _depth),
2045
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2046
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2047
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
2048
+ () => "mentioned",
2049
+ () => "assigned",
2050
+ () => "author",
2051
+ () => "participated",
2052
+ () => "always"
2053
+ ])()),
2054
+ triggerId: $pick([
2055
+ () => undefined,
2056
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2057
+ ])()
2058
+ });
2059
+ const $ro7 = (_recursive = false, _depth = 0) => ({
2060
+ searchId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2061
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2062
+ });
2063
+ const $ro8 = (_recursive = false, _depth = 0) => ({
2064
+ type: "publishSucceeded",
2065
+ payload: $ro9(_recursive, _recursive ? 1 + _depth : _depth),
2066
+ userId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2067
+ timestamp: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2068
+ reasons: (generator?.array ?? $generator.array)(() => $pick([
2069
+ () => "mentioned",
2070
+ () => "assigned",
2071
+ () => "author",
2072
+ () => "participated",
2073
+ () => "always"
2074
+ ])()),
2075
+ triggerId: $pick([
2076
+ () => undefined,
2077
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2078
+ ])()
2079
+ });
2080
+ const $ro9 = (_recursive = false, _depth = 0) => ({
2081
+ userId: $pick([
2082
+ () => undefined,
2083
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2084
+ ])(),
2085
+ assetId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2086
+ publishId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
2087
+ connectionId: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2088
+ });
2089
+ return $pick([
2090
+ () => $ro8(),
2091
+ () => $ro6(),
2092
+ () => $ro4(),
2093
+ () => $ro2(),
2094
+ () => $ro0()
2095
+ ])();
2096
+ };
2097
+ export const assertGuardUserNotificationRecord = (input, errorFactory) => {
2098
+ const __is = input => {
2099
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2100
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2101
+ const $io2 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io3(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2102
+ const $io3 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2103
+ const $io4 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2104
+ const $io6 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2105
+ const $io8 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io9(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2106
+ const $io9 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
2107
+ const $iu0 = input => (() => {
2108
+ if ("publishSucceeded" === input.type)
2109
+ return $io8(input);
2110
+ else if ("added-to-search" === input.type)
2111
+ return $io6(input);
2112
+ else if ("comment" === input.type)
2113
+ return $io4(input);
2114
+ else if ("unassigned" === input.type)
2115
+ return $io2(input);
2116
+ else if ("assigned" === input.type)
2117
+ return $io0(input);
2118
+ else
2119
+ return false;
2120
+ })();
2121
+ return "object" === typeof input && null !== input && $iu0(input);
2122
+ };
2123
+ if (false === __is(input))
2124
+ ((input, _path, _exceptionable = true) => {
2125
+ const $guard = __typia.createAssertGuard.guard;
2126
+ const $ao0 = (input, _path, _exceptionable = true) => ("assigned" === input.type || $guard(_exceptionable, {
2127
+ path: _path + ".type",
2128
+ expected: "\"assigned\"",
2129
+ value: input.type
2130
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2131
+ path: _path + ".payload",
2132
+ expected: "__type",
2133
+ value: input.payload
2134
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2135
+ path: _path + ".payload",
2136
+ expected: "__type",
2137
+ value: input.payload
2138
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2139
+ path: _path + ".userId",
2140
+ expected: "string",
2141
+ value: input.userId
2142
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2143
+ path: _path + ".timestamp",
2144
+ expected: "string",
2145
+ value: input.timestamp
2146
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2147
+ path: _path + ".reasons",
2148
+ expected: "Array<NotificationReason>",
2149
+ value: input.reasons
2150
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2151
+ path: _path + ".reasons[" + _index1 + "]",
2152
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2153
+ value: elem
2154
+ }, errorFactory)) || $guard(_exceptionable, {
2155
+ path: _path + ".reasons",
2156
+ expected: "Array<NotificationReason>",
2157
+ value: input.reasons
2158
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2159
+ path: _path + ".triggerId",
2160
+ expected: "(string | undefined)",
2161
+ value: input.triggerId
2162
+ }, errorFactory));
2163
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
2164
+ path: _path + ".assetId",
2165
+ expected: "string",
2166
+ value: input.assetId
2167
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
2168
+ path: _path + ".actionBy",
2169
+ expected: "(string | undefined)",
2170
+ value: input.actionBy
2171
+ }, errorFactory));
2172
+ const $ao2 = (input, _path, _exceptionable = true) => ("unassigned" === input.type || $guard(_exceptionable, {
2173
+ path: _path + ".type",
2174
+ expected: "\"unassigned\"",
2175
+ value: input.type
2176
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2177
+ path: _path + ".payload",
2178
+ expected: "__type.o1",
2179
+ value: input.payload
2180
+ }, errorFactory)) && $ao3(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2181
+ path: _path + ".payload",
2182
+ expected: "__type.o1",
2183
+ value: input.payload
2184
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2185
+ path: _path + ".userId",
2186
+ expected: "string",
2187
+ value: input.userId
2188
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2189
+ path: _path + ".timestamp",
2190
+ expected: "string",
2191
+ value: input.timestamp
2192
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2193
+ path: _path + ".reasons",
2194
+ expected: "Array<NotificationReason>",
2195
+ value: input.reasons
2196
+ }, errorFactory)) && input.reasons.every((elem, _index2) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2197
+ path: _path + ".reasons[" + _index2 + "]",
2198
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2199
+ value: elem
2200
+ }, errorFactory)) || $guard(_exceptionable, {
2201
+ path: _path + ".reasons",
2202
+ expected: "Array<NotificationReason>",
2203
+ value: input.reasons
2204
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2205
+ path: _path + ".triggerId",
2206
+ expected: "(string | undefined)",
2207
+ value: input.triggerId
2208
+ }, errorFactory));
2209
+ const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
2210
+ path: _path + ".assetId",
2211
+ expected: "string",
2212
+ value: input.assetId
2213
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
2214
+ path: _path + ".actionBy",
2215
+ expected: "(string | undefined)",
2216
+ value: input.actionBy
2217
+ }, errorFactory));
2218
+ const $ao4 = (input, _path, _exceptionable = true) => ("comment" === input.type || $guard(_exceptionable, {
2219
+ path: _path + ".type",
2220
+ expected: "\"comment\"",
2221
+ value: input.type
2222
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2223
+ path: _path + ".payload",
2224
+ expected: "__type.o2",
2225
+ value: input.payload
2226
+ }, errorFactory)) && $ao5(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2227
+ path: _path + ".payload",
2228
+ expected: "__type.o2",
2229
+ value: input.payload
2230
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2231
+ path: _path + ".userId",
2232
+ expected: "string",
2233
+ value: input.userId
2234
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2235
+ path: _path + ".timestamp",
2236
+ expected: "string",
2237
+ value: input.timestamp
2238
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2239
+ path: _path + ".reasons",
2240
+ expected: "Array<NotificationReason>",
2241
+ value: input.reasons
2242
+ }, errorFactory)) && input.reasons.every((elem, _index3) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2243
+ path: _path + ".reasons[" + _index3 + "]",
2244
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2245
+ value: elem
2246
+ }, errorFactory)) || $guard(_exceptionable, {
2247
+ path: _path + ".reasons",
2248
+ expected: "Array<NotificationReason>",
2249
+ value: input.reasons
2250
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2251
+ path: _path + ".triggerId",
2252
+ expected: "(string | undefined)",
2253
+ value: input.triggerId
2254
+ }, errorFactory));
2255
+ const $ao5 = (input, _path, _exceptionable = true) => "string" === typeof input.commentId || $guard(_exceptionable, {
2256
+ path: _path + ".commentId",
2257
+ expected: "string",
2258
+ value: input.commentId
2259
+ }, errorFactory);
2260
+ const $ao6 = (input, _path, _exceptionable = true) => ("added-to-search" === input.type || $guard(_exceptionable, {
2261
+ path: _path + ".type",
2262
+ expected: "\"added-to-search\"",
2263
+ value: input.type
2264
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2265
+ path: _path + ".payload",
2266
+ expected: "__type.o3",
2267
+ value: input.payload
2268
+ }, errorFactory)) && $ao7(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2269
+ path: _path + ".payload",
2270
+ expected: "__type.o3",
2271
+ value: input.payload
2272
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2273
+ path: _path + ".userId",
2274
+ expected: "string",
2275
+ value: input.userId
2276
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2277
+ path: _path + ".timestamp",
2278
+ expected: "string",
2279
+ value: input.timestamp
2280
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2281
+ path: _path + ".reasons",
2282
+ expected: "Array<NotificationReason>",
2283
+ value: input.reasons
2284
+ }, errorFactory)) && input.reasons.every((elem, _index4) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2285
+ path: _path + ".reasons[" + _index4 + "]",
2286
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2287
+ value: elem
2288
+ }, errorFactory)) || $guard(_exceptionable, {
2289
+ path: _path + ".reasons",
2290
+ expected: "Array<NotificationReason>",
2291
+ value: input.reasons
2292
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2293
+ path: _path + ".triggerId",
2294
+ expected: "(string | undefined)",
2295
+ value: input.triggerId
2296
+ }, errorFactory));
2297
+ const $ao7 = (input, _path, _exceptionable = true) => ("string" === typeof input.searchId || $guard(_exceptionable, {
2298
+ path: _path + ".searchId",
2299
+ expected: "string",
2300
+ value: input.searchId
2301
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
2302
+ path: _path + ".assetId",
2303
+ expected: "string",
2304
+ value: input.assetId
2305
+ }, errorFactory));
2306
+ const $ao8 = (input, _path, _exceptionable = true) => ("publishSucceeded" === input.type || $guard(_exceptionable, {
2307
+ path: _path + ".type",
2308
+ expected: "\"publishSucceeded\"",
2309
+ value: input.type
2310
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2311
+ path: _path + ".payload",
2312
+ expected: "__type.o4",
2313
+ value: input.payload
2314
+ }, errorFactory)) && $ao9(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2315
+ path: _path + ".payload",
2316
+ expected: "__type.o4",
2317
+ value: input.payload
2318
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2319
+ path: _path + ".userId",
2320
+ expected: "string",
2321
+ value: input.userId
2322
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2323
+ path: _path + ".timestamp",
2324
+ expected: "string",
2325
+ value: input.timestamp
2326
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2327
+ path: _path + ".reasons",
2328
+ expected: "Array<NotificationReason>",
2329
+ value: input.reasons
2330
+ }, errorFactory)) && input.reasons.every((elem, _index5) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2331
+ path: _path + ".reasons[" + _index5 + "]",
2332
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2333
+ value: elem
2334
+ }, errorFactory)) || $guard(_exceptionable, {
2335
+ path: _path + ".reasons",
2336
+ expected: "Array<NotificationReason>",
2337
+ value: input.reasons
2338
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2339
+ path: _path + ".triggerId",
2340
+ expected: "(string | undefined)",
2341
+ value: input.triggerId
2342
+ }, errorFactory));
2343
+ const $ao9 = (input, _path, _exceptionable = true) => (undefined === input.userId || "string" === typeof input.userId || $guard(_exceptionable, {
2344
+ path: _path + ".userId",
2345
+ expected: "(string | undefined)",
2346
+ value: input.userId
2347
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
2348
+ path: _path + ".assetId",
2349
+ expected: "string",
2350
+ value: input.assetId
2351
+ }, errorFactory)) && ("string" === typeof input.publishId || $guard(_exceptionable, {
2352
+ path: _path + ".publishId",
2353
+ expected: "string",
2354
+ value: input.publishId
2355
+ }, errorFactory)) && ("string" === typeof input.connectionId || $guard(_exceptionable, {
2356
+ path: _path + ".connectionId",
2357
+ expected: "string",
2358
+ value: input.connectionId
2359
+ }, errorFactory));
2360
+ const $au0 = (input, _path, _exceptionable = true) => (() => {
2361
+ if ("publishSucceeded" === input.type)
2362
+ return $ao8(input, _path, true && _exceptionable);
2363
+ else if ("added-to-search" === input.type)
2364
+ return $ao6(input, _path, true && _exceptionable);
2365
+ else if ("comment" === input.type)
2366
+ return $ao4(input, _path, true && _exceptionable);
2367
+ else if ("unassigned" === input.type)
2368
+ return $ao2(input, _path, true && _exceptionable);
2369
+ else if ("assigned" === input.type)
2370
+ return $ao0(input, _path, true && _exceptionable);
2371
+ else
2372
+ return $guard(_exceptionable, {
2373
+ path: _path,
2374
+ expected: "(UserNotificationPublishSucceeded | UserNotificationAddedToSearch | UserNotificationComment | UserNotificationUnassigned | UserNotificationAssigned)",
2375
+ value: input
2376
+ }, errorFactory);
2377
+ })();
2378
+ return ("object" === typeof input && null !== input || $guard(true, {
2379
+ path: _path + "",
2380
+ expected: "(UserNotificationAddedToSearch | UserNotificationAssigned | UserNotificationComment | UserNotificationPublishSucceeded | UserNotificationUnassigned)",
2381
+ value: input
2382
+ }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
2383
+ path: _path + "",
2384
+ expected: "(UserNotificationAddedToSearch | UserNotificationAssigned | UserNotificationComment | UserNotificationPublishSucceeded | UserNotificationUnassigned)",
2385
+ value: input
2386
+ }, errorFactory);
2387
+ })(input, "$input", true);
2388
+ };
2389
+ export const stringifyUserNotificationRecord = input => {
2390
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2391
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2392
+ const $io2 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io3(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2393
+ const $io3 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2394
+ const $io4 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && $io5(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2395
+ const $io5 = input => "string" === typeof input.commentId;
2396
+ const $io6 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && $io7(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2397
+ const $io7 = input => "string" === typeof input.searchId && "string" === typeof input.assetId;
2398
+ const $io8 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io9(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2399
+ const $io9 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
2400
+ const $string = __typia.json.createStringify.string;
2401
+ const $throws = __typia.json.createStringify.throws;
2402
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2403
+ if ("string" === typeof input.type)
2404
+ return $string(input.type);
2405
+ if ("string" === typeof input.type)
2406
+ return "\"" + input.type + "\"";
2407
+ $throws({
2408
+ expected: "\"assigned\"",
2409
+ value: input.type
2410
+ });
2411
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2412
+ if ("string" === typeof elem)
2413
+ return $string(elem);
2414
+ if ("string" === typeof elem)
2415
+ return "\"" + elem + "\"";
2416
+ $throws({
2417
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2418
+ value: elem
2419
+ });
2420
+ })()).join(",")}]`}}`;
2421
+ const $so1 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
2422
+ const $so2 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2423
+ if ("string" === typeof input.type)
2424
+ return $string(input.type);
2425
+ if ("string" === typeof input.type)
2426
+ return "\"" + input.type + "\"";
2427
+ $throws({
2428
+ expected: "\"unassigned\"",
2429
+ value: input.type
2430
+ });
2431
+ })()},"payload":${$so3(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2432
+ if ("string" === typeof elem)
2433
+ return $string(elem);
2434
+ if ("string" === typeof elem)
2435
+ return "\"" + elem + "\"";
2436
+ $throws({
2437
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2438
+ value: elem
2439
+ });
2440
+ })()).join(",")}]`}}`;
2441
+ const $so3 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
2442
+ const $so4 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2443
+ if ("string" === typeof input.type)
2444
+ return $string(input.type);
2445
+ if ("string" === typeof input.type)
2446
+ return "\"" + input.type + "\"";
2447
+ $throws({
2448
+ expected: "\"comment\"",
2449
+ value: input.type
2450
+ });
2451
+ })()},"payload":${`{"commentId":${$string(input.payload.commentId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2452
+ if ("string" === typeof elem)
2453
+ return $string(elem);
2454
+ if ("string" === typeof elem)
2455
+ return "\"" + elem + "\"";
2456
+ $throws({
2457
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2458
+ value: elem
2459
+ });
2460
+ })()).join(",")}]`}}`;
2461
+ const $so6 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2462
+ if ("string" === typeof input.type)
2463
+ return $string(input.type);
2464
+ if ("string" === typeof input.type)
2465
+ return "\"" + input.type + "\"";
2466
+ $throws({
2467
+ expected: "\"added-to-search\"",
2468
+ value: input.type
2469
+ });
2470
+ })()},"payload":${`{"searchId":${$string(input.payload.searchId)},"assetId":${$string(input.payload.assetId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2471
+ if ("string" === typeof elem)
2472
+ return $string(elem);
2473
+ if ("string" === typeof elem)
2474
+ return "\"" + elem + "\"";
2475
+ $throws({
2476
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2477
+ value: elem
2478
+ });
2479
+ })()).join(",")}]`}}`;
2480
+ const $so8 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2481
+ if ("string" === typeof input.type)
2482
+ return $string(input.type);
2483
+ if ("string" === typeof input.type)
2484
+ return "\"" + input.type + "\"";
2485
+ $throws({
2486
+ expected: "\"publishSucceeded\"",
2487
+ value: input.type
2488
+ });
2489
+ })()},"payload":${$so9(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2490
+ if ("string" === typeof elem)
2491
+ return $string(elem);
2492
+ if ("string" === typeof elem)
2493
+ return "\"" + elem + "\"";
2494
+ $throws({
2495
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2496
+ value: elem
2497
+ });
2498
+ })()).join(",")}]`}}`;
2499
+ const $so9 = input => `{${undefined === input.userId ? "" : `"userId":${undefined !== input.userId ? $string(input.userId) : undefined},`}"assetId":${$string(input.assetId)},"publishId":${$string(input.publishId)},"connectionId":${$string(input.connectionId)}}`;
2500
+ const $su0 = input => (() => {
2501
+ if ("publishSucceeded" === input.type)
2502
+ return $so8(input);
2503
+ else if ("added-to-search" === input.type)
2504
+ return $so6(input);
2505
+ else if ("comment" === input.type)
2506
+ return $so4(input);
2507
+ else if ("unassigned" === input.type)
2508
+ return $so2(input);
2509
+ else if ("assigned" === input.type)
2510
+ return $so0(input);
2511
+ else
2512
+ $throws({
2513
+ expected: "(UserNotificationPublishSucceeded | UserNotificationAddedToSearch | UserNotificationComment | UserNotificationUnassigned | UserNotificationAssigned)",
2514
+ value: input
2515
+ });
2516
+ })();
2517
+ return $su0(input);
2518
+ };
2519
+ export const assertStringifyUserNotificationRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
2520
+ const __is = input => {
2521
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2522
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2523
+ const $io2 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io3(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2524
+ const $io3 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2525
+ const $io4 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && "string" === typeof input.payload.commentId) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2526
+ const $io6 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && ("string" === typeof input.payload.searchId && "string" === typeof input.payload.assetId)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2527
+ const $io8 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io9(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2528
+ const $io9 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
2529
+ const $iu0 = input => (() => {
2530
+ if ("publishSucceeded" === input.type)
2531
+ return $io8(input);
2532
+ else if ("added-to-search" === input.type)
2533
+ return $io6(input);
2534
+ else if ("comment" === input.type)
2535
+ return $io4(input);
2536
+ else if ("unassigned" === input.type)
2537
+ return $io2(input);
2538
+ else if ("assigned" === input.type)
2539
+ return $io0(input);
2540
+ else
2541
+ return false;
2542
+ })();
2543
+ return "object" === typeof input && null !== input && $iu0(input);
2544
+ };
2545
+ if (false === __is(input))
2546
+ ((input, _path, _exceptionable = true) => {
2547
+ const $guard = __typia.json.createAssertStringify.guard;
2548
+ const $ao0 = (input, _path, _exceptionable = true) => ("assigned" === input.type || $guard(_exceptionable, {
2549
+ path: _path + ".type",
2550
+ expected: "\"assigned\"",
2551
+ value: input.type
2552
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2553
+ path: _path + ".payload",
2554
+ expected: "__type",
2555
+ value: input.payload
2556
+ }, errorFactory)) && $ao1(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2557
+ path: _path + ".payload",
2558
+ expected: "__type",
2559
+ value: input.payload
2560
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2561
+ path: _path + ".userId",
2562
+ expected: "string",
2563
+ value: input.userId
2564
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2565
+ path: _path + ".timestamp",
2566
+ expected: "string",
2567
+ value: input.timestamp
2568
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2569
+ path: _path + ".reasons",
2570
+ expected: "Array<NotificationReason>",
2571
+ value: input.reasons
2572
+ }, errorFactory)) && input.reasons.every((elem, _index1) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2573
+ path: _path + ".reasons[" + _index1 + "]",
2574
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2575
+ value: elem
2576
+ }, errorFactory)) || $guard(_exceptionable, {
2577
+ path: _path + ".reasons",
2578
+ expected: "Array<NotificationReason>",
2579
+ value: input.reasons
2580
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2581
+ path: _path + ".triggerId",
2582
+ expected: "(string | undefined)",
2583
+ value: input.triggerId
2584
+ }, errorFactory));
2585
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
2586
+ path: _path + ".assetId",
2587
+ expected: "string",
2588
+ value: input.assetId
2589
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
2590
+ path: _path + ".actionBy",
2591
+ expected: "(string | undefined)",
2592
+ value: input.actionBy
2593
+ }, errorFactory));
2594
+ const $ao2 = (input, _path, _exceptionable = true) => ("unassigned" === input.type || $guard(_exceptionable, {
2595
+ path: _path + ".type",
2596
+ expected: "\"unassigned\"",
2597
+ value: input.type
2598
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2599
+ path: _path + ".payload",
2600
+ expected: "__type.o1",
2601
+ value: input.payload
2602
+ }, errorFactory)) && $ao3(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2603
+ path: _path + ".payload",
2604
+ expected: "__type.o1",
2605
+ value: input.payload
2606
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2607
+ path: _path + ".userId",
2608
+ expected: "string",
2609
+ value: input.userId
2610
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2611
+ path: _path + ".timestamp",
2612
+ expected: "string",
2613
+ value: input.timestamp
2614
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2615
+ path: _path + ".reasons",
2616
+ expected: "Array<NotificationReason>",
2617
+ value: input.reasons
2618
+ }, errorFactory)) && input.reasons.every((elem, _index2) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2619
+ path: _path + ".reasons[" + _index2 + "]",
2620
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2621
+ value: elem
2622
+ }, errorFactory)) || $guard(_exceptionable, {
2623
+ path: _path + ".reasons",
2624
+ expected: "Array<NotificationReason>",
2625
+ value: input.reasons
2626
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2627
+ path: _path + ".triggerId",
2628
+ expected: "(string | undefined)",
2629
+ value: input.triggerId
2630
+ }, errorFactory));
2631
+ const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.assetId || $guard(_exceptionable, {
2632
+ path: _path + ".assetId",
2633
+ expected: "string",
2634
+ value: input.assetId
2635
+ }, errorFactory)) && (undefined === input.actionBy || "string" === typeof input.actionBy || $guard(_exceptionable, {
2636
+ path: _path + ".actionBy",
2637
+ expected: "(string | undefined)",
2638
+ value: input.actionBy
2639
+ }, errorFactory));
2640
+ const $ao4 = (input, _path, _exceptionable = true) => ("comment" === input.type || $guard(_exceptionable, {
2641
+ path: _path + ".type",
2642
+ expected: "\"comment\"",
2643
+ value: input.type
2644
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2645
+ path: _path + ".payload",
2646
+ expected: "__type.o2",
2647
+ value: input.payload
2648
+ }, errorFactory)) && $ao5(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2649
+ path: _path + ".payload",
2650
+ expected: "__type.o2",
2651
+ value: input.payload
2652
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2653
+ path: _path + ".userId",
2654
+ expected: "string",
2655
+ value: input.userId
2656
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2657
+ path: _path + ".timestamp",
2658
+ expected: "string",
2659
+ value: input.timestamp
2660
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2661
+ path: _path + ".reasons",
2662
+ expected: "Array<NotificationReason>",
2663
+ value: input.reasons
2664
+ }, errorFactory)) && input.reasons.every((elem, _index3) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2665
+ path: _path + ".reasons[" + _index3 + "]",
2666
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2667
+ value: elem
2668
+ }, errorFactory)) || $guard(_exceptionable, {
2669
+ path: _path + ".reasons",
2670
+ expected: "Array<NotificationReason>",
2671
+ value: input.reasons
2672
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2673
+ path: _path + ".triggerId",
2674
+ expected: "(string | undefined)",
2675
+ value: input.triggerId
2676
+ }, errorFactory));
2677
+ const $ao5 = (input, _path, _exceptionable = true) => "string" === typeof input.commentId || $guard(_exceptionable, {
2678
+ path: _path + ".commentId",
2679
+ expected: "string",
2680
+ value: input.commentId
2681
+ }, errorFactory);
2682
+ const $ao6 = (input, _path, _exceptionable = true) => ("added-to-search" === input.type || $guard(_exceptionable, {
2683
+ path: _path + ".type",
2684
+ expected: "\"added-to-search\"",
2685
+ value: input.type
2686
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2687
+ path: _path + ".payload",
2688
+ expected: "__type.o3",
2689
+ value: input.payload
2690
+ }, errorFactory)) && $ao7(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2691
+ path: _path + ".payload",
2692
+ expected: "__type.o3",
2693
+ value: input.payload
2694
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2695
+ path: _path + ".userId",
2696
+ expected: "string",
2697
+ value: input.userId
2698
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2699
+ path: _path + ".timestamp",
2700
+ expected: "string",
2701
+ value: input.timestamp
2702
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2703
+ path: _path + ".reasons",
2704
+ expected: "Array<NotificationReason>",
2705
+ value: input.reasons
2706
+ }, errorFactory)) && input.reasons.every((elem, _index4) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2707
+ path: _path + ".reasons[" + _index4 + "]",
2708
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2709
+ value: elem
2710
+ }, errorFactory)) || $guard(_exceptionable, {
2711
+ path: _path + ".reasons",
2712
+ expected: "Array<NotificationReason>",
2713
+ value: input.reasons
2714
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2715
+ path: _path + ".triggerId",
2716
+ expected: "(string | undefined)",
2717
+ value: input.triggerId
2718
+ }, errorFactory));
2719
+ const $ao7 = (input, _path, _exceptionable = true) => ("string" === typeof input.searchId || $guard(_exceptionable, {
2720
+ path: _path + ".searchId",
2721
+ expected: "string",
2722
+ value: input.searchId
2723
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
2724
+ path: _path + ".assetId",
2725
+ expected: "string",
2726
+ value: input.assetId
2727
+ }, errorFactory));
2728
+ const $ao8 = (input, _path, _exceptionable = true) => ("publishSucceeded" === input.type || $guard(_exceptionable, {
2729
+ path: _path + ".type",
2730
+ expected: "\"publishSucceeded\"",
2731
+ value: input.type
2732
+ }, errorFactory)) && (("object" === typeof input.payload && null !== input.payload || $guard(_exceptionable, {
2733
+ path: _path + ".payload",
2734
+ expected: "__type.o4",
2735
+ value: input.payload
2736
+ }, errorFactory)) && $ao9(input.payload, _path + ".payload", true && _exceptionable) || $guard(_exceptionable, {
2737
+ path: _path + ".payload",
2738
+ expected: "__type.o4",
2739
+ value: input.payload
2740
+ }, errorFactory)) && ("string" === typeof input.userId || $guard(_exceptionable, {
2741
+ path: _path + ".userId",
2742
+ expected: "string",
2743
+ value: input.userId
2744
+ }, errorFactory)) && ("string" === typeof input.timestamp || $guard(_exceptionable, {
2745
+ path: _path + ".timestamp",
2746
+ expected: "string",
2747
+ value: input.timestamp
2748
+ }, errorFactory)) && ((Array.isArray(input.reasons) || $guard(_exceptionable, {
2749
+ path: _path + ".reasons",
2750
+ expected: "Array<NotificationReason>",
2751
+ value: input.reasons
2752
+ }, errorFactory)) && input.reasons.every((elem, _index5) => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem || $guard(_exceptionable, {
2753
+ path: _path + ".reasons[" + _index5 + "]",
2754
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2755
+ value: elem
2756
+ }, errorFactory)) || $guard(_exceptionable, {
2757
+ path: _path + ".reasons",
2758
+ expected: "Array<NotificationReason>",
2759
+ value: input.reasons
2760
+ }, errorFactory)) && (undefined === input.triggerId || "string" === typeof input.triggerId || $guard(_exceptionable, {
2761
+ path: _path + ".triggerId",
2762
+ expected: "(string | undefined)",
2763
+ value: input.triggerId
2764
+ }, errorFactory));
2765
+ const $ao9 = (input, _path, _exceptionable = true) => (undefined === input.userId || "string" === typeof input.userId || $guard(_exceptionable, {
2766
+ path: _path + ".userId",
2767
+ expected: "(string | undefined)",
2768
+ value: input.userId
2769
+ }, errorFactory)) && ("string" === typeof input.assetId || $guard(_exceptionable, {
2770
+ path: _path + ".assetId",
2771
+ expected: "string",
2772
+ value: input.assetId
2773
+ }, errorFactory)) && ("string" === typeof input.publishId || $guard(_exceptionable, {
2774
+ path: _path + ".publishId",
2775
+ expected: "string",
2776
+ value: input.publishId
2777
+ }, errorFactory)) && ("string" === typeof input.connectionId || $guard(_exceptionable, {
2778
+ path: _path + ".connectionId",
2779
+ expected: "string",
2780
+ value: input.connectionId
2781
+ }, errorFactory));
2782
+ const $au0 = (input, _path, _exceptionable = true) => (() => {
2783
+ if ("publishSucceeded" === input.type)
2784
+ return $ao8(input, _path, true && _exceptionable);
2785
+ else if ("added-to-search" === input.type)
2786
+ return $ao6(input, _path, true && _exceptionable);
2787
+ else if ("comment" === input.type)
2788
+ return $ao4(input, _path, true && _exceptionable);
2789
+ else if ("unassigned" === input.type)
2790
+ return $ao2(input, _path, true && _exceptionable);
2791
+ else if ("assigned" === input.type)
2792
+ return $ao0(input, _path, true && _exceptionable);
2793
+ else
2794
+ return $guard(_exceptionable, {
2795
+ path: _path,
2796
+ expected: "(UserNotificationPublishSucceeded | UserNotificationAddedToSearch | UserNotificationComment | UserNotificationUnassigned | UserNotificationAssigned)",
2797
+ value: input
2798
+ }, errorFactory);
2799
+ })();
2800
+ return ("object" === typeof input && null !== input || $guard(true, {
2801
+ path: _path + "",
2802
+ expected: "(UserNotificationAddedToSearch | UserNotificationAssigned | UserNotificationComment | UserNotificationPublishSucceeded | UserNotificationUnassigned)",
2803
+ value: input
2804
+ }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
2805
+ path: _path + "",
2806
+ expected: "(UserNotificationAddedToSearch | UserNotificationAssigned | UserNotificationComment | UserNotificationPublishSucceeded | UserNotificationUnassigned)",
2807
+ value: input
2808
+ }, errorFactory);
2809
+ })(input, "$input", true);
2810
+ return input;
2811
+ }; const stringify = input => {
2812
+ const $io0 = input => "assigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io1(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2813
+ const $io1 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2814
+ const $io2 = input => "unassigned" === input.type && ("object" === typeof input.payload && null !== input.payload && $io3(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2815
+ const $io3 = input => "string" === typeof input.assetId && (undefined === input.actionBy || "string" === typeof input.actionBy);
2816
+ const $io4 = input => "comment" === input.type && ("object" === typeof input.payload && null !== input.payload && $io5(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2817
+ const $io5 = input => "string" === typeof input.commentId;
2818
+ const $io6 = input => "added-to-search" === input.type && ("object" === typeof input.payload && null !== input.payload && $io7(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2819
+ const $io7 = input => "string" === typeof input.searchId && "string" === typeof input.assetId;
2820
+ const $io8 = input => "publishSucceeded" === input.type && ("object" === typeof input.payload && null !== input.payload && $io9(input.payload)) && "string" === typeof input.userId && "string" === typeof input.timestamp && (Array.isArray(input.reasons) && input.reasons.every(elem => "mentioned" === elem || "assigned" === elem || "author" === elem || "participated" === elem || "always" === elem)) && (undefined === input.triggerId || "string" === typeof input.triggerId);
2821
+ const $io9 = input => (undefined === input.userId || "string" === typeof input.userId) && "string" === typeof input.assetId && "string" === typeof input.publishId && "string" === typeof input.connectionId;
2822
+ const $string = __typia.json.createAssertStringify.string;
2823
+ const $throws = __typia.json.createAssertStringify.throws;
2824
+ const $so0 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2825
+ if ("string" === typeof input.type)
2826
+ return $string(input.type);
2827
+ if ("string" === typeof input.type)
2828
+ return "\"" + input.type + "\"";
2829
+ $throws({
2830
+ expected: "\"assigned\"",
2831
+ value: input.type
2832
+ });
2833
+ })()},"payload":${$so1(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2834
+ if ("string" === typeof elem)
2835
+ return $string(elem);
2836
+ if ("string" === typeof elem)
2837
+ return "\"" + elem + "\"";
2838
+ $throws({
2839
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2840
+ value: elem
2841
+ });
2842
+ })()).join(",")}]`}}`;
2843
+ const $so1 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
2844
+ const $so2 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2845
+ if ("string" === typeof input.type)
2846
+ return $string(input.type);
2847
+ if ("string" === typeof input.type)
2848
+ return "\"" + input.type + "\"";
2849
+ $throws({
2850
+ expected: "\"unassigned\"",
2851
+ value: input.type
2852
+ });
2853
+ })()},"payload":${$so3(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2854
+ if ("string" === typeof elem)
2855
+ return $string(elem);
2856
+ if ("string" === typeof elem)
2857
+ return "\"" + elem + "\"";
2858
+ $throws({
2859
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2860
+ value: elem
2861
+ });
2862
+ })()).join(",")}]`}}`;
2863
+ const $so3 = input => `{${undefined === input.actionBy ? "" : `"actionBy":${undefined !== input.actionBy ? $string(input.actionBy) : undefined},`}"assetId":${$string(input.assetId)}}`;
2864
+ const $so4 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2865
+ if ("string" === typeof input.type)
2866
+ return $string(input.type);
2867
+ if ("string" === typeof input.type)
2868
+ return "\"" + input.type + "\"";
2869
+ $throws({
2870
+ expected: "\"comment\"",
2871
+ value: input.type
2872
+ });
2873
+ })()},"payload":${`{"commentId":${$string(input.payload.commentId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2874
+ if ("string" === typeof elem)
2875
+ return $string(elem);
2876
+ if ("string" === typeof elem)
2877
+ return "\"" + elem + "\"";
2878
+ $throws({
2879
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2880
+ value: elem
2881
+ });
2882
+ })()).join(",")}]`}}`;
2883
+ const $so6 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2884
+ if ("string" === typeof input.type)
2885
+ return $string(input.type);
2886
+ if ("string" === typeof input.type)
2887
+ return "\"" + input.type + "\"";
2888
+ $throws({
2889
+ expected: "\"added-to-search\"",
2890
+ value: input.type
2891
+ });
2892
+ })()},"payload":${`{"searchId":${$string(input.payload.searchId)},"assetId":${$string(input.payload.assetId)}}`},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2893
+ if ("string" === typeof elem)
2894
+ return $string(elem);
2895
+ if ("string" === typeof elem)
2896
+ return "\"" + elem + "\"";
2897
+ $throws({
2898
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2899
+ value: elem
2900
+ });
2901
+ })()).join(",")}]`}}`;
2902
+ const $so8 = input => `{${undefined === input.triggerId ? "" : `"triggerId":${undefined !== input.triggerId ? $string(input.triggerId) : undefined},`}"type":${(() => {
2903
+ if ("string" === typeof input.type)
2904
+ return $string(input.type);
2905
+ if ("string" === typeof input.type)
2906
+ return "\"" + input.type + "\"";
2907
+ $throws({
2908
+ expected: "\"publishSucceeded\"",
2909
+ value: input.type
2910
+ });
2911
+ })()},"payload":${$so9(input.payload)},"userId":${$string(input.userId)},"timestamp":${$string(input.timestamp)},"reasons":${`[${input.reasons.map(elem => (() => {
2912
+ if ("string" === typeof elem)
2913
+ return $string(elem);
2914
+ if ("string" === typeof elem)
2915
+ return "\"" + elem + "\"";
2916
+ $throws({
2917
+ expected: "(\"always\" | \"assigned\" | \"author\" | \"mentioned\" | \"participated\")",
2918
+ value: elem
2919
+ });
2920
+ })()).join(",")}]`}}`;
2921
+ const $so9 = input => `{${undefined === input.userId ? "" : `"userId":${undefined !== input.userId ? $string(input.userId) : undefined},`}"assetId":${$string(input.assetId)},"publishId":${$string(input.publishId)},"connectionId":${$string(input.connectionId)}}`;
2922
+ const $su0 = input => (() => {
2923
+ if ("publishSucceeded" === input.type)
2924
+ return $so8(input);
2925
+ else if ("added-to-search" === input.type)
2926
+ return $so6(input);
2927
+ else if ("comment" === input.type)
2928
+ return $so4(input);
2929
+ else if ("unassigned" === input.type)
2930
+ return $so2(input);
2931
+ else if ("assigned" === input.type)
2932
+ return $so0(input);
2933
+ else
2934
+ $throws({
2935
+ expected: "(UserNotificationPublishSucceeded | UserNotificationAddedToSearch | UserNotificationComment | UserNotificationUnassigned | UserNotificationAssigned)",
2936
+ value: input
2937
+ });
2938
+ })();
2939
+ return $su0(input);
2940
+ }; return stringify(assert(input, errorFactory)); };
2941
+ export const isUserNotificationDomainReadAtRecord = input => {
2942
+ const $io0 = input => undefined === input.value || "string" === typeof input.value;
2943
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
2944
+ };
2945
+ export const assertUserNotificationDomainReadAtRecord = (input, errorFactory) => {
2946
+ const __is = input => {
2947
+ const $io0 = input => undefined === input.value || "string" === typeof input.value;
2948
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
2949
+ };
2950
+ if (false === __is(input))
2951
+ ((input, _path, _exceptionable = true) => {
2952
+ const $guard = __typia.createAssert.guard;
2953
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || "string" === typeof input.value || $guard(_exceptionable, {
2954
+ path: _path + ".value",
2955
+ expected: "(string | undefined)",
2956
+ value: input.value
2957
+ }, errorFactory);
2958
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
2959
+ path: _path + "",
2960
+ expected: "UserNotificationDomainReadAtRecord",
2961
+ value: input
2962
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
2963
+ path: _path + "",
2964
+ expected: "UserNotificationDomainReadAtRecord",
2965
+ value: input
2966
+ }, errorFactory);
2967
+ })(input, "$input", true);
2968
+ return input;
2969
+ };
2970
+ export const randomUserNotificationDomainReadAtRecord = generator => {
2971
+ const $generator = __typia.createRandom.generator;
2972
+ const $pick = __typia.createRandom.pick;
2973
+ const $ro0 = (_recursive = false, _depth = 0) => ({
2974
+ value: $pick([
2975
+ () => undefined,
2976
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
2977
+ ])()
2978
+ });
2979
+ return $ro0();
2980
+ };
2981
+ export const assertGuardUserNotificationDomainReadAtRecord = (input, errorFactory) => {
2982
+ const __is = input => {
2983
+ const $io0 = input => undefined === input.value || "string" === typeof input.value;
2984
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
2985
+ };
2986
+ if (false === __is(input))
2987
+ ((input, _path, _exceptionable = true) => {
2988
+ const $guard = __typia.createAssertGuard.guard;
2989
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || "string" === typeof input.value || $guard(_exceptionable, {
2990
+ path: _path + ".value",
2991
+ expected: "(string | undefined)",
2992
+ value: input.value
2993
+ }, errorFactory);
2994
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
2995
+ path: _path + "",
2996
+ expected: "UserNotificationDomainReadAtRecord",
2997
+ value: input
2998
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
2999
+ path: _path + "",
3000
+ expected: "UserNotificationDomainReadAtRecord",
3001
+ value: input
3002
+ }, errorFactory);
3003
+ })(input, "$input", true);
3004
+ };
3005
+ export const stringifyUserNotificationDomainReadAtRecord = input => {
3006
+ const $string = __typia.json.createStringify.string;
3007
+ const $tail = __typia.json.createStringify.tail;
3008
+ const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? $string(input.value) : undefined}`}`)}}`;
3009
+ return $so0(input);
3010
+ };
3011
+ export const assertStringifyUserNotificationDomainReadAtRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
3012
+ const __is = input => {
3013
+ const $io0 = input => undefined === input.value || "string" === typeof input.value;
3014
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
3015
+ };
3016
+ if (false === __is(input))
3017
+ ((input, _path, _exceptionable = true) => {
3018
+ const $guard = __typia.json.createAssertStringify.guard;
3019
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || "string" === typeof input.value || $guard(_exceptionable, {
3020
+ path: _path + ".value",
3021
+ expected: "(string | undefined)",
3022
+ value: input.value
3023
+ }, errorFactory);
3024
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
3025
+ path: _path + "",
3026
+ expected: "UserNotificationDomainReadAtRecord",
3027
+ value: input
3028
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
3029
+ path: _path + "",
3030
+ expected: "UserNotificationDomainReadAtRecord",
3031
+ value: input
3032
+ }, errorFactory);
3033
+ })(input, "$input", true);
3034
+ return input;
3035
+ }; const stringify = input => {
3036
+ const $string = __typia.json.createAssertStringify.string;
3037
+ const $tail = __typia.json.createAssertStringify.tail;
3038
+ const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? $string(input.value) : undefined}`}`)}}`;
3039
+ return $so0(input);
3040
+ }; return stringify(assert(input, errorFactory)); };