Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/zero-protocol/src/error-kind-enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@ export const InvalidConnectionRequestClientDeleted =
'InvalidConnectionRequestClientDeleted';
export const InvalidMessage = 'InvalidMessage';
export const InvalidPush = 'InvalidPush';
/**
* @deprecated MutationFailed is used for CRUD mutators.
*/
export const MutationFailed = 'MutationFailed';
/**
* @deprecated MutationRateLimited is used for CRUD mutators.
*/
export const MutationRateLimited = 'MutationRateLimited';
export const Rebalance = 'Rebalance';
export const Rehome = 'Rehome';
/**
* @deprecated Unauthorized is used for JWT validation errors.
*/
export const Unauthorized = 'Unauthorized';
export const VersionNotSupported = 'VersionNotSupported';
export const SchemaVersionNotSupported = 'SchemaVersionNotSupported';
Expand All @@ -36,10 +45,13 @@ export type InvalidConnectionRequestClientDeleted =
typeof InvalidConnectionRequestClientDeleted;
export type InvalidMessage = typeof InvalidMessage;
export type InvalidPush = typeof InvalidPush;
/** @deprecated */
export type MutationFailed = typeof MutationFailed;
/** @deprecated */
export type MutationRateLimited = typeof MutationRateLimited;
export type Rebalance = typeof Rebalance;
export type Rehome = typeof Rehome;
/** @deprecated */
export type Unauthorized = typeof Unauthorized;
export type VersionNotSupported = typeof VersionNotSupported;
export type SchemaVersionNotSupported = typeof SchemaVersionNotSupported;
Expand Down
7 changes: 7 additions & 0 deletions packages/zero-protocol/src/error/error-origin-enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const Server = 'Server';
export const ZeroCache = 'ZeroCache';
export const Client = 'Client';

export type Server = typeof Server;
export type ZeroCache = typeof ZeroCache;
export type Client = typeof Client;
5 changes: 5 additions & 0 deletions packages/zero-protocol/src/error/error-origin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type {Enum} from '../../../shared/src/enum.ts';
import * as ErrorOriginEnum from './error-origin-enum.ts';

export {ErrorOriginEnum as ErrorOrigin};
export type ErrorOrigin = Enum<typeof ErrorOriginEnum>;
11 changes: 11 additions & 0 deletions packages/zero-protocol/src/error/error-recovery-strategy-enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const Auto = 'Auto';
export const ManualReconnect = 'ManualReconnect';
export const ManualRefetch = 'ManualRefetch';
export const PageReload = 'PageReload';
export const ClearStorageAndPageReload = 'ClearStorageAndPageReload';

export type Auto = typeof Auto;
export type ManualReconnect = typeof ManualReconnect;
export type ManualRefetch = typeof ManualRefetch;
export type PageReload = typeof PageReload;
export type ClearStorageAndPageReload = typeof ClearStorageAndPageReload;
5 changes: 5 additions & 0 deletions packages/zero-protocol/src/error/error-recovery-strategy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type {Enum} from '../../../shared/src/enum.ts';
import * as ErrorRecoveryStrategyEnum from './error-recovery-strategy-enum.ts';

export {ErrorRecoveryStrategyEnum as ErrorRecoveryStrategy};
export type ErrorRecoveryStrategy = Enum<typeof ErrorRecoveryStrategyEnum>;
13 changes: 13 additions & 0 deletions packages/zero-protocol/src/error/error-scope-enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const Connection = 'Connection';
export const Query = 'Query';
export const Mutation = 'Mutation';
export const Sync = 'Sync';
export const Backoff = 'Backoff';
export const Internal = 'Internal';

export type Connection = typeof Connection;
export type Query = typeof Query;
export type Mutation = typeof Mutation;
export type Sync = typeof Sync;
export type Backoff = typeof Backoff;
export type Internal = typeof Internal;
5 changes: 5 additions & 0 deletions packages/zero-protocol/src/error/error-scope.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type {Enum} from '../../../shared/src/enum.ts';
import * as ErrorScopeEnum from './error-scope-enum.ts';

export {ErrorScopeEnum as ErrorScope};
export type ErrorScope = Enum<typeof ErrorScopeEnum>;
7 changes: 7 additions & 0 deletions packages/zero-protocol/src/error/error-severity-enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const Info = 'info';
export const Warn = 'warn';
export const Error = 'error';

export type Info = typeof Info;
export type Warn = typeof Warn;
export type Error = typeof Error;
5 changes: 5 additions & 0 deletions packages/zero-protocol/src/error/error-severity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type {Enum} from '../../../shared/src/enum.ts';
import * as ErrorSeverityEnum from './error-severity-enum.ts';

export {ErrorSeverityEnum as ErrorSeverity};
export type ErrorSeverity = Enum<typeof ErrorSeverityEnum>;
7 changes: 7 additions & 0 deletions packages/zero-protocol/src/error/error-source-enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const HTTP = 'HTTP';
export const App = 'App';
export const Zero = 'Zero';

export type HTTP = typeof HTTP;
export type App = typeof App;
export type Zero = typeof Zero;
5 changes: 5 additions & 0 deletions packages/zero-protocol/src/error/error-source.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type {Enum} from '../../../shared/src/enum.ts';
import * as ErrorSourceEnum from './error-source-enum.ts';

export {ErrorSourceEnum as ErrorSource};
export type ErrorSource = Enum<typeof ErrorSourceEnum>;
Loading
Loading