@temporary-name/shared 1.9.3-alpha.4225889dbc4c4adc76cdbabb804a30cd075c9d7a → 1.9.3-alpha.47c8371db8c45c361b1db0b785980cc77971e6e6
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.
- package/dist/index.d.mts +40 -4
- package/dist/index.d.ts +40 -4
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -29,7 +29,7 @@ type OmitChainMethodDeep<T extends object, K extends keyof any> = {
|
|
|
29
29
|
|
|
30
30
|
declare const ORPC_NAME = "orpc";
|
|
31
31
|
declare const ORPC_SHARED_PACKAGE_NAME = "@temporary-name/shared";
|
|
32
|
-
declare const ORPC_SHARED_PACKAGE_VERSION = "1.9.3-alpha.
|
|
32
|
+
declare const ORPC_SHARED_PACKAGE_VERSION = "1.9.3-alpha.47c8371db8c45c361b1db0b785980cc77971e6e6";
|
|
33
33
|
|
|
34
34
|
declare const ORPC_CLIENT_PACKAGE_NAME = "__ORPC_CLIENT_PACKAGE_NAME_PLACEHOLDER__";
|
|
35
35
|
declare const ORPC_CLIENT_PACKAGE_VERSION = "__ORPC_CLIENT_PACKAGE_VERSION_PLACEHOLDER__";
|
|
@@ -223,10 +223,46 @@ declare class SequentialIdGenerator {
|
|
|
223
223
|
generate(): string;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
+
type StandardBody = undefined | unknown | Blob | URLSearchParams | FormData | AsyncIterator<unknown | void, unknown | void, undefined>;
|
|
227
|
+
interface StandardRequest {
|
|
228
|
+
method: string;
|
|
229
|
+
url: URL;
|
|
230
|
+
headers: Headers;
|
|
231
|
+
/**
|
|
232
|
+
* The body has been parsed based on the content-type header.
|
|
233
|
+
*/
|
|
234
|
+
body: StandardBody;
|
|
235
|
+
signal: AbortSignal | undefined;
|
|
236
|
+
}
|
|
237
|
+
interface StandardLazyRequest extends Omit<StandardRequest, 'body'> {
|
|
238
|
+
/**
|
|
239
|
+
* The body has been parsed based on the content-type header.
|
|
240
|
+
* This method can safely call multiple times (cached).
|
|
241
|
+
*/
|
|
242
|
+
body: () => Promise<StandardBody>;
|
|
243
|
+
}
|
|
244
|
+
interface StandardResponse {
|
|
245
|
+
status: number;
|
|
246
|
+
headers: Headers;
|
|
247
|
+
/**
|
|
248
|
+
* The body has been parsed based on the content-type header.
|
|
249
|
+
*/
|
|
250
|
+
body: StandardBody;
|
|
251
|
+
}
|
|
252
|
+
interface StandardLazyResponse extends Omit<StandardResponse, 'body'> {
|
|
253
|
+
/**
|
|
254
|
+
* The body has been parsed based on the content-type header.
|
|
255
|
+
* This method can safely call multiple times (cached).
|
|
256
|
+
*/
|
|
257
|
+
body: () => Promise<StandardBody>;
|
|
258
|
+
}
|
|
226
259
|
type HTTPPath = `/${string}`;
|
|
227
|
-
|
|
260
|
+
declare const HTTPMethods: readonly ["HEAD", "GET", "POST", "PUT", "DELETE", "PATCH"];
|
|
261
|
+
type HTTPMethod = (typeof HTTPMethods)[number];
|
|
262
|
+
type HTTPEndpoint = `${HTTPMethod} ${HTTPPath}`;
|
|
228
263
|
type ClientContext = Record<PropertyKey, any>;
|
|
229
264
|
interface ClientOptions<T extends ClientContext> {
|
|
265
|
+
request?: StandardLazyRequest;
|
|
230
266
|
signal?: AbortSignal;
|
|
231
267
|
lastEventId?: string | undefined;
|
|
232
268
|
context: T;
|
|
@@ -505,5 +541,5 @@ type SafeResult<TOutput, TError> = ([error: null, data: TOutput, isDefined: fals
|
|
|
505
541
|
declare function safe<TOutput, TError = ThrowableError$1>(promise: ClientPromiseResult<TOutput, TError>): Promise<SafeResult<TOutput, TError>>;
|
|
506
542
|
declare function toHttpPath(path: readonly string[]): HTTPPath;
|
|
507
543
|
|
|
508
|
-
export { AbortError, AsyncIdQueue, AsyncIteratorClass, COMMON_ORPC_ERROR_DEFS, EventPublisher, NullProtoObj, ORPCError, ORPC_CLIENT_PACKAGE_NAME, ORPC_CLIENT_PACKAGE_VERSION, ORPC_NAME, ORPC_SHARED_PACKAGE_NAME, ORPC_SHARED_PACKAGE_VERSION, SequentialIdGenerator, asyncIteratorToStream, asyncIteratorWithSpan, clone, createORPCErrorFromJson, defer, fallback, fallbackORPCErrorMessage, fallbackORPCErrorStatus, findDeepMatches, get, getConstructor, getGlobalOtelConfig, intercept, isAsyncIteratorObject, isDefinedError, isORPCErrorJson, isORPCErrorStatus, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, overlayProxy, parseEmptyableJSON, preventNativeAwait, readAsBuffer, replicateAsyncIterator, resolveMaybeOptionalOptions, runInSpanContext, runWithSpan, safe, sequential, setGlobalOtelConfig, setSpanAttribute, setSpanError, splitInHalf, startSpan, streamToAsyncIteratorClass, stringifyJSON, toArray, toHttpPath, toORPCError, toOtelException, toSpanAttributeValue, tryDecodeURIComponent, value };
|
|
509
|
-
export type { AnyFunction, AsyncIdQueueCloseOptions, AsyncIteratorClassCleanupFn, AsyncIteratorClassNextFn, AsyncIteratorWithSpanOptions, Client, ClientContext, ClientLink, ClientOptions, ClientPromiseResult, ClientRest, CommonORPCErrorCode, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, FriendlyClientOptions, HTTPMethod, HTTPPath, InferAsyncIterableYield, InferClientContext, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, IsEqual, MaybeOptionalOptions, NestedClient, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, OmitChainMethodDeep, OnFinishState, OtelConfig, Promisable, PromiseWithError, Registry, RunWithSpanOptions, SafeResult, Segment, SetOptional, SetSpanErrorOptions, ThrowableError, Value };
|
|
544
|
+
export { AbortError, AsyncIdQueue, AsyncIteratorClass, COMMON_ORPC_ERROR_DEFS, EventPublisher, HTTPMethods, NullProtoObj, ORPCError, ORPC_CLIENT_PACKAGE_NAME, ORPC_CLIENT_PACKAGE_VERSION, ORPC_NAME, ORPC_SHARED_PACKAGE_NAME, ORPC_SHARED_PACKAGE_VERSION, SequentialIdGenerator, asyncIteratorToStream, asyncIteratorWithSpan, clone, createORPCErrorFromJson, defer, fallback, fallbackORPCErrorMessage, fallbackORPCErrorStatus, findDeepMatches, get, getConstructor, getGlobalOtelConfig, intercept, isAsyncIteratorObject, isDefinedError, isORPCErrorJson, isORPCErrorStatus, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, overlayProxy, parseEmptyableJSON, preventNativeAwait, readAsBuffer, replicateAsyncIterator, resolveMaybeOptionalOptions, runInSpanContext, runWithSpan, safe, sequential, setGlobalOtelConfig, setSpanAttribute, setSpanError, splitInHalf, startSpan, streamToAsyncIteratorClass, stringifyJSON, toArray, toHttpPath, toORPCError, toOtelException, toSpanAttributeValue, tryDecodeURIComponent, value };
|
|
545
|
+
export type { AnyFunction, AsyncIdQueueCloseOptions, AsyncIteratorClassCleanupFn, AsyncIteratorClassNextFn, AsyncIteratorWithSpanOptions, Client, ClientContext, ClientLink, ClientOptions, ClientPromiseResult, ClientRest, CommonORPCErrorCode, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, FriendlyClientOptions, HTTPEndpoint, HTTPMethod, HTTPPath, InferAsyncIterableYield, InferClientContext, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, IsEqual, MaybeOptionalOptions, NestedClient, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, OmitChainMethodDeep, OnFinishState, OtelConfig, Promisable, PromiseWithError, Registry, RunWithSpanOptions, SafeResult, Segment, SetOptional, SetSpanErrorOptions, StandardBody, StandardLazyRequest, StandardLazyResponse, StandardRequest, StandardResponse, ThrowableError, Value };
|
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ type OmitChainMethodDeep<T extends object, K extends keyof any> = {
|
|
|
29
29
|
|
|
30
30
|
declare const ORPC_NAME = "orpc";
|
|
31
31
|
declare const ORPC_SHARED_PACKAGE_NAME = "@temporary-name/shared";
|
|
32
|
-
declare const ORPC_SHARED_PACKAGE_VERSION = "1.9.3-alpha.
|
|
32
|
+
declare const ORPC_SHARED_PACKAGE_VERSION = "1.9.3-alpha.47c8371db8c45c361b1db0b785980cc77971e6e6";
|
|
33
33
|
|
|
34
34
|
declare const ORPC_CLIENT_PACKAGE_NAME = "__ORPC_CLIENT_PACKAGE_NAME_PLACEHOLDER__";
|
|
35
35
|
declare const ORPC_CLIENT_PACKAGE_VERSION = "__ORPC_CLIENT_PACKAGE_VERSION_PLACEHOLDER__";
|
|
@@ -223,10 +223,46 @@ declare class SequentialIdGenerator {
|
|
|
223
223
|
generate(): string;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
+
type StandardBody = undefined | unknown | Blob | URLSearchParams | FormData | AsyncIterator<unknown | void, unknown | void, undefined>;
|
|
227
|
+
interface StandardRequest {
|
|
228
|
+
method: string;
|
|
229
|
+
url: URL;
|
|
230
|
+
headers: Headers;
|
|
231
|
+
/**
|
|
232
|
+
* The body has been parsed based on the content-type header.
|
|
233
|
+
*/
|
|
234
|
+
body: StandardBody;
|
|
235
|
+
signal: AbortSignal | undefined;
|
|
236
|
+
}
|
|
237
|
+
interface StandardLazyRequest extends Omit<StandardRequest, 'body'> {
|
|
238
|
+
/**
|
|
239
|
+
* The body has been parsed based on the content-type header.
|
|
240
|
+
* This method can safely call multiple times (cached).
|
|
241
|
+
*/
|
|
242
|
+
body: () => Promise<StandardBody>;
|
|
243
|
+
}
|
|
244
|
+
interface StandardResponse {
|
|
245
|
+
status: number;
|
|
246
|
+
headers: Headers;
|
|
247
|
+
/**
|
|
248
|
+
* The body has been parsed based on the content-type header.
|
|
249
|
+
*/
|
|
250
|
+
body: StandardBody;
|
|
251
|
+
}
|
|
252
|
+
interface StandardLazyResponse extends Omit<StandardResponse, 'body'> {
|
|
253
|
+
/**
|
|
254
|
+
* The body has been parsed based on the content-type header.
|
|
255
|
+
* This method can safely call multiple times (cached).
|
|
256
|
+
*/
|
|
257
|
+
body: () => Promise<StandardBody>;
|
|
258
|
+
}
|
|
226
259
|
type HTTPPath = `/${string}`;
|
|
227
|
-
|
|
260
|
+
declare const HTTPMethods: readonly ["HEAD", "GET", "POST", "PUT", "DELETE", "PATCH"];
|
|
261
|
+
type HTTPMethod = (typeof HTTPMethods)[number];
|
|
262
|
+
type HTTPEndpoint = `${HTTPMethod} ${HTTPPath}`;
|
|
228
263
|
type ClientContext = Record<PropertyKey, any>;
|
|
229
264
|
interface ClientOptions<T extends ClientContext> {
|
|
265
|
+
request?: StandardLazyRequest;
|
|
230
266
|
signal?: AbortSignal;
|
|
231
267
|
lastEventId?: string | undefined;
|
|
232
268
|
context: T;
|
|
@@ -505,5 +541,5 @@ type SafeResult<TOutput, TError> = ([error: null, data: TOutput, isDefined: fals
|
|
|
505
541
|
declare function safe<TOutput, TError = ThrowableError$1>(promise: ClientPromiseResult<TOutput, TError>): Promise<SafeResult<TOutput, TError>>;
|
|
506
542
|
declare function toHttpPath(path: readonly string[]): HTTPPath;
|
|
507
543
|
|
|
508
|
-
export { AbortError, AsyncIdQueue, AsyncIteratorClass, COMMON_ORPC_ERROR_DEFS, EventPublisher, NullProtoObj, ORPCError, ORPC_CLIENT_PACKAGE_NAME, ORPC_CLIENT_PACKAGE_VERSION, ORPC_NAME, ORPC_SHARED_PACKAGE_NAME, ORPC_SHARED_PACKAGE_VERSION, SequentialIdGenerator, asyncIteratorToStream, asyncIteratorWithSpan, clone, createORPCErrorFromJson, defer, fallback, fallbackORPCErrorMessage, fallbackORPCErrorStatus, findDeepMatches, get, getConstructor, getGlobalOtelConfig, intercept, isAsyncIteratorObject, isDefinedError, isORPCErrorJson, isORPCErrorStatus, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, overlayProxy, parseEmptyableJSON, preventNativeAwait, readAsBuffer, replicateAsyncIterator, resolveMaybeOptionalOptions, runInSpanContext, runWithSpan, safe, sequential, setGlobalOtelConfig, setSpanAttribute, setSpanError, splitInHalf, startSpan, streamToAsyncIteratorClass, stringifyJSON, toArray, toHttpPath, toORPCError, toOtelException, toSpanAttributeValue, tryDecodeURIComponent, value };
|
|
509
|
-
export type { AnyFunction, AsyncIdQueueCloseOptions, AsyncIteratorClassCleanupFn, AsyncIteratorClassNextFn, AsyncIteratorWithSpanOptions, Client, ClientContext, ClientLink, ClientOptions, ClientPromiseResult, ClientRest, CommonORPCErrorCode, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, FriendlyClientOptions, HTTPMethod, HTTPPath, InferAsyncIterableYield, InferClientContext, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, IsEqual, MaybeOptionalOptions, NestedClient, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, OmitChainMethodDeep, OnFinishState, OtelConfig, Promisable, PromiseWithError, Registry, RunWithSpanOptions, SafeResult, Segment, SetOptional, SetSpanErrorOptions, ThrowableError, Value };
|
|
544
|
+
export { AbortError, AsyncIdQueue, AsyncIteratorClass, COMMON_ORPC_ERROR_DEFS, EventPublisher, HTTPMethods, NullProtoObj, ORPCError, ORPC_CLIENT_PACKAGE_NAME, ORPC_CLIENT_PACKAGE_VERSION, ORPC_NAME, ORPC_SHARED_PACKAGE_NAME, ORPC_SHARED_PACKAGE_VERSION, SequentialIdGenerator, asyncIteratorToStream, asyncIteratorWithSpan, clone, createORPCErrorFromJson, defer, fallback, fallbackORPCErrorMessage, fallbackORPCErrorStatus, findDeepMatches, get, getConstructor, getGlobalOtelConfig, intercept, isAsyncIteratorObject, isDefinedError, isORPCErrorJson, isORPCErrorStatus, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, overlayProxy, parseEmptyableJSON, preventNativeAwait, readAsBuffer, replicateAsyncIterator, resolveMaybeOptionalOptions, runInSpanContext, runWithSpan, safe, sequential, setGlobalOtelConfig, setSpanAttribute, setSpanError, splitInHalf, startSpan, streamToAsyncIteratorClass, stringifyJSON, toArray, toHttpPath, toORPCError, toOtelException, toSpanAttributeValue, tryDecodeURIComponent, value };
|
|
545
|
+
export type { AnyFunction, AsyncIdQueueCloseOptions, AsyncIteratorClassCleanupFn, AsyncIteratorClassNextFn, AsyncIteratorWithSpanOptions, Client, ClientContext, ClientLink, ClientOptions, ClientPromiseResult, ClientRest, CommonORPCErrorCode, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, FriendlyClientOptions, HTTPEndpoint, HTTPMethod, HTTPPath, InferAsyncIterableYield, InferClientContext, InterceptableOptions, Interceptor, InterceptorOptions, IntersectPick, IsEqual, MaybeOptionalOptions, NestedClient, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, OmitChainMethodDeep, OnFinishState, OtelConfig, Promisable, PromiseWithError, Registry, RunWithSpanOptions, SafeResult, Segment, SetOptional, SetSpanErrorOptions, StandardBody, StandardLazyRequest, StandardLazyResponse, StandardRequest, StandardResponse, ThrowableError, Value };
|
package/dist/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ function readAsBuffer(source) {
|
|
|
22
22
|
|
|
23
23
|
const ORPC_NAME = "orpc";
|
|
24
24
|
const ORPC_SHARED_PACKAGE_NAME = "@temporary-name/shared";
|
|
25
|
-
const ORPC_SHARED_PACKAGE_VERSION = "1.9.3-alpha.
|
|
25
|
+
const ORPC_SHARED_PACKAGE_VERSION = "1.9.3-alpha.47c8371db8c45c361b1db0b785980cc77971e6e6";
|
|
26
26
|
|
|
27
27
|
const ORPC_CLIENT_PACKAGE_NAME = "__ORPC_CLIENT_PACKAGE_NAME_PLACEHOLDER__";
|
|
28
28
|
const ORPC_CLIENT_PACKAGE_VERSION = "__ORPC_CLIENT_PACKAGE_VERSION_PLACEHOLDER__";
|
|
@@ -852,6 +852,8 @@ function asyncIteratorToStream(iterator) {
|
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
854
|
|
|
855
|
+
const HTTPMethods = ["HEAD", "GET", "POST", "PUT", "DELETE", "PATCH"];
|
|
856
|
+
|
|
855
857
|
function tryDecodeURIComponent(value) {
|
|
856
858
|
try {
|
|
857
859
|
return decodeURIComponent(value);
|
|
@@ -894,4 +896,4 @@ function toHttpPath(path) {
|
|
|
894
896
|
return `/${path.map(encodeURIComponent).join("/")}`;
|
|
895
897
|
}
|
|
896
898
|
|
|
897
|
-
export { AbortError, AsyncIdQueue, AsyncIteratorClass, COMMON_ORPC_ERROR_DEFS, EventPublisher, NullProtoObj, ORPCError, ORPC_CLIENT_PACKAGE_NAME, ORPC_CLIENT_PACKAGE_VERSION, ORPC_NAME, ORPC_SHARED_PACKAGE_NAME, ORPC_SHARED_PACKAGE_VERSION, SequentialIdGenerator, asyncIteratorToStream, asyncIteratorWithSpan, clone, createORPCErrorFromJson, defer, fallback, fallbackORPCErrorMessage, fallbackORPCErrorStatus, findDeepMatches, get, getConstructor, getGlobalOtelConfig, intercept, isAsyncIteratorObject, isDefinedError, isORPCErrorJson, isORPCErrorStatus, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, overlayProxy, parseEmptyableJSON, preventNativeAwait, readAsBuffer, replicateAsyncIterator, resolveMaybeOptionalOptions, runInSpanContext, runWithSpan, safe, sequential, setGlobalOtelConfig, setSpanAttribute, setSpanError, splitInHalf, startSpan, streamToAsyncIteratorClass, stringifyJSON, toArray, toHttpPath, toORPCError, toOtelException, toSpanAttributeValue, tryDecodeURIComponent, value };
|
|
899
|
+
export { AbortError, AsyncIdQueue, AsyncIteratorClass, COMMON_ORPC_ERROR_DEFS, EventPublisher, HTTPMethods, NullProtoObj, ORPCError, ORPC_CLIENT_PACKAGE_NAME, ORPC_CLIENT_PACKAGE_VERSION, ORPC_NAME, ORPC_SHARED_PACKAGE_NAME, ORPC_SHARED_PACKAGE_VERSION, SequentialIdGenerator, asyncIteratorToStream, asyncIteratorWithSpan, clone, createORPCErrorFromJson, defer, fallback, fallbackORPCErrorMessage, fallbackORPCErrorStatus, findDeepMatches, get, getConstructor, getGlobalOtelConfig, intercept, isAsyncIteratorObject, isDefinedError, isORPCErrorJson, isORPCErrorStatus, isObject, isPropertyKey, isTypescriptObject, onError, onFinish, onStart, onSuccess, once, overlayProxy, parseEmptyableJSON, preventNativeAwait, readAsBuffer, replicateAsyncIterator, resolveMaybeOptionalOptions, runInSpanContext, runWithSpan, safe, sequential, setGlobalOtelConfig, setSpanAttribute, setSpanError, splitInHalf, startSpan, streamToAsyncIteratorClass, stringifyJSON, toArray, toHttpPath, toORPCError, toOtelException, toSpanAttributeValue, tryDecodeURIComponent, value };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporary-name/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.3-alpha.
|
|
4
|
+
"version": "1.9.3-alpha.47c8371db8c45c361b1db0b785980cc77971e6e6",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.stainless.com/",
|
|
7
7
|
"repository": {
|