@pgpmjs/export 0.20.1 → 0.20.2

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.
@@ -3,6 +3,7 @@ import { sync as glob } from 'glob';
3
3
  import { toSnakeCase } from 'inflekt';
4
4
  import path from 'path';
5
5
  import { PgpmPackage, getMissingInstallableModules, parseAuthor } from '@pgpmjs/core';
6
+ import { lookupByPgUdt } from './type-map';
6
7
  // =============================================================================
7
8
  // Shared constants
8
9
  // =============================================================================
@@ -25,6 +26,7 @@ export const DB_REQUIRED_EXTENSIONS = [
25
26
  'ltree',
26
27
  'metaschema-schema',
27
28
  'pgpm-inflection',
29
+ 'pgpm-uuid',
28
30
  'pgpm-utils',
29
31
  'pgpm-database-jobs',
30
32
  'pgpm-jwt-claims',
@@ -38,41 +40,11 @@ export const DB_REQUIRED_EXTENSIONS = [
38
40
  /**
39
41
  * Map PostgreSQL data types to FieldType values.
40
42
  * Uses udt_name from information_schema which gives the base type name.
43
+ * Delegates to the canonical PG_TYPE_MAP in type-map.ts.
41
44
  */
42
- const mapPgTypeToFieldType = (udtName) => {
43
- switch (udtName) {
44
- case 'uuid':
45
- return 'uuid';
46
- case '_uuid':
47
- return 'uuid[]';
48
- case 'text':
49
- case 'varchar':
50
- case 'bpchar':
51
- case 'name':
52
- return 'text';
53
- case '_text':
54
- case '_varchar':
55
- return 'text[]';
56
- case 'bool':
57
- return 'boolean';
58
- case 'jsonb':
59
- case 'json':
60
- return 'jsonb';
61
- case '_jsonb':
62
- return 'jsonb[]';
63
- case 'int4':
64
- case 'int8':
65
- case 'int2':
66
- case 'numeric':
67
- return 'int';
68
- case 'interval':
69
- return 'interval';
70
- case 'timestamptz':
71
- case 'timestamp':
72
- return 'timestamptz';
73
- default:
74
- return 'text';
75
- }
45
+ export const mapPgTypeToFieldType = (udtName) => {
46
+ const entry = lookupByPgUdt(udtName);
47
+ return entry?.fieldType ?? 'text';
76
48
  };
77
49
  /**
78
50
  * Required extensions for service/meta exports.
@@ -153,6 +125,7 @@ export const META_TABLE_ORDER = [
153
125
  'memberships_module',
154
126
  'permissions_module',
155
127
  'limits_module',
128
+ 'levels_module',
156
129
  'events_module',
157
130
  'users_module',
158
131
  'hierarchy_module',
@@ -163,6 +136,8 @@ export const META_TABLE_ORDER = [
163
136
  'user_state_module',
164
137
  'profiles_module',
165
138
  'config_secrets_user_module',
139
+ 'user_credentials_module',
140
+ 'user_settings_module',
166
141
  'connected_accounts_module',
167
142
  'phone_numbers_module',
168
143
  'crypto_addresses_module',
@@ -188,6 +163,17 @@ export const META_TABLE_ORDER = [
188
163
  'realtime_module',
189
164
  'session_secrets_module',
190
165
  'config_secrets_org_module',
166
+ 'config_secrets_module',
167
+ 'i18n_module',
168
+ 'agent_module',
169
+ 'function_module',
170
+ 'namespace_module',
171
+ 'merkle_store_module',
172
+ 'graph_module',
173
+ 'compute_log_module',
174
+ 'db_usage_module',
175
+ 'storage_log_module',
176
+ 'transfer_log_module',
191
177
  'webauthn_auth_module',
192
178
  'webauthn_credentials_module',
193
179
  'inference_log_module',
@@ -196,13 +182,13 @@ export const META_TABLE_ORDER = [
196
182
  /**
197
183
  * Shared metadata table configuration.
198
184
  *
199
- * This is the **superset** of fields needed by both the SQL export flow
200
- * (export-meta.ts) and the GraphQL export flow (export-graphql-meta.ts).
201
- * Each flow dynamically filters to only the fields that actually exist:
202
- * - SQL flow: uses buildDynamicFields() to intersect with information_schema
203
- * - GraphQL flow: filters to fields present in the returned data
185
+ * Fields are discovered dynamically at runtime via introspection:
186
+ * - SQL flow: uses information_schema.columns + mapPgTypeToFieldType()
187
+ * - GraphQL flow: uses __type introspection + mapGraphQLTypeToFieldType()
188
+ *
189
+ * Only `typeOverrides` are hardcoded for special types (image, upload, url)
190
+ * that cannot be inferred from database/GraphQL types alone.
204
191
  *
205
- * Adding a field here that doesn't exist in a particular environment is safe.
206
192
  */
207
193
  export const META_TABLE_CONFIG = {
208
194
  // =============================================================================
@@ -210,261 +196,88 @@ export const META_TABLE_CONFIG = {
210
196
  // =============================================================================
211
197
  database: {
212
198
  schema: 'metaschema_public',
213
- table: 'database',
214
- fields: {
215
- id: 'uuid',
216
- owner_id: 'uuid',
217
- name: 'text',
218
- hash: 'uuid'
219
- }
199
+ table: 'database'
220
200
  },
221
201
  schema: {
222
202
  schema: 'metaschema_public',
223
- table: 'schema',
224
- fields: {
225
- id: 'uuid',
226
- database_id: 'uuid',
227
- name: 'text',
228
- schema_name: 'text',
229
- description: 'text',
230
- is_public: 'boolean'
231
- }
203
+ table: 'schema'
232
204
  },
233
205
  function: {
234
206
  schema: 'metaschema_public',
235
- table: 'function',
236
- fields: {
237
- id: 'uuid',
238
- database_id: 'uuid',
239
- schema_id: 'uuid',
240
- name: 'text'
241
- }
207
+ table: 'function'
242
208
  },
243
209
  table: {
244
210
  schema: 'metaschema_public',
245
- table: 'table',
246
- fields: {
247
- id: 'uuid',
248
- database_id: 'uuid',
249
- schema_id: 'uuid',
250
- name: 'text',
251
- description: 'text'
252
- }
211
+ table: 'table'
253
212
  },
254
213
  field: {
255
214
  schema: 'metaschema_public',
256
215
  table: 'field',
257
- // Use ON CONFLICT DO NOTHING to handle the unique constraint (databases_field_uniq_names_idx)
258
- // which normalizes UUID field names by stripping suffixes like _id, _uuid, etc.
259
- // This causes collisions when tables have both 'foo' (text) and 'foo_id' (uuid) columns.
260
- conflictDoNothing: true,
261
- fields: {
262
- id: 'uuid',
263
- database_id: 'uuid',
264
- table_id: 'uuid',
265
- name: 'text',
266
- type: 'jsonb',
267
- description: 'text'
268
- }
216
+ conflictDoNothing: true
269
217
  },
270
218
  policy: {
271
219
  schema: 'metaschema_public',
272
- table: 'policy',
273
- fields: {
274
- id: 'uuid',
275
- database_id: 'uuid',
276
- table_id: 'uuid',
277
- name: 'text',
278
- grantee_name: 'text',
279
- privilege: 'text',
280
- permissive: 'boolean',
281
- disabled: 'boolean',
282
- policy_type: 'text',
283
- data: 'jsonb'
284
- }
220
+ table: 'policy'
285
221
  },
286
222
  index: {
287
223
  schema: 'metaschema_public',
288
- table: 'index',
289
- fields: {
290
- id: 'uuid',
291
- database_id: 'uuid',
292
- table_id: 'uuid',
293
- name: 'text',
294
- field_ids: 'uuid[]',
295
- include_field_ids: 'uuid[]',
296
- access_method: 'text',
297
- index_params: 'jsonb',
298
- where_clause: 'jsonb',
299
- is_unique: 'boolean'
300
- }
224
+ table: 'index'
301
225
  },
302
226
  trigger: {
303
227
  schema: 'metaschema_public',
304
- table: 'trigger',
305
- fields: {
306
- id: 'uuid',
307
- database_id: 'uuid',
308
- table_id: 'uuid',
309
- name: 'text',
310
- event: 'text',
311
- function_name: 'text'
312
- }
228
+ table: 'trigger'
313
229
  },
314
230
  trigger_function: {
315
231
  schema: 'metaschema_public',
316
- table: 'trigger_function',
317
- fields: {
318
- id: 'uuid',
319
- database_id: 'uuid',
320
- name: 'text',
321
- code: 'text'
322
- }
232
+ table: 'trigger_function'
323
233
  },
324
234
  rls_function: {
325
235
  schema: 'metaschema_public',
326
- table: 'rls_function',
327
- fields: {
328
- id: 'uuid',
329
- database_id: 'uuid',
330
- table_id: 'uuid',
331
- name: 'text',
332
- label: 'text',
333
- description: 'text',
334
- data: 'jsonb',
335
- inline: 'boolean',
336
- security: 'int'
337
- }
236
+ table: 'rls_function'
338
237
  },
339
238
  foreign_key_constraint: {
340
239
  schema: 'metaschema_public',
341
- table: 'foreign_key_constraint',
342
- fields: {
343
- id: 'uuid',
344
- database_id: 'uuid',
345
- table_id: 'uuid',
346
- name: 'text',
347
- description: 'text',
348
- smart_tags: 'jsonb',
349
- type: 'text',
350
- field_ids: 'uuid[]',
351
- ref_table_id: 'uuid',
352
- ref_field_ids: 'uuid[]',
353
- delete_action: 'text',
354
- update_action: 'text'
355
- }
240
+ table: 'foreign_key_constraint'
356
241
  },
357
242
  primary_key_constraint: {
358
243
  schema: 'metaschema_public',
359
- table: 'primary_key_constraint',
360
- fields: {
361
- id: 'uuid',
362
- database_id: 'uuid',
363
- table_id: 'uuid',
364
- name: 'text',
365
- type: 'text',
366
- field_ids: 'uuid[]'
367
- }
244
+ table: 'primary_key_constraint'
368
245
  },
369
246
  unique_constraint: {
370
247
  schema: 'metaschema_public',
371
- table: 'unique_constraint',
372
- fields: {
373
- id: 'uuid',
374
- database_id: 'uuid',
375
- table_id: 'uuid',
376
- name: 'text',
377
- description: 'text',
378
- smart_tags: 'jsonb',
379
- type: 'text',
380
- field_ids: 'uuid[]'
381
- }
248
+ table: 'unique_constraint'
382
249
  },
383
250
  check_constraint: {
384
251
  schema: 'metaschema_public',
385
- table: 'check_constraint',
386
- fields: {
387
- id: 'uuid',
388
- database_id: 'uuid',
389
- table_id: 'uuid',
390
- name: 'text',
391
- type: 'text',
392
- field_ids: 'uuid[]',
393
- expr: 'jsonb'
394
- }
252
+ table: 'check_constraint'
395
253
  },
396
254
  full_text_search: {
397
255
  schema: 'metaschema_public',
398
- table: 'full_text_search',
399
- fields: {
400
- id: 'uuid',
401
- database_id: 'uuid',
402
- table_id: 'uuid',
403
- field_id: 'uuid',
404
- field_ids: 'uuid[]',
405
- weights: 'text[]',
406
- langs: 'text[]'
407
- }
256
+ table: 'full_text_search'
408
257
  },
409
258
  schema_grant: {
410
259
  schema: 'metaschema_public',
411
- table: 'schema_grant',
412
- fields: {
413
- id: 'uuid',
414
- database_id: 'uuid',
415
- schema_id: 'uuid',
416
- grantee_name: 'text'
417
- }
260
+ table: 'schema_grant'
418
261
  },
419
262
  table_grant: {
420
263
  schema: 'metaschema_public',
421
- table: 'table_grant',
422
- fields: {
423
- id: 'uuid',
424
- database_id: 'uuid',
425
- table_id: 'uuid',
426
- privilege: 'text',
427
- grantee_name: 'text',
428
- field_ids: 'uuid[]',
429
- is_grant: 'boolean'
430
- }
264
+ table: 'table_grant'
431
265
  },
432
266
  default_privilege: {
433
267
  schema: 'metaschema_public',
434
- table: 'default_privilege',
435
- fields: {
436
- id: 'uuid',
437
- database_id: 'uuid',
438
- schema_id: 'uuid',
439
- object_type: 'text',
440
- privilege: 'text',
441
- grantee_name: 'text',
442
- is_grant: 'boolean'
443
- }
268
+ table: 'default_privilege'
444
269
  },
445
270
  // =============================================================================
446
271
  // services_public tables
447
272
  // =============================================================================
448
273
  domains: {
449
274
  schema: 'services_public',
450
- table: 'domains',
451
- fields: {
452
- id: 'uuid',
453
- database_id: 'uuid',
454
- site_id: 'uuid',
455
- api_id: 'uuid',
456
- domain: 'text',
457
- subdomain: 'text'
458
- }
275
+ table: 'domains'
459
276
  },
460
277
  sites: {
461
278
  schema: 'services_public',
462
279
  table: 'sites',
463
- fields: {
464
- id: 'uuid',
465
- database_id: 'uuid',
466
- title: 'text',
467
- description: 'text',
280
+ typeOverrides: {
468
281
  og_image: 'image',
469
282
  favicon: 'upload',
470
283
  apple_touch_icon: 'image',
@@ -473,1022 +286,300 @@ export const META_TABLE_CONFIG = {
473
286
  },
474
287
  apis: {
475
288
  schema: 'services_public',
476
- table: 'apis',
477
- fields: {
478
- id: 'uuid',
479
- database_id: 'uuid',
480
- name: 'text',
481
- is_public: 'boolean',
482
- role_name: 'text',
483
- anon_role: 'text'
484
- }
289
+ table: 'apis'
485
290
  },
486
291
  apps: {
487
292
  schema: 'services_public',
488
293
  table: 'apps',
489
- fields: {
490
- id: 'uuid',
491
- database_id: 'uuid',
492
- site_id: 'uuid',
493
- name: 'text',
294
+ typeOverrides: {
494
295
  app_image: 'image',
495
296
  app_store_link: 'url',
496
- app_store_id: 'text',
497
- app_id_prefix: 'text',
498
297
  play_store_link: 'url'
499
298
  }
500
299
  },
501
300
  site_modules: {
502
301
  schema: 'services_public',
503
- table: 'site_modules',
504
- fields: {
505
- id: 'uuid',
506
- database_id: 'uuid',
507
- site_id: 'uuid',
508
- name: 'text',
509
- data: 'jsonb'
510
- }
302
+ table: 'site_modules'
511
303
  },
512
304
  site_themes: {
513
305
  schema: 'services_public',
514
- table: 'site_themes',
515
- fields: {
516
- id: 'uuid',
517
- database_id: 'uuid',
518
- site_id: 'uuid',
519
- theme: 'jsonb'
520
- }
306
+ table: 'site_themes'
521
307
  },
522
308
  site_metadata: {
523
309
  schema: 'services_public',
524
310
  table: 'site_metadata',
525
- fields: {
526
- id: 'uuid',
527
- database_id: 'uuid',
528
- site_id: 'uuid',
529
- title: 'text',
530
- description: 'text',
311
+ typeOverrides: {
531
312
  og_image: 'image'
532
313
  }
533
314
  },
534
315
  api_modules: {
535
316
  schema: 'services_public',
536
- table: 'api_modules',
537
- fields: {
538
- id: 'uuid',
539
- database_id: 'uuid',
540
- api_id: 'uuid',
541
- name: 'text',
542
- data: 'jsonb'
543
- }
317
+ table: 'api_modules'
544
318
  },
545
319
  api_extensions: {
546
320
  schema: 'services_public',
547
- table: 'api_extensions',
548
- fields: {
549
- id: 'uuid',
550
- database_id: 'uuid',
551
- api_id: 'uuid',
552
- name: 'text'
553
- }
321
+ table: 'api_extensions'
554
322
  },
555
323
  api_schemas: {
556
324
  schema: 'services_public',
557
- table: 'api_schemas',
558
- fields: {
559
- id: 'uuid',
560
- database_id: 'uuid',
561
- schema_id: 'uuid',
562
- api_id: 'uuid'
563
- }
325
+ table: 'api_schemas'
564
326
  },
565
327
  database_settings: {
566
328
  schema: 'services_public',
567
- table: 'database_settings',
568
- fields: {
569
- id: 'uuid',
570
- database_id: 'uuid',
571
- enable_aggregates: 'boolean',
572
- enable_postgis: 'boolean',
573
- enable_search: 'boolean',
574
- enable_direct_uploads: 'boolean',
575
- enable_presigned_uploads: 'boolean',
576
- enable_many_to_many: 'boolean',
577
- enable_connection_filter: 'boolean',
578
- enable_ltree: 'boolean',
579
- enable_llm: 'boolean',
580
- enable_bulk: 'boolean',
581
- options: 'jsonb'
582
- }
329
+ table: 'database_settings'
583
330
  },
584
331
  api_settings: {
585
332
  schema: 'services_public',
586
- table: 'api_settings',
587
- fields: {
588
- id: 'uuid',
589
- database_id: 'uuid',
590
- api_id: 'uuid',
591
- enable_aggregates: 'boolean',
592
- enable_postgis: 'boolean',
593
- enable_search: 'boolean',
594
- enable_direct_uploads: 'boolean',
595
- enable_presigned_uploads: 'boolean',
596
- enable_many_to_many: 'boolean',
597
- enable_connection_filter: 'boolean',
598
- enable_ltree: 'boolean',
599
- enable_llm: 'boolean',
600
- enable_bulk: 'boolean',
601
- options: 'jsonb'
602
- }
333
+ table: 'api_settings'
603
334
  },
604
335
  rls_settings: {
605
336
  schema: 'services_public',
606
- table: 'rls_settings',
607
- fields: {
608
- id: 'uuid',
609
- database_id: 'uuid',
610
- authenticate_schema_id: 'uuid',
611
- role_schema_id: 'uuid',
612
- authenticate_function_id: 'uuid',
613
- authenticate_strict_function_id: 'uuid',
614
- current_role_function_id: 'uuid',
615
- current_role_id_function_id: 'uuid',
616
- current_user_agent_function_id: 'uuid',
617
- current_ip_address_function_id: 'uuid'
618
- }
337
+ table: 'rls_settings'
619
338
  },
620
339
  cors_settings: {
621
340
  schema: 'services_public',
622
- table: 'cors_settings',
623
- fields: {
624
- id: 'uuid',
625
- database_id: 'uuid',
626
- api_id: 'uuid',
627
- allowed_origins: 'text[]'
628
- }
341
+ table: 'cors_settings'
629
342
  },
630
343
  pubkey_settings: {
631
344
  schema: 'services_public',
632
- table: 'pubkey_settings',
633
- fields: {
634
- id: 'uuid',
635
- database_id: 'uuid',
636
- schema_id: 'uuid',
637
- crypto_network: 'text',
638
- user_field: 'text',
639
- sign_up_with_key_function_id: 'uuid',
640
- sign_in_request_challenge_function_id: 'uuid',
641
- sign_in_record_failure_function_id: 'uuid',
642
- sign_in_with_challenge_function_id: 'uuid'
643
- }
345
+ table: 'pubkey_settings'
644
346
  },
645
347
  webauthn_settings: {
646
348
  schema: 'services_public',
647
- table: 'webauthn_settings',
648
- fields: {
649
- id: 'uuid',
650
- database_id: 'uuid',
651
- schema_id: 'uuid',
652
- credentials_schema_id: 'uuid',
653
- sessions_schema_id: 'uuid',
654
- session_secrets_schema_id: 'uuid',
655
- credentials_table_id: 'uuid',
656
- sessions_table_id: 'uuid',
657
- session_credentials_table_id: 'uuid',
658
- session_secrets_table_id: 'uuid',
659
- user_field_id: 'uuid',
660
- rp_id: 'text',
661
- rp_name: 'text',
662
- origin_allowlist: 'text[]',
663
- attestation_type: 'text',
664
- require_user_verification: 'boolean',
665
- resident_key: 'text',
666
- challenge_expiry_seconds: 'int'
667
- }
349
+ table: 'webauthn_settings'
668
350
  },
669
351
  // =============================================================================
670
352
  // metaschema_modules_public tables
671
353
  // =============================================================================
672
354
  rls_module: {
673
355
  schema: 'metaschema_modules_public',
674
- table: 'rls_module',
675
- fields: {
676
- id: 'uuid',
677
- database_id: 'uuid',
678
- schema_id: 'uuid',
679
- private_schema_id: 'uuid',
680
- session_credentials_table_id: 'uuid',
681
- sessions_table_id: 'uuid',
682
- users_table_id: 'uuid',
683
- authenticate: 'text',
684
- authenticate_strict: 'text',
685
- current_role: 'text',
686
- current_role_id: 'text'
687
- }
356
+ table: 'rls_module'
688
357
  },
689
358
  user_auth_module: {
690
359
  schema: 'metaschema_modules_public',
691
- table: 'user_auth_module',
692
- fields: {
693
- id: 'uuid',
694
- database_id: 'uuid',
695
- schema_id: 'uuid',
696
- emails_table_id: 'uuid',
697
- users_table_id: 'uuid',
698
- secrets_table_id: 'uuid',
699
- encrypted_table_id: 'uuid',
700
- sessions_table_id: 'uuid',
701
- session_credentials_table_id: 'uuid',
702
- audits_table_id: 'uuid',
703
- audits_table_name: 'text',
704
- sign_in_function: 'text',
705
- sign_up_function: 'text',
706
- sign_out_function: 'text',
707
- sign_in_cross_origin_function: 'text',
708
- request_cross_origin_token_function: 'text',
709
- extend_token_expires: 'text',
710
- send_account_deletion_email_function: 'text',
711
- delete_account_function: 'text',
712
- set_password_function: 'text',
713
- reset_password_function: 'text',
714
- forgot_password_function: 'text',
715
- send_verification_email_function: 'text',
716
- verify_email_function: 'text',
717
- verify_password_function: 'text',
718
- check_password_function: 'text'
719
- }
360
+ table: 'user_auth_module'
720
361
  },
721
362
  memberships_module: {
722
363
  schema: 'metaschema_modules_public',
723
- table: 'memberships_module',
724
- fields: {
725
- id: 'uuid',
726
- database_id: 'uuid',
727
- schema_id: 'uuid',
728
- private_schema_id: 'uuid',
729
- memberships_table_id: 'uuid',
730
- memberships_table_name: 'text',
731
- members_table_id: 'uuid',
732
- members_table_name: 'text',
733
- membership_defaults_table_id: 'uuid',
734
- membership_defaults_table_name: 'text',
735
- grants_table_id: 'uuid',
736
- grants_table_name: 'text',
737
- actor_table_id: 'uuid',
738
- limits_table_id: 'uuid',
739
- default_limits_table_id: 'uuid',
740
- permissions_table_id: 'uuid',
741
- default_permissions_table_id: 'uuid',
742
- sprt_table_id: 'uuid',
743
- admin_grants_table_id: 'uuid',
744
- admin_grants_table_name: 'text',
745
- owner_grants_table_id: 'uuid',
746
- owner_grants_table_name: 'text',
747
- membership_type: 'int',
748
- entity_table_id: 'uuid',
749
- entity_table_owner_id: 'uuid',
750
- prefix: 'text',
751
- actor_mask_check: 'text',
752
- actor_perm_check: 'text',
753
- entity_ids_by_mask: 'text',
754
- entity_ids_by_perm: 'text',
755
- entity_ids_function: 'text'
756
- }
364
+ table: 'memberships_module'
757
365
  },
758
366
  permissions_module: {
759
367
  schema: 'metaschema_modules_public',
760
- table: 'permissions_module',
761
- fields: {
762
- id: 'uuid',
763
- database_id: 'uuid',
764
- schema_id: 'uuid',
765
- private_schema_id: 'uuid',
766
- table_id: 'uuid',
767
- table_name: 'text',
768
- default_table_id: 'uuid',
769
- default_table_name: 'text',
770
- bitlen: 'int',
771
- membership_type: 'int',
772
- entity_table_id: 'uuid',
773
- actor_table_id: 'uuid',
774
- prefix: 'text',
775
- get_padded_mask: 'text',
776
- get_mask: 'text',
777
- get_by_mask: 'text',
778
- get_mask_by_name: 'text'
779
- }
368
+ table: 'permissions_module'
780
369
  },
781
370
  limits_module: {
782
371
  schema: 'metaschema_modules_public',
783
- table: 'limits_module',
784
- fields: {
785
- id: 'uuid',
786
- database_id: 'uuid',
787
- schema_id: 'uuid',
788
- private_schema_id: 'uuid',
789
- table_id: 'uuid',
790
- table_name: 'text',
791
- default_table_id: 'uuid',
792
- default_table_name: 'text',
793
- limit_increment_function: 'text',
794
- limit_decrement_function: 'text',
795
- limit_increment_trigger: 'text',
796
- limit_decrement_trigger: 'text',
797
- limit_update_trigger: 'text',
798
- limit_check_function: 'text',
799
- prefix: 'text',
800
- membership_type: 'int',
801
- entity_table_id: 'uuid',
802
- actor_table_id: 'uuid'
803
- }
372
+ table: 'limits_module'
373
+ },
374
+ levels_module: {
375
+ schema: 'metaschema_modules_public',
376
+ table: 'levels_module'
804
377
  },
805
378
  events_module: {
806
379
  schema: 'metaschema_modules_public',
807
- table: 'events_module',
808
- fields: {
809
- id: 'uuid',
810
- database_id: 'uuid',
811
- schema_id: 'uuid',
812
- private_schema_id: 'uuid',
813
- events_table_id: 'uuid',
814
- events_table_name: 'text',
815
- event_aggregates_table_id: 'uuid',
816
- event_aggregates_table_name: 'text',
817
- event_types_table_id: 'uuid',
818
- event_types_table_name: 'text',
819
- levels_table_id: 'uuid',
820
- levels_table_name: 'text',
821
- level_requirements_table_id: 'uuid',
822
- level_requirements_table_name: 'text',
823
- level_grants_table_id: 'uuid',
824
- level_grants_table_name: 'text',
825
- achievement_rewards_table_id: 'uuid',
826
- achievement_rewards_table_name: 'text',
827
- record_event: 'text',
828
- remove_event: 'text',
829
- tg_event: 'text',
830
- tg_event_toggle: 'text',
831
- tg_event_toggle_bool: 'text',
832
- tg_event_bool: 'text',
833
- upsert_aggregate: 'text',
834
- tg_update_aggregates: 'text',
835
- prune_events: 'text',
836
- steps_required: 'text',
837
- level_achieved: 'text',
838
- tg_check_achievements: 'text',
839
- grant_achievement: 'text',
840
- tg_achievement_reward: 'text',
841
- interval: 'text',
842
- retention: 'text',
843
- premake: 'int',
844
- prefix: 'text',
845
- membership_type: 'int',
846
- entity_table_id: 'uuid',
847
- actor_table_id: 'uuid'
848
- }
380
+ table: 'events_module'
849
381
  },
850
382
  users_module: {
851
383
  schema: 'metaschema_modules_public',
852
- table: 'users_module',
853
- fields: {
854
- id: 'uuid',
855
- database_id: 'uuid',
856
- schema_id: 'uuid',
857
- table_id: 'uuid',
858
- table_name: 'text',
859
- type_table_id: 'uuid',
860
- type_table_name: 'text'
861
- }
384
+ table: 'users_module'
862
385
  },
863
386
  hierarchy_module: {
864
387
  schema: 'metaschema_modules_public',
865
- table: 'hierarchy_module',
866
- fields: {
867
- id: 'uuid',
868
- database_id: 'uuid',
869
- schema_id: 'uuid',
870
- private_schema_id: 'uuid',
871
- chart_edges_table_id: 'uuid',
872
- chart_edges_table_name: 'text',
873
- hierarchy_sprt_table_id: 'uuid',
874
- hierarchy_sprt_table_name: 'text',
875
- chart_edge_grants_table_id: 'uuid',
876
- chart_edge_grants_table_name: 'text',
877
- entity_table_id: 'uuid',
878
- users_table_id: 'uuid',
879
- prefix: 'text',
880
- private_schema_name: 'text',
881
- sprt_table_name: 'text',
882
- rebuild_hierarchy_function: 'text',
883
- get_subordinates_function: 'text',
884
- get_managers_function: 'text',
885
- is_manager_of_function: 'text'
886
- }
388
+ table: 'hierarchy_module'
887
389
  },
888
390
  membership_types_module: {
889
391
  schema: 'metaschema_modules_public',
890
- table: 'membership_types_module',
891
- fields: {
892
- id: 'uuid',
893
- database_id: 'uuid',
894
- schema_id: 'uuid',
895
- table_id: 'uuid',
896
- table_name: 'text'
897
- }
392
+ table: 'membership_types_module'
898
393
  },
899
394
  invites_module: {
900
395
  schema: 'metaschema_modules_public',
901
- table: 'invites_module',
902
- fields: {
903
- id: 'uuid',
904
- database_id: 'uuid',
905
- schema_id: 'uuid',
906
- private_schema_id: 'uuid',
907
- emails_table_id: 'uuid',
908
- users_table_id: 'uuid',
909
- invites_table_id: 'uuid',
910
- claimed_invites_table_id: 'uuid',
911
- invites_table_name: 'text',
912
- claimed_invites_table_name: 'text',
913
- submit_invite_code_function: 'text',
914
- prefix: 'text',
915
- membership_type: 'int',
916
- entity_table_id: 'uuid'
917
- }
396
+ table: 'invites_module'
918
397
  },
919
398
  emails_module: {
920
399
  schema: 'metaschema_modules_public',
921
- table: 'emails_module',
922
- fields: {
923
- id: 'uuid',
924
- database_id: 'uuid',
925
- schema_id: 'uuid',
926
- private_schema_id: 'uuid',
927
- table_id: 'uuid',
928
- owner_table_id: 'uuid',
929
- table_name: 'text'
930
- }
400
+ table: 'emails_module'
931
401
  },
932
402
  sessions_module: {
933
403
  schema: 'metaschema_modules_public',
934
- table: 'sessions_module',
935
- fields: {
936
- id: 'uuid',
937
- database_id: 'uuid',
938
- schema_id: 'uuid',
939
- sessions_table_id: 'uuid',
940
- session_credentials_table_id: 'uuid',
941
- auth_settings_table_id: 'uuid',
942
- users_table_id: 'uuid',
943
- sessions_default_expiration: 'interval',
944
- sessions_table: 'text',
945
- session_credentials_table: 'text',
946
- auth_settings_table: 'text'
947
- }
404
+ table: 'sessions_module'
948
405
  },
949
406
  user_state_module: {
950
407
  schema: 'metaschema_modules_public',
951
- table: 'user_state_module',
952
- fields: {
953
- id: 'uuid',
954
- database_id: 'uuid',
955
- schema_id: 'uuid',
956
- table_id: 'uuid',
957
- table_name: 'text'
958
- }
408
+ table: 'user_state_module'
959
409
  },
960
410
  profiles_module: {
961
411
  schema: 'metaschema_modules_public',
962
- table: 'profiles_module',
963
- fields: {
964
- id: 'uuid',
965
- database_id: 'uuid',
966
- schema_id: 'uuid',
967
- private_schema_id: 'uuid',
968
- table_id: 'uuid',
969
- table_name: 'text',
970
- profile_permissions_table_id: 'uuid',
971
- profile_permissions_table_name: 'text',
972
- profile_grants_table_id: 'uuid',
973
- profile_grants_table_name: 'text',
974
- profile_definition_grants_table_id: 'uuid',
975
- profile_definition_grants_table_name: 'text',
976
- membership_type: 'int',
977
- entity_table_id: 'uuid',
978
- actor_table_id: 'uuid',
979
- permissions_table_id: 'uuid',
980
- memberships_table_id: 'uuid',
981
- prefix: 'text'
982
- }
412
+ table: 'profiles_module'
983
413
  },
984
414
  config_secrets_user_module: {
985
415
  schema: 'metaschema_modules_public',
986
- table: 'config_secrets_user_module',
987
- fields: {
988
- id: 'uuid',
989
- database_id: 'uuid',
990
- schema_id: 'uuid',
991
- table_id: 'uuid',
992
- table_name: 'text'
993
- }
416
+ table: 'config_secrets_user_module'
417
+ },
418
+ user_credentials_module: {
419
+ schema: 'metaschema_modules_public',
420
+ table: 'user_credentials_module'
421
+ },
422
+ user_settings_module: {
423
+ schema: 'metaschema_modules_public',
424
+ table: 'user_settings_module'
994
425
  },
995
426
  connected_accounts_module: {
996
427
  schema: 'metaschema_modules_public',
997
- table: 'connected_accounts_module',
998
- fields: {
999
- id: 'uuid',
1000
- database_id: 'uuid',
1001
- schema_id: 'uuid',
1002
- private_schema_id: 'uuid',
1003
- table_id: 'uuid',
1004
- owner_table_id: 'uuid',
1005
- table_name: 'text'
1006
- }
428
+ table: 'connected_accounts_module'
1007
429
  },
1008
430
  phone_numbers_module: {
1009
431
  schema: 'metaschema_modules_public',
1010
- table: 'phone_numbers_module',
1011
- fields: {
1012
- id: 'uuid',
1013
- database_id: 'uuid',
1014
- schema_id: 'uuid',
1015
- private_schema_id: 'uuid',
1016
- table_id: 'uuid',
1017
- owner_table_id: 'uuid',
1018
- table_name: 'text'
1019
- }
432
+ table: 'phone_numbers_module'
1020
433
  },
1021
434
  crypto_addresses_module: {
1022
435
  schema: 'metaschema_modules_public',
1023
- table: 'crypto_addresses_module',
1024
- fields: {
1025
- id: 'uuid',
1026
- database_id: 'uuid',
1027
- schema_id: 'uuid',
1028
- private_schema_id: 'uuid',
1029
- table_id: 'uuid',
1030
- owner_table_id: 'uuid',
1031
- table_name: 'text',
1032
- crypto_network: 'text'
1033
- }
436
+ table: 'crypto_addresses_module'
1034
437
  },
1035
438
  crypto_auth_module: {
1036
439
  schema: 'metaschema_modules_public',
1037
- table: 'crypto_auth_module',
1038
- fields: {
1039
- id: 'uuid',
1040
- database_id: 'uuid',
1041
- schema_id: 'uuid',
1042
- users_table_id: 'uuid',
1043
- sessions_table_id: 'uuid',
1044
- session_credentials_table_id: 'uuid',
1045
- secrets_table_id: 'uuid',
1046
- addresses_table_id: 'uuid',
1047
- user_field: 'text',
1048
- crypto_network: 'text',
1049
- sign_in_request_challenge: 'text',
1050
- sign_in_record_failure: 'text',
1051
- sign_up_with_key: 'text',
1052
- sign_in_with_challenge: 'text'
1053
- }
440
+ table: 'crypto_auth_module'
1054
441
  },
1055
442
  field_module: {
1056
443
  schema: 'metaschema_modules_public',
1057
- table: 'field_module',
1058
- fields: {
1059
- id: 'uuid',
1060
- database_id: 'uuid',
1061
- private_schema_id: 'uuid',
1062
- table_id: 'uuid',
1063
- field_id: 'uuid',
1064
- node_type: 'text',
1065
- data: 'jsonb',
1066
- triggers: 'text[]',
1067
- functions: 'text[]'
1068
- }
444
+ table: 'field_module'
1069
445
  },
1070
446
  table_module: {
1071
447
  schema: 'metaschema_modules_public',
1072
- table: 'table_module',
1073
- fields: {
1074
- id: 'uuid',
1075
- database_id: 'uuid',
1076
- private_schema_id: 'uuid',
1077
- table_id: 'uuid',
1078
- node_type: 'text',
1079
- data: 'jsonb',
1080
- fields: 'uuid[]'
1081
- }
448
+ table: 'table_module'
1082
449
  },
1083
450
  // NOTE: table_template_module has been removed from pgpm-modules (superseded by blueprints)
1084
451
  secure_table_provision: {
1085
452
  schema: 'metaschema_modules_public',
1086
- table: 'secure_table_provision',
1087
- fields: {
1088
- id: 'uuid',
1089
- database_id: 'uuid',
1090
- schema_id: 'uuid',
1091
- table_id: 'uuid',
1092
- table_name: 'text',
1093
- nodes: 'jsonb',
1094
- use_rls: 'boolean',
1095
- fields: 'jsonb[]',
1096
- grants: 'jsonb',
1097
- policies: 'jsonb',
1098
- out_fields: 'uuid[]'
1099
- }
453
+ table: 'secure_table_provision'
1100
454
  },
1101
455
  uuid_module: {
1102
456
  schema: 'metaschema_modules_public',
1103
- table: 'uuid_module',
1104
- fields: {
1105
- id: 'uuid',
1106
- database_id: 'uuid',
1107
- schema_id: 'uuid',
1108
- uuid_function: 'text',
1109
- uuid_seed: 'text'
1110
- }
457
+ table: 'uuid_module'
1111
458
  },
1112
459
  default_ids_module: {
1113
460
  schema: 'metaschema_modules_public',
1114
- table: 'default_ids_module',
1115
- fields: {
1116
- id: 'uuid',
1117
- database_id: 'uuid'
1118
- }
461
+ table: 'default_ids_module'
1119
462
  },
1120
463
  denormalized_table_field: {
1121
464
  schema: 'metaschema_modules_public',
1122
- table: 'denormalized_table_field',
1123
- fields: {
1124
- id: 'uuid',
1125
- database_id: 'uuid',
1126
- table_id: 'uuid',
1127
- field_id: 'uuid',
1128
- set_ids: 'uuid[]',
1129
- ref_table_id: 'uuid',
1130
- ref_field_id: 'uuid',
1131
- ref_ids: 'uuid[]',
1132
- use_updates: 'boolean',
1133
- update_defaults: 'boolean',
1134
- func_name: 'text',
1135
- func_order: 'int'
1136
- }
465
+ table: 'denormalized_table_field'
1137
466
  },
1138
467
  relation_provision: {
1139
468
  schema: 'metaschema_modules_public',
1140
- table: 'relation_provision',
1141
- fields: {
1142
- id: 'uuid',
1143
- database_id: 'uuid',
1144
- relation_type: 'text',
1145
- source_table_id: 'uuid',
1146
- target_table_id: 'uuid',
1147
- field_name: 'text',
1148
- delete_action: 'text',
1149
- is_required: 'boolean',
1150
- api_required: 'boolean',
1151
- junction_table_id: 'uuid',
1152
- junction_table_name: 'text',
1153
- junction_schema_id: 'uuid',
1154
- source_field_name: 'text',
1155
- target_field_name: 'text',
1156
- use_composite_key: 'boolean',
1157
- create_index: 'boolean',
1158
- expose_in_api: 'boolean',
1159
- nodes: 'jsonb',
1160
- grants: 'jsonb',
1161
- policies: 'jsonb',
1162
- out_field_id: 'uuid',
1163
- out_junction_table_id: 'uuid',
1164
- out_source_field_id: 'uuid',
1165
- out_target_field_id: 'uuid'
1166
- }
469
+ table: 'relation_provision'
1167
470
  },
1168
- rate_limits_module: {
471
+ entity_type_provision: {
1169
472
  schema: 'metaschema_modules_public',
1170
- table: 'rate_limits_module',
1171
- fields: {
1172
- id: 'uuid',
1173
- database_id: 'uuid',
1174
- schema_id: 'uuid',
1175
- rate_limit_settings_table_id: 'uuid',
1176
- ip_rate_limits_table_id: 'uuid',
1177
- rate_limits_table_id: 'uuid',
1178
- rate_limit_settings_table: 'text',
1179
- ip_rate_limits_table: 'text',
1180
- rate_limits_table: 'text'
1181
- }
473
+ table: 'entity_type_provision'
1182
474
  },
1183
- storage_module: {
475
+ rate_limits_module: {
1184
476
  schema: 'metaschema_modules_public',
1185
- table: 'storage_module',
1186
- fields: {
1187
- id: 'uuid',
1188
- database_id: 'uuid',
1189
- schema_id: 'uuid',
1190
- private_schema_id: 'uuid',
1191
- buckets_table_id: 'uuid',
1192
- files_table_id: 'uuid',
1193
- buckets_table_name: 'text',
1194
- files_table_name: 'text',
1195
- membership_type: 'int',
1196
- policies: 'jsonb',
1197
- skip_default_policy_tables: 'text[]',
1198
- entity_table_id: 'uuid',
1199
- endpoint: 'text',
1200
- public_url_prefix: 'text',
1201
- provider: 'text',
1202
- allowed_origins: 'text[]',
1203
- restrict_reads: 'boolean',
1204
- has_path_shares: 'boolean',
1205
- path_shares_table_id: 'uuid',
1206
- upload_url_expiry_seconds: 'int',
1207
- download_url_expiry_seconds: 'int',
1208
- max_filename_length: 'int',
1209
- cache_ttl_seconds: 'int',
1210
- max_bulk_files: 'int',
1211
- has_versioning: 'boolean',
1212
- has_content_hash: 'boolean',
1213
- has_custom_keys: 'boolean',
1214
- has_audit_log: 'boolean',
1215
- file_events_table_id: 'uuid'
1216
- }
477
+ table: 'rate_limits_module'
1217
478
  },
1218
- entity_type_provision: {
479
+ storage_module: {
1219
480
  schema: 'metaschema_modules_public',
1220
- table: 'entity_type_provision',
1221
- fields: {
1222
- id: 'uuid',
1223
- database_id: 'uuid',
1224
- name: 'text',
1225
- prefix: 'text',
1226
- description: 'text',
1227
- parent_entity: 'text',
1228
- table_name: 'text',
1229
- is_visible: 'boolean',
1230
- has_limits: 'boolean',
1231
- has_profiles: 'boolean',
1232
- has_levels: 'boolean',
1233
- has_storage: 'boolean',
1234
- has_invites: 'boolean',
1235
- storage_config: 'jsonb',
1236
- skip_entity_policies: 'boolean',
1237
- table_provision: 'jsonb',
1238
- out_membership_type: 'int',
1239
- out_entity_table_id: 'uuid',
1240
- out_entity_table_name: 'text',
1241
- out_installed_modules: 'text[]',
1242
- out_storage_module_id: 'uuid',
1243
- out_buckets_table_id: 'uuid',
1244
- out_files_table_id: 'uuid',
1245
- out_path_shares_table_id: 'uuid',
1246
- out_invites_module_id: 'uuid'
1247
- }
481
+ table: 'storage_module'
1248
482
  },
1249
483
  billing_module: {
1250
484
  schema: 'metaschema_modules_public',
1251
- table: 'billing_module',
1252
- fields: {
1253
- id: 'uuid',
1254
- database_id: 'uuid',
1255
- schema_id: 'uuid',
1256
- private_schema_id: 'uuid',
1257
- meters_table_id: 'uuid',
1258
- meters_table_name: 'text',
1259
- plan_subscriptions_table_id: 'uuid',
1260
- plan_subscriptions_table_name: 'text',
1261
- ledger_table_id: 'uuid',
1262
- ledger_table_name: 'text',
1263
- balances_table_id: 'uuid',
1264
- balances_table_name: 'text',
1265
- record_usage_function: 'text',
1266
- prefix: 'text'
1267
- }
485
+ table: 'billing_module'
1268
486
  },
1269
487
  billing_provider_module: {
1270
488
  schema: 'metaschema_modules_public',
1271
- table: 'billing_provider_module',
1272
- fields: {
1273
- id: 'uuid',
1274
- database_id: 'uuid',
1275
- schema_id: 'uuid',
1276
- private_schema_id: 'uuid',
1277
- provider: 'text',
1278
- products_table_id: 'uuid',
1279
- prices_table_id: 'uuid',
1280
- subscriptions_table_id: 'uuid',
1281
- billing_customers_table_id: 'uuid',
1282
- billing_customers_table_name: 'text',
1283
- billing_products_table_id: 'uuid',
1284
- billing_products_table_name: 'text',
1285
- billing_prices_table_id: 'uuid',
1286
- billing_prices_table_name: 'text',
1287
- billing_subscriptions_table_id: 'uuid',
1288
- billing_subscriptions_table_name: 'text',
1289
- billing_webhook_events_table_id: 'uuid',
1290
- billing_webhook_events_table_name: 'text',
1291
- process_billing_event_function: 'text',
1292
- prefix: 'text'
1293
- }
489
+ table: 'billing_provider_module'
1294
490
  },
1295
491
  devices_module: {
1296
492
  schema: 'metaschema_modules_public',
1297
- table: 'devices_module',
1298
- fields: {
1299
- id: 'uuid',
1300
- database_id: 'uuid',
1301
- schema_id: 'uuid',
1302
- user_devices_table_id: 'uuid',
1303
- device_settings_table_id: 'uuid',
1304
- user_devices_table: 'text',
1305
- device_settings_table: 'text'
1306
- }
493
+ table: 'devices_module'
1307
494
  },
1308
495
  identity_providers_module: {
1309
496
  schema: 'metaschema_modules_public',
1310
- table: 'identity_providers_module',
1311
- fields: {
1312
- id: 'uuid',
1313
- database_id: 'uuid',
1314
- schema_id: 'uuid',
1315
- private_schema_id: 'uuid',
1316
- table_id: 'uuid',
1317
- table_name: 'text'
1318
- }
497
+ table: 'identity_providers_module'
1319
498
  },
1320
499
  notifications_module: {
1321
500
  schema: 'metaschema_modules_public',
1322
- table: 'notifications_module',
1323
- fields: {
1324
- id: 'uuid',
1325
- database_id: 'uuid',
1326
- schema_id: 'uuid',
1327
- private_schema_id: 'uuid',
1328
- notifications_table_id: 'uuid',
1329
- read_state_table_id: 'uuid',
1330
- preferences_table_id: 'uuid',
1331
- channels_table_id: 'uuid',
1332
- delivery_log_table_id: 'uuid',
1333
- owner_table_id: 'uuid',
1334
- user_settings_table_id: 'uuid',
1335
- organization_settings_table_id: 'uuid',
1336
- has_channels: 'boolean',
1337
- has_preferences: 'boolean',
1338
- has_settings_extension: 'boolean',
1339
- has_digest_metadata: 'boolean',
1340
- has_subscriptions: 'boolean'
1341
- }
501
+ table: 'notifications_module'
1342
502
  },
1343
503
  plans_module: {
1344
504
  schema: 'metaschema_modules_public',
1345
- table: 'plans_module',
1346
- fields: {
1347
- id: 'uuid',
1348
- database_id: 'uuid',
1349
- schema_id: 'uuid',
1350
- private_schema_id: 'uuid',
1351
- plans_table_id: 'uuid',
1352
- plans_table_name: 'text',
1353
- plan_limits_table_id: 'uuid',
1354
- plan_limits_table_name: 'text',
1355
- plan_pricing_table_id: 'uuid',
1356
- plan_overrides_table_id: 'uuid',
1357
- apply_plan_function: 'text',
1358
- apply_plan_aggregate_function: 'text',
1359
- prefix: 'text'
1360
- }
505
+ table: 'plans_module'
1361
506
  },
1362
507
  realtime_module: {
1363
508
  schema: 'metaschema_modules_public',
1364
- table: 'realtime_module',
1365
- fields: {
1366
- id: 'uuid',
1367
- database_id: 'uuid',
1368
- schema_id: 'uuid',
1369
- private_schema_id: 'uuid',
1370
- subscriptions_schema_id: 'uuid',
1371
- change_log_table_id: 'uuid',
1372
- listener_node_table_id: 'uuid',
1373
- source_registry_table_id: 'uuid',
1374
- retention_hours: 'int',
1375
- lookahead_hours: 'int',
1376
- partition_interval: 'text',
1377
- notify_channel: 'text'
1378
- }
509
+ table: 'realtime_module'
1379
510
  },
1380
511
  session_secrets_module: {
1381
512
  schema: 'metaschema_modules_public',
1382
- table: 'session_secrets_module',
1383
- fields: {
1384
- id: 'uuid',
1385
- database_id: 'uuid',
1386
- schema_id: 'uuid',
1387
- table_id: 'uuid',
1388
- table_name: 'text',
1389
- sessions_table_id: 'uuid'
1390
- }
513
+ table: 'session_secrets_module'
1391
514
  },
1392
515
  config_secrets_org_module: {
1393
516
  schema: 'metaschema_modules_public',
1394
- table: 'config_secrets_org_module',
1395
- fields: {
1396
- id: 'uuid',
1397
- database_id: 'uuid',
1398
- schema_id: 'uuid',
1399
- table_id: 'uuid',
1400
- table_name: 'text'
1401
- }
517
+ table: 'config_secrets_org_module'
518
+ },
519
+ config_secrets_module: {
520
+ schema: 'metaschema_modules_public',
521
+ table: 'config_secrets_module'
522
+ },
523
+ i18n_module: {
524
+ schema: 'metaschema_modules_public',
525
+ table: 'i18n_module',
526
+ gqlTypeName: 'I18NModule' // i18n is a well-known abbreviation; PostGraphile inflector capitalizes the N
527
+ },
528
+ agent_module: {
529
+ schema: 'metaschema_modules_public',
530
+ table: 'agent_module'
531
+ },
532
+ function_module: {
533
+ schema: 'metaschema_modules_public',
534
+ table: 'function_module'
535
+ },
536
+ namespace_module: {
537
+ schema: 'metaschema_modules_public',
538
+ table: 'namespace_module'
539
+ },
540
+ merkle_store_module: {
541
+ schema: 'metaschema_modules_public',
542
+ table: 'merkle_store_module'
543
+ },
544
+ graph_module: {
545
+ schema: 'metaschema_modules_public',
546
+ table: 'graph_module'
547
+ },
548
+ compute_log_module: {
549
+ schema: 'metaschema_modules_public',
550
+ table: 'compute_log_module'
551
+ },
552
+ db_usage_module: {
553
+ schema: 'metaschema_modules_public',
554
+ table: 'db_usage_module'
555
+ },
556
+ storage_log_module: {
557
+ schema: 'metaschema_modules_public',
558
+ table: 'storage_log_module'
559
+ },
560
+ transfer_log_module: {
561
+ schema: 'metaschema_modules_public',
562
+ table: 'transfer_log_module'
1402
563
  },
1403
564
  webauthn_auth_module: {
1404
565
  schema: 'metaschema_modules_public',
1405
- table: 'webauthn_auth_module',
1406
- fields: {
1407
- id: 'uuid',
1408
- database_id: 'uuid',
1409
- schema_id: 'uuid',
1410
- users_table_id: 'uuid',
1411
- credentials_table_id: 'uuid',
1412
- sessions_table_id: 'uuid',
1413
- session_credentials_table_id: 'uuid',
1414
- session_secrets_table_id: 'uuid',
1415
- auth_settings_table_id: 'uuid',
1416
- rp_id: 'text',
1417
- rp_name: 'text',
1418
- origin_allowlist: 'text[]',
1419
- attestation_type: 'text',
1420
- require_user_verification: 'boolean',
1421
- resident_key: 'text',
1422
- challenge_expiry: 'interval'
1423
- }
566
+ table: 'webauthn_auth_module'
1424
567
  },
1425
568
  webauthn_credentials_module: {
1426
569
  schema: 'metaschema_modules_public',
1427
- table: 'webauthn_credentials_module',
1428
- fields: {
1429
- id: 'uuid',
1430
- database_id: 'uuid',
1431
- schema_id: 'uuid',
1432
- private_schema_id: 'uuid',
1433
- table_id: 'uuid',
1434
- owner_table_id: 'uuid',
1435
- table_name: 'text'
1436
- }
570
+ table: 'webauthn_credentials_module'
1437
571
  },
1438
572
  inference_log_module: {
1439
573
  schema: 'metaschema_modules_public',
1440
574
  table: 'inference_log_module',
1441
- fields: {
1442
- id: 'uuid',
1443
- database_id: 'uuid',
1444
- schema_id: 'uuid',
1445
- private_schema_id: 'uuid',
1446
- inference_log_table_id: 'uuid',
1447
- inference_log_table_name: 'text',
1448
- usage_daily_table_id: 'uuid',
1449
- usage_daily_table_name: 'text',
1450
- interval: 'text',
1451
- retention: 'text',
1452
- premake: 'int',
1453
- prefix: 'text'
1454
- }
1455
575
  },
1456
576
  rate_limit_meters_module: {
1457
577
  schema: 'metaschema_modules_public',
1458
578
  table: 'rate_limit_meters_module',
1459
- fields: {
1460
- id: 'uuid',
1461
- database_id: 'uuid',
1462
- schema_id: 'uuid',
1463
- private_schema_id: 'uuid',
1464
- rate_limit_state_table_id: 'uuid',
1465
- rate_limit_state_table_name: 'text',
1466
- rate_limit_overrides_table_id: 'uuid',
1467
- rate_limit_overrides_table_name: 'text',
1468
- rate_window_limits_table_id: 'uuid',
1469
- rate_window_limits_table_name: 'text',
1470
- check_rate_limit_function: 'text',
1471
- prefix: 'text'
1472
- }
1473
579
  },
1474
580
  spatial_relation: {
1475
581
  schema: 'metaschema_public',
1476
- table: 'spatial_relation',
1477
- fields: {
1478
- id: 'uuid',
1479
- database_id: 'uuid',
1480
- table_id: 'uuid',
1481
- field_id: 'uuid',
1482
- ref_table_id: 'uuid',
1483
- ref_field_id: 'uuid',
1484
- name: 'text',
1485
- operator: 'text',
1486
- param_name: 'text',
1487
- category: 'text',
1488
- module: 'text',
1489
- scope: 'int',
1490
- tags: 'text[]'
1491
- }
582
+ table: 'spatial_relation'
1492
583
  }
1493
584
  };
1494
585
  // =============================================================================