dzql 0.5.33 → 0.6.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 (150) hide show
  1. package/.env.sample +28 -0
  2. package/compose.yml +28 -0
  3. package/dist/client/index.ts +1 -0
  4. package/dist/client/stores/useMyProfileStore.ts +114 -0
  5. package/dist/client/stores/useOrgDashboardStore.ts +131 -0
  6. package/dist/client/stores/useVenueDetailStore.ts +117 -0
  7. package/dist/client/ws.ts +716 -0
  8. package/dist/db/migrations/000_core.sql +92 -0
  9. package/dist/db/migrations/20251229T212912022Z_schema.sql +3020 -0
  10. package/dist/db/migrations/20251229T212912022Z_subscribables.sql +371 -0
  11. package/dist/runtime/manifest.json +1562 -0
  12. package/docs/README.md +293 -36
  13. package/docs/feature-requests/applyPatch-bug-report.md +85 -0
  14. package/docs/feature-requests/connection-ready-profile.md +57 -0
  15. package/docs/feature-requests/hidden-bug-report.md +111 -0
  16. package/docs/feature-requests/hidden-fields-subscribables.md +34 -0
  17. package/docs/feature-requests/subscribable-param-key-bug.md +38 -0
  18. package/docs/feature-requests/todo.md +146 -0
  19. package/docs/for_ai.md +641 -0
  20. package/docs/project-setup.md +432 -0
  21. package/examples/blog.ts +50 -0
  22. package/examples/invalid.ts +18 -0
  23. package/examples/venues.js +485 -0
  24. package/package.json +23 -60
  25. package/src/cli/codegen/client.ts +99 -0
  26. package/src/cli/codegen/manifest.ts +95 -0
  27. package/src/cli/codegen/pinia.ts +174 -0
  28. package/src/cli/codegen/realtime.ts +58 -0
  29. package/src/cli/codegen/sql.ts +698 -0
  30. package/src/cli/codegen/subscribable_sql.ts +547 -0
  31. package/src/cli/codegen/subscribable_store.ts +184 -0
  32. package/src/cli/codegen/types.ts +142 -0
  33. package/src/cli/compiler/analyzer.ts +52 -0
  34. package/src/cli/compiler/graph_rules.ts +251 -0
  35. package/src/cli/compiler/ir.ts +233 -0
  36. package/src/cli/compiler/loader.ts +132 -0
  37. package/src/cli/compiler/permissions.ts +227 -0
  38. package/src/cli/index.ts +164 -0
  39. package/src/client/index.ts +1 -0
  40. package/src/client/ws.ts +286 -0
  41. package/src/create/.env.example +8 -0
  42. package/src/create/README.md +101 -0
  43. package/src/create/compose.yml +14 -0
  44. package/src/create/domain.ts +153 -0
  45. package/src/create/package.json +24 -0
  46. package/src/create/server.ts +18 -0
  47. package/src/create/setup.sh +11 -0
  48. package/src/create/tsconfig.json +15 -0
  49. package/src/runtime/auth.ts +39 -0
  50. package/src/runtime/db.ts +33 -0
  51. package/src/runtime/errors.ts +51 -0
  52. package/src/runtime/index.ts +98 -0
  53. package/src/runtime/js_functions.ts +63 -0
  54. package/src/runtime/manifest_loader.ts +29 -0
  55. package/src/runtime/namespace.ts +483 -0
  56. package/src/runtime/server.ts +87 -0
  57. package/src/runtime/ws.ts +197 -0
  58. package/src/shared/ir.ts +197 -0
  59. package/tests/client.test.ts +38 -0
  60. package/tests/codegen.test.ts +71 -0
  61. package/tests/compiler.test.ts +45 -0
  62. package/tests/graph_rules.test.ts +173 -0
  63. package/tests/integration/db.test.ts +174 -0
  64. package/tests/integration/e2e.test.ts +65 -0
  65. package/tests/integration/features.test.ts +922 -0
  66. package/tests/integration/full_stack.test.ts +262 -0
  67. package/tests/integration/setup.ts +45 -0
  68. package/tests/ir.test.ts +32 -0
  69. package/tests/namespace.test.ts +395 -0
  70. package/tests/permissions.test.ts +55 -0
  71. package/tests/pinia.test.ts +48 -0
  72. package/tests/realtime.test.ts +22 -0
  73. package/tests/runtime.test.ts +80 -0
  74. package/tests/subscribable_gen.test.ts +72 -0
  75. package/tests/subscribable_reactivity.test.ts +258 -0
  76. package/tests/venues_gen.test.ts +25 -0
  77. package/tsconfig.json +20 -0
  78. package/tsconfig.tsbuildinfo +1 -0
  79. package/README.md +0 -90
  80. package/bin/cli.js +0 -727
  81. package/docs/compiler/ADVANCED_FILTERS.md +0 -183
  82. package/docs/compiler/CODING_STANDARDS.md +0 -415
  83. package/docs/compiler/COMPARISON.md +0 -673
  84. package/docs/compiler/QUICKSTART.md +0 -326
  85. package/docs/compiler/README.md +0 -134
  86. package/docs/examples/README.md +0 -38
  87. package/docs/examples/blog.sql +0 -160
  88. package/docs/examples/venue-detail-simple.sql +0 -8
  89. package/docs/examples/venue-detail-subscribable.sql +0 -45
  90. package/docs/for-ai/claude-guide.md +0 -1210
  91. package/docs/getting-started/quickstart.md +0 -125
  92. package/docs/getting-started/subscriptions-quick-start.md +0 -203
  93. package/docs/getting-started/tutorial.md +0 -1104
  94. package/docs/guides/atomic-updates.md +0 -299
  95. package/docs/guides/client-stores.md +0 -730
  96. package/docs/guides/composite-primary-keys.md +0 -158
  97. package/docs/guides/custom-functions.md +0 -362
  98. package/docs/guides/drop-semantics.md +0 -554
  99. package/docs/guides/field-defaults.md +0 -240
  100. package/docs/guides/interpreter-vs-compiler.md +0 -237
  101. package/docs/guides/many-to-many.md +0 -929
  102. package/docs/guides/subscriptions.md +0 -537
  103. package/docs/reference/api.md +0 -1373
  104. package/docs/reference/client.md +0 -224
  105. package/src/client/stores/index.js +0 -8
  106. package/src/client/stores/useAppStore.js +0 -285
  107. package/src/client/stores/useWsStore.js +0 -289
  108. package/src/client/ws.js +0 -762
  109. package/src/compiler/cli/compile-example.js +0 -33
  110. package/src/compiler/cli/compile-subscribable.js +0 -43
  111. package/src/compiler/cli/debug-compile.js +0 -44
  112. package/src/compiler/cli/debug-parse.js +0 -26
  113. package/src/compiler/cli/debug-path-parser.js +0 -18
  114. package/src/compiler/cli/debug-subscribable-parser.js +0 -21
  115. package/src/compiler/cli/index.js +0 -174
  116. package/src/compiler/codegen/auth-codegen.js +0 -153
  117. package/src/compiler/codegen/drop-semantics-codegen.js +0 -553
  118. package/src/compiler/codegen/graph-rules-codegen.js +0 -450
  119. package/src/compiler/codegen/notification-codegen.js +0 -232
  120. package/src/compiler/codegen/operation-codegen.js +0 -1382
  121. package/src/compiler/codegen/permission-codegen.js +0 -318
  122. package/src/compiler/codegen/subscribable-codegen.js +0 -827
  123. package/src/compiler/compiler.js +0 -371
  124. package/src/compiler/index.js +0 -11
  125. package/src/compiler/parser/entity-parser.js +0 -440
  126. package/src/compiler/parser/path-parser.js +0 -290
  127. package/src/compiler/parser/subscribable-parser.js +0 -244
  128. package/src/database/dzql-core.sql +0 -161
  129. package/src/database/migrations/001_schema.sql +0 -60
  130. package/src/database/migrations/002_functions.sql +0 -890
  131. package/src/database/migrations/003_operations.sql +0 -1135
  132. package/src/database/migrations/004_search.sql +0 -581
  133. package/src/database/migrations/005_entities.sql +0 -730
  134. package/src/database/migrations/006_auth.sql +0 -94
  135. package/src/database/migrations/007_events.sql +0 -133
  136. package/src/database/migrations/008_hello.sql +0 -18
  137. package/src/database/migrations/008a_meta.sql +0 -172
  138. package/src/database/migrations/009_subscriptions.sql +0 -240
  139. package/src/database/migrations/010_atomic_updates.sql +0 -157
  140. package/src/database/migrations/010_fix_m2m_events.sql +0 -94
  141. package/src/index.js +0 -40
  142. package/src/server/api.js +0 -9
  143. package/src/server/db.js +0 -442
  144. package/src/server/index.js +0 -317
  145. package/src/server/logger.js +0 -259
  146. package/src/server/mcp.js +0 -594
  147. package/src/server/meta-route.js +0 -251
  148. package/src/server/namespace.js +0 -292
  149. package/src/server/subscriptions.js +0 -351
  150. package/src/server/ws.js +0 -573
