@constructive-io/errors 0.20.0 → 0.20.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 (824 distinct codes
4
+ * Source of truth: the constructive-db error audit (817 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: 824 total, 604 public, 220 internal.
12
+ * Counts: 817 total, 598 public, 219 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 = 824;
27
+ export declare const GENERATED_CODE_COUNT = 817;
@@ -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 (824 distinct codes
5
+ * Source of truth: the constructive-db error audit (817 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: 824 total, 604 public, 220 internal.
13
+ * Counts: 817 total, 598 public, 219 internal.
14
14
  */
15
15
  import { defineError } from '../define';
16
16
  /** Every constructive-db error code, keyed by code. */
@@ -754,12 +754,10 @@ export const generatedRegistry = {
754
754
  'STEP_UP_REQUIRED_FRESH_AUTH': defineError({ code: 'STEP_UP_REQUIRED_FRESH_AUTH', class: 'public', http: 403, message: 'Please verify your identity to continue.' }),
755
755
  '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.' }),
756
756
  'STEP_UP_REQUIRED_PASSWORD': defineError({ code: 'STEP_UP_REQUIRED_PASSWORD', class: 'public', http: 403, message: 'Please re-enter your password to continue.' }),
757
- 'STORAGE_ACCESS_CLAIM_MISMATCH': defineError({ code: 'STORAGE_ACCESS_CLAIM_MISMATCH', class: 'public', http: 400, message: 'Storage access claim mismatch.' }),
758
757
  'STORAGE_API_NOT_PROVISIONED': defineError({ code: 'STORAGE_API_NOT_PROVISIONED', class: 'public', http: 400, message: 'Storage api not provisioned.' }),
759
758
  'STORAGE_DESTINATION_REQUIRES_TEMP': defineError({ code: 'STORAGE_DESTINATION_REQUIRES_TEMP', class: 'internal', http: 500, message: 'Storage destination requires temp.' }),
760
759
  'STORAGE_FILE_BUCKET_IMMUTABLE': defineError({ code: 'STORAGE_FILE_BUCKET_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file bucket immutable.' }),
761
760
  'STORAGE_FILE_KEY_IMMUTABLE': defineError({ code: 'STORAGE_FILE_KEY_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file key immutable.' }),
762
- 'STORAGE_FILE_NOT_FOUND': defineError({ code: 'STORAGE_FILE_NOT_FOUND', class: 'public', http: 404, message: 'Storage file not found.' }),
763
761
  'STORAGE_GC_CONTENT_HASH_UNSUPPORTED': defineError({ code: 'STORAGE_GC_CONTENT_HASH_UNSUPPORTED', class: 'internal', http: 500, message: 'Storage gc content hash unsupported.' }),
764
762
  'STORAGE_GC_FILES_TABLE_MISSING': defineError({ code: 'STORAGE_GC_FILES_TABLE_MISSING', class: 'internal', http: 500, message: 'Storage gc files table missing.' }),
765
763
  'STORAGE_GC_MODULE_AMBIGUOUS': defineError({ code: 'STORAGE_GC_MODULE_AMBIGUOUS', class: 'internal', http: 500, message: 'Storage gc module ambiguous.' }),
@@ -769,15 +767,10 @@ export const generatedRegistry = {
769
767
  'STORAGE_GC_REF_CROSS_DATABASE': defineError({ code: 'STORAGE_GC_REF_CROSS_DATABASE', class: 'internal', http: 500, message: 'Storage gc ref cross database.' }),
770
768
  'STORAGE_GC_REF_FIELD_MISSING': defineError({ code: 'STORAGE_GC_REF_FIELD_MISSING', class: 'internal', http: 500, message: 'Storage gc ref field missing.' }),
771
769
  'STORAGE_GC_REF_TABLE_MISSING': defineError({ code: 'STORAGE_GC_REF_TABLE_MISSING', class: 'internal', http: 500, message: 'Storage gc ref table missing.' }),
772
- 'STORAGE_INVALID_COMPLETION_RESULT': defineError({ code: 'STORAGE_INVALID_COMPLETION_RESULT', class: 'public', http: 400, message: 'Storage invalid completion result.' }),
773
- 'STORAGE_INVALID_UPLOAD_DOCUMENT': defineError({ code: 'STORAGE_INVALID_UPLOAD_DOCUMENT', class: 'internal', http: 500, message: 'Storage invalid upload document.' }),
774
770
  'STORAGE_MODULE_ENTITY_FIELD_INVALID': defineError({ code: 'STORAGE_MODULE_ENTITY_FIELD_INVALID', class: 'internal', http: 500, message: 'Storage module entity field invalid.' }),
775
771
  'STORAGE_MODULE_NOT_FOUND': defineError({ code: 'STORAGE_MODULE_NOT_FOUND', class: 'internal', http: 500, message: 'Storage module not found.' }),
776
- 'STORAGE_PROCESSING_CONFLICT': defineError({ code: 'STORAGE_PROCESSING_CONFLICT', class: 'public', http: 400, message: 'Storage processing conflict.' }),
777
772
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': defineError({ code: 'STORAGE_PROMOTION_DESTINATION_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion destination mismatch.' }),
778
773
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': defineError({ code: 'STORAGE_PROMOTION_VISIBILITY_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion visibility mismatch.' }),
779
- 'STORAGE_SOURCE_HASH_MISMATCH': defineError({ code: 'STORAGE_SOURCE_HASH_MISMATCH', class: 'public', http: 400, message: 'Storage source hash mismatch.' }),
780
- 'STORAGE_SOURCE_HASH_REQUIRED': defineError({ code: 'STORAGE_SOURCE_HASH_REQUIRED', class: 'public', http: 400, message: 'Storage source hash required.' }),
781
774
  'STORAGE_STAGING_BUCKET_NO_DESTINATION': defineError({ code: 'STORAGE_STAGING_BUCKET_NO_DESTINATION', class: 'internal', http: 500, message: 'Storage staging bucket no destination.' }),
782
775
  'STORAGE_STAGING_BUCKET_NO_TTL': defineError({ code: 'STORAGE_STAGING_BUCKET_NO_TTL', class: 'internal', http: 500, message: 'Storage staging bucket no ttl.' }),
783
776
  'STORAGE_STAGING_DESTINATION_INVALID': defineError({ code: 'STORAGE_STAGING_DESTINATION_INVALID', class: 'internal', http: 500, message: 'Storage staging destination invalid.' }),
@@ -1581,12 +1574,10 @@ export const GENERATED_CODE_META = {
1581
1574
  'STEP_UP_REQUIRED_FRESH_AUTH': { class: 'public', dynamic: false, generatedOnly: false },
1582
1575
  'STEP_UP_REQUIRED_MFA': { class: 'public', dynamic: false, generatedOnly: false },
1583
1576
  'STEP_UP_REQUIRED_PASSWORD': { class: 'public', dynamic: false, generatedOnly: false },
1584
- 'STORAGE_ACCESS_CLAIM_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1585
1577
  'STORAGE_API_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
1586
1578
  'STORAGE_DESTINATION_REQUIRES_TEMP': { class: 'internal', dynamic: false, generatedOnly: false },
1587
1579
  'STORAGE_FILE_BUCKET_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1588
1580
  'STORAGE_FILE_KEY_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1589
- 'STORAGE_FILE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1590
1581
  'STORAGE_GC_CONTENT_HASH_UNSUPPORTED': { class: 'internal', dynamic: false, generatedOnly: false },
1591
1582
  'STORAGE_GC_FILES_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1592
1583
  'STORAGE_GC_MODULE_AMBIGUOUS': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1596,15 +1587,10 @@ export const GENERATED_CODE_META = {
1596
1587
  'STORAGE_GC_REF_CROSS_DATABASE': { class: 'internal', dynamic: false, generatedOnly: false },
1597
1588
  'STORAGE_GC_REF_FIELD_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1598
1589
  'STORAGE_GC_REF_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1599
- 'STORAGE_INVALID_COMPLETION_RESULT': { class: 'public', dynamic: false, generatedOnly: false },
1600
- 'STORAGE_INVALID_UPLOAD_DOCUMENT': { class: 'internal', dynamic: false, generatedOnly: false },
1601
1590
  'STORAGE_MODULE_ENTITY_FIELD_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
1602
1591
  'STORAGE_MODULE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
1603
- 'STORAGE_PROCESSING_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1604
1592
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1605
1593
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1606
- 'STORAGE_SOURCE_HASH_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1607
- 'STORAGE_SOURCE_HASH_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1608
1594
  'STORAGE_STAGING_BUCKET_NO_DESTINATION': { class: 'internal', dynamic: false, generatedOnly: false },
1609
1595
  'STORAGE_STAGING_BUCKET_NO_TTL': { class: 'internal', dynamic: false, generatedOnly: false },
1610
1596
  'STORAGE_STAGING_DESTINATION_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1668,4 +1654,4 @@ export const GENERATED_CODE_META = {
1668
1654
  'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
1669
1655
  };
1670
1656
  /** Total number of codes collected from constructive-db. */
1671
- export const GENERATED_CODE_COUNT = 824;
1657
+ export const GENERATED_CODE_COUNT = 817;
package/esm/registry.d.ts CHANGED
@@ -1,10 +1,5 @@
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
- };
8
3
  /**
9
4
  * The curated Constructive error registry.
10
5
  *
@@ -16,36 +11,6 @@ type StorageFileContext = {
16
11
  */
17
12
  export declare const registry: {
18
13
  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
- }>;
49
14
  readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
50
15
  readonly ALREADY_AUTHENTICATED_USE_LINK: import("./define").DefinedError<import("./types").EmptyContext>;
51
16
  readonly IDENTIFIER_CONFLICT: import("./define").DefinedError<import("./types").EmptyContext>;
package/esm/registry.js CHANGED
@@ -17,63 +17,6 @@ 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
- }),
77
20
  // ===========================================================================
78
21
  // Auth / account (public) — copy sourced from dashboard auth-errors.ts
79
22
  // ===========================================================================
@@ -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 (824 distinct codes
4
+ * Source of truth: the constructive-db error audit (817 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: 824 total, 604 public, 220 internal.
12
+ * Counts: 817 total, 598 public, 219 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 = 824;
27
+ export declare const GENERATED_CODE_COUNT = 817;
@@ -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 (824 distinct codes
8
+ * Source of truth: the constructive-db error audit (817 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: 824 total, 604 public, 220 internal.
16
+ * Counts: 817 total, 598 public, 219 internal.
17
17
  */
18
18
  const define_1 = require("../define");
19
19
  /** Every constructive-db error code, keyed by code. */
@@ -757,12 +757,10 @@ exports.generatedRegistry = {
757
757
  '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.' }),
758
758
  '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.' }),
759
759
  '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.' }),
760
- 'STORAGE_ACCESS_CLAIM_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_ACCESS_CLAIM_MISMATCH', class: 'public', http: 400, message: 'Storage access claim mismatch.' }),
761
760
  'STORAGE_API_NOT_PROVISIONED': (0, define_1.defineError)({ code: 'STORAGE_API_NOT_PROVISIONED', class: 'public', http: 400, message: 'Storage api not provisioned.' }),
