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