@orpc/client 0.0.0-next.3f40711 → 0.0.0-next.3f73bd3

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.
Files changed (40) hide show
  1. package/README.md +96 -0
  2. package/dist/adapters/fetch/index.d.mts +33 -0
  3. package/dist/adapters/fetch/index.d.ts +33 -0
  4. package/dist/adapters/fetch/index.mjs +29 -0
  5. package/dist/adapters/message-port/index.d.mts +59 -0
  6. package/dist/adapters/message-port/index.d.ts +59 -0
  7. package/dist/adapters/message-port/index.mjs +71 -0
  8. package/dist/adapters/standard/index.d.mts +10 -0
  9. package/dist/adapters/standard/index.d.ts +10 -0
  10. package/dist/adapters/standard/index.mjs +4 -0
  11. package/dist/adapters/websocket/index.d.mts +29 -0
  12. package/dist/adapters/websocket/index.d.ts +29 -0
  13. package/dist/adapters/websocket/index.mjs +44 -0
  14. package/dist/index.d.mts +185 -0
  15. package/dist/index.d.ts +185 -0
  16. package/dist/index.mjs +82 -0
  17. package/dist/plugins/index.d.mts +202 -0
  18. package/dist/plugins/index.d.ts +202 -0
  19. package/dist/plugins/index.mjs +389 -0
  20. package/dist/shared/client.BOYsZIRq.d.mts +29 -0
  21. package/dist/shared/client.BOYsZIRq.d.ts +29 -0
  22. package/dist/shared/client.C4VxIexA.d.mts +46 -0
  23. package/dist/shared/client.CXXEPIbK.d.ts +46 -0
  24. package/dist/shared/client.DHOfWE0c.mjs +172 -0
  25. package/dist/shared/client.DwfV9Oyl.mjs +355 -0
  26. package/dist/shared/client.WCinBImJ.d.ts +91 -0
  27. package/dist/shared/client.aTp4sII-.d.mts +91 -0
  28. package/package.json +32 -19
  29. package/dist/chunk-HYT35LXG.js +0 -105
  30. package/dist/fetch.js +0 -126
  31. package/dist/index.js +0 -58
  32. package/dist/src/adapters/fetch/index.d.ts +0 -3
  33. package/dist/src/adapters/fetch/orpc-link.d.ts +0 -97
  34. package/dist/src/adapters/fetch/types.d.ts +0 -6
  35. package/dist/src/client.d.ts +0 -11
  36. package/dist/src/dynamic-link.d.ts +0 -13
  37. package/dist/src/event-iterator-state.d.ts +0 -9
  38. package/dist/src/event-iterator.d.ts +0 -8
  39. package/dist/src/index.d.ts +0 -8
  40. package/dist/src/types.d.ts +0 -8
@@ -1,13 +0,0 @@
1
- import type { ClientContext } from '@orpc/contract';
2
- import type { Promisable } from '@orpc/shared';
3
- import type { ClientLink, ClientOptionsOut } from './types';
4
- /**
5
- * DynamicLink provides a way to dynamically resolve and delegate calls to other ClientLinks
6
- * based on the request path, input, and context.
7
- */
8
- export declare class DynamicLink<TClientContext extends ClientContext> implements ClientLink<TClientContext> {
9
- private readonly linkResolver;
10
- constructor(linkResolver: (options: ClientOptionsOut<TClientContext>, path: readonly string[], input: unknown) => Promisable<ClientLink<TClientContext>>);
11
- call(path: readonly string[], input: unknown, options: ClientOptionsOut<TClientContext>): Promise<unknown>;
12
- }
13
- //# sourceMappingURL=dynamic-link.d.ts.map
@@ -1,9 +0,0 @@
1
- export type ConnectionStatus = 'reconnecting' | 'connected' | 'closed';
2
- export interface EventIteratorState {
3
- status: ConnectionStatus;
4
- listeners: Array<(newStatus: ConnectionStatus) => void>;
5
- }
6
- export declare function registerEventIteratorState(iterator: AsyncIteratorObject<unknown, unknown, void>, state: EventIteratorState): void;
7
- export declare function updateEventIteratorStatus(state: EventIteratorState, status: ConnectionStatus): void;
8
- export declare function onEventIteratorStatusChange(iterator: AsyncIteratorObject<unknown, unknown, void>, callback: (status: ConnectionStatus) => void, notifyImmediately?: boolean): () => void;
9
- //# sourceMappingURL=event-iterator-state.d.ts.map
@@ -1,8 +0,0 @@
1
- export interface EventIteratorReconnectOptions {
2
- lastRetry: number | undefined;
3
- lastEventId: string | undefined;
4
- retryTimes: number;
5
- error: unknown;
6
- }
7
- export declare function createAutoRetryEventIterator<TYield, TReturn>(initial: AsyncIterator<TYield, TReturn, void>, reconnect: (options: EventIteratorReconnectOptions) => Promise<AsyncIterator<TYield, TReturn, void> | null>, initialLastEventId: string | undefined): AsyncGenerator<TYield, TReturn, void>;
8
- //# sourceMappingURL=event-iterator.d.ts.map
@@ -1,8 +0,0 @@
1
- /** unnoq */
2
- export * from './client';
3
- export * from './dynamic-link';
4
- export * from './event-iterator';
5
- export * from './event-iterator-state';
6
- export * from './types';
7
- export { isDefinedError, ORPCError, safe } from '@orpc/contract';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1,8 +0,0 @@
1
- import type { ClientContext, ClientOptions } from '@orpc/contract';
2
- export type ClientOptionsOut<TClientContext extends ClientContext> = ClientOptions<TClientContext> & {
3
- context: TClientContext;
4
- };
5
- export interface ClientLink<TClientContext extends ClientContext> {
6
- call(path: readonly string[], input: unknown, options: ClientOptionsOut<TClientContext>): Promise<unknown>;
7
- }
8
- //# sourceMappingURL=types.d.ts.map