762
761
  'STORAGE_DESTINATION_REQUIRES_TEMP': (0, define_1.defineError)({ code: 'STORAGE_DESTINATION_REQUIRES_TEMP', class: 'internal', http: 500, message: 'Storage destination requires temp.' }),
763
762
  'STORAGE_FILE_BUCKET_IMMUTABLE': (0, define_1.defineError)({ code: 'STORAGE_FILE_BUCKET_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file bucket immutable.' }),
764
763
  'STORAGE_FILE_KEY_IMMUTABLE': (0, define_1.defineError)({ code: 'STORAGE_FILE_KEY_IMMUTABLE', class: 'internal', http: 500, message: 'Storage file key immutable.' }),
765
- 'STORAGE_FILE_NOT_FOUND': (0, define_1.defineError)({ code: 'STORAGE_FILE_NOT_FOUND', class: 'public', http: 404, message: 'Storage file not found.' }),
766
764
  '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.' }),
767
765
  '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.' }),
768
766
  'STORAGE_GC_MODULE_AMBIGUOUS': (0, define_1.defineError)({ code: 'STORAGE_GC_MODULE_AMBIGUOUS', class: 'internal', http: 500, message: 'Storage gc module ambiguous.' }),
@@ -772,15 +770,10 @@ exports.generatedRegistry = {
772
770
  '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.' }),
