@constructive-io/errors 0.14.0 → 0.16.1

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * GENERATED FILE — DO NOT EDIT BY HAND.
3
3
  *
4
- * Source of truth: the constructive-db error audit (784 distinct codes
4
+ * Source of truth: the constructive-db error audit (799 distinct codes
5
5
  * raised via EXCEPTION/THROW across deploy sources + generated output).
6
6
  * Regenerate with `python3 scripts/generate-registry.py` (see README.md).
7
7
  *
@@ -9,7 +9,7 @@
9
9
  * codes carry their raw message (with %-args rendered as {{argN}}). Curated
10
10
  * entries in `registry.ts` override anything here (typed context + refined copy).
11
11
  *
12
- * Counts: 784 total, 576 public, 208 internal.
12
+ * Counts: 799 total, 589 public, 210 internal.
13
13
  */
14
14
  import { type DefinedError } from '../define';
15
15
  import type { ErrorContext } from '../types';
@@ -24,4 +24,4 @@ export declare const generatedRegistry: Record<string, DefinedError<ErrorContext
24
24
  /** Audit metadata for each generated code. */
25
25
  export declare const GENERATED_CODE_META: Record<string, GeneratedCodeMeta>;
26
26
  /** Total number of codes collected from constructive-db. */
27
- export declare const GENERATED_CODE_COUNT = 784;
27
+ export declare const GENERATED_CODE_COUNT = 799;
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * GENERATED FILE — DO NOT EDIT BY HAND.
4
4
  *
5
- * Source of truth: the constructive-db error audit (784 distinct codes
5
+ * Source of truth: the constructive-db error audit (799 distinct codes
6
6
  * raised via EXCEPTION/THROW across deploy sources + generated output).
7
7
  * Regenerate with `python3 scripts/generate-registry.py` (see README.md).
8
8
  *
@@ -10,7 +10,7 @@
10
10
  * codes carry their raw message (with %-args rendered as {{argN}}). Curated
11
11
  * entries in `registry.ts` override anything here (typed context + refined copy).
12
12
  *
13
- * Counts: 784 total, 576 public, 208 internal.
13
+ * Counts: 799 total, 589 public, 210 internal.
14
14
  */
15
15
  import { defineError } from '../define';
16
16
  /** Every constructive-db error code, keyed by code. */
@@ -251,6 +251,7 @@ export const generatedRegistry = {
251
251
  'DATA_PERMISSIONS_MAPPING_TABLE_REQUIRED': defineError({ code: 'DATA_PERMISSIONS_MAPPING_TABLE_REQUIRED', class: 'public', http: 400, message: 'Data permissions mapping table required.' }),
252
252
  'DATA_PERMISSIONS_MODULE_AMBIGUOUS': defineError({ code: 'DATA_PERMISSIONS_MODULE_AMBIGUOUS', class: 'public', http: 400, message: 'Data permissions module ambiguous.' }),
253
253
  'DATA_PERMISSIONS_MODULE_NOT_FOUND': defineError({ code: 'DATA_PERMISSIONS_MODULE_NOT_FOUND', class: 'public', http: 404, message: 'Data permissions module not found.' }),
254
+ 'DATA_PERMISSIONS_MODULE_REF_INVALID': defineError({ code: 'DATA_PERMISSIONS_MODULE_REF_INVALID', class: 'public', http: 400, message: 'Data permissions module ref invalid.' }),
254
255
  'DATA_PERMISSIONS_NO_PERMISSIONS_MODULE': defineError({ code: 'DATA_PERMISSIONS_NO_PERMISSIONS_MODULE', class: 'public', http: 400, message: 'Data permissions no permissions module.' }),
255
256
  'DATA_PERMISSIONS_REGISTRATION_CONFLICT': defineError({ code: 'DATA_PERMISSIONS_REGISTRATION_CONFLICT', class: 'public', http: 400, message: 'Data permissions registration conflict.' }),
256
257
  'DATA_PERMISSIONS_TABLE_NOT_FOUND': defineError({ code: 'DATA_PERMISSIONS_TABLE_NOT_FOUND', class: 'public', http: 404, message: 'Data permissions table not found.' }),
@@ -406,6 +407,7 @@ export const generatedRegistry = {
406
407
  'HIERARCHY_MEMBER_IN_USE': defineError({ code: 'HIERARCHY_MEMBER_IN_USE', class: 'internal', http: 500, message: 'HIERARCHY_MEMBER_IN_USE: Cannot deactivate user {{arg0}} - user must be removed from the organization hierarchy first', positional: ['arg0'] }),
407
408
  'HISTORY': defineError({ code: 'HISTORY', class: 'internal', http: 500, message: 'HISTORY: history {{arg0}}.{{arg1}} registration has no copy_fields', positional: ['arg0', 'arg1'] }),
408
409
  'HOSTNAME_BINDING_SYNC': defineError({ code: 'HOSTNAME_BINDING_SYNC', class: 'internal', http: 500, message: 'HOSTNAME_BINDING_SYNC: unknown event {{arg0}}, expected UPSERT or DELETE', positional: ['arg0'] }),
410
+ 'HOSTNAME_CLAIMED_IN_OTHER_PLANE': defineError({ code: 'HOSTNAME_CLAIMED_IN_OTHER_PLANE', class: 'public', http: 400, message: 'Hostname claimed in other plane.' }),
409
411
  'IDENTITY_ACCOUNT_NOT_FOUND': defineError({ code: 'IDENTITY_ACCOUNT_NOT_FOUND', class: 'public', http: 404, message: 'Identity account not found.' }),
410
412
  'IDENTITY_ALREADY_LINKED': defineError({ code: 'IDENTITY_ALREADY_LINKED', class: 'public', http: 409, message: 'Identity already linked.' }),
411
413
  'IDENTITY_LINK_AVAILABLE': defineError({ code: 'IDENTITY_LINK_AVAILABLE', class: 'public', http: 400, message: 'Identity link available.' }),
@@ -443,9 +445,12 @@ export const generatedRegistry = {
443
445
  'INVALID_TOKEN': defineError({ code: 'INVALID_TOKEN', class: 'public', http: 401, message: 'Invalid token.' }),
444
446
  'INVALID_USER': defineError({ code: 'INVALID_USER', class: 'public', http: 400, message: 'Invalid user.' }),
445
447
  'INVALID_WORKER_ID': defineError({ code: 'INVALID_WORKER_ID', class: 'internal', http: 500, message: 'Invalid worker id.' }),
448
+ 'INVITE_ADDRESS_REQUIRED': defineError({ code: 'INVITE_ADDRESS_REQUIRED', class: 'public', http: 400, message: 'Invite address required.' }),
446
449
  'INVITE_EMAIL_NOT_FOUND': defineError({ code: 'INVITE_EMAIL_NOT_FOUND', class: 'public', http: 404, message: 'Invite email not found.' }),
447
450
  'INVITE_LIMIT': defineError({ code: 'INVITE_LIMIT', class: 'public', http: 429, message: 'Invite limit.' }),
448
451
  'INVITE_NOT_FOUND': defineError({ code: 'INVITE_NOT_FOUND', class: 'public', http: 404, message: 'Invite not found.' }),
452
+ 'INVITE_PHONE_NOT_FOUND': defineError({ code: 'INVITE_PHONE_NOT_FOUND', class: 'public', http: 404, message: 'Invite phone not found.' }),
453
+ 'INVITE_USERS_INVALID': defineError({ code: 'INVITE_USERS_INVALID', class: 'public', http: 400, message: 'Invite users invalid.' }),
449
454
  'INVOCATION_ANONYMOUS_NOT_AUTHORIZED': defineError({ code: 'INVOCATION_ANONYMOUS_NOT_AUTHORIZED', class: 'public', http: 400, message: 'Invocation anonymous not authorized.' }),
450
455
  'INVOCATION_ANONYMOUS_NOT_CALLABLE': defineError({ code: 'INVOCATION_ANONYMOUS_NOT_CALLABLE', class: 'public', http: 400, message: 'Invocation anonymous not callable.' }),
451
456
  'INVOCATION_ANONYMOUS_ROUTE_REQUIRED': defineError({ code: 'INVOCATION_ANONYMOUS_ROUTE_REQUIRED', class: 'public', http: 400, message: 'Invocation anonymous route required.' }),
@@ -563,6 +568,7 @@ export const generatedRegistry = {
563
568
  'PASSWORD_RESET_LOCKED_EXCEED_ATTEMPTS': defineError({ code: 'PASSWORD_RESET_LOCKED_EXCEED_ATTEMPTS', class: 'public', http: 423, message: 'Password reset locked exceed attempts.' }),
564
569
  'PASSWORD_SIGN_IN_DISABLED': defineError({ code: 'PASSWORD_SIGN_IN_DISABLED', class: 'public', http: 403, message: 'Password sign in disabled.' }),
565
570
  'PASSWORD_SIGN_UP_DISABLED': defineError({ code: 'PASSWORD_SIGN_UP_DISABLED', class: 'public', http: 403, message: 'Password sign up disabled.' }),
571
+ 'PERMISSION_DENIED': defineError({ code: 'PERMISSION_DENIED', class: 'public', http: 403, message: 'Permission denied.' }),
566
572
  'PLAN_REQUIRED': defineError({ code: 'PLAN_REQUIRED', class: 'internal', http: 500, message: 'Plan required.' }),
567
573
  'PLATFORM_FLAG_IMMUTABLE': defineError({ code: 'PLATFORM_FLAG_IMMUTABLE', class: 'internal', http: 500, message: 'Platform flag immutable.' }),
568
574
  'POLICY_COLUMN_REF_UNRESOLVED': defineError({ code: 'POLICY_COLUMN_REF_UNRESOLVED', class: 'internal', http: 500, message: 'Policy column ref unresolved.' }),
@@ -633,6 +639,7 @@ export const generatedRegistry = {
633
639
  'RESOURCE_STORAGE_TOTAL_CAP_EXCEEDED': defineError({ code: 'RESOURCE_STORAGE_TOTAL_CAP_EXCEEDED', class: 'internal', http: 500, message: 'Resource storage total cap exceeded.' }),
634
640
  'RETIRE_UNSERVED_APIS_SCOPE_REQUIRED': defineError({ code: 'RETIRE_UNSERVED_APIS_SCOPE_REQUIRED', class: 'internal', http: 500, message: 'Retire unserved apis scope required.' }),
635
641
  'ROUTE_BINDING_SYNC': defineError({ code: 'ROUTE_BINDING_SYNC', class: 'internal', http: 500, message: 'ROUTE_BINDING_SYNC: unknown event {{arg0}}, expected UPSERT or DELETE', positional: ['arg0'] }),
642
+ 'ROUTE_DOMAIN_REQUIRED': defineError({ code: 'ROUTE_DOMAIN_REQUIRED', class: 'internal', http: 500, message: 'Route domain required.' }),
636
643
  'ROUTE_PRIVILEGED_TARGET_FORBIDDEN': defineError({ code: 'ROUTE_PRIVILEGED_TARGET_FORBIDDEN', class: 'internal', http: 500, message: 'ROUTE_PRIVILEGED_TARGET_FORBIDDEN: only a platform administrator may route to an API served as a role other than anonymous or authenticated' }),
637
644
  'ROUTE_TARGET_NOT_OWNED': defineError({ code: 'ROUTE_TARGET_NOT_OWNED', class: 'internal', http: 500, message: 'Route target not owned.' }),
638
645
  'ROUTE_TARGET_REQUIRED': defineError({ code: 'ROUTE_TARGET_REQUIRED', class: 'internal', http: 500, message: 'Route target required.' }),
@@ -689,6 +696,7 @@ export const generatedRegistry = {
689
696
  'SESSION_TTL_EXCEEDS_PARENT': defineError({ code: 'SESSION_TTL_EXCEEDS_PARENT', class: 'public', http: 400, message: 'Session ttl exceeds parent.' }),
690
697
  'SETTINGS_SURFACE_NOT_PROVISIONED': defineError({ code: 'SETTINGS_SURFACE_NOT_PROVISIONED', class: 'public', http: 400, message: 'Settings surface not provisioned.' }),
691
698
  'SIGN_UP_DISABLED': defineError({ code: 'SIGN_UP_DISABLED', class: 'public', http: 403, message: 'Sign up disabled.' }),
699
+ 'SIGN_UP_REQUIRES_INVITE': defineError({ code: 'SIGN_UP_REQUIRES_INVITE', class: 'public', http: 403, message: 'Sign up requires invite.' }),
692
700
  'SITE_INSTALLATION_MEMBER_NOT_SERVABLE': defineError({ code: 'SITE_INSTALLATION_MEMBER_NOT_SERVABLE', class: 'internal', http: 500, message: 'Site installation member not servable.' }),
693
701
  'SITE_NOT_FOUND': defineError({ code: 'SITE_NOT_FOUND', class: 'public', http: 404, message: 'Site not found.' }),
694
702
  'SITE_NOT_PROVISIONED': defineError({ code: 'SITE_NOT_PROVISIONED', class: 'public', http: 400, message: 'Site not provisioned.' }),
@@ -722,10 +730,12 @@ export const generatedRegistry = {
722
730
  'STEP_UP_REQUIRED_FRESH_AUTH': defineError({ code: 'STEP_UP_REQUIRED_FRESH_AUTH', class: 'public', http: 403, message: 'Please verify your identity to continue.' }),
723
731
  'STEP_UP_REQUIRED_MFA': defineError({ code: 'STEP_UP_REQUIRED_MFA', class: 'public', http: 403, message: 'Please enter a code from your authenticator app to continue.' }),
724
732
  'STEP_UP_REQUIRED_PASSWORD': defineError({ code: 'STEP_UP_REQUIRED_PASSWORD', class: 'public', http: 403, message: 'Please re-enter your password to continue.' }),
733
+ 'STORAGE_ACCESS_CLAIM_MISMATCH': defineError({ code: 'STORAGE_ACCESS_CLAIM_MISMATCH', class: 'public', http: 400, message: 'Storage access claim mismatch.' }),
725
734
  'STORAGE_API_NOT_PROVISIONED': defineError({ code: 'STORAGE_API_NOT_PROVISIONED', class: 'public', http: 400, message: 'Storage api not provisioned.' }),
726
735
  'STORAGE_DESTINATION_REQUIRES_TEMP': defineError({ code: 'STORAGE_DESTINATION_REQUIRES_TEMP', class: 'internal', http: 500, message: 'Storage destination requires temp.' }),
727
736
  'STORAGE_FILE_BUCKET_IMMUTABLE': defineError({ code: 'STORAGE_FILE_BUCKET_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file bucket immutable.' }),
728
737
  'STORAGE_FILE_KEY_IMMUTABLE': defineError({ code: 'STORAGE_FILE_KEY_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file key immutable.' }),
738
+ 'STORAGE_FILE_NOT_FOUND': defineError({ code: 'STORAGE_FILE_NOT_FOUND', class: 'public', http: 404, message: 'Storage file not found.' }),
729
739
  'STORAGE_GC_CONTENT_HASH_UNSUPPORTED': defineError({ code: 'STORAGE_GC_CONTENT_HASH_UNSUPPORTED', class: 'internal', http: 500, message: 'Storage gc content hash unsupported.' }),
730
740
  'STORAGE_GC_FILES_TABLE_MISSING': defineError({ code: 'STORAGE_GC_FILES_TABLE_MISSING', class: 'internal', http: 500, message: 'Storage gc files table missing.' }),
731
741
  'STORAGE_GC_MODULE_AMBIGUOUS': defineError({ code: 'STORAGE_GC_MODULE_AMBIGUOUS', class: 'internal', http: 500, message: 'Storage gc module ambiguous.' }),
@@ -735,10 +745,15 @@ export const generatedRegistry = {
735
745
  'STORAGE_GC_REF_CROSS_DATABASE': defineError({ code: 'STORAGE_GC_REF_CROSS_DATABASE', class: 'internal', http: 500, message: 'Storage gc ref cross database.' }),
736
746
  'STORAGE_GC_REF_FIELD_MISSING': defineError({ code: 'STORAGE_GC_REF_FIELD_MISSING', class: 'internal', http: 500, message: 'Storage gc ref field missing.' }),
737
747
  'STORAGE_GC_REF_TABLE_MISSING': defineError({ code: 'STORAGE_GC_REF_TABLE_MISSING', class: 'internal', http: 500, message: 'Storage gc ref table missing.' }),
748
+ 'STORAGE_INVALID_COMPLETION_RESULT': defineError({ code: 'STORAGE_INVALID_COMPLETION_RESULT', class: 'public', http: 400, message: 'Storage invalid completion result.' }),
749
+ 'STORAGE_INVALID_UPLOAD_DOCUMENT': defineError({ code: 'STORAGE_INVALID_UPLOAD_DOCUMENT', class: 'internal', http: 500, message: 'Storage invalid upload document.' }),
738
750
  'STORAGE_MODULE_ENTITY_FIELD_INVALID': defineError({ code: 'STORAGE_MODULE_ENTITY_FIELD_INVALID', class: 'internal', http: 500, message: 'Storage module entity field invalid.' }),
739
751
  'STORAGE_MODULE_NOT_FOUND': defineError({ code: 'STORAGE_MODULE_NOT_FOUND', class: 'internal', http: 500, message: 'Storage module not found.' }),
752
+ 'STORAGE_PROCESSING_CONFLICT': defineError({ code: 'STORAGE_PROCESSING_CONFLICT', class: 'public', http: 400, message: 'Storage processing conflict.' }),
740
753
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': defineError({ code: 'STORAGE_PROMOTION_DESTINATION_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion destination mismatch.' }),
741
754
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': defineError({ code: 'STORAGE_PROMOTION_VISIBILITY_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion visibility mismatch.' }),
755
+ 'STORAGE_SOURCE_HASH_MISMATCH': defineError({ code: 'STORAGE_SOURCE_HASH_MISMATCH', class: 'public', http: 400, message: 'Storage source hash mismatch.' }),
756
+ 'STORAGE_SOURCE_HASH_REQUIRED': defineError({ code: 'STORAGE_SOURCE_HASH_REQUIRED', class: 'public', http: 400, message: 'Storage source hash required.' }),
742
757
  'STORAGE_STAGING_BUCKET_NO_DESTINATION': defineError({ code: 'STORAGE_STAGING_BUCKET_NO_DESTINATION', class: 'internal', http: 500, message: 'Storage staging bucket no destination.' }),
743
758
  'STORAGE_STAGING_BUCKET_NO_TTL': defineError({ code: 'STORAGE_STAGING_BUCKET_NO_TTL', class: 'internal', http: 500, message: 'Storage staging bucket no ttl.' }),
744
759
  'STORAGE_STAGING_DESTINATION_INVALID': defineError({ code: 'STORAGE_STAGING_DESTINATION_INVALID', class: 'internal', http: 500, message: 'Storage staging destination invalid.' }),
@@ -1038,6 +1053,7 @@ export const GENERATED_CODE_META = {
1038
1053
  'DATA_PERMISSIONS_MAPPING_TABLE_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1039
1054
  'DATA_PERMISSIONS_MODULE_AMBIGUOUS': { class: 'public', dynamic: false, generatedOnly: false },
1040
1055
  'DATA_PERMISSIONS_MODULE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1056
+ 'DATA_PERMISSIONS_MODULE_REF_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
1041
1057
  'DATA_PERMISSIONS_NO_PERMISSIONS_MODULE': { class: 'public', dynamic: false, generatedOnly: false },
1042
1058
  'DATA_PERMISSIONS_REGISTRATION_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1043
1059
  'DATA_PERMISSIONS_TABLE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1066,7 +1082,7 @@ export const GENERATED_CODE_META = {
1066
1082
  'DOMAIN_CHECK_CERT_UNKNOWN_DOMAIN': { class: 'internal', dynamic: true, generatedOnly: true },
1067
1083
  'DOMAIN_ISSUE_CERT_BAD_ISSUER': { class: 'internal', dynamic: true, generatedOnly: true },
1068
1084
  'DOMAIN_ISSUE_CERT_FORBIDDEN': { class: 'public', dynamic: false, generatedOnly: true },
1069
- 'DOMAIN_ISSUE_CERT_NOT_VERIFIED': { class: 'public', dynamic: true, generatedOnly: false },
1085
+ 'DOMAIN_ISSUE_CERT_NOT_VERIFIED': { class: 'public', dynamic: false, generatedOnly: false },
1070
1086
  'DOMAIN_ISSUE_CERT_UNKNOWN_DOMAIN': { class: 'internal', dynamic: true, generatedOnly: true },
1071
1087
  'DOMAIN_ISSUE_CHALLENGE_BAD_METHOD': { class: 'internal', dynamic: true, generatedOnly: true },
1072
1088
  'DOMAIN_ISSUE_CHALLENGE_UNKNOWN_DOMAIN': { class: 'internal', dynamic: true, generatedOnly: true },
@@ -1193,6 +1209,7 @@ export const GENERATED_CODE_META = {
1193
1209
  'HIERARCHY_MEMBER_IN_USE': { class: 'internal', dynamic: true, generatedOnly: false },
1194
1210
  'HISTORY': { class: 'internal', dynamic: true, generatedOnly: false },
1195
1211
  'HOSTNAME_BINDING_SYNC': { class: 'internal', dynamic: true, generatedOnly: false },
1212
+ 'HOSTNAME_CLAIMED_IN_OTHER_PLANE': { class: 'public', dynamic: false, generatedOnly: true },
1196
1213
  'IDENTITY_ACCOUNT_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1197
1214
  'IDENTITY_ALREADY_LINKED': { class: 'public', dynamic: false, generatedOnly: false },
1198
1215
  'IDENTITY_LINK_AVAILABLE': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1230,9 +1247,12 @@ export const GENERATED_CODE_META = {
1230
1247
  'INVALID_TOKEN': { class: 'public', dynamic: false, generatedOnly: false },
1231
1248
  'INVALID_USER': { class: 'public', dynamic: false, generatedOnly: false },
1232
1249
  'INVALID_WORKER_ID': { class: 'internal', dynamic: false, generatedOnly: true },
1250
+ 'INVITE_ADDRESS_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1233
1251
  'INVITE_EMAIL_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1234
1252
  'INVITE_LIMIT': { class: 'public', dynamic: false, generatedOnly: false },
1235
1253
  'INVITE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1254
+ 'INVITE_PHONE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1255
+ 'INVITE_USERS_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
1236
1256
  'INVOCATION_ANONYMOUS_NOT_AUTHORIZED': { class: 'public', dynamic: false, generatedOnly: false },
1237
1257
  'INVOCATION_ANONYMOUS_NOT_CALLABLE': { class: 'public', dynamic: false, generatedOnly: false },
1238
1258
  'INVOCATION_ANONYMOUS_ROUTE_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1350,6 +1370,7 @@ export const GENERATED_CODE_META = {
1350
1370
  'PASSWORD_RESET_LOCKED_EXCEED_ATTEMPTS': { class: 'public', dynamic: false, generatedOnly: true },
1351
1371
  'PASSWORD_SIGN_IN_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
1352
1372
  'PASSWORD_SIGN_UP_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
1373
+ 'PERMISSION_DENIED': { class: 'public', dynamic: false, generatedOnly: false },
1353
1374
  'PLAN_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: false },
1354
1375
  'PLATFORM_FLAG_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1355
1376
  'POLICY_COLUMN_REF_UNRESOLVED': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1420,6 +1441,7 @@ export const GENERATED_CODE_META = {
1420
1441
  'RESOURCE_STORAGE_TOTAL_CAP_EXCEEDED': { class: 'internal', dynamic: false, generatedOnly: false },
1421
1442
  'RETIRE_UNSERVED_APIS_SCOPE_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: false },
1422
1443
  'ROUTE_BINDING_SYNC': { class: 'internal', dynamic: true, generatedOnly: false },
1444
+ 'ROUTE_DOMAIN_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: true },
1423
1445
  'ROUTE_PRIVILEGED_TARGET_FORBIDDEN': { class: 'internal', dynamic: false, generatedOnly: true },
1424
1446
  'ROUTE_TARGET_NOT_OWNED': { class: 'internal', dynamic: false, generatedOnly: true },
1425
1447
  'ROUTE_TARGET_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: true },
@@ -1476,6 +1498,7 @@ export const GENERATED_CODE_META = {
1476
1498
  'SESSION_TTL_EXCEEDS_PARENT': { class: 'public', dynamic: false, generatedOnly: true },
1477
1499
  'SETTINGS_SURFACE_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
1478
1500
  'SIGN_UP_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
1501
+ 'SIGN_UP_REQUIRES_INVITE': { class: 'public', dynamic: false, generatedOnly: false },
1479
1502
  'SITE_INSTALLATION_MEMBER_NOT_SERVABLE': { class: 'internal', dynamic: false, generatedOnly: true },
1480
1503
  'SITE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1481
1504
  'SITE_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1509,10 +1532,12 @@ export const GENERATED_CODE_META = {
1509
1532
  'STEP_UP_REQUIRED_FRESH_AUTH': { class: 'public', dynamic: false, generatedOnly: false },
1510
1533
  'STEP_UP_REQUIRED_MFA': { class: 'public', dynamic: false, generatedOnly: false },
1511
1534
  'STEP_UP_REQUIRED_PASSWORD': { class: 'public', dynamic: false, generatedOnly: false },
1535
+ 'STORAGE_ACCESS_CLAIM_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1512
1536
  'STORAGE_API_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
1513
1537
  'STORAGE_DESTINATION_REQUIRES_TEMP': { class: 'internal', dynamic: false, generatedOnly: false },
1514
1538
  'STORAGE_FILE_BUCKET_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1515
1539
  'STORAGE_FILE_KEY_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1540
+ 'STORAGE_FILE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1516
1541
  'STORAGE_GC_CONTENT_HASH_UNSUPPORTED': { class: 'internal', dynamic: false, generatedOnly: false },
1517
1542
  'STORAGE_GC_FILES_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1518
1543
  'STORAGE_GC_MODULE_AMBIGUOUS': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1522,10 +1547,15 @@ export const GENERATED_CODE_META = {
1522
1547
  'STORAGE_GC_REF_CROSS_DATABASE': { class: 'internal', dynamic: false, generatedOnly: false },
1523
1548
  'STORAGE_GC_REF_FIELD_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1524
1549
  'STORAGE_GC_REF_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1550
+ 'STORAGE_INVALID_COMPLETION_RESULT': { class: 'public', dynamic: false, generatedOnly: false },
1551
+ 'STORAGE_INVALID_UPLOAD_DOCUMENT': { class: 'internal', dynamic: false, generatedOnly: false },
1525
1552
  'STORAGE_MODULE_ENTITY_FIELD_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
1526
1553
  'STORAGE_MODULE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
1554
+ 'STORAGE_PROCESSING_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1527
1555
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1528
1556
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1557
+ 'STORAGE_SOURCE_HASH_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1558
+ 'STORAGE_SOURCE_HASH_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1529
1559
  'STORAGE_STAGING_BUCKET_NO_DESTINATION': { class: 'internal', dynamic: false, generatedOnly: false },
1530
1560
  'STORAGE_STAGING_BUCKET_NO_TTL': { class: 'internal', dynamic: false, generatedOnly: false },
1531
1561
  'STORAGE_STAGING_DESTINATION_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1588,4 +1618,4 @@ export const GENERATED_CODE_META = {
1588
1618
  'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
1589
1619
  };
1590
1620
  /** Total number of codes collected from constructive-db. */
1591
- export const GENERATED_CODE_COUNT = 784;
1621
+ export const GENERATED_CODE_COUNT = 799;
package/esm/registry.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  import type { ErrorContext, ErrorDefinition } from './types';
2
2
  export { type DefinedError, defineError } from './define';
3
+ type StorageFileContext = {
4
+ database_id?: string | null;
5
+ file_id?: string | null;
6
+ bucket_id?: string | null;
7
+ };
3
8
  /**
4
9
  * The curated Constructive error registry.
5
10
  *
@@ -11,6 +16,36 @@ export { type DefinedError, defineError } from './define';
11
16
  */
12
17
  export declare const registry: {
13
18
  readonly STORAGE_BUCKET_NOT_RECONCILED: import("./define").DefinedError<import("./types").EmptyContext>;
19
+ readonly STORAGE_ACCESS_CLAIM_MISMATCH: import("./define").DefinedError<StorageFileContext>;
20
+ readonly STORAGE_FILE_NOT_FOUND: import("./define").DefinedError<StorageFileContext & {
21
+ bucket?: string;
22
+ fileId?: string;
23
+ reason?: string;
24
+ }>;
25
+ readonly STORAGE_SOURCE_HASH_REQUIRED: import("./define").DefinedError<StorageFileContext & {
26
+ field?: string;
27
+ }>;
28
+ readonly STORAGE_SOURCE_HASH_MISMATCH: import("./define").DefinedError<StorageFileContext>;
29
+ readonly STORAGE_INVALID_COMPLETION_RESULT: import("./define").DefinedError<StorageFileContext & {
30
+ field?: string;
31
+ reason?: string;
32
+ cause?: string;
33
+ maxBytes?: number;
34
+ }>;
35
+ readonly STORAGE_PROCESSING_CONFLICT: import("./define").DefinedError<StorageFileContext>;
36
+ readonly STORAGE_INVALID_UPLOAD_DOCUMENT: import("./define").DefinedError<StorageFileContext>;
37
+ readonly STORAGE_BUCKET_DATABASE_MISMATCH: import("./define").DefinedError<{
38
+ bucket: string;
39
+ capabilitiesDatabaseId?: string;
40
+ bucketDatabaseId?: string;
41
+ invocationDatabaseId?: string | null;
42
+ reason?: string;
43
+ }>;
44
+ readonly STORAGE_FILE_TARGET_UNAVAILABLE: import("./define").DefinedError<{
45
+ bucket: string;
46
+ bucketId?: string;
47
+ reason?: string;
48
+ }>;
14
49
  readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
15
50
  readonly ACCOUNT_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
16
51
  readonly NO_ACCOUNT_EXISTS: import("./define").DefinedError<{
@@ -24,6 +59,7 @@ export declare const registry: {
24
59
  readonly PASSWORD_LEN: import("./define").DefinedError<import("./types").EmptyContext>;
25
60
  readonly EMAIL_NOT_VERIFIED: import("./define").DefinedError<import("./types").EmptyContext>;
26
61
  readonly SIGN_UP_DISABLED: import("./define").DefinedError<import("./types").EmptyContext>;
62
+ readonly SIGN_UP_REQUIRES_INVITE: import("./define").DefinedError<import("./types").EmptyContext>;
27
63
  readonly USER_NOT_AUTHENTICATED: import("./define").DefinedError<import("./types").EmptyContext>;
28
64
  readonly ACCOUNT_LOCKED: import("./define").DefinedError<import("./types").EmptyContext>;
29
65
  readonly USER_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
@@ -44,6 +80,9 @@ export declare const registry: {
44
80
  readonly INVITE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
45
81
  readonly INVITE_LIMIT: import("./define").DefinedError<import("./types").EmptyContext>;
46
82
  readonly INVITE_EMAIL_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
83
+ readonly INVITE_PHONE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
84
+ readonly INVITE_ADDRESS_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
85
+ readonly INVITE_USERS_INVALID: import("./define").DefinedError<import("./types").EmptyContext>;
47
86
  readonly UNAUTHENTICATED: import("./define").DefinedError<import("./types").EmptyContext>;
48
87
  readonly CAPTCHA_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
49
88
  readonly CAPTCHA_FAILED: import("./define").DefinedError<import("./types").EmptyContext>;
package/esm/registry.js CHANGED
@@ -17,6 +17,63 @@ export const registry = {
17
17
  http: 409,
18
18
  message: 'The storage bucket has not yet been reconciled.'
19
19
  }),
20
+ // File processing lifecycle — curated HTTP hints override the generated
21
+ // name-based heuristic, particularly for access and processing conflicts.
22
+ STORAGE_ACCESS_CLAIM_MISMATCH: defineError({
23
+ code: 'STORAGE_ACCESS_CLAIM_MISMATCH',
24
+ class: 'public',
25
+ http: 403,
26
+ message: 'You do not have permission to process this file.'
27
+ }),
28
+ STORAGE_FILE_NOT_FOUND: defineError({
29
+ code: 'STORAGE_FILE_NOT_FOUND',
30
+ class: 'public',
31
+ http: 404,
32
+ message: 'The file could not be found.'
33
+ }),
34
+ STORAGE_SOURCE_HASH_REQUIRED: defineError({
35
+ code: 'STORAGE_SOURCE_HASH_REQUIRED',
36
+ class: 'public',
37
+ http: 400,
38
+ message: 'A valid source file hash is required.'
39
+ }),
40
+ STORAGE_SOURCE_HASH_MISMATCH: defineError({
41
+ code: 'STORAGE_SOURCE_HASH_MISMATCH',
42
+ class: 'public',
43
+ http: 409,
44
+ message: 'The source file has changed. Please process it again.'
45
+ }),
46
+ STORAGE_INVALID_COMPLETION_RESULT: defineError({
47
+ code: 'STORAGE_INVALID_COMPLETION_RESULT',
48
+ class: 'public',
49
+ http: 400,
50
+ message: 'The file processing result is invalid.'
51
+ }),
52
+ STORAGE_PROCESSING_CONFLICT: defineError({
53
+ code: 'STORAGE_PROCESSING_CONFLICT',
54
+ class: 'public',
55
+ http: 409,
56
+ message: 'The file is not in a state that allows this processing result.'
57
+ }),
58
+ STORAGE_INVALID_UPLOAD_DOCUMENT: defineError({
59
+ code: 'STORAGE_INVALID_UPLOAD_DOCUMENT',
60
+ class: 'internal',
61
+ http: 500,
62
+ message: 'The stored upload document is invalid.'
63
+ }),
64
+ // Runtime-only dispatch errors; these have no database audit records.
65
+ STORAGE_BUCKET_DATABASE_MISMATCH: defineError({
66
+ code: 'STORAGE_BUCKET_DATABASE_MISMATCH',
67
+ class: 'internal',
68
+ http: 500,
69
+ message: 'The storage bucket does not belong to the invocation database.'
70
+ }),
71
+ STORAGE_FILE_TARGET_UNAVAILABLE: defineError({
72
+ code: 'STORAGE_FILE_TARGET_UNAVAILABLE',
73
+ class: 'internal',
74
+ http: 500,
75
+ message: 'The storage file target is unavailable.'
76
+ }),
20
77
  // ===========================================================================
21
78
  // Auth / account (public) — copy sourced from dashboard auth-errors.ts
22
79
  // ===========================================================================
@@ -86,6 +143,12 @@ export const registry = {
86
143
  http: 403,
87
144
  message: 'Sign-up is currently disabled.'
88
145
  }),
146
+ SIGN_UP_REQUIRES_INVITE: defineError({
147
+ code: 'SIGN_UP_REQUIRES_INVITE',
148
+ class: 'public',
149
+ http: 403,
150
+ message: 'Sign-up is by invitation only. Please provide a valid invite code.'
151
+ }),
89
152
  // ===========================================================================
90
153
  // Auth / account (public) — migrated from the server graphile SAFE_ERROR_CODES
91
154
  // allowlist so the registry (not a hand-maintained set) is the source of truth
@@ -220,6 +283,24 @@ export const registry = {
220
283
  http: 404,
221
284
  message: 'This email is not associated with the invitation. Please use the email address the invitation was sent to.'
222
285
  }),
286
+ INVITE_PHONE_NOT_FOUND: defineError({
287
+ code: 'INVITE_PHONE_NOT_FOUND',
288
+ class: 'public',
289
+ http: 404,
290
+ message: 'This phone number is not associated with the invitation. Please use the phone number the invitation was sent to.'
291
+ }),
292
+ INVITE_ADDRESS_REQUIRED: defineError({
293
+ code: 'INVITE_ADDRESS_REQUIRED',
294
+ class: 'public',
295
+ http: 400,
296
+ message: 'An email address or phone number is required.'
297
+ }),
298
+ INVITE_USERS_INVALID: defineError({
299
+ code: 'INVITE_USERS_INVALID',
300
+ class: 'public',
301
+ http: 400,
302
+ message: 'The users payload must be a JSON array.'
303
+ }),
223
304
  // ===========================================================================
224
305
  // Authorization / step-up (public)
225
306
  // ===========================================================================
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * GENERATED FILE — DO NOT EDIT BY HAND.
3
3
  *
4
- * Source of truth: the constructive-db error audit (784 distinct codes
4
+ * Source of truth: the constructive-db error audit (799 distinct codes
5
5
  * raised via EXCEPTION/THROW across deploy sources + generated output).
6
6
  * Regenerate with `python3 scripts/generate-registry.py` (see README.md).
7
7
  *
@@ -9,7 +9,7 @@
9
9
  * codes carry their raw message (with %-args rendered as {{argN}}). Curated
10
10
  * entries in `registry.ts` override anything here (typed context + refined copy).
11
11
  *
12
- * Counts: 784 total, 576 public, 208 internal.
12
+ * Counts: 799 total, 589 public, 210 internal.
13
13
  */
14
14
  import { type DefinedError } from '../define';
15
15
  import type { ErrorContext } from '../types';
@@ -24,4 +24,4 @@ export declare const generatedRegistry: Record<string, DefinedError<ErrorContext
24
24
  /** Audit metadata for each generated code. */
25
25
  export declare const GENERATED_CODE_META: Record<string, GeneratedCodeMeta>;
26
26
  /** Total number of codes collected from constructive-db. */
27
- export declare const GENERATED_CODE_COUNT = 784;
27
+ export declare const GENERATED_CODE_COUNT = 799;
@@ -5,7 +5,7 @@ exports.GENERATED_CODE_COUNT = exports.GENERATED_CODE_META = exports.generatedRe
5
5
  /**
6
6
  * GENERATED FILE — DO NOT EDIT BY HAND.
7
7
  *
8
- * Source of truth: the constructive-db error audit (784 distinct codes
8
+ * Source of truth: the constructive-db error audit (799 distinct codes
9
9
  * raised via EXCEPTION/THROW across deploy sources + generated output).
10
10
  * Regenerate with `python3 scripts/generate-registry.py` (see README.md).
11
11
  *
@@ -13,7 +13,7 @@ exports.GENERATED_CODE_COUNT = exports.GENERATED_CODE_META = exports.generatedRe
13
13
  * codes carry their raw message (with %-args rendered as {{argN}}). Curated
14
14
  * entries in `registry.ts` override anything here (typed context + refined copy).
15
15
  *
16
- * Counts: 784 total, 576 public, 208 internal.
16
+ * Counts: 799 total, 589 public, 210 internal.
17
17
  */
18
18
  const define_1 = require("../define");
19
19
  /** Every constructive-db error code, keyed by code. */
@@ -254,6 +254,7 @@ exports.generatedRegistry = {
254
254
  'DATA_PERMISSIONS_MAPPING_TABLE_REQUIRED': (0, define_1.defineError)({ code: 'DATA_PERMISSIONS_MAPPING_TABLE_REQUIRED', class: 'public', http: 400, message: 'Data permissions mapping table required.' }),
255
255
  'DATA_PERMISSIONS_MODULE_AMBIGUOUS': (0, define_1.defineError)({ code: 'DATA_PERMISSIONS_MODULE_AMBIGUOUS', class: 'public', http: 400, message: 'Data permissions module ambiguous.' }),
256
256
  'DATA_PERMISSIONS_MODULE_NOT_FOUND': (0, define_1.defineError)({ code: 'DATA_PERMISSIONS_MODULE_NOT_FOUND', class: 'public', http: 404, message: 'Data permissions module not found.' }),
257
+ 'DATA_PERMISSIONS_MODULE_REF_INVALID': (0, define_1.defineError)({ code: 'DATA_PERMISSIONS_MODULE_REF_INVALID', class: 'public', http: 400, message: 'Data permissions module ref invalid.' }),
257
258
  'DATA_PERMISSIONS_NO_PERMISSIONS_MODULE': (0, define_1.defineError)({ code: 'DATA_PERMISSIONS_NO_PERMISSIONS_MODULE', class: 'public', http: 400, message: 'Data permissions no permissions module.' }),
258
259
  'DATA_PERMISSIONS_REGISTRATION_CONFLICT': (0, define_1.defineError)({ code: 'DATA_PERMISSIONS_REGISTRATION_CONFLICT', class: 'public', http: 400, message: 'Data permissions registration conflict.' }),
259
260
  'DATA_PERMISSIONS_TABLE_NOT_FOUND': (0, define_1.defineError)({ code: 'DATA_PERMISSIONS_TABLE_NOT_FOUND', class: 'public', http: 404, message: 'Data permissions table not found.' }),
@@ -409,6 +410,7 @@ exports.generatedRegistry = {
409
410
  'HIERARCHY_MEMBER_IN_USE': (0, define_1.defineError)({ code: 'HIERARCHY_MEMBER_IN_USE', class: 'internal', http: 500, message: 'HIERARCHY_MEMBER_IN_USE: Cannot deactivate user {{arg0}} - user must be removed from the organization hierarchy first', positional: ['arg0'] }),
410
411
  'HISTORY': (0, define_1.defineError)({ code: 'HISTORY', class: 'internal', http: 500, message: 'HISTORY: history {{arg0}}.{{arg1}} registration has no copy_fields', positional: ['arg0', 'arg1'] }),
411
412
  'HOSTNAME_BINDING_SYNC': (0, define_1.defineError)({ code: 'HOSTNAME_BINDING_SYNC', class: 'internal', http: 500, message: 'HOSTNAME_BINDING_SYNC: unknown event {{arg0}}, expected UPSERT or DELETE', positional: ['arg0'] }),
413
+ 'HOSTNAME_CLAIMED_IN_OTHER_PLANE': (0, define_1.defineError)({ code: 'HOSTNAME_CLAIMED_IN_OTHER_PLANE', class: 'public', http: 400, message: 'Hostname claimed in other plane.' }),
412
414
  'IDENTITY_ACCOUNT_NOT_FOUND': (0, define_1.defineError)({ code: 'IDENTITY_ACCOUNT_NOT_FOUND', class: 'public', http: 404, message: 'Identity account not found.' }),
413
415
  'IDENTITY_ALREADY_LINKED': (0, define_1.defineError)({ code: 'IDENTITY_ALREADY_LINKED', class: 'public', http: 409, message: 'Identity already linked.' }),
414
416
  'IDENTITY_LINK_AVAILABLE': (0, define_1.defineError)({ code: 'IDENTITY_LINK_AVAILABLE', class: 'public', http: 400, message: 'Identity link available.' }),
@@ -446,9 +448,12 @@ exports.generatedRegistry = {
446
448
  'INVALID_TOKEN': (0, define_1.defineError)({ code: 'INVALID_TOKEN', class: 'public', http: 401, message: 'Invalid token.' }),
447
449
  'INVALID_USER': (0, define_1.defineError)({ code: 'INVALID_USER', class: 'public', http: 400, message: 'Invalid user.' }),
448
450
  'INVALID_WORKER_ID': (0, define_1.defineError)({ code: 'INVALID_WORKER_ID', class: 'internal', http: 500, message: 'Invalid worker id.' }),
451
+ 'INVITE_ADDRESS_REQUIRED': (0, define_1.defineError)({ code: 'INVITE_ADDRESS_REQUIRED', class: 'public', http: 400, message: 'Invite address required.' }),
449
452
  'INVITE_EMAIL_NOT_FOUND': (0, define_1.defineError)({ code: 'INVITE_EMAIL_NOT_FOUND', class: 'public', http: 404, message: 'Invite email not found.' }),
450
453
  'INVITE_LIMIT': (0, define_1.defineError)({ code: 'INVITE_LIMIT', class: 'public', http: 429, message: 'Invite limit.' }),
451
454
  'INVITE_NOT_FOUND': (0, define_1.defineError)({ code: 'INVITE_NOT_FOUND', class: 'public', http: 404, message: 'Invite not found.' }),
455
+ 'INVITE_PHONE_NOT_FOUND': (0, define_1.defineError)({ code: 'INVITE_PHONE_NOT_FOUND', class: 'public', http: 404, message: 'Invite phone not found.' }),
456
+ 'INVITE_USERS_INVALID': (0, define_1.defineError)({ code: 'INVITE_USERS_INVALID', class: 'public', http: 400, message: 'Invite users invalid.' }),
452
457
  'INVOCATION_ANONYMOUS_NOT_AUTHORIZED': (0, define_1.defineError)({ code: 'INVOCATION_ANONYMOUS_NOT_AUTHORIZED', class: 'public', http: 400, message: 'Invocation anonymous not authorized.' }),
453
458
  'INVOCATION_ANONYMOUS_NOT_CALLABLE': (0, define_1.defineError)({ code: 'INVOCATION_ANONYMOUS_NOT_CALLABLE', class: 'public', http: 400, message: 'Invocation anonymous not callable.' }),
454
459
  'INVOCATION_ANONYMOUS_ROUTE_REQUIRED': (0, define_1.defineError)({ code: 'INVOCATION_ANONYMOUS_ROUTE_REQUIRED', class: 'public', http: 400, message: 'Invocation anonymous route required.' }),
@@ -566,6 +571,7 @@ exports.generatedRegistry = {
566
571
  'PASSWORD_RESET_LOCKED_EXCEED_ATTEMPTS': (0, define_1.defineError)({ code: 'PASSWORD_RESET_LOCKED_EXCEED_ATTEMPTS', class: 'public', http: 423, message: 'Password reset locked exceed attempts.' }),
567
572
  'PASSWORD_SIGN_IN_DISABLED': (0, define_1.defineError)({ code: 'PASSWORD_SIGN_IN_DISABLED', class: 'public', http: 403, message: 'Password sign in disabled.' }),
568
573
  'PASSWORD_SIGN_UP_DISABLED': (0, define_1.defineError)({ code: 'PASSWORD_SIGN_UP_DISABLED', class: 'public', http: 403, message: 'Password sign up disabled.' }),
574
+ 'PERMISSION_DENIED': (0, define_1.defineError)({ code: 'PERMISSION_DENIED', class: 'public', http: 403, message: 'Permission denied.' }),
569
575
  'PLAN_REQUIRED': (0, define_1.defineError)({ code: 'PLAN_REQUIRED', class: 'internal', http: 500, message: 'Plan required.' }),
570
576
  'PLATFORM_FLAG_IMMUTABLE': (0, define_1.defineError)({ code: 'PLATFORM_FLAG_IMMUTABLE', class: 'internal', http: 500, message: 'Platform flag immutable.' }),
571
577
  'POLICY_COLUMN_REF_UNRESOLVED': (0, define_1.defineError)({ code: 'POLICY_COLUMN_REF_UNRESOLVED', class: 'internal', http: 500, message: 'Policy column ref unresolved.' }),
@@ -636,6 +642,7 @@ exports.generatedRegistry = {
636
642
  'RESOURCE_STORAGE_TOTAL_CAP_EXCEEDED': (0, define_1.defineError)({ code: 'RESOURCE_STORAGE_TOTAL_CAP_EXCEEDED', class: 'internal', http: 500, message: 'Resource storage total cap exceeded.' }),
637
643
  'RETIRE_UNSERVED_APIS_SCOPE_REQUIRED': (0, define_1.defineError)({ code: 'RETIRE_UNSERVED_APIS_SCOPE_REQUIRED', class: 'internal', http: 500, message: 'Retire unserved apis scope required.' }),
638
644
  'ROUTE_BINDING_SYNC': (0, define_1.defineError)({ code: 'ROUTE_BINDING_SYNC', class: 'internal', http: 500, message: 'ROUTE_BINDING_SYNC: unknown event {{arg0}}, expected UPSERT or DELETE', positional: ['arg0'] }),
645
+ 'ROUTE_DOMAIN_REQUIRED': (0, define_1.defineError)({ code: 'ROUTE_DOMAIN_REQUIRED', class: 'internal', http: 500, message: 'Route domain required.' }),
639
646
  'ROUTE_PRIVILEGED_TARGET_FORBIDDEN': (0, define_1.defineError)({ code: 'ROUTE_PRIVILEGED_TARGET_FORBIDDEN', class: 'internal', http: 500, message: 'ROUTE_PRIVILEGED_TARGET_FORBIDDEN: only a platform administrator may route to an API served as a role other than anonymous or authenticated' }),
640
647
  'ROUTE_TARGET_NOT_OWNED': (0, define_1.defineError)({ code: 'ROUTE_TARGET_NOT_OWNED', class: 'internal', http: 500, message: 'Route target not owned.' }),
641
648
  'ROUTE_TARGET_REQUIRED': (0, define_1.defineError)({ code: 'ROUTE_TARGET_REQUIRED', class: 'internal', http: 500, message: 'Route target required.' }),
@@ -692,6 +699,7 @@ exports.generatedRegistry = {
692
699
  'SESSION_TTL_EXCEEDS_PARENT': (0, define_1.defineError)({ code: 'SESSION_TTL_EXCEEDS_PARENT', class: 'public', http: 400, message: 'Session ttl exceeds parent.' }),
693
700
  'SETTINGS_SURFACE_NOT_PROVISIONED': (0, define_1.defineError)({ code: 'SETTINGS_SURFACE_NOT_PROVISIONED', class: 'public', http: 400, message: 'Settings surface not provisioned.' }),
694
701
  'SIGN_UP_DISABLED': (0, define_1.defineError)({ code: 'SIGN_UP_DISABLED', class: 'public', http: 403, message: 'Sign up disabled.' }),
702
+ 'SIGN_UP_REQUIRES_INVITE': (0, define_1.defineError)({ code: 'SIGN_UP_REQUIRES_INVITE', class: 'public', http: 403, message: 'Sign up requires invite.' }),
695
703
  'SITE_INSTALLATION_MEMBER_NOT_SERVABLE': (0, define_1.defineError)({ code: 'SITE_INSTALLATION_MEMBER_NOT_SERVABLE', class: 'internal', http: 500, message: 'Site installation member not servable.' }),
696
704
  'SITE_NOT_FOUND': (0, define_1.defineError)({ code: 'SITE_NOT_FOUND', class: 'public', http: 404, message: 'Site not found.' }),
697
705
  'SITE_NOT_PROVISIONED': (0, define_1.defineError)({ code: 'SITE_NOT_PROVISIONED', class: 'public', http: 400, message: 'Site not provisioned.' }),
@@ -725,10 +733,12 @@ exports.generatedRegistry = {
725
733
  'STEP_UP_REQUIRED_FRESH_AUTH': (0, define_1.defineError)({ code: 'STEP_UP_REQUIRED_FRESH_AUTH', class: 'public', http: 403, message: 'Please verify your identity to continue.' }),
726
734
  'STEP_UP_REQUIRED_MFA': (0, define_1.defineError)({ code: 'STEP_UP_REQUIRED_MFA', class: 'public', http: 403, message: 'Please enter a code from your authenticator app to continue.' }),
727
735
  'STEP_UP_REQUIRED_PASSWORD': (0, define_1.defineError)({ code: 'STEP_UP_REQUIRED_PASSWORD', class: 'public', http: 403, message: 'Please re-enter your password to continue.' }),
736
+ 'STORAGE_ACCESS_CLAIM_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_ACCESS_CLAIM_MISMATCH', class: 'public', http: 400, message: 'Storage access claim mismatch.' }),
728
737
  'STORAGE_API_NOT_PROVISIONED': (0, define_1.defineError)({ code: 'STORAGE_API_NOT_PROVISIONED', class: 'public', http: 400, message: 'Storage api not provisioned.' }),
729
738
  'STORAGE_DESTINATION_REQUIRES_TEMP': (0, define_1.defineError)({ code: 'STORAGE_DESTINATION_REQUIRES_TEMP', class: 'internal', http: 500, message: 'Storage destination requires temp.' }),
730
739
  'STORAGE_FILE_BUCKET_IMMUTABLE': (0, define_1.defineError)({ code: 'STORAGE_FILE_BUCKET_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file bucket immutable.' }),
731
740
  'STORAGE_FILE_KEY_IMMUTABLE': (0, define_1.defineError)({ code: 'STORAGE_FILE_KEY_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file key immutable.' }),
741
+ 'STORAGE_FILE_NOT_FOUND': (0, define_1.defineError)({ code: 'STORAGE_FILE_NOT_FOUND', class: 'public', http: 404, message: 'Storage file not found.' }),
732
742
  'STORAGE_GC_CONTENT_HASH_UNSUPPORTED': (0, define_1.defineError)({ code: 'STORAGE_GC_CONTENT_HASH_UNSUPPORTED', class: 'internal', http: 500, message: 'Storage gc content hash unsupported.' }),
733
743
  'STORAGE_GC_FILES_TABLE_MISSING': (0, define_1.defineError)({ code: 'STORAGE_GC_FILES_TABLE_MISSING', class: 'internal', http: 500, message: 'Storage gc files table missing.' }),
734
744
  'STORAGE_GC_MODULE_AMBIGUOUS': (0, define_1.defineError)({ code: 'STORAGE_GC_MODULE_AMBIGUOUS', class: 'internal', http: 500, message: 'Storage gc module ambiguous.' }),
@@ -738,10 +748,15 @@ exports.generatedRegistry = {
738
748
  'STORAGE_GC_REF_CROSS_DATABASE': (0, define_1.defineError)({ code: 'STORAGE_GC_REF_CROSS_DATABASE', class: 'internal', http: 500, message: 'Storage gc ref cross database.' }),
739
749
  'STORAGE_GC_REF_FIELD_MISSING': (0, define_1.defineError)({ code: 'STORAGE_GC_REF_FIELD_MISSING', class: 'internal', http: 500, message: 'Storage gc ref field missing.' }),
740
750
  'STORAGE_GC_REF_TABLE_MISSING': (0, define_1.defineError)({ code: 'STORAGE_GC_REF_TABLE_MISSING', class: 'internal', http: 500, message: 'Storage gc ref table missing.' }),
751
+ 'STORAGE_INVALID_COMPLETION_RESULT': (0, define_1.defineError)({ code: 'STORAGE_INVALID_COMPLETION_RESULT', class: 'public', http: 400, message: 'Storage invalid completion result.' }),
752
+ 'STORAGE_INVALID_UPLOAD_DOCUMENT': (0, define_1.defineError)({ code: 'STORAGE_INVALID_UPLOAD_DOCUMENT', class: 'internal', http: 500, message: 'Storage invalid upload document.' }),
741
753
  'STORAGE_MODULE_ENTITY_FIELD_INVALID': (0, define_1.defineError)({ code: 'STORAGE_MODULE_ENTITY_FIELD_INVALID', class: 'internal', http: 500, message: 'Storage module entity field invalid.' }),
742
754
  'STORAGE_MODULE_NOT_FOUND': (0, define_1.defineError)({ code: 'STORAGE_MODULE_NOT_FOUND', class: 'internal', http: 500, message: 'Storage module not found.' }),
755
+ 'STORAGE_PROCESSING_CONFLICT': (0, define_1.defineError)({ code: 'STORAGE_PROCESSING_CONFLICT', class: 'public', http: 400, message: 'Storage processing conflict.' }),
743
756
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_PROMOTION_DESTINATION_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion destination mismatch.' }),
744
757
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_PROMOTION_VISIBILITY_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion visibility mismatch.' }),
758
+ 'STORAGE_SOURCE_HASH_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_SOURCE_HASH_MISMATCH', class: 'public', http: 400, message: 'Storage source hash mismatch.' }),
759
+ 'STORAGE_SOURCE_HASH_REQUIRED': (0, define_1.defineError)({ code: 'STORAGE_SOURCE_HASH_REQUIRED', class: 'public', http: 400, message: 'Storage source hash required.' }),
745
760
  'STORAGE_STAGING_BUCKET_NO_DESTINATION': (0, define_1.defineError)({ code: 'STORAGE_STAGING_BUCKET_NO_DESTINATION', class: 'internal', http: 500, message: 'Storage staging bucket no destination.' }),
746
761
  'STORAGE_STAGING_BUCKET_NO_TTL': (0, define_1.defineError)({ code: 'STORAGE_STAGING_BUCKET_NO_TTL', class: 'internal', http: 500, message: 'Storage staging bucket no ttl.' }),
747
762
  'STORAGE_STAGING_DESTINATION_INVALID': (0, define_1.defineError)({ code: 'STORAGE_STAGING_DESTINATION_INVALID', class: 'internal', http: 500, message: 'Storage staging destination invalid.' }),
@@ -1041,6 +1056,7 @@ exports.GENERATED_CODE_META = {
1041
1056
  'DATA_PERMISSIONS_MAPPING_TABLE_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1042
1057
  'DATA_PERMISSIONS_MODULE_AMBIGUOUS': { class: 'public', dynamic: false, generatedOnly: false },
1043
1058
  'DATA_PERMISSIONS_MODULE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1059
+ 'DATA_PERMISSIONS_MODULE_REF_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
1044
1060
  'DATA_PERMISSIONS_NO_PERMISSIONS_MODULE': { class: 'public', dynamic: false, generatedOnly: false },
1045
1061
  'DATA_PERMISSIONS_REGISTRATION_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1046
1062
  'DATA_PERMISSIONS_TABLE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1069,7 +1085,7 @@ exports.GENERATED_CODE_META = {
1069
1085
  'DOMAIN_CHECK_CERT_UNKNOWN_DOMAIN': { class: 'internal', dynamic: true, generatedOnly: true },
1070
1086
  'DOMAIN_ISSUE_CERT_BAD_ISSUER': { class: 'internal', dynamic: true, generatedOnly: true },
1071
1087
  'DOMAIN_ISSUE_CERT_FORBIDDEN': { class: 'public', dynamic: false, generatedOnly: true },
1072
- 'DOMAIN_ISSUE_CERT_NOT_VERIFIED': { class: 'public', dynamic: true, generatedOnly: false },
1088
+ 'DOMAIN_ISSUE_CERT_NOT_VERIFIED': { class: 'public', dynamic: false, generatedOnly: false },
1073
1089
  'DOMAIN_ISSUE_CERT_UNKNOWN_DOMAIN': { class: 'internal', dynamic: true, generatedOnly: true },
1074
1090
  'DOMAIN_ISSUE_CHALLENGE_BAD_METHOD': { class: 'internal', dynamic: true, generatedOnly: true },
1075
1091
  'DOMAIN_ISSUE_CHALLENGE_UNKNOWN_DOMAIN': { class: 'internal', dynamic: true, generatedOnly: true },
@@ -1196,6 +1212,7 @@ exports.GENERATED_CODE_META = {
1196
1212
  'HIERARCHY_MEMBER_IN_USE': { class: 'internal', dynamic: true, generatedOnly: false },
1197
1213
  'HISTORY': { class: 'internal', dynamic: true, generatedOnly: false },
1198
1214
  'HOSTNAME_BINDING_SYNC': { class: 'internal', dynamic: true, generatedOnly: false },
1215
+ 'HOSTNAME_CLAIMED_IN_OTHER_PLANE': { class: 'public', dynamic: false, generatedOnly: true },
1199
1216
  'IDENTITY_ACCOUNT_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1200
1217
  'IDENTITY_ALREADY_LINKED': { class: 'public', dynamic: false, generatedOnly: false },
1201
1218
  'IDENTITY_LINK_AVAILABLE': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1233,9 +1250,12 @@ exports.GENERATED_CODE_META = {
1233
1250
  'INVALID_TOKEN': { class: 'public', dynamic: false, generatedOnly: false },
1234
1251
  'INVALID_USER': { class: 'public', dynamic: false, generatedOnly: false },
1235
1252
  'INVALID_WORKER_ID': { class: 'internal', dynamic: false, generatedOnly: true },
1253
+ 'INVITE_ADDRESS_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1236
1254
  'INVITE_EMAIL_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1237
1255
  'INVITE_LIMIT': { class: 'public', dynamic: false, generatedOnly: false },
1238
1256
  'INVITE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1257
+ 'INVITE_PHONE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1258
+ 'INVITE_USERS_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
1239
1259
  'INVOCATION_ANONYMOUS_NOT_AUTHORIZED': { class: 'public', dynamic: false, generatedOnly: false },
1240
1260
  'INVOCATION_ANONYMOUS_NOT_CALLABLE': { class: 'public', dynamic: false, generatedOnly: false },
1241
1261
  'INVOCATION_ANONYMOUS_ROUTE_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1353,6 +1373,7 @@ exports.GENERATED_CODE_META = {
1353
1373
  'PASSWORD_RESET_LOCKED_EXCEED_ATTEMPTS': { class: 'public', dynamic: false, generatedOnly: true },
1354
1374
  'PASSWORD_SIGN_IN_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
1355
1375
  'PASSWORD_SIGN_UP_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
1376
+ 'PERMISSION_DENIED': { class: 'public', dynamic: false, generatedOnly: false },
1356
1377
  'PLAN_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: false },
1357
1378
  'PLATFORM_FLAG_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1358
1379
  'POLICY_COLUMN_REF_UNRESOLVED': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1423,6 +1444,7 @@ exports.GENERATED_CODE_META = {
1423
1444
  'RESOURCE_STORAGE_TOTAL_CAP_EXCEEDED': { class: 'internal', dynamic: false, generatedOnly: false },
1424
1445
  'RETIRE_UNSERVED_APIS_SCOPE_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: false },
1425
1446
  'ROUTE_BINDING_SYNC': { class: 'internal', dynamic: true, generatedOnly: false },
1447
+ 'ROUTE_DOMAIN_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: true },
1426
1448
  'ROUTE_PRIVILEGED_TARGET_FORBIDDEN': { class: 'internal', dynamic: false, generatedOnly: true },
1427
1449
  'ROUTE_TARGET_NOT_OWNED': { class: 'internal', dynamic: false, generatedOnly: true },
1428
1450
  'ROUTE_TARGET_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: true },
@@ -1479,6 +1501,7 @@ exports.GENERATED_CODE_META = {
1479
1501
  'SESSION_TTL_EXCEEDS_PARENT': { class: 'public', dynamic: false, generatedOnly: true },
1480
1502
  'SETTINGS_SURFACE_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
1481
1503
  'SIGN_UP_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
1504
+ 'SIGN_UP_REQUIRES_INVITE': { class: 'public', dynamic: false, generatedOnly: false },
1482
1505
  'SITE_INSTALLATION_MEMBER_NOT_SERVABLE': { class: 'internal', dynamic: false, generatedOnly: true },
1483
1506
  'SITE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1484
1507
  'SITE_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1512,10 +1535,12 @@ exports.GENERATED_CODE_META = {
1512
1535
  'STEP_UP_REQUIRED_FRESH_AUTH': { class: 'public', dynamic: false, generatedOnly: false },
1513
1536
  'STEP_UP_REQUIRED_MFA': { class: 'public', dynamic: false, generatedOnly: false },
1514
1537
  'STEP_UP_REQUIRED_PASSWORD': { class: 'public', dynamic: false, generatedOnly: false },
1538
+ 'STORAGE_ACCESS_CLAIM_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1515
1539
  'STORAGE_API_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
1516
1540
  'STORAGE_DESTINATION_REQUIRES_TEMP': { class: 'internal', dynamic: false, generatedOnly: false },
1517
1541
  'STORAGE_FILE_BUCKET_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1518
1542
  'STORAGE_FILE_KEY_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1543
+ 'STORAGE_FILE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1519
1544
  'STORAGE_GC_CONTENT_HASH_UNSUPPORTED': { class: 'internal', dynamic: false, generatedOnly: false },
1520
1545
  'STORAGE_GC_FILES_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1521
1546
  'STORAGE_GC_MODULE_AMBIGUOUS': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1525,10 +1550,15 @@ exports.GENERATED_CODE_META = {
1525
1550
  'STORAGE_GC_REF_CROSS_DATABASE': { class: 'internal', dynamic: false, generatedOnly: false },
1526
1551
  'STORAGE_GC_REF_FIELD_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1527
1552
  'STORAGE_GC_REF_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1553
+ 'STORAGE_INVALID_COMPLETION_RESULT': { class: 'public', dynamic: false, generatedOnly: false },
1554
+ 'STORAGE_INVALID_UPLOAD_DOCUMENT': { class: 'internal', dynamic: false, generatedOnly: false },
1528
1555
  'STORAGE_MODULE_ENTITY_FIELD_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
1529
1556
  'STORAGE_MODULE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
1557
+ 'STORAGE_PROCESSING_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1530
1558
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1531
1559
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1560
+ 'STORAGE_SOURCE_HASH_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1561
+ 'STORAGE_SOURCE_HASH_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1532
1562
  'STORAGE_STAGING_BUCKET_NO_DESTINATION': { class: 'internal', dynamic: false, generatedOnly: false },
1533
1563
  'STORAGE_STAGING_BUCKET_NO_TTL': { class: 'internal', dynamic: false, generatedOnly: false },
1534
1564
  'STORAGE_STAGING_DESTINATION_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1591,4 +1621,4 @@ exports.GENERATED_CODE_META = {
1591
1621
  'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
1592
1622
  };
1593
1623
  /** Total number of codes collected from constructive-db. */
1594
- exports.GENERATED_CODE_COUNT = 784;
1624
+ exports.GENERATED_CODE_COUNT = 799;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/errors",
3
- "version": "0.14.0",
3
+ "version": "0.16.1",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Canonical Constructive error system: registry, codes, i18n messages, and cross-source (PostgreSQL/GraphQL/client) parsing. Zero runtime dependencies.",
6
6
  "main": "index.js",
@@ -41,5 +41,5 @@
41
41
  "makage": "^0.8.0",
42
42
  "ts-node": "^10.9.2"
43
43
  },
44
- "gitHead": "27be33dc1ba8351e2a2c2bbb99b9c0798c0813b9"
44
+ "gitHead": "9bba983b38395277e0400294aaa380e586b049d4"
45
45
  }
package/registry.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  import type { ErrorContext, ErrorDefinition } from './types';
2
2
  export { type DefinedError, defineError } from './define';
3
+ type StorageFileContext = {
4
+ database_id?: string | null;
5
+ file_id?: string | null;
6
+ bucket_id?: string | null;
7
+ };
3
8
  /**
4
9
  * The curated Constructive error registry.
5
10
  *
@@ -11,6 +16,36 @@ export { type DefinedError, defineError } from './define';
11
16
  */
12
17
  export declare const registry: {
13
18
  readonly STORAGE_BUCKET_NOT_RECONCILED: import("./define").DefinedError<import("./types").EmptyContext>;
19
+ readonly STORAGE_ACCESS_CLAIM_MISMATCH: import("./define").DefinedError<StorageFileContext>;
20
+ readonly STORAGE_FILE_NOT_FOUND: import("./define").DefinedError<StorageFileContext & {
21
+ bucket?: string;
22
+ fileId?: string;
23
+ reason?: string;
24
+ }>;
25
+ readonly STORAGE_SOURCE_HASH_REQUIRED: import("./define").DefinedError<StorageFileContext & {
26
+ field?: string;
27
+ }>;
28
+ readonly STORAGE_SOURCE_HASH_MISMATCH: import("./define").DefinedError<StorageFileContext>;
29
+ readonly STORAGE_INVALID_COMPLETION_RESULT: import("./define").DefinedError<StorageFileContext & {
30
+ field?: string;
31
+ reason?: string;
32
+ cause?: string;
33
+ maxBytes?: number;
34
+ }>;
35
+ readonly STORAGE_PROCESSING_CONFLICT: import("./define").DefinedError<StorageFileContext>;
36
+ readonly STORAGE_INVALID_UPLOAD_DOCUMENT: import("./define").DefinedError<StorageFileContext>;
37
+ readonly STORAGE_BUCKET_DATABASE_MISMATCH: import("./define").DefinedError<{
38
+ bucket: string;
39
+ capabilitiesDatabaseId?: string;
40
+ bucketDatabaseId?: string;
41
+ invocationDatabaseId?: string | null;
42
+ reason?: string;
43
+ }>;
44
+ readonly STORAGE_FILE_TARGET_UNAVAILABLE: import("./define").DefinedError<{
45
+ bucket: string;
46
+ bucketId?: string;
47
+ reason?: string;
48
+ }>;
14
49
  readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
15
50
  readonly ACCOUNT_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
16
51
  readonly NO_ACCOUNT_EXISTS: import("./define").DefinedError<{
@@ -24,6 +59,7 @@ export declare const registry: {
24
59
  readonly PASSWORD_LEN: import("./define").DefinedError<import("./types").EmptyContext>;
25
60
  readonly EMAIL_NOT_VERIFIED: import("./define").DefinedError<import("./types").EmptyContext>;
26
61
  readonly SIGN_UP_DISABLED: import("./define").DefinedError<import("./types").EmptyContext>;
62
+ readonly SIGN_UP_REQUIRES_INVITE: import("./define").DefinedError<import("./types").EmptyContext>;
27
63
  readonly USER_NOT_AUTHENTICATED: import("./define").DefinedError<import("./types").EmptyContext>;
28
64
  readonly ACCOUNT_LOCKED: import("./define").DefinedError<import("./types").EmptyContext>;
29
65
  readonly USER_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
@@ -44,6 +80,9 @@ export declare const registry: {
44
80
  readonly INVITE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
45
81
  readonly INVITE_LIMIT: import("./define").DefinedError<import("./types").EmptyContext>;
46
82
  readonly INVITE_EMAIL_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
83
+ readonly INVITE_PHONE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
84
+ readonly INVITE_ADDRESS_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
85
+ readonly INVITE_USERS_INVALID: import("./define").DefinedError<import("./types").EmptyContext>;
47
86
  readonly UNAUTHENTICATED: import("./define").DefinedError<import("./types").EmptyContext>;
48
87
  readonly CAPTCHA_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
49
88
  readonly CAPTCHA_FAILED: import("./define").DefinedError<import("./types").EmptyContext>;
package/registry.js CHANGED
@@ -23,6 +23,63 @@ exports.registry = {
23
23
  http: 409,
24
24
  message: 'The storage bucket has not yet been reconciled.'
25
25
  }),
26
+ // File processing lifecycle — curated HTTP hints override the generated
27
+ // name-based heuristic, particularly for access and processing conflicts.
28
+ STORAGE_ACCESS_CLAIM_MISMATCH: (0, define_1.defineError)({
29
+ code: 'STORAGE_ACCESS_CLAIM_MISMATCH',
30
+ class: 'public',
31
+ http: 403,
32
+ message: 'You do not have permission to process this file.'
33
+ }),
34
+ STORAGE_FILE_NOT_FOUND: (0, define_1.defineError)({
35
+ code: 'STORAGE_FILE_NOT_FOUND',
36
+ class: 'public',
37
+ http: 404,
38
+ message: 'The file could not be found.'
39
+ }),
40
+ STORAGE_SOURCE_HASH_REQUIRED: (0, define_1.defineError)({
41
+ code: 'STORAGE_SOURCE_HASH_REQUIRED',
42
+ class: 'public',
43
+ http: 400,
44
+ message: 'A valid source file hash is required.'
45
+ }),
46
+ STORAGE_SOURCE_HASH_MISMATCH: (0, define_1.defineError)({
47
+ code: 'STORAGE_SOURCE_HASH_MISMATCH',
48
+ class: 'public',
49
+ http: 409,
50
+ message: 'The source file has changed. Please process it again.'
51
+ }),
52
+ STORAGE_INVALID_COMPLETION_RESULT: (0, define_1.defineError)({
53
+ code: 'STORAGE_INVALID_COMPLETION_RESULT',
54
+ class: 'public',
55
+ http: 400,
56
+ message: 'The file processing result is invalid.'
57
+ }),
58
+ STORAGE_PROCESSING_CONFLICT: (0, define_1.defineError)({
59
+ code: 'STORAGE_PROCESSING_CONFLICT',
60
+ class: 'public',
61
+ http: 409,
62
+ message: 'The file is not in a state that allows this processing result.'
63
+ }),
64
+ STORAGE_INVALID_UPLOAD_DOCUMENT: (0, define_1.defineError)({
65
+ code: 'STORAGE_INVALID_UPLOAD_DOCUMENT',
66
+ class: 'internal',
67
+ http: 500,
68
+ message: 'The stored upload document is invalid.'
69
+ }),
70
+ // Runtime-only dispatch errors; these have no database audit records.
71
+ STORAGE_BUCKET_DATABASE_MISMATCH: (0, define_1.defineError)({
72
+ code: 'STORAGE_BUCKET_DATABASE_MISMATCH',
73
+ class: 'internal',
74
+ http: 500,
75
+ message: 'The storage bucket does not belong to the invocation database.'
76
+ }),
77
+ STORAGE_FILE_TARGET_UNAVAILABLE: (0, define_1.defineError)({
78
+ code: 'STORAGE_FILE_TARGET_UNAVAILABLE',
79
+ class: 'internal',
80
+ http: 500,
81
+ message: 'The storage file target is unavailable.'
82
+ }),
26
83
  // ===========================================================================
27
84
  // Auth / account (public) — copy sourced from dashboard auth-errors.ts
28
85
  // ===========================================================================
@@ -92,6 +149,12 @@ exports.registry = {
92
149
  http: 403,
93
150
  message: 'Sign-up is currently disabled.'
94
151
  }),
152
+ SIGN_UP_REQUIRES_INVITE: (0, define_1.defineError)({
153
+ code: 'SIGN_UP_REQUIRES_INVITE',
154
+ class: 'public',
155
+ http: 403,
156
+ message: 'Sign-up is by invitation only. Please provide a valid invite code.'
157
+ }),
95
158
  // ===========================================================================
96
159
  // Auth / account (public) — migrated from the server graphile SAFE_ERROR_CODES
97
160
  // allowlist so the registry (not a hand-maintained set) is the source of truth
@@ -226,6 +289,24 @@ exports.registry = {
226
289
  http: 404,
227
290
  message: 'This email is not associated with the invitation. Please use the email address the invitation was sent to.'
228
291
  }),
292
+ INVITE_PHONE_NOT_FOUND: (0, define_1.defineError)({
293
+ code: 'INVITE_PHONE_NOT_FOUND',
294
+ class: 'public',
295
+ http: 404,
296
+ message: 'This phone number is not associated with the invitation. Please use the phone number the invitation was sent to.'
297
+ }),
298
+ INVITE_ADDRESS_REQUIRED: (0, define_1.defineError)({
299
+ code: 'INVITE_ADDRESS_REQUIRED',
300
+ class: 'public',
301
+ http: 400,
302
+ message: 'An email address or phone number is required.'
303
+ }),
304
+ INVITE_USERS_INVALID: (0, define_1.defineError)({
305
+ code: 'INVITE_USERS_INVALID',
306
+ class: 'public',
307
+ http: 400,
308
+ message: 'The users payload must be a JSON array.'
309
+ }),
229
310
  // ===========================================================================
230
311
  // Authorization / step-up (public)
231
312
  // ===========================================================================