@constructive-io/errors 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 (801 distinct codes
4
+ * Source of truth: the constructive-db error audit (804 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: 801 total, 591 public, 210 internal.
12
+ * Counts: 804 total, 594 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 = 801;
27
+ export declare const GENERATED_CODE_COUNT = 804;
@@ -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 (801 distinct codes
5
+ * Source of truth: the constructive-db error audit (804 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: 801 total, 591 public, 210 internal.
13
+ * Counts: 804 total, 594 public, 210 internal.
14
14
  */
15
15
  import { defineError } from '../define';
16
16
  /** Every constructive-db error code, keyed by code. */
@@ -20,6 +20,7 @@ export const generatedRegistry = {
20
20
  'ACCOUNT_LOCKED_EXCEED_ATTEMPTS': defineError({ code: 'ACCOUNT_LOCKED_EXCEED_ATTEMPTS', class: 'public', http: 423, message: 'Account locked exceed attempts.' }),
21
21
  'ACCOUNT_NOT_FOUND': defineError({ code: 'ACCOUNT_NOT_FOUND', class: 'public', http: 404, message: 'Account not found.' }),
22
22
  'ACTOR_CLAIM_REQUIRED': defineError({ code: 'ACTOR_CLAIM_REQUIRED', class: 'internal', http: 500, message: 'Actor claim required.' }),
23
+ 'ALREADY_AUTHENTICATED_USE_LINK': defineError({ code: 'ALREADY_AUTHENTICATED_USE_LINK', class: 'public', http: 409, message: 'Already authenticated use link.' }),
23
24
  'ALREADY_SCHEDULED': defineError({ code: 'ALREADY_SCHEDULED', class: 'public', http: 409, message: 'Already scheduled.' }),
24
25
  'ALTER_TABLE_ADD_COLUMN': defineError({ code: 'ALTER_TABLE_ADD_COLUMN', class: 'internal', http: 500, message: 'ALTER_TABLE_ADD_COLUMN: a column cannot be both generated and an identity column' }),
25
26
  'API_KEYS_DISABLED': defineError({ code: 'API_KEYS_DISABLED', class: 'public', http: 403, message: 'Api keys disabled.' }),
@@ -410,6 +411,7 @@ export const generatedRegistry = {
410
411
  'HISTORY': 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': defineError({ code: 'HOSTNAME_BINDING_SYNC', class: 'internal', http: 500, message: 'HOSTNAME_BINDING_SYNC: unknown event {{arg0}}, expected UPSERT or DELETE', positional: ['arg0'] }),
412
413
  'HOSTNAME_CLAIMED_IN_OTHER_PLANE': defineError({ code: 'HOSTNAME_CLAIMED_IN_OTHER_PLANE', class: 'public', http: 400, message: 'Hostname claimed in other plane.' }),
414
+ 'IDENTIFIER_CONFLICT': defineError({ code: 'IDENTIFIER_CONFLICT', class: 'public', http: 400, message: 'Identifier conflict.' }),
413
415
  'IDENTITY_ACCOUNT_NOT_FOUND': defineError({ code: 'IDENTITY_ACCOUNT_NOT_FOUND', class: 'public', http: 404, message: 'Identity account not found.' }),
414
416
  'IDENTITY_ALREADY_LINKED': defineError({ code: 'IDENTITY_ALREADY_LINKED', class: 'public', http: 409, message: 'Identity already linked.' }),
415
417
  'IDENTITY_LINK_AVAILABLE': defineError({ code: 'IDENTITY_LINK_AVAILABLE', class: 'public', http: 400, message: 'Identity link available.' }),
@@ -447,6 +449,7 @@ export const generatedRegistry = {
447
449
  'INVALID_TOKEN': defineError({ code: 'INVALID_TOKEN', class: 'public', http: 401, message: 'Invalid token.' }),
448
450
  'INVALID_USER': defineError({ code: 'INVALID_USER', class: 'public', http: 400, message: 'Invalid user.' }),
449
451
  'INVALID_WORKER_ID': defineError({ code: 'INVALID_WORKER_ID', class: 'internal', http: 500, message: 'Invalid worker id.' }),
452
+ 'INVITE_ACCOUNT_EXISTS_UNVERIFIED': defineError({ code: 'INVITE_ACCOUNT_EXISTS_UNVERIFIED', class: 'public', http: 400, message: 'Invite account exists unverified.' }),
450
453
  'INVITE_ADDRESS_REQUIRED': defineError({ code: 'INVITE_ADDRESS_REQUIRED', class: 'public', http: 400, message: 'Invite address required.' }),
451
454
  'INVITE_EMAIL_NOT_FOUND': defineError({ code: 'INVITE_EMAIL_NOT_FOUND', class: 'public', http: 404, message: 'Invite email not found.' }),
452
455
  'INVITE_LIMIT': defineError({ code: 'INVITE_LIMIT', class: 'public', http: 429, message: 'Invite limit.' }),
@@ -824,6 +827,7 @@ export const GENERATED_CODE_META = {
824
827
  'ACCOUNT_LOCKED_EXCEED_ATTEMPTS': { class: 'public', dynamic: false, generatedOnly: false },
825
828
  'ACCOUNT_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
826
829
  'ACTOR_CLAIM_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: true },
830
+ 'ALREADY_AUTHENTICATED_USE_LINK': { class: 'public', dynamic: false, generatedOnly: false },
827
831
  'ALREADY_SCHEDULED': { class: 'public', dynamic: false, generatedOnly: true },
828
832
  'ALTER_TABLE_ADD_COLUMN': { class: 'internal', dynamic: true, generatedOnly: false },
829
833
  'API_KEYS_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
@@ -1214,6 +1218,7 @@ export const GENERATED_CODE_META = {
1214
1218
  'HISTORY': { class: 'internal', dynamic: true, generatedOnly: false },
1215
1219
  'HOSTNAME_BINDING_SYNC': { class: 'internal', dynamic: true, generatedOnly: false },
1216
1220
  'HOSTNAME_CLAIMED_IN_OTHER_PLANE': { class: 'public', dynamic: false, generatedOnly: true },
1221
+ 'IDENTIFIER_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1217
1222
  'IDENTITY_ACCOUNT_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1218
1223
  'IDENTITY_ALREADY_LINKED': { class: 'public', dynamic: false, generatedOnly: false },
1219
1224
  'IDENTITY_LINK_AVAILABLE': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1251,6 +1256,7 @@ export const GENERATED_CODE_META = {
1251
1256
  'INVALID_TOKEN': { class: 'public', dynamic: false, generatedOnly: false },
1252
1257
  'INVALID_USER': { class: 'public', dynamic: false, generatedOnly: false },
1253
1258
  'INVALID_WORKER_ID': { class: 'internal', dynamic: false, generatedOnly: true },
1259
+ 'INVITE_ACCOUNT_EXISTS_UNVERIFIED': { class: 'public', dynamic: false, generatedOnly: false },
1254
1260
  'INVITE_ADDRESS_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1255
1261
  'INVITE_EMAIL_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1256
1262
  'INVITE_LIMIT': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1622,4 +1628,4 @@ export const GENERATED_CODE_META = {
1622
1628
  'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
1623
1629
  };
1624
1630
  /** Total number of codes collected from constructive-db. */
1625
- export const GENERATED_CODE_COUNT = 801;
1631
+ export const GENERATED_CODE_COUNT = 804;
package/esm/registry.d.ts CHANGED
@@ -47,6 +47,8 @@ export declare const registry: {
47
47
  reason?: string;
48
48
  }>;
49
49
  readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
50
+ readonly ALREADY_AUTHENTICATED_USE_LINK: import("./define").DefinedError<import("./types").EmptyContext>;
51
+ readonly IDENTIFIER_CONFLICT: import("./define").DefinedError<import("./types").EmptyContext>;
50
52
  readonly ACCOUNT_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
51
53
  readonly NO_ACCOUNT_EXISTS: import("./define").DefinedError<{
52
54
  userId?: string;
@@ -79,6 +81,7 @@ export declare const registry: {
79
81
  readonly SINGLETON_TABLE: import("./define").DefinedError<import("./types").EmptyContext>;
80
82
  readonly INVITE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
81
83
  readonly INVITE_LIMIT: import("./define").DefinedError<import("./types").EmptyContext>;
84
+ readonly INVITE_ACCOUNT_EXISTS_UNVERIFIED: import("./define").DefinedError<import("./types").EmptyContext>;
82
85
  readonly INVITE_EMAIL_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
83
86
  readonly INVITE_PHONE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
84
87
  readonly INVITE_ADDRESS_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
package/esm/registry.js CHANGED
@@ -83,6 +83,18 @@ export const registry = {
83
83
  http: 409,
84
84
  message: 'An account with this email already exists. Please sign in or use a different email.'
85
85
  }),
86
+ ALREADY_AUTHENTICATED_USE_LINK: defineError({
87
+ code: 'ALREADY_AUTHENTICATED_USE_LINK',
88
+ class: 'public',
89
+ http: 409,
90
+ message: 'You are already signed in. Add this email or phone number to your current account instead of creating a new one.'
91
+ }),
92
+ IDENTIFIER_CONFLICT: defineError({
93
+ code: 'IDENTIFIER_CONFLICT',
94
+ class: 'public',
95
+ http: 409,
96
+ message: 'The email and phone number belong to different accounts. Provide only one of them.'
97
+ }),
86
98
  ACCOUNT_NOT_FOUND: defineError({
87
99
  code: 'ACCOUNT_NOT_FOUND',
88
100
  class: 'public',
@@ -277,6 +289,12 @@ export const registry = {
277
289
  http: 429,
278
290
  message: 'This invitation has reached its usage limit. Please request a new invitation.'
279
291
  }),
292
+ INVITE_ACCOUNT_EXISTS_UNVERIFIED: defineError({
293
+ code: 'INVITE_ACCOUNT_EXISTS_UNVERIFIED',
294
+ class: 'public',
295
+ http: 409,
296
+ message: 'An unverified account already exists for this identifier and has no active invitation. Ask the user to verify their account instead.'
297
+ }),
280
298
  INVITE_EMAIL_NOT_FOUND: defineError({
281
299
  code: 'INVITE_EMAIL_NOT_FOUND',
282
300
  class: 'public',
@@ -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 (801 distinct codes
4
+ * Source of truth: the constructive-db error audit (804 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: 801 total, 591 public, 210 internal.
12
+ * Counts: 804 total, 594 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 = 801;
27
+ export declare const GENERATED_CODE_COUNT = 804;
@@ -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 (801 distinct codes
8
+ * Source of truth: the constructive-db error audit (804 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: 801 total, 591 public, 210 internal.
16
+ * Counts: 804 total, 594 public, 210 internal.
17
17
  */
18
18
  const define_1 = require("../define");
19
19
  /** Every constructive-db error code, keyed by code. */
@@ -23,6 +23,7 @@ exports.generatedRegistry = {
23
23
  'ACCOUNT_LOCKED_EXCEED_ATTEMPTS': (0, define_1.defineError)({ code: 'ACCOUNT_LOCKED_EXCEED_ATTEMPTS', class: 'public', http: 423, message: 'Account locked exceed attempts.' }),
24
24
  'ACCOUNT_NOT_FOUND': (0, define_1.defineError)({ code: 'ACCOUNT_NOT_FOUND', class: 'public', http: 404, message: 'Account not found.' }),
25
25
  'ACTOR_CLAIM_REQUIRED': (0, define_1.defineError)({ code: 'ACTOR_CLAIM_REQUIRED', class: 'internal', http: 500, message: 'Actor claim required.' }),
26
+ 'ALREADY_AUTHENTICATED_USE_LINK': (0, define_1.defineError)({ code: 'ALREADY_AUTHENTICATED_USE_LINK', class: 'public', http: 409, message: 'Already authenticated use link.' }),
26
27
  'ALREADY_SCHEDULED': (0, define_1.defineError)({ code: 'ALREADY_SCHEDULED', class: 'public', http: 409, message: 'Already scheduled.' }),
27
28
  'ALTER_TABLE_ADD_COLUMN': (0, define_1.defineError)({ code: 'ALTER_TABLE_ADD_COLUMN', class: 'internal', http: 500, message: 'ALTER_TABLE_ADD_COLUMN: a column cannot be both generated and an identity column' }),
28
29
  'API_KEYS_DISABLED': (0, define_1.defineError)({ code: 'API_KEYS_DISABLED', class: 'public', http: 403, message: 'Api keys disabled.' }),
@@ -413,6 +414,7 @@ exports.generatedRegistry = {
413
414
  'HISTORY': (0, define_1.defineError)({ code: 'HISTORY', class: 'internal', http: 500, message: 'HISTORY: history {{arg0}}.{{arg1}} registration has no copy_fields', positional: ['arg0', 'arg1'] }),
414
415
  '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'] }),
415
416
  '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.' }),
417
+ 'IDENTIFIER_CONFLICT': (0, define_1.defineError)({ code: 'IDENTIFIER_CONFLICT', class: 'public', http: 400, message: 'Identifier conflict.' }),
416
418
  'IDENTITY_ACCOUNT_NOT_FOUND': (0, define_1.defineError)({ code: 'IDENTITY_ACCOUNT_NOT_FOUND', class: 'public', http: 404, message: 'Identity account not found.' }),
417
419
  'IDENTITY_ALREADY_LINKED': (0, define_1.defineError)({ code: 'IDENTITY_ALREADY_LINKED', class: 'public', http: 409, message: 'Identity already linked.' }),
418
420
  'IDENTITY_LINK_AVAILABLE': (0, define_1.defineError)({ code: 'IDENTITY_LINK_AVAILABLE', class: 'public', http: 400, message: 'Identity link available.' }),
@@ -450,6 +452,7 @@ exports.generatedRegistry = {
450
452
  'INVALID_TOKEN': (0, define_1.defineError)({ code: 'INVALID_TOKEN', class: 'public', http: 401, message: 'Invalid token.' }),
451
453
  'INVALID_USER': (0, define_1.defineError)({ code: 'INVALID_USER', class: 'public', http: 400, message: 'Invalid user.' }),
452
454
  'INVALID_WORKER_ID': (0, define_1.defineError)({ code: 'INVALID_WORKER_ID', class: 'internal', http: 500, message: 'Invalid worker id.' }),
455
+ 'INVITE_ACCOUNT_EXISTS_UNVERIFIED': (0, define_1.defineError)({ code: 'INVITE_ACCOUNT_EXISTS_UNVERIFIED', class: 'public', http: 400, message: 'Invite account exists unverified.' }),
453
456
  'INVITE_ADDRESS_REQUIRED': (0, define_1.defineError)({ code: 'INVITE_ADDRESS_REQUIRED', class: 'public', http: 400, message: 'Invite address required.' }),
454
457
  'INVITE_EMAIL_NOT_FOUND': (0, define_1.defineError)({ code: 'INVITE_EMAIL_NOT_FOUND', class: 'public', http: 404, message: 'Invite email not found.' }),
455
458
  'INVITE_LIMIT': (0, define_1.defineError)({ code: 'INVITE_LIMIT', class: 'public', http: 429, message: 'Invite limit.' }),
@@ -827,6 +830,7 @@ exports.GENERATED_CODE_META = {
827
830
  'ACCOUNT_LOCKED_EXCEED_ATTEMPTS': { class: 'public', dynamic: false, generatedOnly: false },
828
831
  'ACCOUNT_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
829
832
  'ACTOR_CLAIM_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: true },
833
+ 'ALREADY_AUTHENTICATED_USE_LINK': { class: 'public', dynamic: false, generatedOnly: false },
830
834
  'ALREADY_SCHEDULED': { class: 'public', dynamic: false, generatedOnly: true },
831
835
  'ALTER_TABLE_ADD_COLUMN': { class: 'internal', dynamic: true, generatedOnly: false },
832
836
  'API_KEYS_DISABLED': { class: 'public', dynamic: false, generatedOnly: true },
@@ -1217,6 +1221,7 @@ exports.GENERATED_CODE_META = {
1217
1221
  'HISTORY': { class: 'internal', dynamic: true, generatedOnly: false },
1218
1222
  'HOSTNAME_BINDING_SYNC': { class: 'internal', dynamic: true, generatedOnly: false },
1219
1223
  'HOSTNAME_CLAIMED_IN_OTHER_PLANE': { class: 'public', dynamic: false, generatedOnly: true },
1224
+ 'IDENTIFIER_CONFLICT': { class: 'public', dynamic: false, generatedOnly: false },
1220
1225
  'IDENTITY_ACCOUNT_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1221
1226
  'IDENTITY_ALREADY_LINKED': { class: 'public', dynamic: false, generatedOnly: false },
1222
1227
  'IDENTITY_LINK_AVAILABLE': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1254,6 +1259,7 @@ exports.GENERATED_CODE_META = {
1254
1259
  'INVALID_TOKEN': { class: 'public', dynamic: false, generatedOnly: false },
1255
1260
  'INVALID_USER': { class: 'public', dynamic: false, generatedOnly: false },
1256
1261
  'INVALID_WORKER_ID': { class: 'internal', dynamic: false, generatedOnly: true },
1262
+ 'INVITE_ACCOUNT_EXISTS_UNVERIFIED': { class: 'public', dynamic: false, generatedOnly: false },
1257
1263
  'INVITE_ADDRESS_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
1258
1264
  'INVITE_EMAIL_NOT_FOUND': { class: 'public', dynamic: false, generatedOnly: false },
1259
1265
  'INVITE_LIMIT': { class: 'public', dynamic: false, generatedOnly: false },
@@ -1625,4 +1631,4 @@ exports.GENERATED_CODE_META = {
1625
1631
  'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
1626
1632
  };
1627
1633
  /** Total number of codes collected from constructive-db. */
1628
- exports.GENERATED_CODE_COUNT = 801;
1634
+ exports.GENERATED_CODE_COUNT = 804;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/errors",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
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": "baa84094b8541eb5000701b0060aa5b298032dc7"
44
+ "gitHead": "0e26550efd7cd782ecaa106be30b3251efd97e6e"
45
45
  }
package/registry.d.ts CHANGED
@@ -47,6 +47,8 @@ export declare const registry: {
47
47
  reason?: string;
48
48
  }>;
49
49
  readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
50
+ readonly ALREADY_AUTHENTICATED_USE_LINK: import("./define").DefinedError<import("./types").EmptyContext>;
51
+ readonly IDENTIFIER_CONFLICT: import("./define").DefinedError<import("./types").EmptyContext>;
50
52
  readonly ACCOUNT_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
51
53
  readonly NO_ACCOUNT_EXISTS: import("./define").DefinedError<{
52
54
  userId?: string;
@@ -79,6 +81,7 @@ export declare const registry: {
79
81
  readonly SINGLETON_TABLE: import("./define").DefinedError<import("./types").EmptyContext>;
80
82
  readonly INVITE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
81
83
  readonly INVITE_LIMIT: import("./define").DefinedError<import("./types").EmptyContext>;
84
+ readonly INVITE_ACCOUNT_EXISTS_UNVERIFIED: import("./define").DefinedError<import("./types").EmptyContext>;
82
85
  readonly INVITE_EMAIL_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
83
86
  readonly INVITE_PHONE_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
84
87
  readonly INVITE_ADDRESS_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
package/registry.js CHANGED
@@ -89,6 +89,18 @@ exports.registry = {
89
89
  http: 409,
90
90
  message: 'An account with this email already exists. Please sign in or use a different email.'
91
91
  }),
92
+ ALREADY_AUTHENTICATED_USE_LINK: (0, define_1.defineError)({
93
+ code: 'ALREADY_AUTHENTICATED_USE_LINK',
94
+ class: 'public',
95
+ http: 409,
96
+ message: 'You are already signed in. Add this email or phone number to your current account instead of creating a new one.'
97
+ }),
98
+ IDENTIFIER_CONFLICT: (0, define_1.defineError)({
99
+ code: 'IDENTIFIER_CONFLICT',
100
+ class: 'public',
101
+ http: 409,
102
+ message: 'The email and phone number belong to different accounts. Provide only one of them.'
103
+ }),
92
104
  ACCOUNT_NOT_FOUND: (0, define_1.defineError)({
93
105
  code: 'ACCOUNT_NOT_FOUND',
94
106
  class: 'public',
@@ -283,6 +295,12 @@ exports.registry = {
283
295
  http: 429,
284
296
  message: 'This invitation has reached its usage limit. Please request a new invitation.'
285
297
  }),
298
+ INVITE_ACCOUNT_EXISTS_UNVERIFIED: (0, define_1.defineError)({
299
+ code: 'INVITE_ACCOUNT_EXISTS_UNVERIFIED',
300
+ class: 'public',
301
+ http: 409,
302
+ message: 'An unverified account already exists for this identifier and has no active invitation. Ask the user to verify their account instead.'
303
+ }),
286
304
  INVITE_EMAIL_NOT_FOUND: (0, define_1.defineError)({
287
305
  code: 'INVITE_EMAIL_NOT_FOUND',
288
306
  class: 'public',