@hyper-fetch/db 0.0.0-stage → 1.0.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 (141) hide show
  1. package/README.md +180 -2
  2. package/__tests__/e2e/db.e2e.spec.ts +269 -0
  3. package/__tests__/features/connection/connection.spec.ts +23 -0
  4. package/__tests__/features/model/live-query.model.spec.ts +320 -0
  5. package/__tests__/features/operators/operators.spec.ts +113 -0
  6. package/__tests__/features/runtime/runtime.spec.ts +185 -0
  7. package/__tests__/features/serializer/serializer.spec.ts +73 -0
  8. package/__tests__/features/store/store.spec.ts +147 -0
  9. package/__tests__/features/types/db.types.spec.ts +337 -0
  10. package/__tests__/integration/audit.spec.ts +639 -0
  11. package/__tests__/integration/competitors.spec.ts +393 -0
  12. package/__tests__/integration/convergence.model.spec.ts +162 -0
  13. package/__tests__/integration/edge-cases.spec.ts +465 -0
  14. package/__tests__/integration/errors.spec.ts +178 -0
  15. package/__tests__/integration/infinite.model.spec.ts +142 -0
  16. package/__tests__/integration/infinite.spec.ts +290 -0
  17. package/__tests__/integration/inspect.spec.ts +103 -0
  18. package/__tests__/integration/joins-many.spec.ts +177 -0
  19. package/__tests__/integration/joins.spec.ts +179 -0
  20. package/__tests__/integration/key-loaders.spec.ts +196 -0
  21. package/__tests__/integration/links.spec.ts +105 -0
  22. package/__tests__/integration/mutations.spec.ts +337 -0
  23. package/__tests__/integration/normalize.spec.ts +80 -0
  24. package/__tests__/integration/offline.spec.ts +479 -0
  25. package/__tests__/integration/queries.spec.ts +513 -0
  26. package/__tests__/integration/races.spec.ts +127 -0
  27. package/__tests__/integration/server-operators.spec.ts +123 -0
  28. package/__tests__/integration/ssr.spec.ts +111 -0
  29. package/__tests__/integration/syncs.spec.ts +564 -0
  30. package/__tests__/integration/transactions.spec.ts +344 -0
  31. package/__tests__/integration/windows.spec.ts +192 -0
  32. package/__tests__/tsconfig.json +11 -0
  33. package/__tests__/type-budget/budget.fixture.ts +2476 -0
  34. package/__tests__/type-budget/tsconfig.json +4 -0
  35. package/__tests__/utils/fixtures.ts +225 -0
  36. package/__tests__/utils/random.ts +19 -0
  37. package/__tests__/vitest.setup.ts +11 -0
  38. package/dist/collection/collection.d.ts +111 -0
  39. package/dist/collection/collection.d.ts.map +1 -0
  40. package/dist/collection/collection.types.d.ts +316 -0
  41. package/dist/collection/collection.types.d.ts.map +1 -0
  42. package/dist/collection/resource.types.d.ts +77 -0
  43. package/dist/collection/resource.types.d.ts.map +1 -0
  44. package/dist/db/collection.runtime.d.ts +98 -0
  45. package/dist/db/collection.runtime.d.ts.map +1 -0
  46. package/dist/db/db.d.ts +154 -0
  47. package/dist/db/db.d.ts.map +1 -0
  48. package/dist/db/db.runtime.d.ts +114 -0
  49. package/dist/db/db.runtime.d.ts.map +1 -0
  50. package/dist/db/db.types.d.ts +162 -0
  51. package/dist/db/db.types.d.ts.map +1 -0
  52. package/dist/graphql/connection.d.ts +25 -0
  53. package/dist/graphql/connection.d.ts.map +1 -0
  54. package/dist/index.d.ts +17 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.mjs +4220 -0
  57. package/dist/index.mjs.map +1 -0
  58. package/dist/mutation/mutation.d.ts +136 -0
  59. package/dist/mutation/mutation.d.ts.map +1 -0
  60. package/dist/mutation/mutation.errors.d.ts +6 -0
  61. package/dist/mutation/mutation.errors.d.ts.map +1 -0
  62. package/dist/mutation/mutation.utils.d.ts +35 -0
  63. package/dist/mutation/mutation.utils.d.ts.map +1 -0
  64. package/dist/operators/operators.d.ts +33 -0
  65. package/dist/operators/operators.d.ts.map +1 -0
  66. package/dist/operators/operators.types.d.ts +68 -0
  67. package/dist/operators/operators.types.d.ts.map +1 -0
  68. package/dist/operators/operators.utils.d.ts +19 -0
  69. package/dist/operators/operators.utils.d.ts.map +1 -0
  70. package/dist/persistence/persistence.d.ts +42 -0
  71. package/dist/persistence/persistence.d.ts.map +1 -0
  72. package/dist/persistence/serializer.d.ts +23 -0
  73. package/dist/persistence/serializer.d.ts.map +1 -0
  74. package/dist/persistence/snapshot.d.ts +29 -0
  75. package/dist/persistence/snapshot.d.ts.map +1 -0
  76. package/dist/persistence/tabs.d.ts +53 -0
  77. package/dist/persistence/tabs.d.ts.map +1 -0
  78. package/dist/query/infinite-query.d.ts +59 -0
  79. package/dist/query/infinite-query.d.ts.map +1 -0
  80. package/dist/query/live-query.d.ts +85 -0
  81. package/dist/query/live-query.d.ts.map +1 -0
  82. package/dist/query/planner.d.ts +57 -0
  83. package/dist/query/planner.d.ts.map +1 -0
  84. package/dist/query/query.d.ts +155 -0
  85. package/dist/query/query.d.ts.map +1 -0
  86. package/dist/query/query.types.d.ts +71 -0
  87. package/dist/query/query.types.d.ts.map +1 -0
  88. package/dist/schema/schema.types.d.ts +33 -0
  89. package/dist/schema/schema.types.d.ts.map +1 -0
  90. package/dist/store/store.d.ts +76 -0
  91. package/dist/store/store.d.ts.map +1 -0
  92. package/dist/store/store.types.d.ts +27 -0
  93. package/dist/store/store.types.d.ts.map +1 -0
  94. package/dist/subset/base-subset.d.ts +66 -0
  95. package/dist/subset/base-subset.d.ts.map +1 -0
  96. package/dist/subset/key-subset.d.ts +23 -0
  97. package/dist/subset/key-subset.d.ts.map +1 -0
  98. package/dist/subset/list-subset.d.ts +63 -0
  99. package/dist/subset/list-subset.d.ts.map +1 -0
  100. package/dist/sync/sync.d.ts +42 -0
  101. package/dist/sync/sync.d.ts.map +1 -0
  102. package/dist/utils/request.utils.d.ts +11 -0
  103. package/dist/utils/request.utils.d.ts.map +1 -0
  104. package/package.json +71 -4
  105. package/project.json +4 -0
  106. package/scripts/docs-typescript.mjs +24 -0
  107. package/scripts/type-budget.mjs +37 -0
  108. package/src/collection/collection.ts +330 -0
  109. package/src/collection/collection.types.ts +383 -0
  110. package/src/collection/resource.types.ts +114 -0
  111. package/src/db/collection.runtime.ts +572 -0
  112. package/src/db/db.runtime.ts +537 -0
  113. package/src/db/db.ts +451 -0
  114. package/src/db/db.types.ts +157 -0
  115. package/src/graphql/connection.ts +23 -0
  116. package/src/index.ts +16 -0
  117. package/src/mutation/mutation.errors.ts +7 -0
  118. package/src/mutation/mutation.ts +776 -0
  119. package/src/mutation/mutation.utils.ts +58 -0
  120. package/src/operators/operators.ts +90 -0
  121. package/src/operators/operators.types.ts +67 -0
  122. package/src/operators/operators.utils.ts +169 -0
  123. package/src/persistence/persistence.ts +168 -0
  124. package/src/persistence/serializer.ts +123 -0
  125. package/src/persistence/snapshot.ts +76 -0
  126. package/src/persistence/tabs.ts +86 -0
  127. package/src/query/infinite-query.ts +206 -0
  128. package/src/query/live-query.ts +552 -0
  129. package/src/query/planner.ts +199 -0
  130. package/src/query/query.ts +319 -0
  131. package/src/query/query.types.ts +90 -0
  132. package/src/schema/schema.types.ts +29 -0
  133. package/src/store/store.ts +300 -0
  134. package/src/store/store.types.ts +17 -0
  135. package/src/subset/base-subset.ts +169 -0
  136. package/src/subset/key-subset.ts +44 -0
  137. package/src/subset/list-subset.ts +328 -0
  138. package/src/sync/sync.ts +99 -0
  139. package/src/utils/request.utils.ts +67 -0
  140. package/tsconfig.json +12 -0
  141. package/vite.config.ts +71 -0