773
771
  '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.' }),
774
772
  '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.' }),
775
- 'STORAGE_INVALID_COMPLETION_RESULT': (0, define_1.defineError)({ code: 'STORAGE_INVALID_COMPLETION_RESULT', class: 'public', http: 400, message: 'Storage invalid completion result.' }),
776
- 'STORAGE_INVALID_UPLOAD_DOCUMENT': (0, define_1.defineError)({ code: 'STORAGE_INVALID_UPLOAD_DOCUMENT', class: 'internal', http: 500, message: 'Storage invalid upload document.' }),
777
773
  '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.' }),
778
774
  'STORAGE_MODULE_NOT_FOUND': (0, define_1.defineError)({ code: 'STORAGE_MODULE_NOT_FOUND', class: 'internal', http: 500, message: 'Storage module not found.' }),
779
- 'STORAGE_PROCESSING_CONFLICT': (0, define_1.defineError)({ code: 'STORAGE_PROCESSING_CONFLICT', class: 'public', http: 400, message: 'Storage processing conflict.' }),
780
775
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_PROMOTION_DESTINATION_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion destination mismatch.' }),
781
776
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_PROMOTION_VISIBILITY_MISMATCH', class: 'internal', http: 500, message: 'Storage promotion visibility mismatch.' }),
782
- 'STORAGE_SOURCE_HASH_MISMATCH': (0, define_1.defineError)({ code: 'STORAGE_SOURCE_HASH_MISMATCH', class: 'public', http: 400, message: 'Storage source hash mismatch.' }),
783
- 'STORAGE_SOURCE_HASH_REQUIRED': (0, define_1.defineError)({ code: 'STORAGE_SOURCE_HASH_REQUIRED', class: 'public', http: 400, message: 'Storage source hash required.' }),
784
777
  '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.' }),
