@boltstore/utils 0.5.0

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 (62) hide show
  1. package/README.md +61 -0
  2. package/dist/auth-types.d.ts +138 -0
  3. package/dist/auth-types.d.ts.map +1 -0
  4. package/dist/auth-types.js +4 -0
  5. package/dist/auth-types.js.map +1 -0
  6. package/dist/constants.d.ts +123 -0
  7. package/dist/constants.d.ts.map +1 -0
  8. package/dist/constants.js +144 -0
  9. package/dist/constants.js.map +1 -0
  10. package/dist/filter/compiler.d.ts +14 -0
  11. package/dist/filter/compiler.d.ts.map +1 -0
  12. package/dist/filter/compiler.js +93 -0
  13. package/dist/filter/compiler.js.map +1 -0
  14. package/dist/filter/parser.d.ts +15 -0
  15. package/dist/filter/parser.d.ts.map +1 -0
  16. package/dist/filter/parser.js +134 -0
  17. package/dist/filter/parser.js.map +1 -0
  18. package/dist/filter/query.d.ts +13 -0
  19. package/dist/filter/query.d.ts.map +1 -0
  20. package/dist/filter/query.js +20 -0
  21. package/dist/filter/query.js.map +1 -0
  22. package/dist/filter/tokenizer.d.ts +17 -0
  23. package/dist/filter/tokenizer.d.ts.map +1 -0
  24. package/dist/filter/tokenizer.js +133 -0
  25. package/dist/filter/tokenizer.js.map +1 -0
  26. package/dist/filter/types.d.ts +24 -0
  27. package/dist/filter/types.d.ts.map +1 -0
  28. package/dist/filter/types.js +3 -0
  29. package/dist/filter/types.js.map +1 -0
  30. package/dist/filter.d.ts +7 -0
  31. package/dist/filter.d.ts.map +1 -0
  32. package/dist/filter.js +12 -0
  33. package/dist/filter.js.map +1 -0
  34. package/dist/index.d.ts +13 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +16 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/realtime-types.d.ts +90 -0
  39. package/dist/realtime-types.d.ts.map +1 -0
  40. package/dist/realtime-types.js +4 -0
  41. package/dist/realtime-types.js.map +1 -0
  42. package/dist/schema.d.ts +612 -0
  43. package/dist/schema.d.ts.map +1 -0
  44. package/dist/schema.js +209 -0
  45. package/dist/schema.js.map +1 -0
  46. package/dist/storage-types.d.ts +117 -0
  47. package/dist/storage-types.d.ts.map +1 -0
  48. package/dist/storage-types.js +4 -0
  49. package/dist/storage-types.js.map +1 -0
  50. package/dist/sync-types.d.ts +136 -0
  51. package/dist/sync-types.d.ts.map +1 -0
  52. package/dist/sync-types.js +4 -0
  53. package/dist/sync-types.js.map +1 -0
  54. package/dist/types.d.ts +164 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/types.js +3 -0
  57. package/dist/types.js.map +1 -0
  58. package/dist/validation.d.ts +30 -0
  59. package/dist/validation.d.ts.map +1 -0
  60. package/dist/validation.js +259 -0
  61. package/dist/validation.js.map +1 -0
  62. package/package.json +74 -0