@@ -0,0 +1,2476 @@
1
+ /* oxlint-disable max-lines -- a generated fixture of 50 collections */
2
+ /* A db of 50 collections that uses every typed feature. `scripts/type-budget.mjs` type-checks it and fails when
3
+ * the instantiations grow past the budget, so a type change that slows `tsc` for large apps is caught in CI. */
4
+ import { Client } from "@hyper-fetch/core";
5
+ import { and, collection, createDb, eq, gt, inArray, op, rowType } from "@hyper-fetch/db";
6
+
7
+ const client = new Client({ url: "http://localhost:5000" });
8
+
9
+ type Row0 = {
10
+ id: number;
11
+ teamId: number;
12
+ parentId: number | null;
13
+ title: string;
14
+ likes: number;
15
+ createdAt: string;
16
+ f0: boolean;
17
+ };
18
+ type Row1 = {
19
+ id: number;
20
+ teamId: number;
21
+ parentId: number | null;
22
+ title: string;
23
+ likes: number;
24
+ createdAt: string;
25
+ f1: boolean;
26
+ };
27
+ type Row2 = {
28
+ id: number;
29
+ teamId: number;
30
+ parentId: number | null;
31
+ title: string;
32
+ likes: number;
33
+ createdAt: string;
34
+ f2: boolean;
35
+ };
36
+ type Row3 = {
37
+ id: number;
38
+ teamId: number;
39
+ parentId: number | null;
40
+ title: string;
41
+ likes: number;
42
+ createdAt: string;
43
+ f3: boolean;
44
+ };
45
+ type Row4 = {
46
+ id: number;
47
+ teamId: number;
48
+ parentId: number | null;
49
+ title: string;
50
+ likes: number;
51
+ createdAt: string;
52
+ f4: boolean;
53
+ };
54
+ type Row5 = {
55
+ id: number;
56
+ teamId: number;
57
+ parentId: number | null;
58
+ title: string;
59
+ likes: number;
60
+ createdAt: string;
61
+ f5: boolean;
62
+ };
63
+ type Row6 = {
64
+ id: number;
65
+ teamId: number;
66
+ parentId: number | null;
67
+ title: string;
68
+ likes: number;
69
+ createdAt: string;
70
+ f6: boolean;
71
+ };
72
+ type Row7 = {
73
+ id: number;
74
+ teamId: number;
75
+ parentId: number | null;
76
+ title: string;
77
+ likes: number;
78
+ createdAt: string;
79
+ f7: boolean;
80
+ };
81
+ type Row8 = {
82
+ id: number;
83
+ teamId: number;
84
+ parentId: number | null;
85
+ title: string;
86
+ likes: number;
87
+ createdAt: string;
88
+ f8: boolean;
89
+ };
90
+ type Row9 = {
91
+ id: number;
92
+ teamId: number;
93
+ parentId: number | null;
94
+ title: string;
95
+ likes: number;
96
+ createdAt: string;
97
+ f9: boolean;
98
+ };
99
+ type Row10 = {
100
+ id: number;
101
+ teamId: number;
102
+ parentId: number | null;
103
+ title: string;
104
+ likes: number;
105
+ createdAt: string;
106
+ f10: boolean;
107
+ };
108
+ type Row11 = {
109
+ id: number;
110
+ teamId: number;
111
+ parentId: number | null;
112
+ title: string;
113
+ likes: number;
114
+ createdAt: string;
115
+ f11: boolean;
116
+ };
117
+ type Row12 = {
118
+ id: number;
119
+ teamId: number;
120
+ parentId: number | null;
121
+ title: string;
122
+ likes: number;
123
+ createdAt: string;
124
+ f12: boolean;
125
+ };
126
+ type Row13 = {
127
+ id: number;
128
+ teamId: number;
129
+ parentId: number | null;
130
+ title: string;
131
+ likes: number;
132
+ createdAt: string;
133
+ f13: boolean;
134
+ };
135
+ type Row14 = {
136
+ id: number;
137
+ teamId: number;
138
+ parentId: number | null;
139
+ title: string;
140
+ likes: number;
141
+ createdAt: string;
142
+ f14: boolean;
143
+ };
144
+ type Row15 = {
145
+ id: number;
146
+ teamId: number;
147
+ parentId: number | null;
148
+ title: string;
149
+ likes: number;
150
+ createdAt: string;
151
+ f15: boolean;
152
+ };
153
+ type Row16 = {
154
+ id: number;
155
+ teamId: number;
156
+ parentId: number | null;
157
+ title: string;
158
+ likes: number;
159
+ createdAt: string;
160
+ f16: boolean;
161
+ };
162
+ type Row17 = {
163
+ id: number;
164
+ teamId: number;
165
+ parentId: number | null;
166
+ title: string;
167
+ likes: number;
168
+ createdAt: string;
169
+ f17: boolean;
170
+ };
171
+ type Row18 = {
172
+ id: number;
173
+ teamId: number;
174
+ parentId: number | null;
175
+ title: string;
176
+ likes: number;
177
+ createdAt: string;
178
+ f18: boolean;
179
+ };
180
+ type Row19 = {
181
+ id: number;
182
+ teamId: number;
183
+ parentId: number | null;
184
+ title: string;
185
+ likes: number;
186
+ createdAt: string;
187
+ f19: boolean;
188
+ };
189
+ type Row20 = {
190
+ id: number;
191
+ teamId: number;
192
+ parentId: number | null;
193
+ title: string;
194
+ likes: number;
195
+ createdAt: string;
196
+ f20: boolean;
197
+ };
198
+ type Row21 = {
199
+ id: number;
200
+ teamId: number;
201
+ parentId: number | null;
202
+ title: string;
203
+ likes: number;
204
+ createdAt: string;
205
+ f21: boolean;
206
+ };
207
+ type Row22 = {
208
+ id: number;
209
+ teamId: number;
210
+ parentId: number | null;
211
+ title: string;
212
+ likes: number;
213
+ createdAt: string;
214
+ f22: boolean;
215
+ };
216
+ type Row23 = {
217
+ id: number;
218
+ teamId: number;
219
+ parentId: number | null;
220
+ title: string;
221
+ likes: number;
222
+ createdAt: string;
223
+ f23: boolean;
224
+ };
225
+ type Row24 = {
226
+ id: number;
227
+ teamId: number;
228
+ parentId: number | null;
229
+ title: string;
230
+ likes: number;
231
+ createdAt: string;
232
+ f24: boolean;
233
+ };
234
+ type Row25 = {
235
+ id: number;
236
+ teamId: number;
237
+ parentId: number | null;
238
+ title: string;
239
+ likes: number;
240
+ createdAt: string;
241
+ f25: boolean;
242
+ };
243
+ type Row26 = {
244
+ id: number;
245
+ teamId: number;
246
+ parentId: number | null;
247
+ title: string;
248
+ likes: number;
249
+ createdAt: string;
250
+ f26: boolean;
251
+ };
252
+ type Row27 = {
253
+ id: number;
254
+ teamId: number;
255
+ parentId: number | null;
256
+ title: string;
257
+ likes: number;
258
+ createdAt: string;
259
+ f27: boolean;
260
+ };
261
+ type Row28 = {
262
+ id: number;
263
+ teamId: number;
264
+ parentId: number | null;
265
+ title: string;
266
+ likes: number;
267
+ createdAt: string;
268
+ f28: boolean;
269
+ };
270
+ type Row29 = {
271
+ id: number;
272
+ teamId: number;
273
+ parentId: number | null;
274
+ title: string;
275
+ likes: number;
276
+ createdAt: string;
277
+ f29: boolean;
278
+ };
279
+ type Row30 = {
280
+ id: number;
281
+ teamId: number;
282
+ parentId: number | null;
283
+ title: string;
284
+ likes: number;
285
+ createdAt: string;
286
+ f30: boolean;
287
+ };
288
+ type Row31 = {
289
+ id: number;
290
+ teamId: number;
291
+ parentId: number | null;
292
+ title: string;
293
+ likes: number;
294
+ createdAt: string;
295
+ f31: boolean;
296
+ };
297
+ type Row32 = {
298
+ id: number;
299
+ teamId: number;
300
+ parentId: number | null;
301
+ title: string;
302
+ likes: number;
303
+ createdAt: string;
304
+ f32: boolean;
305
+ };
306
+ type Row33 = {
307
+ id: number;
308
+ teamId: number;
309
+ parentId: number | null;
310
+ title: string;
311
+ likes: number;
312
+ createdAt: string;
313
+ f33: boolean;
314
+ };
315
+ type Row34 = {
316
+ id: number;
317
+ teamId: number;
318
+ parentId: number | null;
319
+ title: string;
320
+ likes: number;
321
+ createdAt: string;
322
+ f34: boolean;
323
+ };
324
+ type Row35 = {
325
+ id: number;
326
+ teamId: number;
327
+ parentId: number | null;
328
+ title: string;
329
+ likes: number;
330
+ createdAt: string;
331
+ f35: boolean;
332
+ };
333
+ type Row36 = {
334
+ id: number;
335
+ teamId: number;
336
+ parentId: number | null;
337
+ title: string;
338
+ likes: number;
339
+ createdAt: string;
340
+ f36: boolean;
341
+ };
342
+ type Row37 = {
343
+ id: number;
344
+ teamId: number;
345
+ parentId: number | null;
346
+ title: string;
347
+ likes: number;
348
+ createdAt: string;
349
+ f37: boolean;
350
+ };
351
+ type Row38 = {
352
+ id: number;
353
+ teamId: number;
354
+ parentId: number | null;
355
+ title: string;
356
+ likes: number;
357
+ createdAt: string;
358
+ f38: boolean;
359
+ };
360
+ type Row39 = {
361
+ id: number;
362
+ teamId: number;
363
+ parentId: number | null;
364
+ title: string;
365
+ likes: number;
366
+ createdAt: string;
367
+ f39: boolean;
368
+ };
369
+ type Row40 = {
370
+ id: number;
371
+ teamId: number;
372
+ parentId: number | null;
373
+ title: string;
374
+ likes: number;
375
+ createdAt: string;
376
+ f40: boolean;
377
+ };
378
+ type Row41 = {
379
+ id: number;
380
+ teamId: number;
381
+ parentId: number | null;
382
+ title: string;
383
+ likes: number;
384
+ createdAt: string;
385
+ f41: boolean;
386
+ };
387
+ type Row42 = {
388
+ id: number;
389
+ teamId: number;
390
+ parentId: number | null;
391
+ title: string;
392
+ likes: number;
393
+ createdAt: string;
394
+ f42: boolean;
395
+ };
396
+ type Row43 = {
397
+ id: number;
398
+ teamId: number;
399
+ parentId: number | null;
400
+ title: string;
401
+ likes: number;
402
+ createdAt: string;
403
+ f43: boolean;
404
+ };
405
+ type Row44 = {
406
+ id: number;
407
+ teamId: number;
408
+ parentId: number | null;
409
+ title: string;
410
+ likes: number;
411
+ createdAt: string;
412
+ f44: boolean;
413
+ };
414
+ type Row45 = {
415
+ id: number;
416
+ teamId: number;
417
+ parentId: number | null;
418
+ title: string;
419
+ likes: number;
420
+ createdAt: string;
421
+ f45: boolean;
422
+ };
423
+ type Row46 = {
424
+ id: number;
425
+ teamId: number;
426
+ parentId: number | null;
427
+ title: string;
428
+ likes: number;
429
+ createdAt: string;
430
+ f46: boolean;
431
+ };
432
+ type Row47 = {
433
+ id: number;
434
+ teamId: number;
435
+ parentId: number | null;
436
+ title: string;
437
+ likes: number;
438
+ createdAt: string;
439
+ f47: boolean;
440
+ };
441
+ type Row48 = {
442
+ id: number;
443
+ teamId: number;
444
+ parentId: number | null;
445
+ title: string;
446
+ likes: number;
447
+ createdAt: string;
448
+ f48: boolean;
449
+ };
450
+ type Row49 = {
451
+ id: number;
452
+ teamId: number;
453
+ parentId: number | null;
454
+ title: string;
455
+ likes: number;
456
+ createdAt: string;
457
+ f49: boolean;
458
+ };
459
+
460
+ const list0 = client.createRequest<{
461
+ response: { items: Row0[]; next: string | null };
462
+ queryParams?: { cursor?: string; q?: string; likes?: number };
463
+ }>()({ endpoint: "/teams/:teamId/c0" });
464
+ const one0 = client.createRequest<{ response: Row0 }>()({
465
+ endpoint: "/c0/:id",
466
+ });
467
+ const save0 = client.createRequest<{
468
+ response: Row0;
469
+ payload: Partial<Row0>;
470
+ }>()({ endpoint: "/c0/:id", method: "PATCH" });
471
+ const C0 = collection(rowType<Row0>(), { key: "id" })
472
+ .load(list0, {
473
+ rows: (response) => response.items,
474
+ cursor: (response) => response.next,
475
+ page: (cursor) => ({ queryParams: { cursor } }),
476
+ where: {
477
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
478
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
479
+ title: { search: (q: string) => ({ queryParams: { q } }) },
480
+ },
481
+ orderBy: { createdAt: true },
482
+ })
483
+ .load(one0, { byKey: (id) => ({ params: { id } }) })
484
+ .mutate({
485
+ update: {
486
+ request: save0,
487
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
488
+ },
489
+ });
490
+ const list1 = client.createRequest<{
491
+ response: { items: Row1[]; next: string | null };
492
+ queryParams?: { cursor?: string; q?: string; likes?: number };
493
+ }>()({ endpoint: "/teams/:teamId/c1" });
494
+ const one1 = client.createRequest<{ response: Row1 }>()({
495
+ endpoint: "/c1/:id",
496
+ });
497
+ const save1 = client.createRequest<{
498
+ response: Row1;
499
+ payload: Partial<Row1>;
500
+ }>()({ endpoint: "/c1/:id", method: "PATCH" });
501
+ const C1 = collection(rowType<Row1>(), { key: "id" })
502
+ .load(list1, {
503
+ rows: (response) => response.items,
504
+ cursor: (response) => response.next,
505
+ page: (cursor) => ({ queryParams: { cursor } }),
506
+ where: {
507
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
508
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
509
+ title: { search: (q: string) => ({ queryParams: { q } }) },
510
+ },
511
+ orderBy: { createdAt: true },
512
+ })
513
+ .load(one1, { byKey: (id) => ({ params: { id } }) })
514
+ .mutate({
515
+ update: {
516
+ request: save1,
517
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
518
+ },
519
+ });
520
+ const list2 = client.createRequest<{
521
+ response: { items: Row2[]; next: string | null };
522
+ queryParams?: { cursor?: string; q?: string; likes?: number };
523
+ }>()({ endpoint: "/teams/:teamId/c2" });
524
+ const one2 = client.createRequest<{ response: Row2 }>()({
525
+ endpoint: "/c2/:id",
526
+ });
527
+ const save2 = client.createRequest<{
528
+ response: Row2;
529
+ payload: Partial<Row2>;
530
+ }>()({ endpoint: "/c2/:id", method: "PATCH" });
531
+ const C2 = collection(rowType<Row2>(), { key: "id" })
532
+ .load(list2, {
533
+ rows: (response) => response.items,
534
+ cursor: (response) => response.next,
535
+ page: (cursor) => ({ queryParams: { cursor } }),
536
+ where: {
537
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
538
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
539
+ title: { search: (q: string) => ({ queryParams: { q } }) },
540
+ },
541
+ orderBy: { createdAt: true },
542
+ })
543
+ .load(one2, { byKey: (id) => ({ params: { id } }) })
544
+ .mutate({
545
+ update: {
546
+ request: save2,
547
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
548
+ },
549
+ });
550
+ const list3 = client.createRequest<{
551
+ response: { items: Row3[]; next: string | null };
552
+ queryParams?: { cursor?: string; q?: string; likes?: number };
553
+ }>()({ endpoint: "/teams/:teamId/c3" });
554
+ const one3 = client.createRequest<{ response: Row3 }>()({
555
+ endpoint: "/c3/:id",
556
+ });
557
+ const save3 = client.createRequest<{
558
+ response: Row3;
559
+ payload: Partial<Row3>;
560
+ }>()({ endpoint: "/c3/:id", method: "PATCH" });
561
+ const C3 = collection(rowType<Row3>(), { key: "id" })
562
+ .load(list3, {
563
+ rows: (response) => response.items,
564
+ cursor: (response) => response.next,
565
+ page: (cursor) => ({ queryParams: { cursor } }),
566
+ where: {
567
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
568
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
569
+ title: { search: (q: string) => ({ queryParams: { q } }) },
570
+ },
571
+ orderBy: { createdAt: true },
572
+ })
573
+ .load(one3, { byKey: (id) => ({ params: { id } }) })
574
+ .mutate({
575
+ update: {
576
+ request: save3,
577
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
578
+ },
579
+ });
580
+ const list4 = client.createRequest<{
581
+ response: { items: Row4[]; next: string | null };
582
+ queryParams?: { cursor?: string; q?: string; likes?: number };
583
+ }>()({ endpoint: "/teams/:teamId/c4" });
584
+ const one4 = client.createRequest<{ response: Row4 }>()({
585
+ endpoint: "/c4/:id",
586
+ });
587
+ const save4 = client.createRequest<{
588
+ response: Row4;
589
+ payload: Partial<Row4>;
590
+ }>()({ endpoint: "/c4/:id", method: "PATCH" });
591
+ const C4 = collection(rowType<Row4>(), { key: "id" })
592
+ .load(list4, {
593
+ rows: (response) => response.items,
594
+ cursor: (response) => response.next,
595
+ page: (cursor) => ({ queryParams: { cursor } }),
596
+ where: {
597
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
598
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
599
+ title: { search: (q: string) => ({ queryParams: { q } }) },
600
+ },
601
+ orderBy: { createdAt: true },
602
+ })
603
+ .load(one4, { byKey: (id) => ({ params: { id } }) })
604
+ .mutate({
605
+ update: {
606
+ request: save4,
607
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
608
+ },
609
+ });
610
+ const list5 = client.createRequest<{
611
+ response: { items: Row5[]; next: string | null };
612
+ queryParams?: { cursor?: string; q?: string; likes?: number };
613
+ }>()({ endpoint: "/teams/:teamId/c5" });
614
+ const one5 = client.createRequest<{ response: Row5 }>()({
615
+ endpoint: "/c5/:id",
616
+ });
617
+ const save5 = client.createRequest<{
618
+ response: Row5;
619
+ payload: Partial<Row5>;
620
+ }>()({ endpoint: "/c5/:id", method: "PATCH" });
621
+ const C5 = collection(rowType<Row5>(), { key: "id" })
622
+ .load(list5, {
623
+ rows: (response) => response.items,
624
+ cursor: (response) => response.next,
625
+ page: (cursor) => ({ queryParams: { cursor } }),
626
+ where: {
627
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
628
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
629
+ title: { search: (q: string) => ({ queryParams: { q } }) },
630
+ },
631
+ orderBy: { createdAt: true },
632
+ })
633
+ .load(one5, { byKey: (id) => ({ params: { id } }) })
634
+ .mutate({
635
+ update: {
636
+ request: save5,
637
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
638
+ },
639
+ });
640
+ const list6 = client.createRequest<{
641
+ response: { items: Row6[]; next: string | null };
642
+ queryParams?: { cursor?: string; q?: string; likes?: number };
643
+ }>()({ endpoint: "/teams/:teamId/c6" });
644
+ const one6 = client.createRequest<{ response: Row6 }>()({
645
+ endpoint: "/c6/:id",
646
+ });
647
+ const save6 = client.createRequest<{
648
+ response: Row6;
649
+ payload: Partial<Row6>;
650
+ }>()({ endpoint: "/c6/:id", method: "PATCH" });
651
+ const C6 = collection(rowType<Row6>(), { key: "id" })
652
+ .load(list6, {
653
+ rows: (response) => response.items,
654
+ cursor: (response) => response.next,
655
+ page: (cursor) => ({ queryParams: { cursor } }),
656
+ where: {
657
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
658
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
659
+ title: { search: (q: string) => ({ queryParams: { q } }) },
660
+ },
661
+ orderBy: { createdAt: true },
662
+ })
663
+ .load(one6, { byKey: (id) => ({ params: { id } }) })
664
+ .mutate({
665
+ update: {
666
+ request: save6,
667
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
668
+ },
669
+ });
670
+ const list7 = client.createRequest<{
671
+ response: { items: Row7[]; next: string | null };
672
+ queryParams?: { cursor?: string; q?: string; likes?: number };
673
+ }>()({ endpoint: "/teams/:teamId/c7" });
674
+ const one7 = client.createRequest<{ response: Row7 }>()({
675
+ endpoint: "/c7/:id",
676
+ });
677
+ const save7 = client.createRequest<{
678
+ response: Row7;
679
+ payload: Partial<Row7>;
680
+ }>()({ endpoint: "/c7/:id", method: "PATCH" });
681
+ const C7 = collection(rowType<Row7>(), { key: "id" })
682
+ .load(list7, {
683
+ rows: (response) => response.items,
684
+ cursor: (response) => response.next,
685
+ page: (cursor) => ({ queryParams: { cursor } }),
686
+ where: {
687
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
688
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
689
+ title: { search: (q: string) => ({ queryParams: { q } }) },
690
+ },
691
+ orderBy: { createdAt: true },
692
+ })
693
+ .load(one7, { byKey: (id) => ({ params: { id } }) })
694
+ .mutate({
695
+ update: {
696
+ request: save7,
697
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
698
+ },
699
+ });
700
+ const list8 = client.createRequest<{
701
+ response: { items: Row8[]; next: string | null };
702
+ queryParams?: { cursor?: string; q?: string; likes?: number };
703
+ }>()({ endpoint: "/teams/:teamId/c8" });
704
+ const one8 = client.createRequest<{ response: Row8 }>()({
705
+ endpoint: "/c8/:id",
706
+ });
707
+ const save8 = client.createRequest<{
708
+ response: Row8;
709
+ payload: Partial<Row8>;
710
+ }>()({ endpoint: "/c8/:id", method: "PATCH" });
711
+ const C8 = collection(rowType<Row8>(), { key: "id" })
712
+ .load(list8, {
713
+ rows: (response) => response.items,
714
+ cursor: (response) => response.next,
715
+ page: (cursor) => ({ queryParams: { cursor } }),
716
+ where: {
717
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
718
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
719
+ title: { search: (q: string) => ({ queryParams: { q } }) },
720
+ },
721
+ orderBy: { createdAt: true },
722
+ })
723
+ .load(one8, { byKey: (id) => ({ params: { id } }) })
724
+ .mutate({
725
+ update: {
726
+ request: save8,
727
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
728
+ },
729
+ });
730
+ const list9 = client.createRequest<{
731
+ response: { items: Row9[]; next: string | null };
732
+ queryParams?: { cursor?: string; q?: string; likes?: number };
733
+ }>()({ endpoint: "/teams/:teamId/c9" });
734
+ const one9 = client.createRequest<{ response: Row9 }>()({
735
+ endpoint: "/c9/:id",
736
+ });
737
+ const save9 = client.createRequest<{
738
+ response: Row9;
739
+ payload: Partial<Row9>;
740
+ }>()({ endpoint: "/c9/:id", method: "PATCH" });
741
+ const C9 = collection(rowType<Row9>(), { key: "id" })
742
+ .load(list9, {
743
+ rows: (response) => response.items,
744
+ cursor: (response) => response.next,
745
+ page: (cursor) => ({ queryParams: { cursor } }),
746
+ where: {
747
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
748
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
749
+ title: { search: (q: string) => ({ queryParams: { q } }) },
750
+ },
751
+ orderBy: { createdAt: true },
752
+ })
753
+ .load(one9, { byKey: (id) => ({ params: { id } }) })
754
+ .mutate({
755
+ update: {
756
+ request: save9,
757
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
758
+ },
759
+ });
760
+ const list10 = client.createRequest<{
761
+ response: { items: Row10[]; next: string | null };
762
+ queryParams?: { cursor?: string; q?: string; likes?: number };
763
+ }>()({ endpoint: "/teams/:teamId/c10" });
764
+ const one10 = client.createRequest<{ response: Row10 }>()({
765
+ endpoint: "/c10/:id",
766
+ });
767
+ const save10 = client.createRequest<{
768
+ response: Row10;
769
+ payload: Partial<Row10>;
770
+ }>()({ endpoint: "/c10/:id", method: "PATCH" });
771
+ const C10 = collection(rowType<Row10>(), { key: "id" })
772
+ .load(list10, {
773
+ rows: (response) => response.items,
774
+ cursor: (response) => response.next,
775
+ page: (cursor) => ({ queryParams: { cursor } }),
776
+ where: {
777
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
778
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
779
+ title: { search: (q: string) => ({ queryParams: { q } }) },
780
+ },
781
+ orderBy: { createdAt: true },
782
+ })
783
+ .load(one10, { byKey: (id) => ({ params: { id } }) })
784
+ .mutate({
785
+ update: {
786
+ request: save10,
787
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
788
+ },
789
+ });
790
+ const list11 = client.createRequest<{
791
+ response: { items: Row11[]; next: string | null };
792
+ queryParams?: { cursor?: string; q?: string; likes?: number };
793
+ }>()({ endpoint: "/teams/:teamId/c11" });
794
+ const one11 = client.createRequest<{ response: Row11 }>()({
795
+ endpoint: "/c11/:id",
796
+ });
797
+ const save11 = client.createRequest<{
798
+ response: Row11;
799
+ payload: Partial<Row11>;
800
+ }>()({ endpoint: "/c11/:id", method: "PATCH" });
801
+ const C11 = collection(rowType<Row11>(), { key: "id" })
802
+ .load(list11, {
803
+ rows: (response) => response.items,
804
+ cursor: (response) => response.next,
805
+ page: (cursor) => ({ queryParams: { cursor } }),
806
+ where: {
807
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
808
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
809
+ title: { search: (q: string) => ({ queryParams: { q } }) },
810
+ },
811
+ orderBy: { createdAt: true },
812
+ })
813
+ .load(one11, { byKey: (id) => ({ params: { id } }) })
814
+ .mutate({
815
+ update: {
816
+ request: save11,
817
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
818
+ },
819
+ });
820
+ const list12 = client.createRequest<{
821
+ response: { items: Row12[]; next: string | null };
822
+ queryParams?: { cursor?: string; q?: string; likes?: number };
823
+ }>()({ endpoint: "/teams/:teamId/c12" });
824
+ const one12 = client.createRequest<{ response: Row12 }>()({
825
+ endpoint: "/c12/:id",
826
+ });
827
+ const save12 = client.createRequest<{
828
+ response: Row12;
829
+ payload: Partial<Row12>;
830
+ }>()({ endpoint: "/c12/:id", method: "PATCH" });
831
+ const C12 = collection(rowType<Row12>(), { key: "id" })
832
+ .load(list12, {
833
+ rows: (response) => response.items,
834
+ cursor: (response) => response.next,
835
+ page: (cursor) => ({ queryParams: { cursor } }),
836
+ where: {
837
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
838
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
839
+ title: { search: (q: string) => ({ queryParams: { q } }) },
840
+ },
841
+ orderBy: { createdAt: true },
842
+ })
843
+ .load(one12, { byKey: (id) => ({ params: { id } }) })
844
+ .mutate({
845
+ update: {
846
+ request: save12,
847
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
848
+ },
849
+ });
850
+ const list13 = client.createRequest<{
851
+ response: { items: Row13[]; next: string | null };
852
+ queryParams?: { cursor?: string; q?: string; likes?: number };
853
+ }>()({ endpoint: "/teams/:teamId/c13" });
854
+ const one13 = client.createRequest<{ response: Row13 }>()({
855
+ endpoint: "/c13/:id",
856
+ });
857
+ const save13 = client.createRequest<{
858
+ response: Row13;
859
+ payload: Partial<Row13>;
860
+ }>()({ endpoint: "/c13/:id", method: "PATCH" });
861
+ const C13 = collection(rowType<Row13>(), { key: "id" })
862
+ .load(list13, {
863
+ rows: (response) => response.items,
864
+ cursor: (response) => response.next,
865
+ page: (cursor) => ({ queryParams: { cursor } }),
866
+ where: {
867
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
868
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
869
+ title: { search: (q: string) => ({ queryParams: { q } }) },
870
+ },
871
+ orderBy: { createdAt: true },
872
+ })
873
+ .load(one13, { byKey: (id) => ({ params: { id } }) })
874
+ .mutate({
875
+ update: {
876
+ request: save13,
877
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
878
+ },
879
+ });
880
+ const list14 = client.createRequest<{
881
+ response: { items: Row14[]; next: string | null };
882
+ queryParams?: { cursor?: string; q?: string; likes?: number };
883
+ }>()({ endpoint: "/teams/:teamId/c14" });
884
+ const one14 = client.createRequest<{ response: Row14 }>()({
885
+ endpoint: "/c14/:id",
886
+ });
887
+ const save14 = client.createRequest<{
888
+ response: Row14;
889
+ payload: Partial<Row14>;
890
+ }>()({ endpoint: "/c14/:id", method: "PATCH" });
891
+ const C14 = collection(rowType<Row14>(), { key: "id" })
892
+ .load(list14, {
893
+ rows: (response) => response.items,
894
+ cursor: (response) => response.next,
895
+ page: (cursor) => ({ queryParams: { cursor } }),
896
+ where: {
897
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
898
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
899
+ title: { search: (q: string) => ({ queryParams: { q } }) },
900
+ },
901
+ orderBy: { createdAt: true },
902
+ })
903
+ .load(one14, { byKey: (id) => ({ params: { id } }) })
904
+ .mutate({
905
+ update: {
906
+ request: save14,
907
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
908
+ },
909
+ });
910
+ const list15 = client.createRequest<{
911
+ response: { items: Row15[]; next: string | null };
912
+ queryParams?: { cursor?: string; q?: string; likes?: number };
913
+ }>()({ endpoint: "/teams/:teamId/c15" });
914
+ const one15 = client.createRequest<{ response: Row15 }>()({
915
+ endpoint: "/c15/:id",
916
+ });
917
+ const save15 = client.createRequest<{
918
+ response: Row15;
919
+ payload: Partial<Row15>;
920
+ }>()({ endpoint: "/c15/:id", method: "PATCH" });
921
+ const C15 = collection(rowType<Row15>(), { key: "id" })
922
+ .load(list15, {
923
+ rows: (response) => response.items,
924
+ cursor: (response) => response.next,
925
+ page: (cursor) => ({ queryParams: { cursor } }),
926
+ where: {
927
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
928
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
929
+ title: { search: (q: string) => ({ queryParams: { q } }) },
930
+ },
931
+ orderBy: { createdAt: true },
932
+ })
933
+ .load(one15, { byKey: (id) => ({ params: { id } }) })
934
+ .mutate({
935
+ update: {
936
+ request: save15,
937
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
938
+ },
939
+ });
940
+ const list16 = client.createRequest<{
941
+ response: { items: Row16[]; next: string | null };
942
+ queryParams?: { cursor?: string; q?: string; likes?: number };
943
+ }>()({ endpoint: "/teams/:teamId/c16" });
944
+ const one16 = client.createRequest<{ response: Row16 }>()({
945
+ endpoint: "/c16/:id",
946
+ });
947
+ const save16 = client.createRequest<{
948
+ response: Row16;
949
+ payload: Partial<Row16>;
950
+ }>()({ endpoint: "/c16/:id", method: "PATCH" });
951
+ const C16 = collection(rowType<Row16>(), { key: "id" })
952
+ .load(list16, {
953
+ rows: (response) => response.items,
954
+ cursor: (response) => response.next,
955
+ page: (cursor) => ({ queryParams: { cursor } }),
956
+ where: {
957
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
958
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
959
+ title: { search: (q: string) => ({ queryParams: { q } }) },
960
+ },
961
+ orderBy: { createdAt: true },
962
+ })
963
+ .load(one16, { byKey: (id) => ({ params: { id } }) })
964
+ .mutate({
965
+ update: {
966
+ request: save16,
967
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
968
+ },
969
+ });
970
+ const list17 = client.createRequest<{
971
+ response: { items: Row17[]; next: string | null };
972
+ queryParams?: { cursor?: string; q?: string; likes?: number };
973
+ }>()({ endpoint: "/teams/:teamId/c17" });
974
+ const one17 = client.createRequest<{ response: Row17 }>()({
975
+ endpoint: "/c17/:id",
976
+ });
977
+ const save17 = client.createRequest<{
978
+ response: Row17;
979
+ payload: Partial<Row17>;
980
+ }>()({ endpoint: "/c17/:id", method: "PATCH" });
981
+ const C17 = collection(rowType<Row17>(), { key: "id" })
982
+ .load(list17, {
983
+ rows: (response) => response.items,
984
+ cursor: (response) => response.next,
985
+ page: (cursor) => ({ queryParams: { cursor } }),
986
+ where: {
987
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
988
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
989
+ title: { search: (q: string) => ({ queryParams: { q } }) },
990
+ },
991
+ orderBy: { createdAt: true },
992
+ })
993
+ .load(one17, { byKey: (id) => ({ params: { id } }) })
994
+ .mutate({
995
+ update: {
996
+ request: save17,
997
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
998
+ },
999
+ });
1000
+ const list18 = client.createRequest<{
1001
+ response: { items: Row18[]; next: string | null };
1002
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1003
+ }>()({ endpoint: "/teams/:teamId/c18" });
1004
+ const one18 = client.createRequest<{ response: Row18 }>()({
1005
+ endpoint: "/c18/:id",
1006
+ });
1007
+ const save18 = client.createRequest<{
1008
+ response: Row18;
1009
+ payload: Partial<Row18>;
1010
+ }>()({ endpoint: "/c18/:id", method: "PATCH" });
1011
+ const C18 = collection(rowType<Row18>(), { key: "id" })
1012
+ .load(list18, {
1013
+ rows: (response) => response.items,
1014
+ cursor: (response) => response.next,
1015
+ page: (cursor) => ({ queryParams: { cursor } }),
1016
+ where: {
1017
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1018
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1019
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1020
+ },
1021
+ orderBy: { createdAt: true },
1022
+ })
1023
+ .load(one18, { byKey: (id) => ({ params: { id } }) })
1024
+ .mutate({
1025
+ update: {
1026
+ request: save18,
1027
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1028
+ },
1029
+ });
1030
+ const list19 = client.createRequest<{
1031
+ response: { items: Row19[]; next: string | null };
1032
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1033
+ }>()({ endpoint: "/teams/:teamId/c19" });
1034
+ const one19 = client.createRequest<{ response: Row19 }>()({
1035
+ endpoint: "/c19/:id",
1036
+ });
1037
+ const save19 = client.createRequest<{
1038
+ response: Row19;
1039
+ payload: Partial<Row19>;
1040
+ }>()({ endpoint: "/c19/:id", method: "PATCH" });
1041
+ const C19 = collection(rowType<Row19>(), { key: "id" })
1042
+ .load(list19, {
1043
+ rows: (response) => response.items,
1044
+ cursor: (response) => response.next,
1045
+ page: (cursor) => ({ queryParams: { cursor } }),
1046
+ where: {
1047
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1048
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1049
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1050
+ },
1051
+ orderBy: { createdAt: true },
1052
+ })
1053
+ .load(one19, { byKey: (id) => ({ params: { id } }) })
1054
+ .mutate({
1055
+ update: {
1056
+ request: save19,
1057
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1058
+ },
1059
+ });
1060
+ const list20 = client.createRequest<{
1061
+ response: { items: Row20[]; next: string | null };
1062
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1063
+ }>()({ endpoint: "/teams/:teamId/c20" });
1064
+ const one20 = client.createRequest<{ response: Row20 }>()({
1065
+ endpoint: "/c20/:id",
1066
+ });
1067
+ const save20 = client.createRequest<{
1068
+ response: Row20;
1069
+ payload: Partial<Row20>;
1070
+ }>()({ endpoint: "/c20/:id", method: "PATCH" });
1071
+ const C20 = collection(rowType<Row20>(), { key: "id" })
1072
+ .load(list20, {
1073
+ rows: (response) => response.items,
1074
+ cursor: (response) => response.next,
1075
+ page: (cursor) => ({ queryParams: { cursor } }),
1076
+ where: {
1077
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1078
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1079
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1080
+ },
1081
+ orderBy: { createdAt: true },
1082
+ })
1083
+ .load(one20, { byKey: (id) => ({ params: { id } }) })
1084
+ .mutate({
1085
+ update: {
1086
+ request: save20,
1087
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1088
+ },
1089
+ });
1090
+ const list21 = client.createRequest<{
1091
+ response: { items: Row21[]; next: string | null };
1092
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1093
+ }>()({ endpoint: "/teams/:teamId/c21" });
1094
+ const one21 = client.createRequest<{ response: Row21 }>()({
1095
+ endpoint: "/c21/:id",
1096
+ });
1097
+ const save21 = client.createRequest<{
1098
+ response: Row21;
1099
+ payload: Partial<Row21>;
1100
+ }>()({ endpoint: "/c21/:id", method: "PATCH" });
1101
+ const C21 = collection(rowType<Row21>(), { key: "id" })
1102
+ .load(list21, {
1103
+ rows: (response) => response.items,
1104
+ cursor: (response) => response.next,
1105
+ page: (cursor) => ({ queryParams: { cursor } }),
1106
+ where: {
1107
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1108
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1109
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1110
+ },
1111
+ orderBy: { createdAt: true },
1112
+ })
1113
+ .load(one21, { byKey: (id) => ({ params: { id } }) })
1114
+ .mutate({
1115
+ update: {
1116
+ request: save21,
1117
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1118
+ },
1119
+ });
1120
+ const list22 = client.createRequest<{
1121
+ response: { items: Row22[]; next: string | null };
1122
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1123
+ }>()({ endpoint: "/teams/:teamId/c22" });
1124
+ const one22 = client.createRequest<{ response: Row22 }>()({
1125
+ endpoint: "/c22/:id",
1126
+ });
1127
+ const save22 = client.createRequest<{
1128
+ response: Row22;
1129
+ payload: Partial<Row22>;
1130
+ }>()({ endpoint: "/c22/:id", method: "PATCH" });
1131
+ const C22 = collection(rowType<Row22>(), { key: "id" })
1132
+ .load(list22, {
1133
+ rows: (response) => response.items,
1134
+ cursor: (response) => response.next,
1135
+ page: (cursor) => ({ queryParams: { cursor } }),
1136
+ where: {
1137
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1138
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1139
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1140
+ },
1141
+ orderBy: { createdAt: true },
1142
+ })
1143
+ .load(one22, { byKey: (id) => ({ params: { id } }) })
1144
+ .mutate({
1145
+ update: {
1146
+ request: save22,
1147
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1148
+ },
1149
+ });
1150
+ const list23 = client.createRequest<{
1151
+ response: { items: Row23[]; next: string | null };
1152
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1153
+ }>()({ endpoint: "/teams/:teamId/c23" });
1154
+ const one23 = client.createRequest<{ response: Row23 }>()({
1155
+ endpoint: "/c23/:id",
1156
+ });
1157
+ const save23 = client.createRequest<{
1158
+ response: Row23;
1159
+ payload: Partial<Row23>;
1160
+ }>()({ endpoint: "/c23/:id", method: "PATCH" });
1161
+ const C23 = collection(rowType<Row23>(), { key: "id" })
1162
+ .load(list23, {
1163
+ rows: (response) => response.items,
1164
+ cursor: (response) => response.next,
1165
+ page: (cursor) => ({ queryParams: { cursor } }),
1166
+ where: {
1167
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1168
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1169
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1170
+ },
1171
+ orderBy: { createdAt: true },
1172
+ })
1173
+ .load(one23, { byKey: (id) => ({ params: { id } }) })
1174
+ .mutate({
1175
+ update: {
1176
+ request: save23,
1177
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1178
+ },
1179
+ });
1180
+ const list24 = client.createRequest<{
1181
+ response: { items: Row24[]; next: string | null };
1182
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1183
+ }>()({ endpoint: "/teams/:teamId/c24" });
1184
+ const one24 = client.createRequest<{ response: Row24 }>()({
1185
+ endpoint: "/c24/:id",
1186
+ });
1187
+ const save24 = client.createRequest<{
1188
+ response: Row24;
1189
+ payload: Partial<Row24>;
1190
+ }>()({ endpoint: "/c24/:id", method: "PATCH" });
1191
+ const C24 = collection(rowType<Row24>(), { key: "id" })
1192
+ .load(list24, {
1193
+ rows: (response) => response.items,
1194
+ cursor: (response) => response.next,
1195
+ page: (cursor) => ({ queryParams: { cursor } }),
1196
+ where: {
1197
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1198
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1199
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1200
+ },
1201
+ orderBy: { createdAt: true },
1202
+ })
1203
+ .load(one24, { byKey: (id) => ({ params: { id } }) })
1204
+ .mutate({
1205
+ update: {
1206
+ request: save24,
1207
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1208
+ },
1209
+ });
1210
+ const list25 = client.createRequest<{
1211
+ response: { items: Row25[]; next: string | null };
1212
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1213
+ }>()({ endpoint: "/teams/:teamId/c25" });
1214
+ const one25 = client.createRequest<{ response: Row25 }>()({
1215
+ endpoint: "/c25/:id",
1216
+ });
1217
+ const save25 = client.createRequest<{
1218
+ response: Row25;
1219
+ payload: Partial<Row25>;
1220
+ }>()({ endpoint: "/c25/:id", method: "PATCH" });
1221
+ const C25 = collection(rowType<Row25>(), { key: "id" })
1222
+ .load(list25, {
1223
+ rows: (response) => response.items,
1224
+ cursor: (response) => response.next,
1225
+ page: (cursor) => ({ queryParams: { cursor } }),
1226
+ where: {
1227
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1228
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1229
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1230
+ },
1231
+ orderBy: { createdAt: true },
1232
+ })
1233
+ .load(one25, { byKey: (id) => ({ params: { id } }) })
1234
+ .mutate({
1235
+ update: {
1236
+ request: save25,
1237
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1238
+ },
1239
+ });
1240
+ const list26 = client.createRequest<{
1241
+ response: { items: Row26[]; next: string | null };
1242
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1243
+ }>()({ endpoint: "/teams/:teamId/c26" });
1244
+ const one26 = client.createRequest<{ response: Row26 }>()({
1245
+ endpoint: "/c26/:id",
1246
+ });
1247
+ const save26 = client.createRequest<{
1248
+ response: Row26;
1249
+ payload: Partial<Row26>;
1250
+ }>()({ endpoint: "/c26/:id", method: "PATCH" });
1251
+ const C26 = collection(rowType<Row26>(), { key: "id" })
1252
+ .load(list26, {
1253
+ rows: (response) => response.items,
1254
+ cursor: (response) => response.next,
1255
+ page: (cursor) => ({ queryParams: { cursor } }),
1256
+ where: {
1257
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1258
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1259
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1260
+ },
1261
+ orderBy: { createdAt: true },
1262
+ })
1263
+ .load(one26, { byKey: (id) => ({ params: { id } }) })
1264
+ .mutate({
1265
+ update: {
1266
+ request: save26,
1267
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1268
+ },
1269
+ });
1270
+ const list27 = client.createRequest<{
1271
+ response: { items: Row27[]; next: string | null };
1272
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1273
+ }>()({ endpoint: "/teams/:teamId/c27" });
1274
+ const one27 = client.createRequest<{ response: Row27 }>()({
1275
+ endpoint: "/c27/:id",
1276
+ });
1277
+ const save27 = client.createRequest<{
1278
+ response: Row27;
1279
+ payload: Partial<Row27>;
1280
+ }>()({ endpoint: "/c27/:id", method: "PATCH" });
1281
+ const C27 = collection(rowType<Row27>(), { key: "id" })
1282
+ .load(list27, {
1283
+ rows: (response) => response.items,
1284
+ cursor: (response) => response.next,
1285
+ page: (cursor) => ({ queryParams: { cursor } }),
1286
+ where: {
1287
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1288
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1289
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1290
+ },
1291
+ orderBy: { createdAt: true },
1292
+ })
1293
+ .load(one27, { byKey: (id) => ({ params: { id } }) })
1294
+ .mutate({
1295
+ update: {
1296
+ request: save27,
1297
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1298
+ },
1299
+ });
1300
+ const list28 = client.createRequest<{
1301
+ response: { items: Row28[]; next: string | null };
1302
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1303
+ }>()({ endpoint: "/teams/:teamId/c28" });
1304
+ const one28 = client.createRequest<{ response: Row28 }>()({
1305
+ endpoint: "/c28/:id",
1306
+ });
1307
+ const save28 = client.createRequest<{
1308
+ response: Row28;
1309
+ payload: Partial<Row28>;
1310
+ }>()({ endpoint: "/c28/:id", method: "PATCH" });
1311
+ const C28 = collection(rowType<Row28>(), { key: "id" })
1312
+ .load(list28, {
1313
+ rows: (response) => response.items,
1314
+ cursor: (response) => response.next,
1315
+ page: (cursor) => ({ queryParams: { cursor } }),
1316
+ where: {
1317
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1318
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1319
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1320
+ },
1321
+ orderBy: { createdAt: true },
1322
+ })
1323
+ .load(one28, { byKey: (id) => ({ params: { id } }) })
1324
+ .mutate({
1325
+ update: {
1326
+ request: save28,
1327
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1328
+ },
1329
+ });
1330
+ const list29 = client.createRequest<{
1331
+ response: { items: Row29[]; next: string | null };
1332
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1333
+ }>()({ endpoint: "/teams/:teamId/c29" });
1334
+ const one29 = client.createRequest<{ response: Row29 }>()({
1335
+ endpoint: "/c29/:id",
1336
+ });
1337
+ const save29 = client.createRequest<{
1338
+ response: Row29;
1339
+ payload: Partial<Row29>;
1340
+ }>()({ endpoint: "/c29/:id", method: "PATCH" });
1341
+ const C29 = collection(rowType<Row29>(), { key: "id" })
1342
+ .load(list29, {
1343
+ rows: (response) => response.items,
1344
+ cursor: (response) => response.next,
1345
+ page: (cursor) => ({ queryParams: { cursor } }),
1346
+ where: {
1347
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1348
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1349
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1350
+ },
1351
+ orderBy: { createdAt: true },
1352
+ })
1353
+ .load(one29, { byKey: (id) => ({ params: { id } }) })
1354
+ .mutate({
1355
+ update: {
1356
+ request: save29,
1357
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1358
+ },
1359
+ });
1360
+ const list30 = client.createRequest<{
1361
+ response: { items: Row30[]; next: string | null };
1362
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1363
+ }>()({ endpoint: "/teams/:teamId/c30" });
1364
+ const one30 = client.createRequest<{ response: Row30 }>()({
1365
+ endpoint: "/c30/:id",
1366
+ });
1367
+ const save30 = client.createRequest<{
1368
+ response: Row30;
1369
+ payload: Partial<Row30>;
1370
+ }>()({ endpoint: "/c30/:id", method: "PATCH" });
1371
+ const C30 = collection(rowType<Row30>(), { key: "id" })
1372
+ .load(list30, {
1373
+ rows: (response) => response.items,
1374
+ cursor: (response) => response.next,
1375
+ page: (cursor) => ({ queryParams: { cursor } }),
1376
+ where: {
1377
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1378
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1379
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1380
+ },
1381
+ orderBy: { createdAt: true },
1382
+ })
1383
+ .load(one30, { byKey: (id) => ({ params: { id } }) })
1384
+ .mutate({
1385
+ update: {
1386
+ request: save30,
1387
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1388
+ },
1389
+ });
1390
+ const list31 = client.createRequest<{
1391
+ response: { items: Row31[]; next: string | null };
1392
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1393
+ }>()({ endpoint: "/teams/:teamId/c31" });
1394
+ const one31 = client.createRequest<{ response: Row31 }>()({
1395
+ endpoint: "/c31/:id",
1396
+ });
1397
+ const save31 = client.createRequest<{
1398
+ response: Row31;
1399
+ payload: Partial<Row31>;
1400
+ }>()({ endpoint: "/c31/:id", method: "PATCH" });
1401
+ const C31 = collection(rowType<Row31>(), { key: "id" })
1402
+ .load(list31, {
1403
+ rows: (response) => response.items,
1404
+ cursor: (response) => response.next,
1405
+ page: (cursor) => ({ queryParams: { cursor } }),
1406
+ where: {
1407
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1408
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1409
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1410
+ },
1411
+ orderBy: { createdAt: true },
1412
+ })
1413
+ .load(one31, { byKey: (id) => ({ params: { id } }) })
1414
+ .mutate({
1415
+ update: {
1416
+ request: save31,
1417
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1418
+ },
1419
+ });
1420
+ const list32 = client.createRequest<{
1421
+ response: { items: Row32[]; next: string | null };
1422
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1423
+ }>()({ endpoint: "/teams/:teamId/c32" });
1424
+ const one32 = client.createRequest<{ response: Row32 }>()({
1425
+ endpoint: "/c32/:id",
1426
+ });
1427
+ const save32 = client.createRequest<{
1428
+ response: Row32;
1429
+ payload: Partial<Row32>;
1430
+ }>()({ endpoint: "/c32/:id", method: "PATCH" });
1431
+ const C32 = collection(rowType<Row32>(), { key: "id" })
1432
+ .load(list32, {
1433
+ rows: (response) => response.items,
1434
+ cursor: (response) => response.next,
1435
+ page: (cursor) => ({ queryParams: { cursor } }),
1436
+ where: {
1437
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1438
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1439
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1440
+ },
1441
+ orderBy: { createdAt: true },
1442
+ })
1443
+ .load(one32, { byKey: (id) => ({ params: { id } }) })
1444
+ .mutate({
1445
+ update: {
1446
+ request: save32,
1447
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1448
+ },
1449
+ });
1450
+ const list33 = client.createRequest<{
1451
+ response: { items: Row33[]; next: string | null };
1452
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1453
+ }>()({ endpoint: "/teams/:teamId/c33" });
1454
+ const one33 = client.createRequest<{ response: Row33 }>()({
1455
+ endpoint: "/c33/:id",
1456
+ });
1457
+ const save33 = client.createRequest<{
1458
+ response: Row33;
1459
+ payload: Partial<Row33>;
1460
+ }>()({ endpoint: "/c33/:id", method: "PATCH" });
1461
+ const C33 = collection(rowType<Row33>(), { key: "id" })
1462
+ .load(list33, {
1463
+ rows: (response) => response.items,
1464
+ cursor: (response) => response.next,
1465
+ page: (cursor) => ({ queryParams: { cursor } }),
1466
+ where: {
1467
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1468
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1469
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1470
+ },
1471
+ orderBy: { createdAt: true },
1472
+ })
1473
+ .load(one33, { byKey: (id) => ({ params: { id } }) })
1474
+ .mutate({
1475
+ update: {
1476
+ request: save33,
1477
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1478
+ },
1479
+ });
1480
+ const list34 = client.createRequest<{
1481
+ response: { items: Row34[]; next: string | null };
1482
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1483
+ }>()({ endpoint: "/teams/:teamId/c34" });
1484
+ const one34 = client.createRequest<{ response: Row34 }>()({
1485
+ endpoint: "/c34/:id",
1486
+ });
1487
+ const save34 = client.createRequest<{
1488
+ response: Row34;
1489
+ payload: Partial<Row34>;
1490
+ }>()({ endpoint: "/c34/:id", method: "PATCH" });
1491
+ const C34 = collection(rowType<Row34>(), { key: "id" })
1492
+ .load(list34, {
1493
+ rows: (response) => response.items,
1494
+ cursor: (response) => response.next,
1495
+ page: (cursor) => ({ queryParams: { cursor } }),
1496
+ where: {
1497
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1498
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1499
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1500
+ },
1501
+ orderBy: { createdAt: true },
1502
+ })
1503
+ .load(one34, { byKey: (id) => ({ params: { id } }) })
1504
+ .mutate({
1505
+ update: {
1506
+ request: save34,
1507
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1508
+ },
1509
+ });
1510
+ const list35 = client.createRequest<{
1511
+ response: { items: Row35[]; next: string | null };
1512
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1513
+ }>()({ endpoint: "/teams/:teamId/c35" });
1514
+ const one35 = client.createRequest<{ response: Row35 }>()({
1515
+ endpoint: "/c35/:id",
1516
+ });
1517
+ const save35 = client.createRequest<{
1518
+ response: Row35;
1519
+ payload: Partial<Row35>;
1520
+ }>()({ endpoint: "/c35/:id", method: "PATCH" });
1521
+ const C35 = collection(rowType<Row35>(), { key: "id" })
1522
+ .load(list35, {
1523
+ rows: (response) => response.items,
1524
+ cursor: (response) => response.next,
1525
+ page: (cursor) => ({ queryParams: { cursor } }),
1526
+ where: {
1527
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1528
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1529
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1530
+ },
1531
+ orderBy: { createdAt: true },
1532
+ })
1533
+ .load(one35, { byKey: (id) => ({ params: { id } }) })
1534
+ .mutate({
1535
+ update: {
1536
+ request: save35,
1537
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1538
+ },
1539
+ });
1540
+ const list36 = client.createRequest<{
1541
+ response: { items: Row36[]; next: string | null };
1542
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1543
+ }>()({ endpoint: "/teams/:teamId/c36" });
1544
+ const one36 = client.createRequest<{ response: Row36 }>()({
1545
+ endpoint: "/c36/:id",
1546
+ });
1547
+ const save36 = client.createRequest<{
1548
+ response: Row36;
1549
+ payload: Partial<Row36>;
1550
+ }>()({ endpoint: "/c36/:id", method: "PATCH" });
1551
+ const C36 = collection(rowType<Row36>(), { key: "id" })
1552
+ .load(list36, {
1553
+ rows: (response) => response.items,
1554
+ cursor: (response) => response.next,
1555
+ page: (cursor) => ({ queryParams: { cursor } }),
1556
+ where: {
1557
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1558
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1559
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1560
+ },
1561
+ orderBy: { createdAt: true },
1562
+ })
1563
+ .load(one36, { byKey: (id) => ({ params: { id } }) })
1564
+ .mutate({
1565
+ update: {
1566
+ request: save36,
1567
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1568
+ },
1569
+ });
1570
+ const list37 = client.createRequest<{
1571
+ response: { items: Row37[]; next: string | null };
1572
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1573
+ }>()({ endpoint: "/teams/:teamId/c37" });
1574
+ const one37 = client.createRequest<{ response: Row37 }>()({
1575
+ endpoint: "/c37/:id",
1576
+ });
1577
+ const save37 = client.createRequest<{
1578
+ response: Row37;
1579
+ payload: Partial<Row37>;
1580
+ }>()({ endpoint: "/c37/:id", method: "PATCH" });
1581
+ const C37 = collection(rowType<Row37>(), { key: "id" })
1582
+ .load(list37, {
1583
+ rows: (response) => response.items,
1584
+ cursor: (response) => response.next,
1585
+ page: (cursor) => ({ queryParams: { cursor } }),
1586
+ where: {
1587
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1588
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1589
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1590
+ },
1591
+ orderBy: { createdAt: true },
1592
+ })
1593
+ .load(one37, { byKey: (id) => ({ params: { id } }) })
1594
+ .mutate({
1595
+ update: {
1596
+ request: save37,
1597
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1598
+ },
1599
+ });
1600
+ const list38 = client.createRequest<{
1601
+ response: { items: Row38[]; next: string | null };
1602
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1603
+ }>()({ endpoint: "/teams/:teamId/c38" });
1604
+ const one38 = client.createRequest<{ response: Row38 }>()({
1605
+ endpoint: "/c38/:id",
1606
+ });
1607
+ const save38 = client.createRequest<{
1608
+ response: Row38;
1609
+ payload: Partial<Row38>;
1610
+ }>()({ endpoint: "/c38/:id", method: "PATCH" });
1611
+ const C38 = collection(rowType<Row38>(), { key: "id" })
1612
+ .load(list38, {
1613
+ rows: (response) => response.items,
1614
+ cursor: (response) => response.next,
1615
+ page: (cursor) => ({ queryParams: { cursor } }),
1616
+ where: {
1617
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1618
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1619
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1620
+ },
1621
+ orderBy: { createdAt: true },
1622
+ })
1623
+ .load(one38, { byKey: (id) => ({ params: { id } }) })
1624
+ .mutate({
1625
+ update: {
1626
+ request: save38,
1627
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1628
+ },
1629
+ });
1630
+ const list39 = client.createRequest<{
1631
+ response: { items: Row39[]; next: string | null };
1632
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1633
+ }>()({ endpoint: "/teams/:teamId/c39" });
1634
+ const one39 = client.createRequest<{ response: Row39 }>()({
1635
+ endpoint: "/c39/:id",
1636
+ });
1637
+ const save39 = client.createRequest<{
1638
+ response: Row39;
1639
+ payload: Partial<Row39>;
1640
+ }>()({ endpoint: "/c39/:id", method: "PATCH" });
1641
+ const C39 = collection(rowType<Row39>(), { key: "id" })
1642
+ .load(list39, {
1643
+ rows: (response) => response.items,
1644
+ cursor: (response) => response.next,
1645
+ page: (cursor) => ({ queryParams: { cursor } }),
1646
+ where: {
1647
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1648
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1649
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1650
+ },
1651
+ orderBy: { createdAt: true },
1652
+ })
1653
+ .load(one39, { byKey: (id) => ({ params: { id } }) })
1654
+ .mutate({
1655
+ update: {
1656
+ request: save39,
1657
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1658
+ },
1659
+ });
1660
+ const list40 = client.createRequest<{
1661
+ response: { items: Row40[]; next: string | null };
1662
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1663
+ }>()({ endpoint: "/teams/:teamId/c40" });
1664
+ const one40 = client.createRequest<{ response: Row40 }>()({
1665
+ endpoint: "/c40/:id",
1666
+ });
1667
+ const save40 = client.createRequest<{
1668
+ response: Row40;
1669
+ payload: Partial<Row40>;
1670
+ }>()({ endpoint: "/c40/:id", method: "PATCH" });
1671
+ const C40 = collection(rowType<Row40>(), { key: "id" })
1672
+ .load(list40, {
1673
+ rows: (response) => response.items,
1674
+ cursor: (response) => response.next,
1675
+ page: (cursor) => ({ queryParams: { cursor } }),
1676
+ where: {
1677
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1678
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1679
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1680
+ },
1681
+ orderBy: { createdAt: true },
1682
+ })
1683
+ .load(one40, { byKey: (id) => ({ params: { id } }) })
1684
+ .mutate({
1685
+ update: {
1686
+ request: save40,
1687
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1688
+ },
1689
+ });
1690
+ const list41 = client.createRequest<{
1691
+ response: { items: Row41[]; next: string | null };
1692
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1693
+ }>()({ endpoint: "/teams/:teamId/c41" });
1694
+ const one41 = client.createRequest<{ response: Row41 }>()({
1695
+ endpoint: "/c41/:id",
1696
+ });
1697
+ const save41 = client.createRequest<{
1698
+ response: Row41;
1699
+ payload: Partial<Row41>;
1700
+ }>()({ endpoint: "/c41/:id", method: "PATCH" });
1701
+ const C41 = collection(rowType<Row41>(), { key: "id" })
1702
+ .load(list41, {
1703
+ rows: (response) => response.items,
1704
+ cursor: (response) => response.next,
1705
+ page: (cursor) => ({ queryParams: { cursor } }),
1706
+ where: {
1707
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1708
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1709
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1710
+ },
1711
+ orderBy: { createdAt: true },
1712
+ })
1713
+ .load(one41, { byKey: (id) => ({ params: { id } }) })
1714
+ .mutate({
1715
+ update: {
1716
+ request: save41,
1717
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1718
+ },
1719
+ });
1720
+ const list42 = client.createRequest<{
1721
+ response: { items: Row42[]; next: string | null };
1722
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1723
+ }>()({ endpoint: "/teams/:teamId/c42" });
1724
+ const one42 = client.createRequest<{ response: Row42 }>()({
1725
+ endpoint: "/c42/:id",
1726
+ });
1727
+ const save42 = client.createRequest<{
1728
+ response: Row42;
1729
+ payload: Partial<Row42>;
1730
+ }>()({ endpoint: "/c42/:id", method: "PATCH" });
1731
+ const C42 = collection(rowType<Row42>(), { key: "id" })
1732
+ .load(list42, {
1733
+ rows: (response) => response.items,
1734
+ cursor: (response) => response.next,
1735
+ page: (cursor) => ({ queryParams: { cursor } }),
1736
+ where: {
1737
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1738
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1739
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1740
+ },
1741
+ orderBy: { createdAt: true },
1742
+ })
1743
+ .load(one42, { byKey: (id) => ({ params: { id } }) })
1744
+ .mutate({
1745
+ update: {
1746
+ request: save42,
1747
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1748
+ },
1749
+ });
1750
+ const list43 = client.createRequest<{
1751
+ response: { items: Row43[]; next: string | null };
1752
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1753
+ }>()({ endpoint: "/teams/:teamId/c43" });
1754
+ const one43 = client.createRequest<{ response: Row43 }>()({
1755
+ endpoint: "/c43/:id",
1756
+ });
1757
+ const save43 = client.createRequest<{
1758
+ response: Row43;
1759
+ payload: Partial<Row43>;
1760
+ }>()({ endpoint: "/c43/:id", method: "PATCH" });
1761
+ const C43 = collection(rowType<Row43>(), { key: "id" })
1762
+ .load(list43, {
1763
+ rows: (response) => response.items,
1764
+ cursor: (response) => response.next,
1765
+ page: (cursor) => ({ queryParams: { cursor } }),
1766
+ where: {
1767
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1768
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1769
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1770
+ },
1771
+ orderBy: { createdAt: true },
1772
+ })
1773
+ .load(one43, { byKey: (id) => ({ params: { id } }) })
1774
+ .mutate({
1775
+ update: {
1776
+ request: save43,
1777
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1778
+ },
1779
+ });
1780
+ const list44 = client.createRequest<{
1781
+ response: { items: Row44[]; next: string | null };
1782
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1783
+ }>()({ endpoint: "/teams/:teamId/c44" });
1784
+ const one44 = client.createRequest<{ response: Row44 }>()({
1785
+ endpoint: "/c44/:id",
1786
+ });
1787
+ const save44 = client.createRequest<{
1788
+ response: Row44;
1789
+ payload: Partial<Row44>;
1790
+ }>()({ endpoint: "/c44/:id", method: "PATCH" });
1791
+ const C44 = collection(rowType<Row44>(), { key: "id" })
1792
+ .load(list44, {
1793
+ rows: (response) => response.items,
1794
+ cursor: (response) => response.next,
1795
+ page: (cursor) => ({ queryParams: { cursor } }),
1796
+ where: {
1797
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1798
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1799
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1800
+ },
1801
+ orderBy: { createdAt: true },
1802
+ })
1803
+ .load(one44, { byKey: (id) => ({ params: { id } }) })
1804
+ .mutate({
1805
+ update: {
1806
+ request: save44,
1807
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1808
+ },
1809
+ });
1810
+ const list45 = client.createRequest<{
1811
+ response: { items: Row45[]; next: string | null };
1812
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1813
+ }>()({ endpoint: "/teams/:teamId/c45" });
1814
+ const one45 = client.createRequest<{ response: Row45 }>()({
1815
+ endpoint: "/c45/:id",
1816
+ });
1817
+ const save45 = client.createRequest<{
1818
+ response: Row45;
1819
+ payload: Partial<Row45>;
1820
+ }>()({ endpoint: "/c45/:id", method: "PATCH" });
1821
+ const C45 = collection(rowType<Row45>(), { key: "id" })
1822
+ .load(list45, {
1823
+ rows: (response) => response.items,
1824
+ cursor: (response) => response.next,
1825
+ page: (cursor) => ({ queryParams: { cursor } }),
1826
+ where: {
1827
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1828
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1829
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1830
+ },
1831
+ orderBy: { createdAt: true },
1832
+ })
1833
+ .load(one45, { byKey: (id) => ({ params: { id } }) })
1834
+ .mutate({
1835
+ update: {
1836
+ request: save45,
1837
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1838
+ },
1839
+ });
1840
+ const list46 = client.createRequest<{
1841
+ response: { items: Row46[]; next: string | null };
1842
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1843
+ }>()({ endpoint: "/teams/:teamId/c46" });
1844
+ const one46 = client.createRequest<{ response: Row46 }>()({
1845
+ endpoint: "/c46/:id",
1846
+ });
1847
+ const save46 = client.createRequest<{
1848
+ response: Row46;
1849
+ payload: Partial<Row46>;
1850
+ }>()({ endpoint: "/c46/:id", method: "PATCH" });
1851
+ const C46 = collection(rowType<Row46>(), { key: "id" })
1852
+ .load(list46, {
1853
+ rows: (response) => response.items,
1854
+ cursor: (response) => response.next,
1855
+ page: (cursor) => ({ queryParams: { cursor } }),
1856
+ where: {
1857
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1858
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1859
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1860
+ },
1861
+ orderBy: { createdAt: true },
1862
+ })
1863
+ .load(one46, { byKey: (id) => ({ params: { id } }) })
1864
+ .mutate({
1865
+ update: {
1866
+ request: save46,
1867
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1868
+ },
1869
+ });
1870
+ const list47 = client.createRequest<{
1871
+ response: { items: Row47[]; next: string | null };
1872
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1873
+ }>()({ endpoint: "/teams/:teamId/c47" });
1874
+ const one47 = client.createRequest<{ response: Row47 }>()({
1875
+ endpoint: "/c47/:id",
1876
+ });
1877
+ const save47 = client.createRequest<{
1878
+ response: Row47;
1879
+ payload: Partial<Row47>;
1880
+ }>()({ endpoint: "/c47/:id", method: "PATCH" });
1881
+ const C47 = collection(rowType<Row47>(), { key: "id" })
1882
+ .load(list47, {
1883
+ rows: (response) => response.items,
1884
+ cursor: (response) => response.next,
1885
+ page: (cursor) => ({ queryParams: { cursor } }),
1886
+ where: {
1887
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1888
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1889
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1890
+ },
1891
+ orderBy: { createdAt: true },
1892
+ })
1893
+ .load(one47, { byKey: (id) => ({ params: { id } }) })
1894
+ .mutate({
1895
+ update: {
1896
+ request: save47,
1897
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1898
+ },
1899
+ });
1900
+ const list48 = client.createRequest<{
1901
+ response: { items: Row48[]; next: string | null };
1902
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1903
+ }>()({ endpoint: "/teams/:teamId/c48" });
1904
+ const one48 = client.createRequest<{ response: Row48 }>()({
1905
+ endpoint: "/c48/:id",
1906
+ });
1907
+ const save48 = client.createRequest<{
1908
+ response: Row48;
1909
+ payload: Partial<Row48>;
1910
+ }>()({ endpoint: "/c48/:id", method: "PATCH" });
1911
+ const C48 = collection(rowType<Row48>(), { key: "id" })
1912
+ .load(list48, {
1913
+ rows: (response) => response.items,
1914
+ cursor: (response) => response.next,
1915
+ page: (cursor) => ({ queryParams: { cursor } }),
1916
+ where: {
1917
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1918
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1919
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1920
+ },
1921
+ orderBy: { createdAt: true },
1922
+ })
1923
+ .load(one48, { byKey: (id) => ({ params: { id } }) })
1924
+ .mutate({
1925
+ update: {
1926
+ request: save48,
1927
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1928
+ },
1929
+ });
1930
+ const list49 = client.createRequest<{
1931
+ response: { items: Row49[]; next: string | null };
1932
+ queryParams?: { cursor?: string; q?: string; likes?: number };
1933
+ }>()({ endpoint: "/teams/:teamId/c49" });
1934
+ const one49 = client.createRequest<{ response: Row49 }>()({
1935
+ endpoint: "/c49/:id",
1936
+ });
1937
+ const save49 = client.createRequest<{
1938
+ response: Row49;
1939
+ payload: Partial<Row49>;
1940
+ }>()({ endpoint: "/c49/:id", method: "PATCH" });
1941
+ const C49 = collection(rowType<Row49>(), { key: "id" })
1942
+ .load(list49, {
1943
+ rows: (response) => response.items,
1944
+ cursor: (response) => response.next,
1945
+ page: (cursor) => ({ queryParams: { cursor } }),
1946
+ where: {
1947
+ teamId: { eq: (teamId) => ({ params: { teamId } }), required: true },
1948
+ likes: { gt: (likes) => ({ queryParams: { likes } }) },
1949
+ title: { search: (q: string) => ({ queryParams: { q } }) },
1950
+ },
1951
+ orderBy: { createdAt: true },
1952
+ })
1953
+ .load(one49, { byKey: (id) => ({ params: { id } }) })
1954
+ .mutate({
1955
+ update: {
1956
+ request: save49,
1957
+ map: (key, changes) => ({ params: { id: key }, payload: changes }),
1958
+ },
1959
+ });
1960
+
1961
+ export const db = createDb(
1962
+ {
1963
+ c0: C0,
1964
+ c1: C1,
1965
+ c2: C2,
1966
+ c3: C3,
1967
+ c4: C4,
1968
+ c5: C5,
1969
+ c6: C6,
1970
+ c7: C7,
1971
+ c8: C8,
1972
+ c9: C9,
1973
+ c10: C10,
1974
+ c11: C11,
1975
+ c12: C12,
1976
+ c13: C13,
1977
+ c14: C14,
1978
+ c15: C15,
1979
+ c16: C16,
1980
+ c17: C17,
1981
+ c18: C18,
1982
+ c19: C19,
1983
+ c20: C20,
1984
+ c21: C21,
1985
+ c22: C22,
1986
+ c23: C23,
1987
+ c24: C24,
1988
+ c25: C25,
1989
+ c26: C26,
1990
+ c27: C27,
1991
+ c28: C28,
1992
+ c29: C29,
1993
+ c30: C30,
1994
+ c31: C31,
1995
+ c32: C32,
1996
+ c33: C33,
1997
+ c34: C34,
1998
+ c35: C35,
1999
+ c36: C36,
2000
+ c37: C37,
2001
+ c38: C38,
2002
+ c39: C39,
2003
+ c40: C40,
2004
+ c41: C41,
2005
+ c42: C42,
2006
+ c43: C43,
2007
+ c44: C44,
2008
+ c45: C45,
2009
+ c46: C46,
2010
+ c47: C47,
2011
+ c48: C48,
2012
+ c49: C49,
2013
+ },
2014
+ {
2015
+ orderBy: (field, direction) => ({
2016
+ queryParams: { sort: `${field}:${direction}` },
2017
+ }),
2018
+ },
2019
+ );
2020
+
2021
+ export const q0 = db.c0
2022
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2023
+ .orderBy((row) => row.createdAt, "desc")
2024
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2025
+ .join("parent", db.c1, (row) => row.parentId)
2026
+ .infinite({ pageSize: 20 });
2027
+ export const one0Query = db.c0.findOne(1).join("children", db.c1, { by: (row) => row.id, on: "parentId" });
2028
+ export const local0 = db.c0.local().where((row) => inArray(row.id, [1, 2]));
2029
+ export const write0 = () => db.c0.update(1, { title: "t" });
2030
+ export const q1 = db.c1
2031
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2032
+ .orderBy((row) => row.createdAt, "desc")
2033
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2034
+ .join("parent", db.c2, (row) => row.parentId)
2035
+ .infinite({ pageSize: 20 });
2036
+ export const one1Query = db.c1.findOne(1).join("children", db.c2, { by: (row) => row.id, on: "parentId" });
2037
+ export const local1 = db.c1.local().where((row) => inArray(row.id, [1, 2]));
2038
+ export const write1 = () => db.c1.update(1, { title: "t" });
2039
+ export const q2 = db.c2
2040
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2041
+ .orderBy((row) => row.createdAt, "desc")
2042
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2043
+ .join("parent", db.c3, (row) => row.parentId)
2044
+ .infinite({ pageSize: 20 });
2045
+ export const one2Query = db.c2.findOne(1).join("children", db.c3, { by: (row) => row.id, on: "parentId" });
2046
+ export const local2 = db.c2.local().where((row) => inArray(row.id, [1, 2]));
2047
+ export const write2 = () => db.c2.update(1, { title: "t" });
2048
+ export const q3 = db.c3
2049
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2050
+ .orderBy((row) => row.createdAt, "desc")
2051
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2052
+ .join("parent", db.c4, (row) => row.parentId)
2053
+ .infinite({ pageSize: 20 });
2054
+ export const one3Query = db.c3.findOne(1).join("children", db.c4, { by: (row) => row.id, on: "parentId" });
2055
+ export const local3 = db.c3.local().where((row) => inArray(row.id, [1, 2]));
2056
+ export const write3 = () => db.c3.update(1, { title: "t" });
2057
+ export const q4 = db.c4
2058
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2059
+ .orderBy((row) => row.createdAt, "desc")
2060
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2061
+ .join("parent", db.c5, (row) => row.parentId)
2062
+ .infinite({ pageSize: 20 });
2063
+ export const one4Query = db.c4.findOne(1).join("children", db.c5, { by: (row) => row.id, on: "parentId" });
2064
+ export const local4 = db.c4.local().where((row) => inArray(row.id, [1, 2]));
2065
+ export const write4 = () => db.c4.update(1, { title: "t" });
2066
+ export const q5 = db.c5
2067
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2068
+ .orderBy((row) => row.createdAt, "desc")
2069
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2070
+ .join("parent", db.c6, (row) => row.parentId)
2071
+ .infinite({ pageSize: 20 });
2072
+ export const one5Query = db.c5.findOne(1).join("children", db.c6, { by: (row) => row.id, on: "parentId" });
2073
+ export const local5 = db.c5.local().where((row) => inArray(row.id, [1, 2]));
2074
+ export const write5 = () => db.c5.update(1, { title: "t" });
2075
+ export const q6 = db.c6
2076
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2077
+ .orderBy((row) => row.createdAt, "desc")
2078
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2079
+ .join("parent", db.c7, (row) => row.parentId)
2080
+ .infinite({ pageSize: 20 });
2081
+ export const one6Query = db.c6.findOne(1).join("children", db.c7, { by: (row) => row.id, on: "parentId" });
2082
+ export const local6 = db.c6.local().where((row) => inArray(row.id, [1, 2]));
2083
+ export const write6 = () => db.c6.update(1, { title: "t" });
2084
+ export const q7 = db.c7
2085
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2086
+ .orderBy((row) => row.createdAt, "desc")
2087
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2088
+ .join("parent", db.c8, (row) => row.parentId)
2089
+ .infinite({ pageSize: 20 });
2090
+ export const one7Query = db.c7.findOne(1).join("children", db.c8, { by: (row) => row.id, on: "parentId" });
2091
+ export const local7 = db.c7.local().where((row) => inArray(row.id, [1, 2]));
2092
+ export const write7 = () => db.c7.update(1, { title: "t" });
2093
+ export const q8 = db.c8
2094
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2095
+ .orderBy((row) => row.createdAt, "desc")
2096
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2097
+ .join("parent", db.c9, (row) => row.parentId)
2098
+ .infinite({ pageSize: 20 });
2099
+ export const one8Query = db.c8.findOne(1).join("children", db.c9, { by: (row) => row.id, on: "parentId" });
2100
+ export const local8 = db.c8.local().where((row) => inArray(row.id, [1, 2]));
2101
+ export const write8 = () => db.c8.update(1, { title: "t" });
2102
+ export const q9 = db.c9
2103
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2104
+ .orderBy((row) => row.createdAt, "desc")
2105
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2106
+ .join("parent", db.c10, (row) => row.parentId)
2107
+ .infinite({ pageSize: 20 });
2108
+ export const one9Query = db.c9.findOne(1).join("children", db.c10, { by: (row) => row.id, on: "parentId" });
2109
+ export const local9 = db.c9.local().where((row) => inArray(row.id, [1, 2]));
2110
+ export const write9 = () => db.c9.update(1, { title: "t" });
2111
+ export const q10 = db.c10
2112
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2113
+ .orderBy((row) => row.createdAt, "desc")
2114
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2115
+ .join("parent", db.c11, (row) => row.parentId)
2116
+ .infinite({ pageSize: 20 });
2117
+ export const one10Query = db.c10.findOne(1).join("children", db.c11, { by: (row) => row.id, on: "parentId" });
2118
+ export const local10 = db.c10.local().where((row) => inArray(row.id, [1, 2]));
2119
+ export const write10 = () => db.c10.update(1, { title: "t" });
2120
+ export const q11 = db.c11
2121
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2122
+ .orderBy((row) => row.createdAt, "desc")
2123
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2124
+ .join("parent", db.c12, (row) => row.parentId)
2125
+ .infinite({ pageSize: 20 });
2126
+ export const one11Query = db.c11.findOne(1).join("children", db.c12, { by: (row) => row.id, on: "parentId" });
2127
+ export const local11 = db.c11.local().where((row) => inArray(row.id, [1, 2]));
2128
+ export const write11 = () => db.c11.update(1, { title: "t" });
2129
+ export const q12 = db.c12
2130
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2131
+ .orderBy((row) => row.createdAt, "desc")
2132
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2133
+ .join("parent", db.c13, (row) => row.parentId)
2134
+ .infinite({ pageSize: 20 });
2135
+ export const one12Query = db.c12.findOne(1).join("children", db.c13, { by: (row) => row.id, on: "parentId" });
2136
+ export const local12 = db.c12.local().where((row) => inArray(row.id, [1, 2]));
2137
+ export const write12 = () => db.c12.update(1, { title: "t" });
2138
+ export const q13 = db.c13
2139
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2140
+ .orderBy((row) => row.createdAt, "desc")
2141
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2142
+ .join("parent", db.c14, (row) => row.parentId)
2143
+ .infinite({ pageSize: 20 });
2144
+ export const one13Query = db.c13.findOne(1).join("children", db.c14, { by: (row) => row.id, on: "parentId" });
2145
+ export const local13 = db.c13.local().where((row) => inArray(row.id, [1, 2]));
2146
+ export const write13 = () => db.c13.update(1, { title: "t" });
2147
+ export const q14 = db.c14
2148
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2149
+ .orderBy((row) => row.createdAt, "desc")
2150
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2151
+ .join("parent", db.c15, (row) => row.parentId)
2152
+ .infinite({ pageSize: 20 });
2153
+ export const one14Query = db.c14.findOne(1).join("children", db.c15, { by: (row) => row.id, on: "parentId" });
2154
+ export const local14 = db.c14.local().where((row) => inArray(row.id, [1, 2]));
2155
+ export const write14 = () => db.c14.update(1, { title: "t" });
2156
+ export const q15 = db.c15
2157
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2158
+ .orderBy((row) => row.createdAt, "desc")
2159
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2160
+ .join("parent", db.c16, (row) => row.parentId)
2161
+ .infinite({ pageSize: 20 });
2162
+ export const one15Query = db.c15.findOne(1).join("children", db.c16, { by: (row) => row.id, on: "parentId" });
2163
+ export const local15 = db.c15.local().where((row) => inArray(row.id, [1, 2]));
2164
+ export const write15 = () => db.c15.update(1, { title: "t" });
2165
+ export const q16 = db.c16
2166
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2167
+ .orderBy((row) => row.createdAt, "desc")
2168
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2169
+ .join("parent", db.c17, (row) => row.parentId)
2170
+ .infinite({ pageSize: 20 });
2171
+ export const one16Query = db.c16.findOne(1).join("children", db.c17, { by: (row) => row.id, on: "parentId" });
2172
+ export const local16 = db.c16.local().where((row) => inArray(row.id, [1, 2]));
2173
+ export const write16 = () => db.c16.update(1, { title: "t" });
2174
+ export const q17 = db.c17
2175
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2176
+ .orderBy((row) => row.createdAt, "desc")
2177
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2178
+ .join("parent", db.c18, (row) => row.parentId)
2179
+ .infinite({ pageSize: 20 });
2180
+ export const one17Query = db.c17.findOne(1).join("children", db.c18, { by: (row) => row.id, on: "parentId" });
2181
+ export const local17 = db.c17.local().where((row) => inArray(row.id, [1, 2]));
2182
+ export const write17 = () => db.c17.update(1, { title: "t" });
2183
+ export const q18 = db.c18
2184
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2185
+ .orderBy((row) => row.createdAt, "desc")
2186
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2187
+ .join("parent", db.c19, (row) => row.parentId)
2188
+ .infinite({ pageSize: 20 });
2189
+ export const one18Query = db.c18.findOne(1).join("children", db.c19, { by: (row) => row.id, on: "parentId" });
2190
+ export const local18 = db.c18.local().where((row) => inArray(row.id, [1, 2]));
2191
+ export const write18 = () => db.c18.update(1, { title: "t" });
2192
+ export const q19 = db.c19
2193
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2194
+ .orderBy((row) => row.createdAt, "desc")
2195
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2196
+ .join("parent", db.c20, (row) => row.parentId)
2197
+ .infinite({ pageSize: 20 });
2198
+ export const one19Query = db.c19.findOne(1).join("children", db.c20, { by: (row) => row.id, on: "parentId" });
2199
+ export const local19 = db.c19.local().where((row) => inArray(row.id, [1, 2]));
2200
+ export const write19 = () => db.c19.update(1, { title: "t" });
2201
+ export const q20 = db.c20
2202
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2203
+ .orderBy((row) => row.createdAt, "desc")
2204
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2205
+ .join("parent", db.c21, (row) => row.parentId)
2206
+ .infinite({ pageSize: 20 });
2207
+ export const one20Query = db.c20.findOne(1).join("children", db.c21, { by: (row) => row.id, on: "parentId" });
2208
+ export const local20 = db.c20.local().where((row) => inArray(row.id, [1, 2]));
2209
+ export const write20 = () => db.c20.update(1, { title: "t" });
2210
+ export const q21 = db.c21
2211
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2212
+ .orderBy((row) => row.createdAt, "desc")
2213
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2214
+ .join("parent", db.c22, (row) => row.parentId)
2215
+ .infinite({ pageSize: 20 });
2216
+ export const one21Query = db.c21.findOne(1).join("children", db.c22, { by: (row) => row.id, on: "parentId" });
2217
+ export const local21 = db.c21.local().where((row) => inArray(row.id, [1, 2]));
2218
+ export const write21 = () => db.c21.update(1, { title: "t" });
2219
+ export const q22 = db.c22
2220
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2221
+ .orderBy((row) => row.createdAt, "desc")
2222
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2223
+ .join("parent", db.c23, (row) => row.parentId)
2224
+ .infinite({ pageSize: 20 });
2225
+ export const one22Query = db.c22.findOne(1).join("children", db.c23, { by: (row) => row.id, on: "parentId" });
2226
+ export const local22 = db.c22.local().where((row) => inArray(row.id, [1, 2]));
2227
+ export const write22 = () => db.c22.update(1, { title: "t" });
2228
+ export const q23 = db.c23
2229
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2230
+ .orderBy((row) => row.createdAt, "desc")
2231
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2232
+ .join("parent", db.c24, (row) => row.parentId)
2233
+ .infinite({ pageSize: 20 });
2234
+ export const one23Query = db.c23.findOne(1).join("children", db.c24, { by: (row) => row.id, on: "parentId" });
2235
+ export const local23 = db.c23.local().where((row) => inArray(row.id, [1, 2]));
2236
+ export const write23 = () => db.c23.update(1, { title: "t" });
2237
+ export const q24 = db.c24
2238
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2239
+ .orderBy((row) => row.createdAt, "desc")
2240
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2241
+ .join("parent", db.c25, (row) => row.parentId)
2242
+ .infinite({ pageSize: 20 });
2243
+ export const one24Query = db.c24.findOne(1).join("children", db.c25, { by: (row) => row.id, on: "parentId" });
2244
+ export const local24 = db.c24.local().where((row) => inArray(row.id, [1, 2]));
2245
+ export const write24 = () => db.c24.update(1, { title: "t" });
2246
+ export const q25 = db.c25
2247
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2248
+ .orderBy((row) => row.createdAt, "desc")
2249
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2250
+ .join("parent", db.c26, (row) => row.parentId)
2251
+ .infinite({ pageSize: 20 });
2252
+ export const one25Query = db.c25.findOne(1).join("children", db.c26, { by: (row) => row.id, on: "parentId" });
2253
+ export const local25 = db.c25.local().where((row) => inArray(row.id, [1, 2]));
2254
+ export const write25 = () => db.c25.update(1, { title: "t" });
2255
+ export const q26 = db.c26
2256
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2257
+ .orderBy((row) => row.createdAt, "desc")
2258
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2259
+ .join("parent", db.c27, (row) => row.parentId)
2260
+ .infinite({ pageSize: 20 });
2261
+ export const one26Query = db.c26.findOne(1).join("children", db.c27, { by: (row) => row.id, on: "parentId" });
2262
+ export const local26 = db.c26.local().where((row) => inArray(row.id, [1, 2]));
2263
+ export const write26 = () => db.c26.update(1, { title: "t" });
2264
+ export const q27 = db.c27
2265
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2266
+ .orderBy((row) => row.createdAt, "desc")
2267
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2268
+ .join("parent", db.c28, (row) => row.parentId)
2269
+ .infinite({ pageSize: 20 });
2270
+ export const one27Query = db.c27.findOne(1).join("children", db.c28, { by: (row) => row.id, on: "parentId" });
2271
+ export const local27 = db.c27.local().where((row) => inArray(row.id, [1, 2]));
2272
+ export const write27 = () => db.c27.update(1, { title: "t" });
2273
+ export const q28 = db.c28
2274
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2275
+ .orderBy((row) => row.createdAt, "desc")
2276
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2277
+ .join("parent", db.c29, (row) => row.parentId)
2278
+ .infinite({ pageSize: 20 });
2279
+ export const one28Query = db.c28.findOne(1).join("children", db.c29, { by: (row) => row.id, on: "parentId" });
2280
+ export const local28 = db.c28.local().where((row) => inArray(row.id, [1, 2]));
2281
+ export const write28 = () => db.c28.update(1, { title: "t" });
2282
+ export const q29 = db.c29
2283
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2284
+ .orderBy((row) => row.createdAt, "desc")
2285
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2286
+ .join("parent", db.c30, (row) => row.parentId)
2287
+ .infinite({ pageSize: 20 });
2288
+ export const one29Query = db.c29.findOne(1).join("children", db.c30, { by: (row) => row.id, on: "parentId" });
2289
+ export const local29 = db.c29.local().where((row) => inArray(row.id, [1, 2]));
2290
+ export const write29 = () => db.c29.update(1, { title: "t" });
2291
+ export const q30 = db.c30
2292
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2293
+ .orderBy((row) => row.createdAt, "desc")
2294
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2295
+ .join("parent", db.c31, (row) => row.parentId)
2296
+ .infinite({ pageSize: 20 });
2297
+ export const one30Query = db.c30.findOne(1).join("children", db.c31, { by: (row) => row.id, on: "parentId" });
2298
+ export const local30 = db.c30.local().where((row) => inArray(row.id, [1, 2]));
2299
+ export const write30 = () => db.c30.update(1, { title: "t" });
2300
+ export const q31 = db.c31
2301
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2302
+ .orderBy((row) => row.createdAt, "desc")
2303
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2304
+ .join("parent", db.c32, (row) => row.parentId)
2305
+ .infinite({ pageSize: 20 });
2306
+ export const one31Query = db.c31.findOne(1).join("children", db.c32, { by: (row) => row.id, on: "parentId" });
2307
+ export const local31 = db.c31.local().where((row) => inArray(row.id, [1, 2]));
2308
+ export const write31 = () => db.c31.update(1, { title: "t" });
2309
+ export const q32 = db.c32
2310
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2311
+ .orderBy((row) => row.createdAt, "desc")
2312
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2313
+ .join("parent", db.c33, (row) => row.parentId)
2314
+ .infinite({ pageSize: 20 });
2315
+ export const one32Query = db.c32.findOne(1).join("children", db.c33, { by: (row) => row.id, on: "parentId" });
2316
+ export const local32 = db.c32.local().where((row) => inArray(row.id, [1, 2]));
2317
+ export const write32 = () => db.c32.update(1, { title: "t" });
2318
+ export const q33 = db.c33
2319
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2320
+ .orderBy((row) => row.createdAt, "desc")
2321
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2322
+ .join("parent", db.c34, (row) => row.parentId)
2323
+ .infinite({ pageSize: 20 });
2324
+ export const one33Query = db.c33.findOne(1).join("children", db.c34, { by: (row) => row.id, on: "parentId" });
2325
+ export const local33 = db.c33.local().where((row) => inArray(row.id, [1, 2]));
2326
+ export const write33 = () => db.c33.update(1, { title: "t" });
2327
+ export const q34 = db.c34
2328
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2329
+ .orderBy((row) => row.createdAt, "desc")
2330
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2331
+ .join("parent", db.c35, (row) => row.parentId)
2332
+ .infinite({ pageSize: 20 });
2333
+ export const one34Query = db.c34.findOne(1).join("children", db.c35, { by: (row) => row.id, on: "parentId" });
2334
+ export const local34 = db.c34.local().where((row) => inArray(row.id, [1, 2]));
2335
+ export const write34 = () => db.c34.update(1, { title: "t" });
2336
+ export const q35 = db.c35
2337
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2338
+ .orderBy((row) => row.createdAt, "desc")
2339
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2340
+ .join("parent", db.c36, (row) => row.parentId)
2341
+ .infinite({ pageSize: 20 });
2342
+ export const one35Query = db.c35.findOne(1).join("children", db.c36, { by: (row) => row.id, on: "parentId" });
2343
+ export const local35 = db.c35.local().where((row) => inArray(row.id, [1, 2]));
2344
+ export const write35 = () => db.c35.update(1, { title: "t" });
2345
+ export const q36 = db.c36
2346
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2347
+ .orderBy((row) => row.createdAt, "desc")
2348
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2349
+ .join("parent", db.c37, (row) => row.parentId)
2350
+ .infinite({ pageSize: 20 });
2351
+ export const one36Query = db.c36.findOne(1).join("children", db.c37, { by: (row) => row.id, on: "parentId" });
2352
+ export const local36 = db.c36.local().where((row) => inArray(row.id, [1, 2]));
2353
+ export const write36 = () => db.c36.update(1, { title: "t" });
2354
+ export const q37 = db.c37
2355
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2356
+ .orderBy((row) => row.createdAt, "desc")
2357
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2358
+ .join("parent", db.c38, (row) => row.parentId)
2359
+ .infinite({ pageSize: 20 });
2360
+ export const one37Query = db.c37.findOne(1).join("children", db.c38, { by: (row) => row.id, on: "parentId" });
2361
+ export const local37 = db.c37.local().where((row) => inArray(row.id, [1, 2]));
2362
+ export const write37 = () => db.c37.update(1, { title: "t" });
2363
+ export const q38 = db.c38
2364
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2365
+ .orderBy((row) => row.createdAt, "desc")
2366
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2367
+ .join("parent", db.c39, (row) => row.parentId)
2368
+ .infinite({ pageSize: 20 });
2369
+ export const one38Query = db.c38.findOne(1).join("children", db.c39, { by: (row) => row.id, on: "parentId" });
2370
+ export const local38 = db.c38.local().where((row) => inArray(row.id, [1, 2]));
2371
+ export const write38 = () => db.c38.update(1, { title: "t" });
2372
+ export const q39 = db.c39
2373
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2374
+ .orderBy((row) => row.createdAt, "desc")
2375
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2376
+ .join("parent", db.c40, (row) => row.parentId)
2377
+ .infinite({ pageSize: 20 });
2378
+ export const one39Query = db.c39.findOne(1).join("children", db.c40, { by: (row) => row.id, on: "parentId" });
2379
+ export const local39 = db.c39.local().where((row) => inArray(row.id, [1, 2]));
2380
+ export const write39 = () => db.c39.update(1, { title: "t" });
2381
+ export const q40 = db.c40
2382
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2383
+ .orderBy((row) => row.createdAt, "desc")
2384
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2385
+ .join("parent", db.c41, (row) => row.parentId)
2386
+ .infinite({ pageSize: 20 });
2387
+ export const one40Query = db.c40.findOne(1).join("children", db.c41, { by: (row) => row.id, on: "parentId" });
2388
+ export const local40 = db.c40.local().where((row) => inArray(row.id, [1, 2]));
2389
+ export const write40 = () => db.c40.update(1, { title: "t" });
2390
+ export const q41 = db.c41
2391
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2392
+ .orderBy((row) => row.createdAt, "desc")
2393
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2394
+ .join("parent", db.c42, (row) => row.parentId)
2395
+ .infinite({ pageSize: 20 });
2396
+ export const one41Query = db.c41.findOne(1).join("children", db.c42, { by: (row) => row.id, on: "parentId" });
2397
+ export const local41 = db.c41.local().where((row) => inArray(row.id, [1, 2]));
2398
+ export const write41 = () => db.c41.update(1, { title: "t" });
2399
+ export const q42 = db.c42
2400
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2401
+ .orderBy((row) => row.createdAt, "desc")
2402
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2403
+ .join("parent", db.c43, (row) => row.parentId)
2404
+ .infinite({ pageSize: 20 });
2405
+ export const one42Query = db.c42.findOne(1).join("children", db.c43, { by: (row) => row.id, on: "parentId" });
2406
+ export const local42 = db.c42.local().where((row) => inArray(row.id, [1, 2]));
2407
+ export const write42 = () => db.c42.update(1, { title: "t" });
2408
+ export const q43 = db.c43
2409
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2410
+ .orderBy((row) => row.createdAt, "desc")
2411
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2412
+ .join("parent", db.c44, (row) => row.parentId)
2413
+ .infinite({ pageSize: 20 });
2414
+ export const one43Query = db.c43.findOne(1).join("children", db.c44, { by: (row) => row.id, on: "parentId" });
2415
+ export const local43 = db.c43.local().where((row) => inArray(row.id, [1, 2]));
2416
+ export const write43 = () => db.c43.update(1, { title: "t" });
2417
+ export const q44 = db.c44
2418
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2419
+ .orderBy((row) => row.createdAt, "desc")
2420
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2421
+ .join("parent", db.c45, (row) => row.parentId)
2422
+ .infinite({ pageSize: 20 });
2423
+ export const one44Query = db.c44.findOne(1).join("children", db.c45, { by: (row) => row.id, on: "parentId" });
2424
+ export const local44 = db.c44.local().where((row) => inArray(row.id, [1, 2]));
2425
+ export const write44 = () => db.c44.update(1, { title: "t" });
2426
+ export const q45 = db.c45
2427
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2428
+ .orderBy((row) => row.createdAt, "desc")
2429
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2430
+ .join("parent", db.c46, (row) => row.parentId)
2431
+ .infinite({ pageSize: 20 });
2432
+ export const one45Query = db.c45.findOne(1).join("children", db.c46, { by: (row) => row.id, on: "parentId" });
2433
+ export const local45 = db.c45.local().where((row) => inArray(row.id, [1, 2]));
2434
+ export const write45 = () => db.c45.update(1, { title: "t" });
2435
+ export const q46 = db.c46
2436
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2437
+ .orderBy((row) => row.createdAt, "desc")
2438
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2439
+ .join("parent", db.c47, (row) => row.parentId)
2440
+ .infinite({ pageSize: 20 });
2441
+ export const one46Query = db.c46.findOne(1).join("children", db.c47, { by: (row) => row.id, on: "parentId" });
2442
+ export const local46 = db.c46.local().where((row) => inArray(row.id, [1, 2]));
2443
+ export const write46 = () => db.c46.update(1, { title: "t" });
2444
+ export const q47 = db.c47
2445
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2446
+ .orderBy((row) => row.createdAt, "desc")
2447
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2448
+ .join("parent", db.c48, (row) => row.parentId)
2449
+ .infinite({ pageSize: 20 });
2450
+ export const one47Query = db.c47.findOne(1).join("children", db.c48, { by: (row) => row.id, on: "parentId" });
2451
+ export const local47 = db.c47.local().where((row) => inArray(row.id, [1, 2]));
2452
+ export const write47 = () => db.c47.update(1, { title: "t" });
2453
+ export const q48 = db.c48
2454
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2455
+ .orderBy((row) => row.createdAt, "desc")
2456
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2457
+ .join("parent", db.c49, (row) => row.parentId)
2458
+ .infinite({ pageSize: 20 });
2459
+ export const one48Query = db.c48.findOne(1).join("children", db.c49, { by: (row) => row.id, on: "parentId" });
2460
+ export const local48 = db.c48.local().where((row) => inArray(row.id, [1, 2]));
2461
+ export const write48 = () => db.c48.update(1, { title: "t" });
2462
+ export const q49 = db.c49
2463
+ .where((row) => and(eq(row.teamId, 1), gt(row.likes, 2), op("search", row.title, "x")))
2464
+ .orderBy((row) => row.createdAt, "desc")
2465
+ .select((row) => ({ id: row.id, title: row.title, parentId: row.parentId }))
2466
+ .join("parent", db.c0, (row) => row.parentId)
2467
+ .infinite({ pageSize: 20 });
2468
+ export const one49Query = db.c49.findOne(1).join("children", db.c0, { by: (row) => row.id, on: "parentId" });
2469
+ export const local49 = db.c49.local().where((row) => inArray(row.id, [1, 2]));
2470
+ export const write49 = () => db.c49.update(1, { title: "t" });
2471
+
2472
+ export const tx = () =>
2473
+ db.transaction((t) => {
2474
+ t.c0.update(1, { likes: 1 });
2475
+ t.c1.update(2, { title: "a" });
2476
+ });