785
778
  '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.' }),
786
779
  'STORAGE_STAGING_DESTINATION_INVALID': (0, define_1.defineError)({ code: 'STORAGE_STAGING_DESTINATION_INVALID', class: 'internal', http: 500, message: 'Storage staging destination invalid.' }),
@@ -1584,12 +1577,10 @@ exports.GENERATED_CODE_META = {
1584
1577
  'STEP_UP_REQUIRED_FRESH_AUTH': { class: 'public', dynamic: false, generatedOnly: false },
1585
1578
  'STEP_UP_REQUIRED_MFA': { class: 'public', dynamic: false, generatedOnly: false },
1586
1579
  'STEP_UP_REQUIRED_PASSWORD': { class: 'public', dynamic: false, generatedOnly: false },
1587
- 'STORAGE_ACCESS_CLAIM_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1588
1580
  'STORAGE_API_NOT_PROVISIONED': { class: 'public', dynamic: false, generatedOnly: false },
1589
1581
  'STORAGE_DESTINATION_REQUIRES_TEMP': { class: 'internal', dynamic: false, generatedOnly: false },
1590
1582
  'STORAGE_FILE_BUCKET_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1591
1583
  'STORAGE_FILE_KEY_IMMUTABLE': { class: 'internal', dynamic: false, generatedOnly: false },
1592
- 'STORAGE_FILE_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1593
1584
  'STORAGE_GC_CONTENT_HASH_UNSUPPORTED': { class: 'internal', dynamic: false, generatedOnly: false },
1594
1585
  'STORAGE_GC_FILES_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1595
1586
  'STORAGE_GC_MODULE_AMBIGUOUS': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1599,15 +1590,10 @@ exports.GENERATED_CODE_META = {
1599
1590
  'STORAGE_GC_REF_CROSS_DATABASE': { class: 'internal', dynamic: false, generatedOnly: false },
1600
1591
  'STORAGE_GC_REF_FIELD_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1601
1592
  'STORAGE_GC_REF_TABLE_MISSING': { class: 'internal', dynamic: false, generatedOnly: false },
1602
- 'STORAGE_INVALID_COMPLETION_RESULT': { class: 'public', dynamic: false, generatedOnly: false },
1603
- 'STORAGE_INVALID_UPLOAD_DOCUMENT': { class: 'internal', dynamic: false, generatedOnly: false },
1604
1593
  'STORAGE_MODULE_ENTITY_FIELD_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
1605
1594
  'STORAGE_MODULE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
1606
- 'STORAGE_PROCESSING_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1607
1595
  'STORAGE_PROMOTION_DESTINATION_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1608
1596
  'STORAGE_PROMOTION_VISIBILITY_MISMATCH': { class: 'internal', dynamic: false, generatedOnly: false },
1609
- 'STORAGE_SOURCE_HASH_MISMATCH': { class: 'public', dynamic: false, generatedOnly: false },
1610
- 'STORAGE_SOURCE_HASH_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1611
1597
  'STORAGE_STAGING_BUCKET_NO_DESTINATION': { class: 'internal', dynamic: false, generatedOnly: false },
1612
1598
  'STORAGE_STAGING_BUCKET_NO_TTL': { class: 'internal', dynamic: false, generatedOnly: false },
1613
1599
  'STORAGE_STAGING_DESTINATION_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
@@ -1671,4 +1657,4 @@ exports.GENERATED_CODE_META = {
1671
1657
  'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
1672
1658
  };
1673
1659
  /** Total number of codes collected from constructive-db. */
1674
- exports.GENERATED_CODE_COUNT = 824;
1660
+ exports.GENERATED_CODE_COUNT = 817;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/errors",
3
- "version": "0.20.0",
3
+ "version": "0.20.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": "e05686fb94c5e22c954436f18c25aa4439b9e83e"
44
+ "gitHead": "4c68f85c7d9b3c72082f8305dffc0b3dfca80941"
45
45
  }
package/registry.d.ts CHANGED
@@ -1,10 +1,5 @@
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
- };
8
3
  /**
9
4
  * The curated Constructive error registry.
10
5
  *
@@ -16,36 +11,6 @@ type StorageFileContext = {
16
11
  */
17
12
  export declare const registry: {
18
13
  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
- }>;
49
14
  readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
50
15
  readonly ALREADY_AUTHENTICATED_USE_LINK: import("./define").DefinedError<import("./types").EmptyContext>;
51
16
  readonly IDENTIFIER_CONFLICT: import("./define").DefinedError<import("./types").EmptyContext>;
package/registry.js CHANGED
@@ -23,63 +23,6 @@ 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
- }),
83
26
  // ===========================================================================
84
27
  // Auth / account (public) — copy sourced from dashboard auth-errors.ts
85
28
  // ===========================================================================