@amqp-contract/client 0.23.0 → 0.23.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.
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/docs/index.md +28 -28
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import { TcpSocketConnectOpts } from "net";
|
|
|
6
6
|
import { ConnectionOptions } from "tls";
|
|
7
7
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
8
|
|
|
9
|
-
//#region ../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@
|
|
9
|
+
//#region ../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@0.10.9/node_modules/amqp-connection-manager/dist/types/AmqpConnectionManager.d.ts
|
|
10
10
|
type ConnectionUrl = string | amqp.Options.Connect | {
|
|
11
11
|
url: string;
|
|
12
12
|
connectionOptions?: AmqpConnectionOptions;
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["amqp","EventEmitter","TcpSocketConnectOpts","ConnectionOptions","ChannelWrapper","CreateChannelOpts","ConnectionUrl","Options","Connect","AmqpConnectionOptions","url","connectionOptions","ConnectListener","Connection","connection","arg","ConnectFailedListener","Error","err","Buffer","noDelay","timeout","keepAlive","keepAliveDelay","clientProperties","credentials","mechanism","username","password","response","AmqpConnectionManagerOptions","Promise","heartbeatIntervalInSeconds","reconnectTimeInSeconds","findServers","urls","callback","IAmqpConnectionManager","Function","ChannelModel","addListener","event","args","listener","reason","listeners","eventName","on","once","prependListener","prependOnceListener","removeListener","connect","options","reconnect","createChannel","close","isConnected","channelCount","AmqpConnectionManager","_channels","_currentUrl","_closed","_cancelRetriesHandler","_connectPromise","_currentConnection","_findServers","_urls","constructor","_connect","default"],"sources":["../../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["amqp","EventEmitter","TcpSocketConnectOpts","ConnectionOptions","ChannelWrapper","CreateChannelOpts","ConnectionUrl","Options","Connect","AmqpConnectionOptions","url","connectionOptions","ConnectListener","Connection","connection","arg","ConnectFailedListener","Error","err","Buffer","noDelay","timeout","keepAlive","keepAliveDelay","clientProperties","credentials","mechanism","username","password","response","AmqpConnectionManagerOptions","Promise","heartbeatIntervalInSeconds","reconnectTimeInSeconds","findServers","urls","callback","IAmqpConnectionManager","Function","ChannelModel","addListener","event","args","listener","reason","listeners","eventName","on","once","prependListener","prependOnceListener","removeListener","connect","options","reconnect","createChannel","close","isConnected","channelCount","AmqpConnectionManager","_channels","_currentUrl","_closed","_cancelRetriesHandler","_connectPromise","_currentConnection","_findServers","_urls","constructor","_connect","default"],"sources":["../../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@0.10.9/node_modules/amqp-connection-manager/dist/types/AmqpConnectionManager.d.ts","../src/errors.ts","../src/types.ts","../src/client.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;KAKYM,aAAAA,YAAyBN,IAAAA,CAAKO,OAAAA,CAAQC,OAAAA;EAC9CE,GAAAA;EACAC,iBAAAA,GAAoBF,qBAAAA;AAAAA;AAAAA,KAcZA,qBAAAA,IAAyBN,iBAAAA,GAAoBD,oBAAAA;EACrDkB,OAAAA;EACAC,OAAAA;EACAC,SAAAA;EACAC,cAAAA;EACAC,gBAAAA;EACAC,WAAAA;IACIC,SAAAA;IACAC,QAAAA;IACAC,QAAAA;IACAC,QAAAA,QAAgBV,MAAAA;EAAAA;IAEhBO,SAAAA;IACAG,QAAAA,QAAgBV,MAAAA;EAAAA;AAAAA;AAAAA,UAGPW,4BAAAA;EATTJ;EAWJM,0BAAAA;EATIJ;;;;EAcJK,sBAAAA;EAVoBd;;;AAGxB;;;;EAeIe,WAAAA,KAAgBE,QAAAA,GAAWD,IAAAA,EAA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T,MAAA,CAAO,MAAA,OAAa,cAAA,GAAiB,sBAAA;EDpSD;;;;;AAAiC;;;;;;;;;;;;;;;;;;;;AAU3C;EC8Y7B,IAAA,eAAmB,aAAA,CAAc,SAAA,EAAA,CAC/B,OAAA,EAAS,KAAA,EACT,OAAA,EAAS,0BAAA,CAA2B,SAAA,EAAW,KAAA,GAC/C,OAAA,EAAS,WAAA,GACR,MAAA,CACD,MAAA,CACE,4BAAA,CAA6B,SAAA,EAAW,KAAA,GACxC,cAAA,GAAiB,sBAAA,GAAyB,eAAA,GAAkB,iBAAA;EDlZ9C;;;;ECmiBlB,KAAA,CAAA,GAAS,MAAA,CAAO,MAAA,OAAa,cAAA;EAAA,QAiBrB,sBAAA;AAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import { TcpSocketConnectOpts } from "net";
|
|
|
6
6
|
import { ConnectionOptions } from "tls";
|
|
7
7
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
8
|
|
|
9
|
-
//#region ../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@
|
|
9
|
+
//#region ../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@0.10.9/node_modules/amqp-connection-manager/dist/types/AmqpConnectionManager.d.ts
|
|
10
10
|
type ConnectionUrl = string | amqp.Options.Connect | {
|
|
11
11
|
url: string;
|
|
12
12
|
connectionOptions?: AmqpConnectionOptions;
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":["amqp","EventEmitter","TcpSocketConnectOpts","ConnectionOptions","ChannelWrapper","CreateChannelOpts","ConnectionUrl","Options","Connect","AmqpConnectionOptions","url","connectionOptions","ConnectListener","Connection","connection","arg","ConnectFailedListener","Error","err","Buffer","noDelay","timeout","keepAlive","keepAliveDelay","clientProperties","credentials","mechanism","username","password","response","AmqpConnectionManagerOptions","Promise","heartbeatIntervalInSeconds","reconnectTimeInSeconds","findServers","urls","callback","IAmqpConnectionManager","Function","ChannelModel","addListener","event","args","listener","reason","listeners","eventName","on","once","prependListener","prependOnceListener","removeListener","connect","options","reconnect","createChannel","close","isConnected","channelCount","AmqpConnectionManager","_channels","_currentUrl","_closed","_cancelRetriesHandler","_connectPromise","_currentConnection","_findServers","_urls","constructor","_connect","default"],"sources":["../../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["amqp","EventEmitter","TcpSocketConnectOpts","ConnectionOptions","ChannelWrapper","CreateChannelOpts","ConnectionUrl","Options","Connect","AmqpConnectionOptions","url","connectionOptions","ConnectListener","Connection","connection","arg","ConnectFailedListener","Error","err","Buffer","noDelay","timeout","keepAlive","keepAliveDelay","clientProperties","credentials","mechanism","username","password","response","AmqpConnectionManagerOptions","Promise","heartbeatIntervalInSeconds","reconnectTimeInSeconds","findServers","urls","callback","IAmqpConnectionManager","Function","ChannelModel","addListener","event","args","listener","reason","listeners","eventName","on","once","prependListener","prependOnceListener","removeListener","connect","options","reconnect","createChannel","close","isConnected","channelCount","AmqpConnectionManager","_channels","_currentUrl","_closed","_cancelRetriesHandler","_connectPromise","_currentConnection","_findServers","_urls","constructor","_connect","default"],"sources":["../../../node_modules/.pnpm/amqp-connection-manager@5.0.0_amqplib@0.10.9/node_modules/amqp-connection-manager/dist/types/AmqpConnectionManager.d.ts","../src/errors.ts","../src/types.ts","../src/client.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;KAKYM,aAAAA,YAAyBN,IAAAA,CAAKO,OAAAA,CAAQC,OAAAA;EAC9CE,GAAAA;EACAC,iBAAAA,GAAoBF,qBAAAA;AAAAA;AAAAA,KAcZA,qBAAAA,IAAyBN,iBAAAA,GAAoBD,oBAAAA;EACrDkB,OAAAA;EACAC,OAAAA;EACAC,SAAAA;EACAC,cAAAA;EACAC,gBAAAA;EACAC,WAAAA;IACIC,SAAAA;IACAC,QAAAA;IACAC,QAAAA;IACAC,QAAAA,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AA;;AD5LoD;;;;;;;;UCmNpD,cAAA;ED9M4B;;;;;;;AACmB;;;;;;;EAMvB;;;;ECgShC,OAAA,eAAsB,mBAAA,CAAoB,SAAA,EAAA,CACxC,aAAA,EAAe,KAAA,EACf,OAAA,EAAS,yBAAA,CAA0B,SAAA,EAAW,KAAA,GAC9C,OAAA,GAAU,cAAA,GACT,MAAA,CAAO,MAAA,OAAa,cAAA,GAAiB,sBAAA;EDpSD;;;;;AAAiC;;;;;;;;;;;;;;;;;;;;AAU3C;EC8Y7B,IAAA,eAAmB,aAAA,CAAc,SAAA,EAAA,CAC/B,OAAA,EAAS,KAAA,EACT,OAAA,EAAS,0BAAA,CAA2B,SAAA,EAAW,KAAA,GAC/C,OAAA,EAAS,WAAA,GACR,MAAA,CACD,MAAA,CACE,4BAAA,CAA6B,SAAA,EAAW,KAAA,GACxC,cAAA,GAAiB,sBAAA,GAAyB,eAAA,GAAkB,iBAAA;EDlZ9C;;;;ECmiBlB,KAAA,CAAA,GAAS,MAAA,CAAO,MAAA,OAAa,cAAA;EAAA,QAiBrB,sBAAA;AAAA"}
|
package/docs/index.md
CHANGED
|
@@ -170,7 +170,7 @@ Error.prepareStackTrace
|
|
|
170
170
|
|
|
171
171
|
### RpcCancelledError
|
|
172
172
|
|
|
173
|
-
Defined in: [packages/client/src/errors.ts:39](https://github.com/btravers/amqp-contract/blob/
|
|
173
|
+
Defined in: [packages/client/src/errors.ts:39](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/errors.ts#L39)
|
|
174
174
|
|
|
175
175
|
Returned from any in-flight RPC call when the client is closed before the
|
|
176
176
|
reply is received. The correlation map is cleared on close and every pending
|
|
@@ -188,7 +188,7 @@ caller's promise resolves with `Result.Error(RpcCancelledError)`.
|
|
|
188
188
|
new RpcCancelledError(rpcName): RpcCancelledError;
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
Defined in: [packages/client/src/errors.ts:40](https://github.com/btravers/amqp-contract/blob/
|
|
191
|
+
Defined in: [packages/client/src/errors.ts:40](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/errors.ts#L40)
|
|
192
192
|
|
|
193
193
|
###### Parameters
|
|
194
194
|
|
|
@@ -213,7 +213,7 @@ Error.constructor
|
|
|
213
213
|
| <a id="cause-1"></a> `cause?` | `public` | `unknown` | - | `Error.cause` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 |
|
|
214
214
|
| <a id="message-1"></a> `message` | `public` | `string` | - | `Error.message` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 |
|
|
215
215
|
| <a id="name-1"></a> `name` | `public` | `string` | - | `Error.name` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074 |
|
|
216
|
-
| <a id="rpcname"></a> `rpcName` | `readonly` | `string` | - | - | [packages/client/src/errors.ts:40](https://github.com/btravers/amqp-contract/blob/
|
|
216
|
+
| <a id="rpcname"></a> `rpcName` | `readonly` | `string` | - | - | [packages/client/src/errors.ts:40](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/errors.ts#L40) |
|
|
217
217
|
| <a id="stack-1"></a> `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
|
|
218
218
|
| <a id="stacktracelimit-1"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | node\_modules/.pnpm/@types+node@24.12.2/node\_modules/@types/node/globals.d.ts:68 |
|
|
219
219
|
|
|
@@ -321,7 +321,7 @@ Error.prepareStackTrace
|
|
|
321
321
|
|
|
322
322
|
### RpcTimeoutError
|
|
323
323
|
|
|
324
|
-
Defined in: [packages/client/src/errors.ts:23](https://github.com/btravers/amqp-contract/blob/
|
|
324
|
+
Defined in: [packages/client/src/errors.ts:23](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/errors.ts#L23)
|
|
325
325
|
|
|
326
326
|
Returned from `TypedAmqpClient.call()` when the configured `timeoutMs` elapses
|
|
327
327
|
before the RPC server publishes a reply with the matching `correlationId`.
|
|
@@ -342,7 +342,7 @@ client if a logger is configured).
|
|
|
342
342
|
new RpcTimeoutError(rpcName, timeoutMs): RpcTimeoutError;
|
|
343
343
|
```
|
|
344
344
|
|
|
345
|
-
Defined in: [packages/client/src/errors.ts:24](https://github.com/btravers/amqp-contract/blob/
|
|
345
|
+
Defined in: [packages/client/src/errors.ts:24](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/errors.ts#L24)
|
|
346
346
|
|
|
347
347
|
###### Parameters
|
|
348
348
|
|
|
@@ -368,9 +368,9 @@ Error.constructor
|
|
|
368
368
|
| <a id="cause-2"></a> `cause?` | `public` | `unknown` | - | `Error.cause` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 |
|
|
369
369
|
| <a id="message-2"></a> `message` | `public` | `string` | - | `Error.message` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 |
|
|
370
370
|
| <a id="name-2"></a> `name` | `public` | `string` | - | `Error.name` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074 |
|
|
371
|
-
| <a id="rpcname-1"></a> `rpcName` | `readonly` | `string` | - | - | [packages/client/src/errors.ts:25](https://github.com/btravers/amqp-contract/blob/
|
|
371
|
+
| <a id="rpcname-1"></a> `rpcName` | `readonly` | `string` | - | - | [packages/client/src/errors.ts:25](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/errors.ts#L25) |
|
|
372
372
|
| <a id="stack-2"></a> `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
|
|
373
|
-
| <a id="timeoutms"></a> `timeoutMs` | `readonly` | `number` | - | - | [packages/client/src/errors.ts:26](https://github.com/btravers/amqp-contract/blob/
|
|
373
|
+
| <a id="timeoutms"></a> `timeoutMs` | `readonly` | `number` | - | - | [packages/client/src/errors.ts:26](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/errors.ts#L26) |
|
|
374
374
|
| <a id="stacktracelimit-2"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | node\_modules/.pnpm/@types+node@24.12.2/node\_modules/@types/node/globals.d.ts:68 |
|
|
375
375
|
|
|
376
376
|
#### Methods
|
|
@@ -477,7 +477,7 @@ Error.prepareStackTrace
|
|
|
477
477
|
|
|
478
478
|
### TypedAmqpClient
|
|
479
479
|
|
|
480
|
-
Defined in: [packages/client/src/client.ts:124](https://github.com/btravers/amqp-contract/blob/
|
|
480
|
+
Defined in: [packages/client/src/client.ts:124](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L124)
|
|
481
481
|
|
|
482
482
|
Type-safe AMQP client for publishing messages
|
|
483
483
|
|
|
@@ -502,7 +502,7 @@ call<TName>(
|
|
|
502
502
|
| RpcCancelledError>>;
|
|
503
503
|
```
|
|
504
504
|
|
|
505
|
-
Defined in: [packages/client/src/client.ts:429](https://github.com/btravers/amqp-contract/blob/
|
|
505
|
+
Defined in: [packages/client/src/client.ts:429](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L429)
|
|
506
506
|
|
|
507
507
|
Invoke an RPC defined via `defineRpc` and await the typed response.
|
|
508
508
|
|
|
@@ -553,7 +553,7 @@ if (result.isOk()) console.log(result.value.sum); // 3
|
|
|
553
553
|
close(): Future<Result<void, TechnicalError>>;
|
|
554
554
|
```
|
|
555
555
|
|
|
556
|
-
Defined in: [packages/client/src/client.ts:581](https://github.com/btravers/amqp-contract/blob/
|
|
556
|
+
Defined in: [packages/client/src/client.ts:581](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L581)
|
|
557
557
|
|
|
558
558
|
Close the channel and connection. Cancels the reply consumer (if any) and
|
|
559
559
|
rejects every in-flight RPC call with `RpcCancelledError`.
|
|
@@ -571,7 +571,7 @@ publish<TName>(
|
|
|
571
571
|
options?): Future<Result<void, TechnicalError | MessageValidationError>>;
|
|
572
572
|
```
|
|
573
573
|
|
|
574
|
-
Defined in: [packages/client/src/client.ts:309](https://github.com/btravers/amqp-contract/blob/
|
|
574
|
+
Defined in: [packages/client/src/client.ts:309](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L309)
|
|
575
575
|
|
|
576
576
|
Publish a message using a defined publisher.
|
|
577
577
|
TypeScript guarantees publisher exists for valid publisher names.
|
|
@@ -600,7 +600,7 @@ TypeScript guarantees publisher exists for valid publisher names.
|
|
|
600
600
|
static create<TContract>(__namedParameters): Future<Result<TypedAmqpClient<TContract>, TechnicalError>>;
|
|
601
601
|
```
|
|
602
602
|
|
|
603
|
-
Defined in: [packages/client/src/client.ts:155](https://github.com/btravers/amqp-contract/blob/
|
|
603
|
+
Defined in: [packages/client/src/client.ts:155](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L155)
|
|
604
604
|
|
|
605
605
|
Create a type-safe AMQP client from a contract.
|
|
606
606
|
|
|
@@ -635,7 +635,7 @@ connection options, following RabbitMQ best practices.
|
|
|
635
635
|
type CallOptions = object;
|
|
636
636
|
```
|
|
637
637
|
|
|
638
|
-
Defined in: [packages/client/src/client.ts:104](https://github.com/btravers/amqp-contract/blob/
|
|
638
|
+
Defined in: [packages/client/src/client.ts:104](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L104)
|
|
639
639
|
|
|
640
640
|
Per-call options for `client.call()`.
|
|
641
641
|
|
|
@@ -643,8 +643,8 @@ Per-call options for `client.call()`.
|
|
|
643
643
|
|
|
644
644
|
| Property | Type | Description | Defined in |
|
|
645
645
|
| ------ | ------ | ------ | ------ |
|
|
646
|
-
| <a id="publishoptions"></a> `publishOptions?` | `Omit`<`AmqpClientPublishOptions`, `"replyTo"` \| `"correlationId"`> | Optional AMQP message properties to merge into the request. `replyTo` and `correlationId` are managed by the client and cannot be overridden. | [packages/client/src/client.ts:118](https://github.com/btravers/amqp-contract/blob/
|
|
647
|
-
| <a id="timeoutms-1"></a> `timeoutMs` | `number` | Maximum time in ms to wait for an RPC reply. If exceeded, the call resolves to `Result.Error<RpcTimeoutError>` and the in-memory correlation entry is cleared. A late reply arriving after the timeout is silently dropped. Required: RPC without a timeout is a footgun. | [packages/client/src/client.ts:112](https://github.com/btravers/amqp-contract/blob/
|
|
646
|
+
| <a id="publishoptions"></a> `publishOptions?` | `Omit`<`AmqpClientPublishOptions`, `"replyTo"` \| `"correlationId"`> | Optional AMQP message properties to merge into the request. `replyTo` and `correlationId` are managed by the client and cannot be overridden. | [packages/client/src/client.ts:118](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L118) |
|
|
647
|
+
| <a id="timeoutms-1"></a> `timeoutMs` | `number` | Maximum time in ms to wait for an RPC reply. If exceeded, the call resolves to `Result.Error<RpcTimeoutError>` and the in-memory correlation entry is cleared. A late reply arriving after the timeout is silently dropped. Required: RPC without a timeout is a footgun. | [packages/client/src/client.ts:112](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L112) |
|
|
648
648
|
|
|
649
649
|
***
|
|
650
650
|
|
|
@@ -654,7 +654,7 @@ Per-call options for `client.call()`.
|
|
|
654
654
|
type ClientInferPublisherInput<TContract, TName> = PublisherInferInput<InferPublisher<TContract, TName>>;
|
|
655
655
|
```
|
|
656
656
|
|
|
657
|
-
Defined in: [packages/client/src/types.ts:43](https://github.com/btravers/amqp-contract/blob/
|
|
657
|
+
Defined in: [packages/client/src/types.ts:43](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/types.ts#L43)
|
|
658
658
|
|
|
659
659
|
Input type accepted by `client.publish(name, ...)` for a specific publisher.
|
|
660
660
|
|
|
@@ -673,7 +673,7 @@ Input type accepted by `client.publish(name, ...)` for a specific publisher.
|
|
|
673
673
|
type ClientInferRpcRequestInput<TContract, TName> = InferRpc<TContract, TName> extends RpcDefinition<infer TRequest, MessageDefinition> ? TRequest extends MessageDefinition ? InferSchemaInput<TRequest["payload"]> : never : never;
|
|
674
674
|
```
|
|
675
675
|
|
|
676
|
-
Defined in: [packages/client/src/types.ts:61](https://github.com/btravers/amqp-contract/blob/
|
|
676
|
+
Defined in: [packages/client/src/types.ts:61](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/types.ts#L61)
|
|
677
677
|
|
|
678
678
|
Input type accepted by `client.call(name, request, ...)`.
|
|
679
679
|
|
|
@@ -692,7 +692,7 @@ Input type accepted by `client.call(name, request, ...)`.
|
|
|
692
692
|
type ClientInferRpcResponseOutput<TContract, TName> = InferRpc<TContract, TName> extends RpcDefinition<MessageDefinition, infer TResponse> ? TResponse extends MessageDefinition ? InferSchemaOutput<TResponse["payload"]> : never : never;
|
|
693
693
|
```
|
|
694
694
|
|
|
695
|
-
Defined in: [packages/client/src/types.ts:74](https://github.com/btravers/amqp-contract/blob/
|
|
695
|
+
Defined in: [packages/client/src/types.ts:74](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/types.ts#L74)
|
|
696
696
|
|
|
697
697
|
Output (validated) response type returned by `client.call(name, ...)`.
|
|
698
698
|
|
|
@@ -711,7 +711,7 @@ Output (validated) response type returned by `client.call(name, ...)`.
|
|
|
711
711
|
type CreateClientOptions<TContract> = object;
|
|
712
712
|
```
|
|
713
713
|
|
|
714
|
-
Defined in: [packages/client/src/client.ts:75](https://github.com/btravers/amqp-contract/blob/
|
|
714
|
+
Defined in: [packages/client/src/client.ts:75](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L75)
|
|
715
715
|
|
|
716
716
|
Options for creating a client
|
|
717
717
|
|
|
@@ -725,13 +725,13 @@ Options for creating a client
|
|
|
725
725
|
|
|
726
726
|
| Property | Type | Description | Defined in |
|
|
727
727
|
| ------ | ------ | ------ | ------ |
|
|
728
|
-
| <a id="connectionoptions"></a> `connectionOptions?` | `AmqpConnectionManagerOptions` | - | [packages/client/src/client.ts:78](https://github.com/btravers/amqp-contract/blob/
|
|
729
|
-
| <a id="connecttimeoutms"></a> `connectTimeoutMs?` | `number` \| `null` | Maximum time in ms to wait for the AMQP connection to become ready before `create()` resolves to `Result.Error<TechnicalError>`. Defaults to 30s (the [AmqpClient](https://btravers.github.io/amqp-contract/api/core#amqpclient)'s `DEFAULT_CONNECT_TIMEOUT_MS`). Pass `null` to disable the timeout and let amqp-connection-manager retry indefinitely. | [packages/client/src/client.ts:98](https://github.com/btravers/amqp-contract/blob/
|
|
730
|
-
| <a id="contract"></a> `contract` | `TContract` | - | [packages/client/src/client.ts:76](https://github.com/btravers/amqp-contract/blob/
|
|
731
|
-
| <a id="defaultpublishoptions"></a> `defaultPublishOptions?` | [`PublishOptions`](#publishoptions-1) | Default publish options that will be applied to all publish operations. These can be overridden by options passed to the publish method. By default, persistent is set to true for message durability. | [packages/client/src/client.ts:91](https://github.com/btravers/amqp-contract/blob/
|
|
732
|
-
| <a id="logger"></a> `logger?` | `Logger` | - | [packages/client/src/client.ts:79](https://github.com/btravers/amqp-contract/blob/
|
|
733
|
-
| <a id="telemetry"></a> `telemetry?` | `TelemetryProvider` | Optional telemetry provider for tracing and metrics. If not provided, uses the default provider which attempts to load OpenTelemetry. OpenTelemetry instrumentation is automatically enabled if @opentelemetry/api is installed. | [packages/client/src/client.ts:85](https://github.com/btravers/amqp-contract/blob/
|
|
734
|
-
| <a id="urls"></a> `urls` | `ConnectionUrl`[] | - | [packages/client/src/client.ts:77](https://github.com/btravers/amqp-contract/blob/
|
|
728
|
+
| <a id="connectionoptions"></a> `connectionOptions?` | `AmqpConnectionManagerOptions` | - | [packages/client/src/client.ts:78](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L78) |
|
|
729
|
+
| <a id="connecttimeoutms"></a> `connectTimeoutMs?` | `number` \| `null` | Maximum time in ms to wait for the AMQP connection to become ready before `create()` resolves to `Result.Error<TechnicalError>`. Defaults to 30s (the [AmqpClient](https://btravers.github.io/amqp-contract/api/core#amqpclient)'s `DEFAULT_CONNECT_TIMEOUT_MS`). Pass `null` to disable the timeout and let amqp-connection-manager retry indefinitely. | [packages/client/src/client.ts:98](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L98) |
|
|
730
|
+
| <a id="contract"></a> `contract` | `TContract` | - | [packages/client/src/client.ts:76](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L76) |
|
|
731
|
+
| <a id="defaultpublishoptions"></a> `defaultPublishOptions?` | [`PublishOptions`](#publishoptions-1) | Default publish options that will be applied to all publish operations. These can be overridden by options passed to the publish method. By default, persistent is set to true for message durability. | [packages/client/src/client.ts:91](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L91) |
|
|
732
|
+
| <a id="logger"></a> `logger?` | `Logger` | - | [packages/client/src/client.ts:79](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L79) |
|
|
733
|
+
| <a id="telemetry"></a> `telemetry?` | `TelemetryProvider` | Optional telemetry provider for tracing and metrics. If not provided, uses the default provider which attempts to load OpenTelemetry. OpenTelemetry instrumentation is automatically enabled if @opentelemetry/api is installed. | [packages/client/src/client.ts:85](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L85) |
|
|
734
|
+
| <a id="urls"></a> `urls` | `ConnectionUrl`[] | - | [packages/client/src/client.ts:77](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L77) |
|
|
735
735
|
|
|
736
736
|
***
|
|
737
737
|
|
|
@@ -741,7 +741,7 @@ Options for creating a client
|
|
|
741
741
|
type PublishOptions = AmqpClientPublishOptions & object;
|
|
742
742
|
```
|
|
743
743
|
|
|
744
|
-
Defined in: [packages/client/src/client.ts:63](https://github.com/btravers/amqp-contract/blob/
|
|
744
|
+
Defined in: [packages/client/src/client.ts:63](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L63)
|
|
745
745
|
|
|
746
746
|
Publish options that extend amqp-client's PublishOptions with optional compression support.
|
|
747
747
|
|
|
@@ -749,4 +749,4 @@ Publish options that extend amqp-client's PublishOptions with optional compressi
|
|
|
749
749
|
|
|
750
750
|
| Name | Type | Description | Defined in |
|
|
751
751
|
| ------ | ------ | ------ | ------ |
|
|
752
|
-
| `compression?` | `CompressionAlgorithm` | Optional compression algorithm to use for the message payload. When specified, the message will be compressed using the chosen algorithm and the contentEncoding header will be set automatically. | [packages/client/src/client.ts:69](https://github.com/btravers/amqp-contract/blob/
|
|
752
|
+
| `compression?` | `CompressionAlgorithm` | Optional compression algorithm to use for the message payload. When specified, the message will be compressed using the chosen algorithm and the contentEncoding header will be set automatically. | [packages/client/src/client.ts:69](https://github.com/btravers/amqp-contract/blob/dc096282cd7249a6b8148d35c3dfad011c9e9753/packages/client/src/client.ts#L69) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amqp-contract/client",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "Client utilities for publishing messages using amqp-contract",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"amqp",
|
|
@@ -53,22 +53,22 @@
|
|
|
53
53
|
"@standard-schema/spec": "1.1.0",
|
|
54
54
|
"@swan-io/boxed": "3.2.1",
|
|
55
55
|
"ts-pattern": "5.9.0",
|
|
56
|
-
"@amqp-contract/contract": "0.23.
|
|
57
|
-
"@amqp-contract/core": "0.23.
|
|
56
|
+
"@amqp-contract/contract": "0.23.1",
|
|
57
|
+
"@amqp-contract/core": "0.23.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/amqplib": "0.10.8",
|
|
61
61
|
"@types/node": "24.12.2",
|
|
62
62
|
"@vitest/coverage-v8": "4.1.5",
|
|
63
63
|
"amqp-connection-manager": "5.0.0",
|
|
64
|
-
"amqplib": "
|
|
64
|
+
"amqplib": "0.10.9",
|
|
65
65
|
"tsdown": "0.21.10",
|
|
66
66
|
"typedoc": "0.28.19",
|
|
67
67
|
"typedoc-plugin-markdown": "4.11.0",
|
|
68
68
|
"typescript": "6.0.3",
|
|
69
69
|
"vitest": "4.1.5",
|
|
70
|
-
"zod": "4.3
|
|
71
|
-
"@amqp-contract/testing": "0.23.
|
|
70
|
+
"zod": "4.4.3",
|
|
71
|
+
"@amqp-contract/testing": "0.23.1",
|
|
72
72
|
"@amqp-contract/tsconfig": "0.1.0",
|
|
73
73
|
"@amqp-contract/typedoc": "0.1.0"
|
|
74
74
|
},
|