@kl1/contracts 1.1.16-uat → 1.1.18-uat

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.
@@ -0,0 +1,740 @@
1
+ import { z } from 'zod';
2
+ import { SnippetSchema, SnippetGroupSchema, SnippetGroupListItemSchema, SnippetListItemSchema } from './schema';
3
+ import { CreateSnippetGroupSchema, CreateSnippetSchema, UpdateSnippetGroupSchema, UpdateSnippetSchema } from './validation';
4
+ export type Snippet = z.infer<typeof SnippetSchema>;
5
+ export type SnippetGroupBody = z.infer<typeof SnippetGroupSchema>;
6
+ export type SnippetGroupListItem = z.infer<typeof SnippetGroupListItemSchema>;
7
+ export type SnippetListItem = z.infer<typeof SnippetListItemSchema>;
8
+ export type CreateSnippetGroupBody = z.infer<typeof CreateSnippetGroupSchema>;
9
+ export type UpdateSnippetGroupBody = z.infer<typeof UpdateSnippetGroupSchema>;
10
+ export type CreateSnippetBody = z.infer<typeof CreateSnippetSchema>;
11
+ export type UpdateSnippetBody = z.infer<typeof UpdateSnippetSchema>;
12
+ export declare const snippetContract: {
13
+ createSnippetGroup: {
14
+ body: z.ZodObject<{
15
+ name: z.ZodString;
16
+ platformType: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ name: string;
19
+ platformType: string;
20
+ }, {
21
+ name: string;
22
+ platformType: string;
23
+ }>;
24
+ method: "POST";
25
+ responses: {
26
+ 201: z.ZodObject<{
27
+ requestId: z.ZodString;
28
+ snippetgroup: z.ZodObject<{
29
+ id: z.ZodString;
30
+ createdAt: z.ZodDate;
31
+ updatedAt: z.ZodDate;
32
+ deletedAt: z.ZodNullable<z.ZodDate>;
33
+ name: z.ZodString;
34
+ platformType: z.ZodString;
35
+ }, "strip", z.ZodTypeAny, {
36
+ id: string;
37
+ name: string;
38
+ createdAt: Date;
39
+ updatedAt: Date;
40
+ deletedAt: Date | null;
41
+ platformType: string;
42
+ }, {
43
+ id: string;
44
+ name: string;
45
+ createdAt: Date;
46
+ updatedAt: Date;
47
+ deletedAt: Date | null;
48
+ platformType: string;
49
+ }>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ requestId: string;
52
+ snippetgroup: {
53
+ id: string;
54
+ name: string;
55
+ createdAt: Date;
56
+ updatedAt: Date;
57
+ deletedAt: Date | null;
58
+ platformType: string;
59
+ };
60
+ }, {
61
+ requestId: string;
62
+ snippetgroup: {
63
+ id: string;
64
+ name: string;
65
+ createdAt: Date;
66
+ updatedAt: Date;
67
+ deletedAt: Date | null;
68
+ platformType: string;
69
+ };
70
+ }>;
71
+ 500: z.ZodObject<{
72
+ message: z.ZodString;
73
+ error: z.ZodAny;
74
+ }, "strip", z.ZodTypeAny, {
75
+ message: string;
76
+ error?: any;
77
+ }, {
78
+ message: string;
79
+ error?: any;
80
+ }>;
81
+ };
82
+ path: "snippets/groups";
83
+ };
84
+ getSnippetGroups: {
85
+ method: "GET";
86
+ query: null;
87
+ responses: {
88
+ 200: z.ZodObject<{
89
+ requestId: z.ZodString;
90
+ snippetgroups: z.ZodArray<z.ZodObject<{
91
+ id: z.ZodString;
92
+ createdAt: z.ZodDate;
93
+ updatedAt: z.ZodDate;
94
+ deletedAt: z.ZodNullable<z.ZodDate>;
95
+ name: z.ZodString;
96
+ platformType: z.ZodString;
97
+ }, "strip", z.ZodTypeAny, {
98
+ id: string;
99
+ name: string;
100
+ createdAt: Date;
101
+ updatedAt: Date;
102
+ deletedAt: Date | null;
103
+ platformType: string;
104
+ }, {
105
+ id: string;
106
+ name: string;
107
+ createdAt: Date;
108
+ updatedAt: Date;
109
+ deletedAt: Date | null;
110
+ platformType: string;
111
+ }>, "many">;
112
+ }, "strip", z.ZodTypeAny, {
113
+ requestId: string;
114
+ snippetgroups: {
115
+ id: string;
116
+ name: string;
117
+ createdAt: Date;
118
+ updatedAt: Date;
119
+ deletedAt: Date | null;
120
+ platformType: string;
121
+ }[];
122
+ }, {
123
+ requestId: string;
124
+ snippetgroups: {
125
+ id: string;
126
+ name: string;
127
+ createdAt: Date;
128
+ updatedAt: Date;
129
+ deletedAt: Date | null;
130
+ platformType: string;
131
+ }[];
132
+ }>;
133
+ 500: z.ZodObject<{
134
+ message: z.ZodString;
135
+ error: z.ZodAny;
136
+ }, "strip", z.ZodTypeAny, {
137
+ message: string;
138
+ error?: any;
139
+ }, {
140
+ message: string;
141
+ error?: any;
142
+ }>;
143
+ };
144
+ path: "snippets/groups";
145
+ };
146
+ updateSnippetGroup: {
147
+ body: z.ZodObject<{
148
+ name: z.ZodOptional<z.ZodString>;
149
+ paltformType: z.ZodOptional<z.ZodString>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ name?: string | undefined;
152
+ paltformType?: string | undefined;
153
+ }, {
154
+ name?: string | undefined;
155
+ paltformType?: string | undefined;
156
+ }>;
157
+ method: "PATCH";
158
+ pathParams: z.ZodObject<{
159
+ id: z.ZodString;
160
+ }, "strip", z.ZodTypeAny, {
161
+ id: string;
162
+ }, {
163
+ id: string;
164
+ }>;
165
+ responses: {
166
+ 200: z.ZodObject<{
167
+ requestId: z.ZodString;
168
+ snippetgroup: z.ZodObject<{
169
+ id: z.ZodString;
170
+ createdAt: z.ZodDate;
171
+ updatedAt: z.ZodDate;
172
+ deletedAt: z.ZodNullable<z.ZodDate>;
173
+ name: z.ZodString;
174
+ platformType: z.ZodString;
175
+ }, "strip", z.ZodTypeAny, {
176
+ id: string;
177
+ name: string;
178
+ createdAt: Date;
179
+ updatedAt: Date;
180
+ deletedAt: Date | null;
181
+ platformType: string;
182
+ }, {
183
+ id: string;
184
+ name: string;
185
+ createdAt: Date;
186
+ updatedAt: Date;
187
+ deletedAt: Date | null;
188
+ platformType: string;
189
+ }>;
190
+ }, "strip", z.ZodTypeAny, {
191
+ requestId: string;
192
+ snippetgroup: {
193
+ id: string;
194
+ name: string;
195
+ createdAt: Date;
196
+ updatedAt: Date;
197
+ deletedAt: Date | null;
198
+ platformType: string;
199
+ };
200
+ }, {
201
+ requestId: string;
202
+ snippetgroup: {
203
+ id: string;
204
+ name: string;
205
+ createdAt: Date;
206
+ updatedAt: Date;
207
+ deletedAt: Date | null;
208
+ platformType: string;
209
+ };
210
+ }>;
211
+ 500: z.ZodObject<{
212
+ message: z.ZodString;
213
+ error: z.ZodAny;
214
+ }, "strip", z.ZodTypeAny, {
215
+ message: string;
216
+ error?: any;
217
+ }, {
218
+ message: string;
219
+ error?: any;
220
+ }>;
221
+ };
222
+ path: "snippets/groups/:id";
223
+ };
224
+ deleteSnippetGroup: {
225
+ body: null;
226
+ method: "DELETE";
227
+ pathParams: z.ZodObject<{
228
+ id: z.ZodString;
229
+ }, "strip", z.ZodTypeAny, {
230
+ id: string;
231
+ }, {
232
+ id: string;
233
+ }>;
234
+ responses: {
235
+ 200: z.ZodObject<{
236
+ requestId: z.ZodString;
237
+ }, "strip", z.ZodTypeAny, {
238
+ requestId: string;
239
+ }, {
240
+ requestId: string;
241
+ }>;
242
+ 500: z.ZodObject<{
243
+ message: z.ZodString;
244
+ error: z.ZodAny;
245
+ }, "strip", z.ZodTypeAny, {
246
+ message: string;
247
+ error?: any;
248
+ }, {
249
+ message: string;
250
+ error?: any;
251
+ }>;
252
+ };
253
+ path: "snippets/groups/:id";
254
+ };
255
+ getSnippets: {
256
+ method: "GET";
257
+ responses: {
258
+ 200: z.ZodObject<{
259
+ requestId: z.ZodString;
260
+ snippets: z.ZodArray<z.ZodObject<{
261
+ id: z.ZodString;
262
+ createdAt: z.ZodDate;
263
+ updatedAt: z.ZodDate;
264
+ deletedAt: z.ZodNullable<z.ZodDate>;
265
+ shortcutName: z.ZodString;
266
+ contentType: z.ZodString;
267
+ contentValue: z.ZodNullable<z.ZodString>;
268
+ uploadId: z.ZodNullable<z.ZodString>;
269
+ order: z.ZodOptional<z.ZodNumber>;
270
+ snippetGroupId: z.ZodString;
271
+ snippetGroup: z.ZodObject<{
272
+ id: z.ZodString;
273
+ createdAt: z.ZodDate;
274
+ updatedAt: z.ZodDate;
275
+ deletedAt: z.ZodNullable<z.ZodDate>;
276
+ name: z.ZodString;
277
+ platformType: z.ZodString;
278
+ }, "strip", z.ZodTypeAny, {
279
+ id: string;
280
+ name: string;
281
+ createdAt: Date;
282
+ updatedAt: Date;
283
+ deletedAt: Date | null;
284
+ platformType: string;
285
+ }, {
286
+ id: string;
287
+ name: string;
288
+ createdAt: Date;
289
+ updatedAt: Date;
290
+ deletedAt: Date | null;
291
+ platformType: string;
292
+ }>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ id: string;
295
+ createdAt: Date;
296
+ updatedAt: Date;
297
+ deletedAt: Date | null;
298
+ contentType: string;
299
+ uploadId: string | null;
300
+ shortcutName: string;
301
+ contentValue: string | null;
302
+ snippetGroupId: string;
303
+ snippetGroup: {
304
+ id: string;
305
+ name: string;
306
+ createdAt: Date;
307
+ updatedAt: Date;
308
+ deletedAt: Date | null;
309
+ platformType: string;
310
+ };
311
+ order?: number | undefined;
312
+ }, {
313
+ id: string;
314
+ createdAt: Date;
315
+ updatedAt: Date;
316
+ deletedAt: Date | null;
317
+ contentType: string;
318
+ uploadId: string | null;
319
+ shortcutName: string;
320
+ contentValue: string | null;
321
+ snippetGroupId: string;
322
+ snippetGroup: {
323
+ id: string;
324
+ name: string;
325
+ createdAt: Date;
326
+ updatedAt: Date;
327
+ deletedAt: Date | null;
328
+ platformType: string;
329
+ };
330
+ order?: number | undefined;
331
+ }>, "many">;
332
+ }, "strip", z.ZodTypeAny, {
333
+ requestId: string;
334
+ snippets: {
335
+ id: string;
336
+ createdAt: Date;
337
+ updatedAt: Date;
338
+ deletedAt: Date | null;
339
+ contentType: string;
340
+ uploadId: string | null;
341
+ shortcutName: string;
342
+ contentValue: string | null;
343
+ snippetGroupId: string;
344
+ snippetGroup: {
345
+ id: string;
346
+ name: string;
347
+ createdAt: Date;
348
+ updatedAt: Date;
349
+ deletedAt: Date | null;
350
+ platformType: string;
351
+ };
352
+ order?: number | undefined;
353
+ }[];
354
+ }, {
355
+ requestId: string;
356
+ snippets: {
357
+ id: string;
358
+ createdAt: Date;
359
+ updatedAt: Date;
360
+ deletedAt: Date | null;
361
+ contentType: string;
362
+ uploadId: string | null;
363
+ shortcutName: string;
364
+ contentValue: string | null;
365
+ snippetGroupId: string;
366
+ snippetGroup: {
367
+ id: string;
368
+ name: string;
369
+ createdAt: Date;
370
+ updatedAt: Date;
371
+ deletedAt: Date | null;
372
+ platformType: string;
373
+ };
374
+ order?: number | undefined;
375
+ }[];
376
+ }>;
377
+ 500: z.ZodObject<{
378
+ message: z.ZodString;
379
+ error: z.ZodAny;
380
+ }, "strip", z.ZodTypeAny, {
381
+ message: string;
382
+ error?: any;
383
+ }, {
384
+ message: string;
385
+ error?: any;
386
+ }>;
387
+ };
388
+ path: "snippets";
389
+ };
390
+ createSnippet: {
391
+ body: z.ZodObject<{
392
+ shortcutName: z.ZodString;
393
+ contentType: z.ZodString;
394
+ contentValue: z.ZodOptional<z.ZodString>;
395
+ snippetGroupId: z.ZodString;
396
+ platformType: z.ZodString;
397
+ }, "strip", z.ZodTypeAny, {
398
+ contentType: string;
399
+ platformType: string;
400
+ shortcutName: string;
401
+ snippetGroupId: string;
402
+ contentValue?: string | undefined;
403
+ }, {
404
+ contentType: string;
405
+ platformType: string;
406
+ shortcutName: string;
407
+ snippetGroupId: string;
408
+ contentValue?: string | undefined;
409
+ }>;
410
+ method: "POST";
411
+ responses: {
412
+ 201: z.ZodObject<{
413
+ requestId: z.ZodString;
414
+ snippet: z.ZodObject<{
415
+ id: z.ZodString;
416
+ createdAt: z.ZodDate;
417
+ updatedAt: z.ZodDate;
418
+ deletedAt: z.ZodNullable<z.ZodDate>;
419
+ shortcutName: z.ZodString;
420
+ contentType: z.ZodString;
421
+ contentValue: z.ZodNullable<z.ZodString>;
422
+ uploadId: z.ZodNullable<z.ZodString>;
423
+ order: z.ZodOptional<z.ZodNumber>;
424
+ snippetGroupId: z.ZodString;
425
+ snippetGroup: z.ZodObject<{
426
+ id: z.ZodString;
427
+ createdAt: z.ZodDate;
428
+ updatedAt: z.ZodDate;
429
+ deletedAt: z.ZodNullable<z.ZodDate>;
430
+ name: z.ZodString;
431
+ platformType: z.ZodString;
432
+ }, "strip", z.ZodTypeAny, {
433
+ id: string;
434
+ name: string;
435
+ createdAt: Date;
436
+ updatedAt: Date;
437
+ deletedAt: Date | null;
438
+ platformType: string;
439
+ }, {
440
+ id: string;
441
+ name: string;
442
+ createdAt: Date;
443
+ updatedAt: Date;
444
+ deletedAt: Date | null;
445
+ platformType: string;
446
+ }>;
447
+ }, "strip", z.ZodTypeAny, {
448
+ id: string;
449
+ createdAt: Date;
450
+ updatedAt: Date;
451
+ deletedAt: Date | null;
452
+ contentType: string;
453
+ uploadId: string | null;
454
+ shortcutName: string;
455
+ contentValue: string | null;
456
+ snippetGroupId: string;
457
+ snippetGroup: {
458
+ id: string;
459
+ name: string;
460
+ createdAt: Date;
461
+ updatedAt: Date;
462
+ deletedAt: Date | null;
463
+ platformType: string;
464
+ };
465
+ order?: number | undefined;
466
+ }, {
467
+ id: string;
468
+ createdAt: Date;
469
+ updatedAt: Date;
470
+ deletedAt: Date | null;
471
+ contentType: string;
472
+ uploadId: string | null;
473
+ shortcutName: string;
474
+ contentValue: string | null;
475
+ snippetGroupId: string;
476
+ snippetGroup: {
477
+ id: string;
478
+ name: string;
479
+ createdAt: Date;
480
+ updatedAt: Date;
481
+ deletedAt: Date | null;
482
+ platformType: string;
483
+ };
484
+ order?: number | undefined;
485
+ }>;
486
+ }, "strip", z.ZodTypeAny, {
487
+ requestId: string;
488
+ snippet: {
489
+ id: string;
490
+ createdAt: Date;
491
+ updatedAt: Date;
492
+ deletedAt: Date | null;
493
+ contentType: string;
494
+ uploadId: string | null;
495
+ shortcutName: string;
496
+ contentValue: string | null;
497
+ snippetGroupId: string;
498
+ snippetGroup: {
499
+ id: string;
500
+ name: string;
501
+ createdAt: Date;
502
+ updatedAt: Date;
503
+ deletedAt: Date | null;
504
+ platformType: string;
505
+ };
506
+ order?: number | undefined;
507
+ };
508
+ }, {
509
+ requestId: string;
510
+ snippet: {
511
+ id: string;
512
+ createdAt: Date;
513
+ updatedAt: Date;
514
+ deletedAt: Date | null;
515
+ contentType: string;
516
+ uploadId: string | null;
517
+ shortcutName: string;
518
+ contentValue: string | null;
519
+ snippetGroupId: string;
520
+ snippetGroup: {
521
+ id: string;
522
+ name: string;
523
+ createdAt: Date;
524
+ updatedAt: Date;
525
+ deletedAt: Date | null;
526
+ platformType: string;
527
+ };
528
+ order?: number | undefined;
529
+ };
530
+ }>;
531
+ 500: z.ZodObject<{
532
+ message: z.ZodString;
533
+ error: z.ZodAny;
534
+ }, "strip", z.ZodTypeAny, {
535
+ message: string;
536
+ error?: any;
537
+ }, {
538
+ message: string;
539
+ error?: any;
540
+ }>;
541
+ };
542
+ path: "snippets";
543
+ };
544
+ updateSnippet: {
545
+ body: z.ZodObject<{
546
+ contentType: z.ZodString;
547
+ platformType: z.ZodString;
548
+ shortcutName: z.ZodString;
549
+ contentValue: z.ZodOptional<z.ZodString>;
550
+ snippetGroupId: z.ZodString;
551
+ snippetId: z.ZodString;
552
+ }, "strip", z.ZodTypeAny, {
553
+ contentType: string;
554
+ platformType: string;
555
+ shortcutName: string;
556
+ snippetGroupId: string;
557
+ snippetId: string;
558
+ contentValue?: string | undefined;
559
+ }, {
560
+ contentType: string;
561
+ platformType: string;
562
+ shortcutName: string;
563
+ snippetGroupId: string;
564
+ snippetId: string;
565
+ contentValue?: string | undefined;
566
+ }>;
567
+ method: "PATCH";
568
+ pathParams: z.ZodObject<{
569
+ id: z.ZodString;
570
+ }, "strip", z.ZodTypeAny, {
571
+ id: string;
572
+ }, {
573
+ id: string;
574
+ }>;
575
+ responses: {
576
+ 200: z.ZodObject<{
577
+ requestId: z.ZodString;
578
+ snippet: z.ZodObject<{
579
+ id: z.ZodString;
580
+ createdAt: z.ZodDate;
581
+ updatedAt: z.ZodDate;
582
+ deletedAt: z.ZodNullable<z.ZodDate>;
583
+ shortcutName: z.ZodString;
584
+ contentType: z.ZodString;
585
+ contentValue: z.ZodNullable<z.ZodString>;
586
+ uploadId: z.ZodNullable<z.ZodString>;
587
+ order: z.ZodOptional<z.ZodNumber>;
588
+ snippetGroupId: z.ZodString;
589
+ snippetGroup: z.ZodObject<{
590
+ id: z.ZodString;
591
+ createdAt: z.ZodDate;
592
+ updatedAt: z.ZodDate;
593
+ deletedAt: z.ZodNullable<z.ZodDate>;
594
+ name: z.ZodString;
595
+ platformType: z.ZodString;
596
+ }, "strip", z.ZodTypeAny, {
597
+ id: string;
598
+ name: string;
599
+ createdAt: Date;
600
+ updatedAt: Date;
601
+ deletedAt: Date | null;
602
+ platformType: string;
603
+ }, {
604
+ id: string;
605
+ name: string;
606
+ createdAt: Date;
607
+ updatedAt: Date;
608
+ deletedAt: Date | null;
609
+ platformType: string;
610
+ }>;
611
+ }, "strip", z.ZodTypeAny, {
612
+ id: string;
613
+ createdAt: Date;
614
+ updatedAt: Date;
615
+ deletedAt: Date | null;
616
+ contentType: string;
617
+ uploadId: string | null;
618
+ shortcutName: string;
619
+ contentValue: string | null;
620
+ snippetGroupId: string;
621
+ snippetGroup: {
622
+ id: string;
623
+ name: string;
624
+ createdAt: Date;
625
+ updatedAt: Date;
626
+ deletedAt: Date | null;
627
+ platformType: string;
628
+ };
629
+ order?: number | undefined;
630
+ }, {
631
+ id: string;
632
+ createdAt: Date;
633
+ updatedAt: Date;
634
+ deletedAt: Date | null;
635
+ contentType: string;
636
+ uploadId: string | null;
637
+ shortcutName: string;
638
+ contentValue: string | null;
639
+ snippetGroupId: string;
640
+ snippetGroup: {
641
+ id: string;
642
+ name: string;
643
+ createdAt: Date;
644
+ updatedAt: Date;
645
+ deletedAt: Date | null;
646
+ platformType: string;
647
+ };
648
+ order?: number | undefined;
649
+ }>;
650
+ }, "strip", z.ZodTypeAny, {
651
+ requestId: string;
652
+ snippet: {
653
+ id: string;
654
+ createdAt: Date;
655
+ updatedAt: Date;
656
+ deletedAt: Date | null;
657
+ contentType: string;
658
+ uploadId: string | null;
659
+ shortcutName: string;
660
+ contentValue: string | null;
661
+ snippetGroupId: string;
662
+ snippetGroup: {
663
+ id: string;
664
+ name: string;
665
+ createdAt: Date;
666
+ updatedAt: Date;
667
+ deletedAt: Date | null;
668
+ platformType: string;
669
+ };
670
+ order?: number | undefined;
671
+ };
672
+ }, {
673
+ requestId: string;
674
+ snippet: {
675
+ id: string;
676
+ createdAt: Date;
677
+ updatedAt: Date;
678
+ deletedAt: Date | null;
679
+ contentType: string;
680
+ uploadId: string | null;
681
+ shortcutName: string;
682
+ contentValue: string | null;
683
+ snippetGroupId: string;
684
+ snippetGroup: {
685
+ id: string;
686
+ name: string;
687
+ createdAt: Date;
688
+ updatedAt: Date;
689
+ deletedAt: Date | null;
690
+ platformType: string;
691
+ };
692
+ order?: number | undefined;
693
+ };
694
+ }>;
695
+ 500: z.ZodObject<{
696
+ message: z.ZodString;
697
+ error: z.ZodAny;
698
+ }, "strip", z.ZodTypeAny, {
699
+ message: string;
700
+ error?: any;
701
+ }, {
702
+ message: string;
703
+ error?: any;
704
+ }>;
705
+ };
706
+ path: "snippets/:id";
707
+ };
708
+ deleteSnippet: {
709
+ body: null;
710
+ method: "DELETE";
711
+ pathParams: z.ZodObject<{
712
+ id: z.ZodString;
713
+ }, "strip", z.ZodTypeAny, {
714
+ id: string;
715
+ }, {
716
+ id: string;
717
+ }>;
718
+ responses: {
719
+ 200: z.ZodObject<{
720
+ requestId: z.ZodString;
721
+ }, "strip", z.ZodTypeAny, {
722
+ requestId: string;
723
+ }, {
724
+ requestId: string;
725
+ }>;
726
+ 500: z.ZodObject<{
727
+ message: z.ZodString;
728
+ error: z.ZodAny;
729
+ }, "strip", z.ZodTypeAny, {
730
+ message: string;
731
+ error?: any;
732
+ }, {
733
+ message: string;
734
+ error?: any;
735
+ }>;
736
+ };
737
+ path: "snippets/:id";
738
+ };
739
+ };
740
+ //# sourceMappingURL=index.d.ts.map