@@ -0,0 +1,716 @@
1
+ // Generated by TZQL Compiler v2.0.0
2
+ // Do not edit this file directly.
3
+
4
+ import { WebSocketManager } from '/Users/peterb/Workshop/blueshed/dzql/packages/tzql/src/client/index.ts';
5
+
6
+ // Filter operators for search queries
7
+ export interface FilterOperators<T> {
8
+ eq?: T;
9
+ ne?: T;
10
+ gt?: T;
11
+ gte?: T;
12
+ lt?: T;
13
+ lte?: T;
14
+ in?: T[];
15
+ not_in?: T[];
16
+ ilike?: string;
17
+ is_null?: boolean;
18
+ }
19
+
20
+ export type FilterValue<T> = T | FilterOperators<T>;
21
+
22
+ export interface Users {
23
+ id: number;
24
+ name: string;
25
+ email: string;
26
+ password_hash: string;
27
+ created_at?: string;
28
+ }
29
+
30
+ export interface SaveUsersParams {
31
+ id?: number;
32
+ name: string;
33
+ email: string;
34
+ password_hash: string;
35
+ created_at?: string;
36
+ }
37
+
38
+ export interface UsersPK {
39
+ id: number;
40
+ }
41
+
42
+ export interface UsersFilters {
43
+ id?: FilterValue<number>;
44
+ name?: FilterValue<string>;
45
+ email?: FilterValue<string>;
46
+ password_hash?: FilterValue<string>;
47
+ created_at?: FilterValue<string>;
48
+ }
49
+
50
+ export interface SearchUsersParams {
51
+ filters?: UsersFilters;
52
+ sort_field?: keyof Users;
53
+ sort_order?: 'asc' | 'desc';
54
+ limit?: number;
55
+ offset?: number;
56
+ }
57
+
58
+ export interface LookupUsersParams {
59
+ q?: string;
60
+ limit?: number;
61
+ }
62
+
63
+ export interface Organisations {
64
+ id: number;
65
+ name: string;
66
+ description?: string;
67
+ }
68
+
69
+ export interface SaveOrganisationsParams {
70
+ id?: number;
71
+ name: string;
72
+ description?: string;
73
+ }
74
+
75
+ export interface OrganisationsPK {
76
+ id: number;
77
+ }
78
+
79
+ export interface OrganisationsFilters {
80
+ id?: FilterValue<number>;
81
+ name?: FilterValue<string>;
82
+ description?: FilterValue<string>;
83
+ }
84
+
85
+ export interface SearchOrganisationsParams {
86
+ filters?: OrganisationsFilters;
87
+ sort_field?: keyof Organisations;
88
+ sort_order?: 'asc' | 'desc';
89
+ limit?: number;
90
+ offset?: number;
91
+ }
92
+
93
+ export interface LookupOrganisationsParams {
94
+ q?: string;
95
+ limit?: number;
96
+ }
97
+
98
+ export interface ActsFor {
99
+ user_id: number;
100
+ org_id: number;
101
+ valid_from: string;
102
+ valid_to?: string;
103
+ active?: boolean;
104
+ }
105
+
106
+ export interface SaveActsForParams {
107
+ user_id?: number;
108
+ org_id?: number;
109
+ valid_from?: string;
110
+ valid_to?: string;
111
+ active?: boolean;
112
+ }
113
+
114
+ export interface ActsForPK {
115
+ user_id: number;
116
+ org_id: number;
117
+ valid_from: string;
118
+ }
119
+
120
+ export interface ActsForFilters {
121
+ user_id?: FilterValue<number>;
122
+ org_id?: FilterValue<number>;
123
+ valid_from?: FilterValue<string>;
124
+ valid_to?: FilterValue<string>;
125
+ active?: FilterValue<boolean>;
126
+ }
127
+
128
+ export interface SearchActsForParams {
129
+ filters?: ActsForFilters;
130
+ sort_field?: keyof ActsFor;
131
+ sort_order?: 'asc' | 'desc';
132
+ limit?: number;
133
+ offset?: number;
134
+ }
135
+
136
+ export interface LookupActsForParams {
137
+ q?: string;
138
+ limit?: number;
139
+ }
140
+
141
+ export interface Venues {
142
+ id: number;
143
+ org_id: number;
144
+ name: string;
145
+ address: string;
146
+ description?: string;
147
+ }
148
+
149
+ export interface SaveVenuesParams {
150
+ id?: number;
151
+ org_id: number;
152
+ name: string;
153
+ address: string;
154
+ description?: string;
155
+ }
156
+
157
+ export interface VenuesPK {
158
+ id: number;
159
+ }
160
+
161
+ export interface VenuesFilters {
162
+ id?: FilterValue<number>;
163
+ org_id?: FilterValue<number>;
164
+ name?: FilterValue<string>;
165
+ address?: FilterValue<string>;
166
+ description?: FilterValue<string>;
167
+ }
168
+
169
+ export interface SearchVenuesParams {
170
+ filters?: VenuesFilters;
171
+ sort_field?: keyof Venues;
172
+ sort_order?: 'asc' | 'desc';
173
+ limit?: number;
174
+ offset?: number;
175
+ }
176
+
177
+ export interface LookupVenuesParams {
178
+ q?: string;
179
+ limit?: number;
180
+ }
181
+
182
+ export interface Sites {
183
+ id: number;
184
+ venue_id: number;
185
+ name: string;
186
+ description?: string;
187
+ }
188
+
189
+ export interface SaveSitesParams {
190
+ id?: number;
191
+ venue_id: number;
192
+ name: string;
193
+ description?: string;
194
+ }
195
+
196
+ export interface SitesPK {
197
+ id: number;
198
+ }
199
+
200
+ export interface SitesFilters {
201
+ id?: FilterValue<number>;
202
+ venue_id?: FilterValue<number>;
203
+ name?: FilterValue<string>;
204
+ description?: FilterValue<string>;
205
+ }
206
+
207
+ export interface SearchSitesParams {
208
+ filters?: SitesFilters;
209
+ sort_field?: keyof Sites;
210
+ sort_order?: 'asc' | 'desc';
211
+ limit?: number;
212
+ offset?: number;
213
+ }
214
+
215
+ export interface LookupSitesParams {
216
+ q?: string;
217
+ limit?: number;
218
+ }
219
+
220
+ export interface Products {
221
+ id: number;
222
+ org_id: number;
223
+ name: string;
224
+ description?: string;
225
+ price: number;
226
+ created_by?: number;
227
+ created_at?: string;
228
+ deleted_at?: string;
229
+ }
230
+
231
+ export interface SaveProductsParams {
232
+ id?: number;
233
+ org_id: number;
234
+ name: string;
235
+ description?: string;
236
+ price?: number;
237
+ created_by?: number;
238
+ created_at?: string;
239
+ deleted_at?: string;
240
+ }
241
+
242
+ export interface ProductsPK {
243
+ id: number;
244
+ }
245
+
246
+ export interface ProductsFilters {
247
+ id?: FilterValue<number>;
248
+ org_id?: FilterValue<number>;
249
+ name?: FilterValue<string>;
250
+ description?: FilterValue<string>;
251
+ price?: FilterValue<number>;
252
+ created_by?: FilterValue<number>;
253
+ created_at?: FilterValue<string>;
254
+ deleted_at?: FilterValue<string>;
255
+ }
256
+
257
+ export interface SearchProductsParams {
258
+ filters?: ProductsFilters;
259
+ sort_field?: keyof Products;
260
+ sort_order?: 'asc' | 'desc';
261
+ limit?: number;
262
+ offset?: number;
263
+ }
264
+
265
+ export interface LookupProductsParams {
266
+ q?: string;
267
+ limit?: number;
268
+ }
269
+
270
+ export interface Packages {
271
+ id: number;
272
+ owner_org_id: number;
273
+ sponsor_org_id?: number;
274
+ name: string;
275
+ price: number;
276
+ status: string;
277
+ }
278
+
279
+ export interface SavePackagesParams {
280
+ id?: number;
281
+ owner_org_id: number;
282
+ sponsor_org_id?: number;
283
+ name: string;
284
+ price?: number;
285
+ status?: string;
286
+ }
287
+
288
+ export interface PackagesPK {
289
+ id: number;
290
+ }
291
+
292
+ export interface PackagesFilters {
293
+ id?: FilterValue<number>;
294
+ owner_org_id?: FilterValue<number>;
295
+ sponsor_org_id?: FilterValue<number>;
296
+ name?: FilterValue<string>;
297
+ price?: FilterValue<number>;
298
+ status?: FilterValue<string>;
299
+ }
300
+
301
+ export interface SearchPackagesParams {
302
+ filters?: PackagesFilters;
303
+ sort_field?: keyof Packages;
304
+ sort_order?: 'asc' | 'desc';
305
+ limit?: number;
306
+ offset?: number;
307
+ }
308
+
309
+ export interface LookupPackagesParams {
310
+ q?: string;
311
+ limit?: number;
312
+ }
313
+
314
+ export interface Allocations {
315
+ id: number;
316
+ package_id: number;
317
+ site_id: number;
318
+ from_date: string;
319
+ to_date: string;
320
+ }
321
+
322
+ export interface SaveAllocationsParams {
323
+ id?: number;
324
+ package_id: number;
325
+ site_id: number;
326
+ from_date: string;
327
+ to_date: string;
328
+ }
329
+
330
+ export interface AllocationsPK {
331
+ id: number;
332
+ }
333
+
334
+ export interface AllocationsFilters {
335
+ id?: FilterValue<number>;
336
+ package_id?: FilterValue<number>;
337
+ site_id?: FilterValue<number>;
338
+ from_date?: FilterValue<string>;
339
+ to_date?: FilterValue<string>;
340
+ }
341
+
342
+ export interface SearchAllocationsParams {
343
+ filters?: AllocationsFilters;
344
+ sort_field?: keyof Allocations;
345
+ sort_order?: 'asc' | 'desc';
346
+ limit?: number;
347
+ offset?: number;
348
+ }
349
+
350
+ export interface LookupAllocationsParams {
351
+ q?: string;
352
+ limit?: number;
353
+ }
354
+
355
+ export interface ContractorRights {
356
+ contractor_org_id: number;
357
+ sponsor_org_id: number;
358
+ package_id: number;
359
+ valid_from: string;
360
+ valid_to?: string;
361
+ }
362
+
363
+ export interface SaveContractorRightsParams {
364
+ contractor_org_id?: number;
365
+ sponsor_org_id: number;
366
+ package_id?: number;
367
+ valid_from?: string;
368
+ valid_to?: string;
369
+ }
370
+
371
+ export interface ContractorRightsPK {
372
+ contractor_org_id: number;
373
+ package_id: number;
374
+ valid_from: string;
375
+ }
376
+
377
+ export interface ContractorRightsFilters {
378
+ contractor_org_id?: FilterValue<number>;
379
+ sponsor_org_id?: FilterValue<number>;
380
+ package_id?: FilterValue<number>;
381
+ valid_from?: FilterValue<string>;
382
+ valid_to?: FilterValue<string>;
383
+ }
384
+
385
+ export interface SearchContractorRightsParams {
386
+ filters?: ContractorRightsFilters;
387
+ sort_field?: keyof ContractorRights;
388
+ sort_order?: 'asc' | 'desc';
389
+ limit?: number;
390
+ offset?: number;
391
+ }
392
+
393
+ export interface LookupContractorRightsParams {
394
+ q?: string;
395
+ limit?: number;
396
+ }
397
+
398
+ export interface Brands {
399
+ id: number;
400
+ org_id: number;
401
+ name: string;
402
+ description?: string;
403
+ }
404
+
405
+ export interface SaveBrandsParams {
406
+ id?: number;
407
+ org_id: number;
408
+ name: string;
409
+ description?: string;
410
+ }
411
+
412
+ export interface BrandsPK {
413
+ id: number;
414
+ }
415
+
416
+ export interface BrandsFilters {
417
+ id?: FilterValue<number>;
418
+ org_id?: FilterValue<number>;
419
+ name?: FilterValue<string>;
420
+ description?: FilterValue<string>;
421
+ }
422
+
423
+ export interface SearchBrandsParams {
424
+ filters?: BrandsFilters;
425
+ sort_field?: keyof Brands;
426
+ sort_order?: 'asc' | 'desc';
427
+ limit?: number;
428
+ offset?: number;
429
+ }
430
+
431
+ export interface LookupBrandsParams {
432
+ q?: string;
433
+ limit?: number;
434
+ }
435
+
436
+ export interface Artwork {
437
+ id: number;
438
+ brand_id: number;
439
+ url: string;
440
+ ratio: number;
441
+ }
442
+
443
+ export interface SaveArtworkParams {
444
+ id?: number;
445
+ brand_id: number;
446
+ url: string;
447
+ ratio: number;
448
+ }
449
+
450
+ export interface ArtworkPK {
451
+ id: number;
452
+ }
453
+
454
+ export interface ArtworkFilters {
455
+ id?: FilterValue<number>;
456
+ brand_id?: FilterValue<number>;
457
+ url?: FilterValue<string>;
458
+ ratio?: FilterValue<number>;
459
+ }
460
+
461
+ export interface SearchArtworkParams {
462
+ filters?: ArtworkFilters;
463
+ sort_field?: keyof Artwork;
464
+ sort_order?: 'asc' | 'desc';
465
+ limit?: number;
466
+ offset?: number;
467
+ }
468
+
469
+ export interface LookupArtworkParams {
470
+ q?: string;
471
+ limit?: number;
472
+ }
473
+
474
+ export interface Tags {
475
+ id: number;
476
+ name: string;
477
+ color?: string;
478
+ description?: string;
479
+ }
480
+
481
+ export interface SaveTagsParams {
482
+ id?: number;
483
+ name: string;
484
+ color?: string;
485
+ description?: string;
486
+ }
487
+
488
+ export interface TagsPK {
489
+ id: number;
490
+ }
491
+
492
+ export interface TagsFilters {
493
+ id?: FilterValue<number>;
494
+ name?: FilterValue<string>;
495
+ color?: FilterValue<string>;
496
+ description?: FilterValue<string>;
497
+ }
498
+
499
+ export interface SearchTagsParams {
500
+ filters?: TagsFilters;
501
+ sort_field?: keyof Tags;
502
+ sort_order?: 'asc' | 'desc';
503
+ limit?: number;
504
+ offset?: number;
505
+ }
506
+
507
+ export interface LookupTagsParams {
508
+ q?: string;
509
+ limit?: number;
510
+ }
511
+
512
+ export interface BrandTags {
513
+ brand_id: number;
514
+ tag_id: number;
515
+ }
516
+
517
+ export interface SaveBrandTagsParams {
518
+ brand_id?: number;
519
+ tag_id?: number;
520
+ }
521
+
522
+ export interface BrandTagsPK {
523
+ brand_id: number;
524
+ tag_id: number;
525
+ }
526
+
527
+ export interface BrandTagsFilters {
528
+ brand_id?: FilterValue<number>;
529
+ tag_id?: FilterValue<number>;
530
+ }
531
+
532
+ export interface SearchBrandTagsParams {
533
+ filters?: BrandTagsFilters;
534
+ sort_field?: keyof BrandTags;
535
+ sort_order?: 'asc' | 'desc';
536
+ limit?: number;
537
+ offset?: number;
538
+ }
539
+
540
+ export interface LookupBrandTagsParams {
541
+ q?: string;
542
+ limit?: number;
543
+ }
544
+
545
+ export interface VenueDetailParams {
546
+ venue_id: number;
547
+ }
548
+
549
+ export interface OrgDashboardParams {
550
+ org_id: number;
551
+ }
552
+
553
+ export interface MyProfileParams {
554
+ }
555
+
556
+
557
+
558
+ /** API interface with typed methods */
559
+ export interface TzqlAPI {
560
+ login_user: (params: Record<string, unknown>) => Promise<unknown>;
561
+ register_user: (params: Record<string, unknown>) => Promise<unknown>;
562
+ get_users: (params: UsersPK) => Promise<Users | null>;
563
+ save_users: (params: SaveUsersParams) => Promise<Users>;
564
+ delete_users: (params: UsersPK) => Promise<Users>;
565
+ search_users: (params: SearchUsersParams) => Promise<Users[]>;
566
+ lookup_users: (params: LookupUsersParams) => Promise<Users[]>;
567
+ get_organisations: (params: OrganisationsPK) => Promise<Organisations | null>;
568
+ save_organisations: (params: SaveOrganisationsParams) => Promise<Organisations>;
569
+ delete_organisations: (params: OrganisationsPK) => Promise<Organisations>;
570
+ search_organisations: (params: SearchOrganisationsParams) => Promise<Organisations[]>;
571
+ lookup_organisations: (params: LookupOrganisationsParams) => Promise<Organisations[]>;
572
+ get_acts_for: (params: ActsForPK) => Promise<ActsFor | null>;
573
+ save_acts_for: (params: SaveActsForParams) => Promise<ActsFor>;
574
+ delete_acts_for: (params: ActsForPK) => Promise<ActsFor>;
575
+ search_acts_for: (params: SearchActsForParams) => Promise<ActsFor[]>;
576
+ lookup_acts_for: (params: LookupActsForParams) => Promise<ActsFor[]>;
577
+ get_venues: (params: VenuesPK) => Promise<Venues | null>;
578
+ save_venues: (params: SaveVenuesParams) => Promise<Venues>;
579
+ delete_venues: (params: VenuesPK) => Promise<Venues>;
580
+ search_venues: (params: SearchVenuesParams) => Promise<Venues[]>;
581
+ lookup_venues: (params: LookupVenuesParams) => Promise<Venues[]>;
582
+ get_sites: (params: SitesPK) => Promise<Sites | null>;
583
+ save_sites: (params: SaveSitesParams) => Promise<Sites>;
584
+ delete_sites: (params: SitesPK) => Promise<Sites>;
585
+ search_sites: (params: SearchSitesParams) => Promise<Sites[]>;
586
+ lookup_sites: (params: LookupSitesParams) => Promise<Sites[]>;
587
+ get_products: (params: ProductsPK) => Promise<Products | null>;
588
+ save_products: (params: SaveProductsParams) => Promise<Products>;
589
+ delete_products: (params: ProductsPK) => Promise<Products>;
590
+ search_products: (params: SearchProductsParams) => Promise<Products[]>;
591
+ lookup_products: (params: LookupProductsParams) => Promise<Products[]>;
592
+ get_packages: (params: PackagesPK) => Promise<Packages | null>;
593
+ save_packages: (params: SavePackagesParams) => Promise<Packages>;
594
+ delete_packages: (params: PackagesPK) => Promise<Packages>;
595
+ search_packages: (params: SearchPackagesParams) => Promise<Packages[]>;
596
+ lookup_packages: (params: LookupPackagesParams) => Promise<Packages[]>;
597
+ get_allocations: (params: AllocationsPK) => Promise<Allocations | null>;
598
+ save_allocations: (params: SaveAllocationsParams) => Promise<Allocations>;
599
+ delete_allocations: (params: AllocationsPK) => Promise<Allocations>;
600
+ search_allocations: (params: SearchAllocationsParams) => Promise<Allocations[]>;
601
+ lookup_allocations: (params: LookupAllocationsParams) => Promise<Allocations[]>;
602
+ get_contractor_rights: (params: ContractorRightsPK) => Promise<ContractorRights | null>;
603
+ save_contractor_rights: (params: SaveContractorRightsParams) => Promise<ContractorRights>;
604
+ delete_contractor_rights: (params: ContractorRightsPK) => Promise<ContractorRights>;
605
+ search_contractor_rights: (params: SearchContractorRightsParams) => Promise<ContractorRights[]>;
606
+ lookup_contractor_rights: (params: LookupContractorRightsParams) => Promise<ContractorRights[]>;
607
+ get_brands: (params: BrandsPK) => Promise<Brands | null>;
608
+ save_brands: (params: SaveBrandsParams) => Promise<Brands>;
609
+ delete_brands: (params: BrandsPK) => Promise<Brands>;
610
+ search_brands: (params: SearchBrandsParams) => Promise<Brands[]>;
611
+ lookup_brands: (params: LookupBrandsParams) => Promise<Brands[]>;
612
+ get_artwork: (params: ArtworkPK) => Promise<Artwork | null>;
613
+ save_artwork: (params: SaveArtworkParams) => Promise<Artwork>;
614
+ delete_artwork: (params: ArtworkPK) => Promise<Artwork>;
615
+ search_artwork: (params: SearchArtworkParams) => Promise<Artwork[]>;
616
+ lookup_artwork: (params: LookupArtworkParams) => Promise<Artwork[]>;
617
+ get_tags: (params: TagsPK) => Promise<Tags | null>;
618
+ save_tags: (params: SaveTagsParams) => Promise<Tags>;
619
+ delete_tags: (params: TagsPK) => Promise<Tags>;
620
+ search_tags: (params: SearchTagsParams) => Promise<Tags[]>;
621
+ lookup_tags: (params: LookupTagsParams) => Promise<Tags[]>;
622
+ get_venue_detail: (params: Record<string, unknown>) => Promise<unknown>;
623
+ venue_detail_can_subscribe: (params: Record<string, unknown>) => Promise<unknown>;
624
+ subscribe_venue_detail: (params: VenueDetailParams, callback: (data: unknown) => void) => Promise<() => void>;
625
+ get_org_dashboard: (params: Record<string, unknown>) => Promise<unknown>;
626
+ org_dashboard_can_subscribe: (params: Record<string, unknown>) => Promise<unknown>;
627
+ subscribe_org_dashboard: (params: OrgDashboardParams, callback: (data: unknown) => void) => Promise<() => void>;
628
+ get_my_profile: (params: Record<string, unknown>) => Promise<unknown>;
629
+ my_profile_can_subscribe: (params: Record<string, unknown>) => Promise<unknown>;
630
+ subscribe_my_profile: (params: MyProfileParams, callback: (data: unknown) => void) => Promise<() => void>;
631
+ }
632
+
633
+ /** Extended WebSocket manager with typed API */
634
+ export class GeneratedWebSocketManager extends WebSocketManager {
635
+ api: TzqlAPI;
636
+
637
+ constructor(options: { url?: string; reconnect?: boolean } = {}) {
638
+ super(options);
639
+ this.api = {
640
+ login_user: (params: Record<string, unknown>) => this.call('login_user', params),
641
+ register_user: (params: Record<string, unknown>) => this.call('register_user', params),
642
+ get_users: (params: Record<string, unknown>) => this.call('get_users', params),
643
+ save_users: (params: Record<string, unknown>) => this.call('save_users', params),
644
+ delete_users: (params: Record<string, unknown>) => this.call('delete_users', params),
645
+ search_users: (params: Record<string, unknown>) => this.call('search_users', params),
646
+ lookup_users: (params: Record<string, unknown>) => this.call('lookup_users', params),
647
+ get_organisations: (params: Record<string, unknown>) => this.call('get_organisations', params),
648
+ save_organisations: (params: Record<string, unknown>) => this.call('save_organisations', params),
649
+ delete_organisations: (params: Record<string, unknown>) => this.call('delete_organisations', params),
650
+ search_organisations: (params: Record<string, unknown>) => this.call('search_organisations', params),
651
+ lookup_organisations: (params: Record<string, unknown>) => this.call('lookup_organisations', params),
652
+ get_acts_for: (params: Record<string, unknown>) => this.call('get_acts_for', params),
653
+ save_acts_for: (params: Record<string, unknown>) => this.call('save_acts_for', params),
654
+ delete_acts_for: (params: Record<string, unknown>) => this.call('delete_acts_for', params),
655
+ search_acts_for: (params: Record<string, unknown>) => this.call('search_acts_for', params),
656
+ lookup_acts_for: (params: Record<string, unknown>) => this.call('lookup_acts_for', params),
657
+ get_venues: (params: Record<string, unknown>) => this.call('get_venues', params),
658
+ save_venues: (params: Record<string, unknown>) => this.call('save_venues', params),
659
+ delete_venues: (params: Record<string, unknown>) => this.call('delete_venues', params),
660
+ search_venues: (params: Record<string, unknown>) => this.call('search_venues', params),
661
+ lookup_venues: (params: Record<string, unknown>) => this.call('lookup_venues', params),
662
+ get_sites: (params: Record<string, unknown>) => this.call('get_sites', params),
663
+ save_sites: (params: Record<string, unknown>) => this.call('save_sites', params),
664
+ delete_sites: (params: Record<string, unknown>) => this.call('delete_sites', params),
665
+ search_sites: (params: Record<string, unknown>) => this.call('search_sites', params),
666
+ lookup_sites: (params: Record<string, unknown>) => this.call('lookup_sites', params),
667
+ get_products: (params: Record<string, unknown>) => this.call('get_products', params),
668
+ save_products: (params: Record<string, unknown>) => this.call('save_products', params),
669
+ delete_products: (params: Record<string, unknown>) => this.call('delete_products', params),
670
+ search_products: (params: Record<string, unknown>) => this.call('search_products', params),
671
+ lookup_products: (params: Record<string, unknown>) => this.call('lookup_products', params),
672
+ get_packages: (params: Record<string, unknown>) => this.call('get_packages', params),
673
+ save_packages: (params: Record<string, unknown>) => this.call('save_packages', params),
674
+ delete_packages: (params: Record<string, unknown>) => this.call('delete_packages', params),
675
+ search_packages: (params: Record<string, unknown>) => this.call('search_packages', params),
676
+ lookup_packages: (params: Record<string, unknown>) => this.call('lookup_packages', params),
677
+ get_allocations: (params: Record<string, unknown>) => this.call('get_allocations', params),
678
+ save_allocations: (params: Record<string, unknown>) => this.call('save_allocations', params),
679
+ delete_allocations: (params: Record<string, unknown>) => this.call('delete_allocations', params),
680
+ search_allocations: (params: Record<string, unknown>) => this.call('search_allocations', params),
681
+ lookup_allocations: (params: Record<string, unknown>) => this.call('lookup_allocations', params),
682
+ get_contractor_rights: (params: Record<string, unknown>) => this.call('get_contractor_rights', params),
683
+ save_contractor_rights: (params: Record<string, unknown>) => this.call('save_contractor_rights', params),
684
+ delete_contractor_rights: (params: Record<string, unknown>) => this.call('delete_contractor_rights', params),
685
+ search_contractor_rights: (params: Record<string, unknown>) => this.call('search_contractor_rights', params),
686
+ lookup_contractor_rights: (params: Record<string, unknown>) => this.call('lookup_contractor_rights', params),
687
+ get_brands: (params: Record<string, unknown>) => this.call('get_brands', params),
688
+ save_brands: (params: Record<string, unknown>) => this.call('save_brands', params),
689
+ delete_brands: (params: Record<string, unknown>) => this.call('delete_brands', params),
690
+ search_brands: (params: Record<string, unknown>) => this.call('search_brands', params),
691
+ lookup_brands: (params: Record<string, unknown>) => this.call('lookup_brands', params),
692
+ get_artwork: (params: Record<string, unknown>) => this.call('get_artwork', params),
693
+ save_artwork: (params: Record<string, unknown>) => this.call('save_artwork', params),
694
+ delete_artwork: (params: Record<string, unknown>) => this.call('delete_artwork', params),
695
+ search_artwork: (params: Record<string, unknown>) => this.call('search_artwork', params),
696
+ lookup_artwork: (params: Record<string, unknown>) => this.call('lookup_artwork', params),
697
+ get_tags: (params: Record<string, unknown>) => this.call('get_tags', params),
698
+ save_tags: (params: Record<string, unknown>) => this.call('save_tags', params),
699
+ delete_tags: (params: Record<string, unknown>) => this.call('delete_tags', params),
700
+ search_tags: (params: Record<string, unknown>) => this.call('search_tags', params),
701
+ lookup_tags: (params: Record<string, unknown>) => this.call('lookup_tags', params),
702
+ get_venue_detail: (params: Record<string, unknown>) => this.call('get_venue_detail', params),
703
+ venue_detail_can_subscribe: (params: Record<string, unknown>) => this.call('venue_detail_can_subscribe', params),
704
+ get_org_dashboard: (params: Record<string, unknown>) => this.call('get_org_dashboard', params),
705
+ org_dashboard_can_subscribe: (params: Record<string, unknown>) => this.call('org_dashboard_can_subscribe', params),
706
+ get_my_profile: (params: Record<string, unknown>) => this.call('get_my_profile', params),
707
+ my_profile_can_subscribe: (params: Record<string, unknown>) => this.call('my_profile_can_subscribe', params),
708
+ subscribe_venue_detail: (params: Record<string, unknown>, callback: (data: unknown) => void) => this.subscribe('subscribe_venue_detail', params, callback),
709
+ subscribe_org_dashboard: (params: Record<string, unknown>, callback: (data: unknown) => void) => this.subscribe('subscribe_org_dashboard', params, callback),
710
+ subscribe_my_profile: (params: Record<string, unknown>, callback: (data: unknown) => void) => this.subscribe('subscribe_my_profile', params, callback),
711
+ } as TzqlAPI;
712
+ }
713
+ }
714
+
715
+ /** Singleton WebSocket instance */
716
+ export const ws = new GeneratedWebSocketManager();