@@ -0,0 +1,612 @@
1
+ export declare const RecordSchema: {
2
+ $id: string;
3
+ $schema: string;
4
+ title: string;
5
+ type: string;
6
+ properties: {
7
+ id: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ collectionId: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ collectionName: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ created: {
20
+ type: string;
21
+ format: string;
22
+ };
23
+ updated: {
24
+ type: string;
25
+ format: string;
26
+ };
27
+ };
28
+ required: string[];
29
+ additionalProperties: boolean;
30
+ };
31
+ export declare const CollectionSchema: {
32
+ $id: string;
33
+ $schema: string;
34
+ title: string;
35
+ type: string;
36
+ properties: {
37
+ id: {
38
+ type: string;
39
+ };
40
+ name: {
41
+ type: string;
42
+ minLength: number;
43
+ maxLength: number;
44
+ };
45
+ fields: {
46
+ type: string;
47
+ items: {
48
+ $ref: string;
49
+ };
50
+ };
51
+ rls: {
52
+ $ref: string;
53
+ };
54
+ sync: {
55
+ $ref: string;
56
+ };
57
+ system: {
58
+ type: string;
59
+ };
60
+ created: {
61
+ type: string;
62
+ format: string;
63
+ };
64
+ updated: {
65
+ type: string;
66
+ format: string;
67
+ };
68
+ };
69
+ required: string[];
70
+ $defs: {
71
+ FieldSchema: {
72
+ type: string;
73
+ properties: {
74
+ name: {
75
+ type: string;
76
+ };
77
+ type: {
78
+ type: string;
79
+ enum: string[];
80
+ };
81
+ required: {
82
+ type: string;
83
+ };
84
+ unique: {
85
+ type: string;
86
+ };
87
+ default: {};
88
+ values: {
89
+ type: string;
90
+ items: {
91
+ type: string;
92
+ };
93
+ };
94
+ maxLength: {
95
+ type: string;
96
+ };
97
+ min: {
98
+ type: string;
99
+ };
100
+ max: {
101
+ type: string;
102
+ };
103
+ pattern: {
104
+ type: string;
105
+ };
106
+ relationCollection: {
107
+ type: string;
108
+ };
109
+ cascadeDelete: {
110
+ type: string;
111
+ };
112
+ maxSize: {
113
+ type: string;
114
+ };
115
+ mimeTypes: {
116
+ type: string;
117
+ items: {
118
+ type: string;
119
+ };
120
+ };
121
+ index: {
122
+ type: string;
123
+ };
124
+ };
125
+ required: string[];
126
+ };
127
+ RlsPolicy: {
128
+ type: string;
129
+ properties: {
130
+ select: {
131
+ type: string;
132
+ };
133
+ insert: {
134
+ type: string;
135
+ };
136
+ update: {
137
+ type: string;
138
+ };
139
+ delete: {
140
+ type: string;
141
+ };
142
+ };
143
+ };
144
+ SyncConfig: {
145
+ type: string;
146
+ properties: {
147
+ strategy: {
148
+ type: string;
149
+ enum: string[];
150
+ };
151
+ fields: {
152
+ type: string;
153
+ additionalProperties: {
154
+ type: string;
155
+ enum: string[];
156
+ };
157
+ };
158
+ };
159
+ required: string[];
160
+ };
161
+ };
162
+ };
163
+ export declare const UserSchema: {
164
+ $id: string;
165
+ $schema: string;
166
+ title: string;
167
+ type: string;
168
+ properties: {
169
+ id: {
170
+ type: string;
171
+ };
172
+ email: {
173
+ type: string;
174
+ format: string;
175
+ };
176
+ emailVerified: {
177
+ type: string;
178
+ };
179
+ role: {
180
+ type: string;
181
+ enum: string[];
182
+ };
183
+ avatar: {
184
+ type: string;
185
+ format: string;
186
+ };
187
+ created: {
188
+ type: string;
189
+ format: string;
190
+ };
191
+ updated: {
192
+ type: string;
193
+ format: string;
194
+ };
195
+ };
196
+ required: string[];
197
+ };
198
+ export declare const JwtPayloadSchema: {
199
+ $id: string;
200
+ $schema: string;
201
+ title: string;
202
+ type: string;
203
+ properties: {
204
+ sub: {
205
+ type: string;
206
+ };
207
+ iss: {
208
+ type: string;
209
+ const: string;
210
+ };
211
+ aud: {
212
+ type: string;
213
+ };
214
+ iat: {
215
+ type: string;
216
+ };
217
+ exp: {
218
+ type: string;
219
+ };
220
+ role: {
221
+ type: string;
222
+ enum: string[];
223
+ };
224
+ email: {
225
+ type: string;
226
+ format: string;
227
+ };
228
+ application: {
229
+ type: string;
230
+ };
231
+ type: {
232
+ type: string;
233
+ enum: string[];
234
+ };
235
+ jti: {
236
+ type: string;
237
+ };
238
+ };
239
+ required: string[];
240
+ };
241
+ export declare const ApiResponseSchema: {
242
+ $id: string;
243
+ $schema: string;
244
+ title: string;
245
+ type: string;
246
+ properties: {
247
+ success: {
248
+ type: string;
249
+ };
250
+ data: {};
251
+ error: {
252
+ type: string;
253
+ properties: {
254
+ code: {
255
+ type: string;
256
+ };
257
+ message: {
258
+ type: string;
259
+ };
260
+ details: {
261
+ type: string;
262
+ };
263
+ };
264
+ required: string[];
265
+ };
266
+ meta: {
267
+ type: string;
268
+ properties: {
269
+ page: {
270
+ type: string;
271
+ };
272
+ perPage: {
273
+ type: string;
274
+ };
275
+ totalItems: {
276
+ type: string;
277
+ };
278
+ totalPages: {
279
+ type: string;
280
+ };
281
+ };
282
+ };
283
+ };
284
+ required: string[];
285
+ };
286
+ export declare const ErrorCodesSchema: {
287
+ $id: string;
288
+ $schema: string;
289
+ title: string;
290
+ type: string;
291
+ properties: {
292
+ code: {
293
+ type: string;
294
+ enum: string[];
295
+ };
296
+ message: {
297
+ type: string;
298
+ };
299
+ details: {
300
+ type: string;
301
+ };
302
+ };
303
+ required: string[];
304
+ };
305
+ export declare const allSchemas: {
306
+ readonly record: {
307
+ $id: string;
308
+ $schema: string;
309
+ title: string;
310
+ type: string;
311
+ properties: {
312
+ id: {
313
+ type: string;
314
+ description: string;
315
+ };
316
+ collectionId: {
317
+ type: string;
318
+ description: string;
319
+ };
320
+ collectionName: {
321
+ type: string;
322
+ description: string;
323
+ };
324
+ created: {
325
+ type: string;
326
+ format: string;
327
+ };
328
+ updated: {
329
+ type: string;
330
+ format: string;
331
+ };
332
+ };
333
+ required: string[];
334
+ additionalProperties: boolean;
335
+ };
336
+ readonly collection: {
337
+ $id: string;
338
+ $schema: string;
339
+ title: string;
340
+ type: string;
341
+ properties: {
342
+ id: {
343
+ type: string;
344
+ };
345
+ name: {
346
+ type: string;
347
+ minLength: number;
348
+ maxLength: number;
349
+ };
350
+ fields: {
351
+ type: string;
352
+ items: {
353
+ $ref: string;
354
+ };
355
+ };
356
+ rls: {
357
+ $ref: string;
358
+ };
359
+ sync: {
360
+ $ref: string;
361
+ };
362
+ system: {
363
+ type: string;
364
+ };
365
+ created: {
366
+ type: string;
367
+ format: string;
368
+ };
369
+ updated: {
370
+ type: string;
371
+ format: string;
372
+ };
373
+ };
374
+ required: string[];
375
+ $defs: {
376
+ FieldSchema: {
377
+ type: string;
378
+ properties: {
379
+ name: {
380
+ type: string;
381
+ };
382
+ type: {
383
+ type: string;
384
+ enum: string[];
385
+ };
386
+ required: {
387
+ type: string;
388
+ };
389
+ unique: {
390
+ type: string;
391
+ };
392
+ default: {};
393
+ values: {
394
+ type: string;
395
+ items: {
396
+ type: string;
397
+ };
398
+ };
399
+ maxLength: {
400
+ type: string;
401
+ };
402
+ min: {
403
+ type: string;
404
+ };
405
+ max: {
406
+ type: string;
407
+ };
408
+ pattern: {
409
+ type: string;
410
+ };
411
+ relationCollection: {
412
+ type: string;
413
+ };
414
+ cascadeDelete: {
415
+ type: string;
416
+ };
417
+ maxSize: {
418
+ type: string;
419
+ };
420
+ mimeTypes: {
421
+ type: string;
422
+ items: {
423
+ type: string;
424
+ };
425
+ };
426
+ index: {
427
+ type: string;
428
+ };
429
+ };
430
+ required: string[];
431
+ };
432
+ RlsPolicy: {
433
+ type: string;
434
+ properties: {
435
+ select: {
436
+ type: string;
437
+ };
438
+ insert: {
439
+ type: string;
440
+ };
441
+ update: {
442
+ type: string;
443
+ };
444
+ delete: {
445
+ type: string;
446
+ };
447
+ };
448
+ };
449
+ SyncConfig: {
450
+ type: string;
451
+ properties: {
452
+ strategy: {
453
+ type: string;
454
+ enum: string[];
455
+ };
456
+ fields: {
457
+ type: string;
458
+ additionalProperties: {
459
+ type: string;
460
+ enum: string[];
461
+ };
462
+ };
463
+ };
464
+ required: string[];
465
+ };
466
+ };
467
+ };
468
+ readonly user: {
469
+ $id: string;
470
+ $schema: string;
471
+ title: string;
472
+ type: string;
473
+ properties: {
474
+ id: {
475
+ type: string;
476
+ };
477
+ email: {
478
+ type: string;
479
+ format: string;
480
+ };
481
+ emailVerified: {
482
+ type: string;
483
+ };
484
+ role: {
485
+ type: string;
486
+ enum: string[];
487
+ };
488
+ avatar: {
489
+ type: string;
490
+ format: string;
491
+ };
492
+ created: {
493
+ type: string;
494
+ format: string;
495
+ };
496
+ updated: {
497
+ type: string;
498
+ format: string;
499
+ };
500
+ };
501
+ required: string[];
502
+ };
503
+ readonly jwtPayload: {
504
+ $id: string;
505
+ $schema: string;
506
+ title: string;
507
+ type: string;
508
+ properties: {
509
+ sub: {
510
+ type: string;
511
+ };
512
+ iss: {
513
+ type: string;
514
+ const: string;
515
+ };
516
+ aud: {
517
+ type: string;
518
+ };
519
+ iat: {
520
+ type: string;
521
+ };
522
+ exp: {
523
+ type: string;
524
+ };
525
+ role: {
526
+ type: string;
527
+ enum: string[];
528
+ };
529
+ email: {
530
+ type: string;
531
+ format: string;
532
+ };
533
+ application: {
534
+ type: string;
535
+ };
536
+ type: {
537
+ type: string;
538
+ enum: string[];
539
+ };
540
+ jti: {
541
+ type: string;
542
+ };
543
+ };
544
+ required: string[];
545
+ };
546
+ readonly apiResponse: {
547
+ $id: string;
548
+ $schema: string;
549
+ title: string;
550
+ type: string;
551
+ properties: {
552
+ success: {
553
+ type: string;
554
+ };
555
+ data: {};
556
+ error: {
557
+ type: string;
558
+ properties: {
559
+ code: {
560
+ type: string;
561
+ };
562
+ message: {
563
+ type: string;
564
+ };
565
+ details: {
566
+ type: string;
567
+ };
568
+ };
569
+ required: string[];
570
+ };
571
+ meta: {
572
+ type: string;
573
+ properties: {
574
+ page: {
575
+ type: string;
576
+ };
577
+ perPage: {
578
+ type: string;
579
+ };
580
+ totalItems: {
581
+ type: string;
582
+ };
583
+ totalPages: {
584
+ type: string;
585
+ };
586
+ };
587
+ };
588
+ };
589
+ required: string[];
590
+ };
591
+ readonly errorCodes: {
592
+ $id: string;
593
+ $schema: string;
594
+ title: string;
595
+ type: string;
596
+ properties: {
597
+ code: {
598
+ type: string;
599
+ enum: string[];
600
+ };
601
+ message: {
602
+ type: string;
603
+ };
604
+ details: {
605
+ type: string;
606
+ };
607
+ };
608
+ required: string[];
609
+ };
610
+ };
611
+ export type SchemaName = keyof typeof allSchemas;
612
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcxB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuE5B,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAetB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;CA4C5B,CAAC;AAIF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC"}