chore(docs): Generated JS Client Reference (#5434)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-10-20 11:47:19 +00:00
committed by GitHub
parent 8203dec3e2
commit 39de54e2e8
96 changed files with 12353 additions and 525 deletions
@@ -237,6 +237,14 @@ Base abstract entity for all entities
"defaultValue": "",
"children": []
},
{
"name": "item_tax_total",
"type": "``null`` \\| `number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "items",
"type": "[`LineItem`](admin_collections.internal.LineItem.mdx)[]",
@@ -397,6 +405,14 @@ Base abstract entity for all entities
"defaultValue": "",
"children": []
},
{
"name": "shipping_tax_total",
"type": "``null`` \\| `number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "shipping_total",
"type": "`number`",
@@ -21,7 +21,7 @@ v15.7.0, v14.18.0
{
"name": "size",
"type": "`number`",
"description": "The total size of the `Blob` in bytes.",
"description": "The total size of the `Blob` in bytes. #### Since v15.7.0, v14.18.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -29,7 +29,7 @@ v15.7.0, v14.18.0
{
"name": "type",
"type": "`string`",
"description": "The content-type of the `Blob`.",
"description": "The content-type of the `Blob`. #### Since v15.7.0, v14.18.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -30,7 +30,7 @@ v0.9.4
{
"name": "allowHalfOpen",
"type": "`boolean`",
"description": "If `false` then the stream will automatically end the writable side when the readable side ends. Set initially by the `allowHalfOpen` constructor option, which defaults to `true`. This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is emitted.",
"description": "If `false` then the stream will automatically end the writable side when the readable side ends. Set initially by the `allowHalfOpen` constructor option, which defaults to `true`. This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is emitted. #### Since v0.9.4",
"optional": false,
"defaultValue": "",
"children": []
@@ -38,7 +38,7 @@ v0.9.4
{
"name": "closed",
"type": "`boolean`",
"description": "Is `true` after `'close'` has been emitted.",
"description": "Is `true` after `'close'` has been emitted. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -46,7 +46,7 @@ v0.9.4
{
"name": "destroyed",
"type": "`boolean`",
"description": "Is `true` after `readable.destroy()` has been called.",
"description": "Is `true` after `readable.destroy()` has been called. #### Since v8.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -54,7 +54,7 @@ v0.9.4
{
"name": "errored",
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
"description": "Returns error if the stream has been destroyed with an error.",
"description": "Returns error if the stream has been destroyed with an error. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -62,7 +62,7 @@ v0.9.4
{
"name": "readable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`.",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -70,7 +70,7 @@ v0.9.4
{
"name": "readableAborted",
"type": "`boolean`",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`.",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`. #### Since v16.8.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -78,7 +78,7 @@ v0.9.4
{
"name": "readableDidRead",
"type": "`boolean`",
"description": "Returns whether `'data'` has been emitted.",
"description": "Returns whether `'data'` has been emitted. #### Since v16.7.0, v14.18.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -86,7 +86,7 @@ v0.9.4
{
"name": "readableEncoding",
"type": "``null`` \\| [`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. #### Since v12.7.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -94,7 +94,7 @@ v0.9.4
{
"name": "readableEnded",
"type": "`boolean`",
"description": "Becomes `true` when `'end'` event is emitted.",
"description": "Becomes `true` when `'end'` event is emitted. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -102,7 +102,7 @@ v0.9.4
{
"name": "readableFlowing",
"type": "``null`` \\| `boolean`",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section.",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -110,7 +110,7 @@ v0.9.4
{
"name": "readableHighWaterMark",
"type": "`number`",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`.",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -118,7 +118,7 @@ v0.9.4
{
"name": "readableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -126,7 +126,7 @@ v0.9.4
{
"name": "readableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Readable` stream.",
"description": "Getter for the property `objectMode` of a given `Readable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -134,7 +134,7 @@ v0.9.4
{
"name": "writable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended.",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -142,7 +142,7 @@ v0.9.4
{
"name": "writableCorked",
"type": "`number`",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream.",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream. #### Since v13.2.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -150,7 +150,7 @@ v0.9.4
{
"name": "writableEnded",
"type": "`boolean`",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -158,7 +158,7 @@ v0.9.4
{
"name": "writableFinished",
"type": "`boolean`",
"description": "Is set to `true` immediately before the `'finish'` event is emitted.",
"description": "Is set to `true` immediately before the `'finish'` event is emitted. #### Since v12.6.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -166,7 +166,7 @@ v0.9.4
{
"name": "writableHighWaterMark",
"type": "`number`",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`.",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -174,7 +174,7 @@ v0.9.4
{
"name": "writableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -182,7 +182,7 @@ v0.9.4
{
"name": "writableNeedDrain",
"type": "`boolean`",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`.",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`. #### Since v15.2.0, v14.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -190,15 +190,15 @@ v0.9.4
{
"name": "writableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Writable` stream.",
"description": "Getter for the property `objectMode` of a given `Writable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -206,7 +206,7 @@ v0.9.4
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -214,15 +214,15 @@ v0.9.4
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -1108,7 +1108,7 @@ ___
▸ **cork**(): `void`
The `writable.cork()` method forces all written data to be buffered in memory.
The buffered data will be flushed when either the [uncork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#uncork) or [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) methods are called.
The buffered data will be flushed when either the [uncork](admin_discounts.internal.WritableBase.mdx#uncork) or [end](admin_discounts.internal.WritableBase.mdx#end) methods are called.
The primary intent of `writable.cork()` is to accommodate a situation in which
several small chunks are written to the stream in rapid succession. Instead of
@@ -1749,7 +1749,7 @@ to the `Writable`. The optional `chunk` and `encoding` arguments allow one
final additional chunk of data to be written immediately before closing the
stream.
Calling the [write](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#write) method after calling [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) will raise an error.
Calling the [write](admin_discounts.internal.WritableBase.mdx#write) method after calling [end](admin_discounts.internal.WritableBase.mdx#end) will raise an error.
```js
// Write 'hello, ' and then end with 'world!'.
@@ -4816,7 +4816,7 @@ a call to `readable.read(size)`, regardless of the value of the`size` argument.
If the `readable.read()` method returns a chunk of data, a `'data'` event will
also be emitted.
Calling [read](admin_discounts.internal.PassThrough.mdx#read) after the `'end'` event has
Calling [read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#read) after the `'end'` event has
been emitted will return `null`. No runtime error will be raised.
#### Parameters
@@ -5760,7 +5760,7 @@ ___
▸ **uncork**(): `void`
The `writable.uncork()` method flushes all data buffered since [cork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#cork) was called.
The `writable.uncork()` method flushes all data buffered since [cork](admin_discounts.internal.WritableBase.mdx#cork) was called.
When using `writable.cork()` and `writable.uncork()` to manage the buffering
of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
@@ -5821,7 +5821,7 @@ ___
▸ **unpipe**(`destination?`): [`Duplex`](admin_discounts.internal.Duplex.mdx)
The `readable.unpipe()` method detaches a `Writable` stream previously attached
using the [pipe](admin_discounts.internal.PassThrough.mdx#pipe) method.
using the [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe) method.
If the `destination` is not specified, then _all_ pipes are detached.
@@ -5937,11 +5937,11 @@ function parseHeader(stream, callback) {
}
```
Unlike [push](admin_discounts.internal.PassThrough.mdx#push), `stream.unshift(chunk)` will not
Unlike [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push), `stream.unshift(chunk)` will not
end the reading process by resetting the internal reading state of the stream.
This can cause unexpected results if `readable.unshift()` is called during a
read (i.e. from within a [_read](admin_discounts.internal.PassThrough.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](admin_discounts.internal.PassThrough.mdx#push) will reset the reading state appropriately,
read (i.e. from within a [_read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push) will reset the reading state appropriately,
however it is best to simply avoid calling `readable.unshift()` while in the
process of performing a read.
@@ -5998,7 +5998,7 @@ ___
Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
information.)
When using an older Node.js library that emits `'data'` events and has a [pause](admin_discounts.internal.PassThrough.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
When using an older Node.js library that emits `'data'` events and has a [pause](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
stream that uses
the old stream as its data source.
@@ -6088,7 +6088,7 @@ by default until they are piped or a `'data'` or `'readable'` event handler
is added.
If the data to be written can be generated or fetched on demand, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](admin_discounts.internal.PassThrough.mdx#pipe). However, if calling `write()` is preferred, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe). However, if calling `write()` is preferred, it is
possible to respect backpressure and avoid memory issues using the `'drain'` event:
```js
@@ -6231,7 +6231,7 @@ A utility method for creating duplex streams.
<ParameterTypes parameters={[
{
"name": "src",
"type": "`string` \\| [`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object) \\| `Promise`<`any`\\> \\| `ArrayBuffer` \\| [`Stream`](admin_discounts.internal.Stream.mdx) \\| [`Blob`](admin_discounts.internal.Blob.mdx) \\| [`Iterable`](../interfaces/admin_discounts.internal.Iterable.mdx)<`any`\\> \\| [`AsyncIterable`](../interfaces/admin_discounts.internal.AsyncIterable.mdx)<`any`\\> \\| [`AsyncGeneratorFunction`](../interfaces/admin_discounts.internal.AsyncGeneratorFunction.mdx)",
"type": "`string` \\| [`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object) \\| `Promise`<`any`\\> \\| [`Stream`](admin_discounts.internal.Stream.mdx) \\| `ArrayBuffer` \\| [`Blob`](admin_discounts.internal.Blob.mdx) \\| [`Iterable`](../interfaces/admin_discounts.internal.Iterable.mdx)<`any`\\> \\| [`AsyncIterable`](../interfaces/admin_discounts.internal.AsyncIterable.mdx)<`any`\\> \\| [`AsyncGeneratorFunction`](../interfaces/admin_discounts.internal.AsyncGeneratorFunction.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -28,8 +28,8 @@ v0.1.26
<ParameterTypes parameters={[
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -37,7 +37,7 @@ v0.1.26
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -45,15 +45,15 @@ v0.1.26
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -85,7 +85,7 @@ ___
{
"name": "FeatureFlagsResponse",
"type": "{ `key`: `string` ; `value`: `boolean` \\| Record<`string`, `boolean`\\> }[]",
"description": "",
"description": "#### Schema FeatureFlagsResponse type: array items: type: object required: - key - value properties: key: description: The key of the feature flag. type: string value: description: The value of the feature flag. type: boolean",
"optional": false,
"defaultValue": "",
"children": []
@@ -176,7 +176,7 @@ Standardized error to be used across Medusa project.
{
"name": "prepareStackTrace",
"type": "(`err`: [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error), `stackTraces`: [`CallSite`](../interfaces/admin_discounts.internal.CallSite.mdx)[]) => `any`",
"description": "Optional override for formatting stack traces",
"description": "Optional override for formatting stack traces #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces",
"optional": true,
"defaultValue": "",
"children": []
@@ -17,7 +17,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "allowHalfOpen",
"type": "`boolean`",
"description": "If `false` then the stream will automatically end the writable side when the readable side ends. Set initially by the `allowHalfOpen` constructor option, which defaults to `true`. This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is emitted.",
"description": "If `false` then the stream will automatically end the writable side when the readable side ends. Set initially by the `allowHalfOpen` constructor option, which defaults to `true`. This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is emitted. #### Since v0.9.4",
"optional": false,
"defaultValue": "",
"children": []
@@ -25,7 +25,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "closed",
"type": "`boolean`",
"description": "Is `true` after `'close'` has been emitted.",
"description": "Is `true` after `'close'` has been emitted. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -33,7 +33,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "destroyed",
"type": "`boolean`",
"description": "Is `true` after `readable.destroy()` has been called.",
"description": "Is `true` after `readable.destroy()` has been called. #### Since v8.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -41,7 +41,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "errored",
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
"description": "Returns error if the stream has been destroyed with an error.",
"description": "Returns error if the stream has been destroyed with an error. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -49,7 +49,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`.",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -57,7 +57,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableAborted",
"type": "`boolean`",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`.",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`. #### Since v16.8.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -65,7 +65,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableDidRead",
"type": "`boolean`",
"description": "Returns whether `'data'` has been emitted.",
"description": "Returns whether `'data'` has been emitted. #### Since v16.7.0, v14.18.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -73,7 +73,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableEncoding",
"type": "``null`` \\| [`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. #### Since v12.7.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -81,7 +81,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableEnded",
"type": "`boolean`",
"description": "Becomes `true` when `'end'` event is emitted.",
"description": "Becomes `true` when `'end'` event is emitted. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -89,7 +89,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableFlowing",
"type": "``null`` \\| `boolean`",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section.",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -97,7 +97,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableHighWaterMark",
"type": "`number`",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`.",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -105,7 +105,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -113,7 +113,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "readableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Readable` stream.",
"description": "Getter for the property `objectMode` of a given `Readable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -121,7 +121,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended.",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -129,7 +129,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writableCorked",
"type": "`number`",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream.",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream. #### Since v13.2.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -137,7 +137,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writableEnded",
"type": "`boolean`",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -145,7 +145,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writableFinished",
"type": "`boolean`",
"description": "Is set to `true` immediately before the `'finish'` event is emitted.",
"description": "Is set to `true` immediately before the `'finish'` event is emitted. #### Since v12.6.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -153,7 +153,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writableHighWaterMark",
"type": "`number`",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`.",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -161,7 +161,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -169,7 +169,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writableNeedDrain",
"type": "`boolean`",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`.",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`. #### Since v15.2.0, v14.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -177,15 +177,15 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "writableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Writable` stream.",
"description": "Getter for the property `objectMode` of a given `Writable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -193,7 +193,7 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -201,15 +201,15 @@ primarily for examples and testing, but there are some use cases where`stream.Pa
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -1131,7 +1131,7 @@ ___
▸ **cork**(): `void`
The `writable.cork()` method forces all written data to be buffered in memory.
The buffered data will be flushed when either the [uncork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#uncork) or [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) methods are called.
The buffered data will be flushed when either the [uncork](admin_discounts.internal.WritableBase.mdx#uncork) or [end](admin_discounts.internal.WritableBase.mdx#end) methods are called.
The primary intent of `writable.cork()` is to accommodate a situation in which
several small chunks are written to the stream in rapid succession. Instead of
@@ -1720,7 +1720,7 @@ to the `Writable`. The optional `chunk` and `encoding` arguments allow one
final additional chunk of data to be written immediately before closing the
stream.
Calling the [write](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#write) method after calling [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) will raise an error.
Calling the [write](admin_discounts.internal.WritableBase.mdx#write) method after calling [end](admin_discounts.internal.WritableBase.mdx#end) will raise an error.
```js
// Write 'hello, ' and then end with 'world!'.
@@ -4567,7 +4567,7 @@ a call to `readable.read(size)`, regardless of the value of the`size` argument.
If the `readable.read()` method returns a chunk of data, a `'data'` event will
also be emitted.
Calling [read](admin_discounts.internal.PassThrough.mdx#read) after the `'end'` event has
Calling [read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#read) after the `'end'` event has
been emitted will return `null`. No runtime error will be raised.
#### Parameters
@@ -5455,7 +5455,7 @@ ___
▸ **uncork**(): `void`
The `writable.uncork()` method flushes all data buffered since [cork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#cork) was called.
The `writable.uncork()` method flushes all data buffered since [cork](admin_discounts.internal.WritableBase.mdx#cork) was called.
When using `writable.cork()` and `writable.uncork()` to manage the buffering
of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
@@ -5516,7 +5516,7 @@ ___
▸ **unpipe**(`destination?`): [`PassThrough`](admin_discounts.internal.PassThrough.mdx)
The `readable.unpipe()` method detaches a `Writable` stream previously attached
using the [pipe](admin_discounts.internal.PassThrough.mdx#pipe) method.
using the [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe) method.
If the `destination` is not specified, then _all_ pipes are detached.
@@ -5632,11 +5632,11 @@ function parseHeader(stream, callback) {
}
```
Unlike [push](admin_discounts.internal.PassThrough.mdx#push), `stream.unshift(chunk)` will not
Unlike [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push), `stream.unshift(chunk)` will not
end the reading process by resetting the internal reading state of the stream.
This can cause unexpected results if `readable.unshift()` is called during a
read (i.e. from within a [_read](admin_discounts.internal.PassThrough.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](admin_discounts.internal.PassThrough.mdx#push) will reset the reading state appropriately,
read (i.e. from within a [_read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push) will reset the reading state appropriately,
however it is best to simply avoid calling `readable.unshift()` while in the
process of performing a read.
@@ -5693,7 +5693,7 @@ ___
Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
information.)
When using an older Node.js library that emits `'data'` events and has a [pause](admin_discounts.internal.PassThrough.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
When using an older Node.js library that emits `'data'` events and has a [pause](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
stream that uses
the old stream as its data source.
@@ -5783,7 +5783,7 @@ by default until they are piped or a `'data'` or `'readable'` event handler
is added.
If the data to be written can be generated or fetched on demand, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](admin_discounts.internal.PassThrough.mdx#pipe). However, if calling `write()` is preferred, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe). However, if calling `write()` is preferred, it is
possible to respect backpressure and avoid memory issues using the `'drain'` event:
```js
@@ -5926,7 +5926,7 @@ A utility method for creating duplex streams.
<ParameterTypes parameters={[
{
"name": "src",
"type": "`string` \\| [`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object) \\| `Promise`<`any`\\> \\| `ArrayBuffer` \\| [`Stream`](admin_discounts.internal.Stream.mdx) \\| [`Blob`](admin_discounts.internal.Blob.mdx) \\| [`Iterable`](../interfaces/admin_discounts.internal.Iterable.mdx)<`any`\\> \\| [`AsyncIterable`](../interfaces/admin_discounts.internal.AsyncIterable.mdx)<`any`\\> \\| [`AsyncGeneratorFunction`](../interfaces/admin_discounts.internal.AsyncGeneratorFunction.mdx)",
"type": "`string` \\| [`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object) \\| `Promise`<`any`\\> \\| [`Stream`](admin_discounts.internal.Stream.mdx) \\| `ArrayBuffer` \\| [`Blob`](admin_discounts.internal.Blob.mdx) \\| [`Iterable`](../interfaces/admin_discounts.internal.Iterable.mdx)<`any`\\> \\| [`AsyncIterable`](../interfaces/admin_discounts.internal.AsyncIterable.mdx)<`any`\\> \\| [`AsyncGeneratorFunction`](../interfaces/admin_discounts.internal.AsyncGeneratorFunction.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -18,7 +18,7 @@ v0.9.4
{
"name": "closed",
"type": "`boolean`",
"description": "Is `true` after `'close'` has been emitted.",
"description": "Is `true` after `'close'` has been emitted. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -26,7 +26,7 @@ v0.9.4
{
"name": "destroyed",
"type": "`boolean`",
"description": "Is `true` after `readable.destroy()` has been called.",
"description": "Is `true` after `readable.destroy()` has been called. #### Since v8.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -34,7 +34,7 @@ v0.9.4
{
"name": "errored",
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
"description": "Returns error if the stream has been destroyed with an error.",
"description": "Returns error if the stream has been destroyed with an error. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -42,7 +42,7 @@ v0.9.4
{
"name": "readable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`.",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -50,7 +50,7 @@ v0.9.4
{
"name": "readableAborted",
"type": "`boolean`",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`.",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`. #### Since v16.8.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -58,7 +58,7 @@ v0.9.4
{
"name": "readableDidRead",
"type": "`boolean`",
"description": "Returns whether `'data'` has been emitted.",
"description": "Returns whether `'data'` has been emitted. #### Since v16.7.0, v14.18.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -66,7 +66,7 @@ v0.9.4
{
"name": "readableEncoding",
"type": "``null`` \\| [`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. #### Since v12.7.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -74,7 +74,7 @@ v0.9.4
{
"name": "readableEnded",
"type": "`boolean`",
"description": "Becomes `true` when `'end'` event is emitted.",
"description": "Becomes `true` when `'end'` event is emitted. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -82,7 +82,7 @@ v0.9.4
{
"name": "readableFlowing",
"type": "``null`` \\| `boolean`",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section.",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -90,7 +90,7 @@ v0.9.4
{
"name": "readableHighWaterMark",
"type": "`number`",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`.",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -98,7 +98,7 @@ v0.9.4
{
"name": "readableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -106,15 +106,15 @@ v0.9.4
{
"name": "readableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Readable` stream.",
"description": "Getter for the property `objectMode` of a given `Readable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -122,7 +122,7 @@ v0.9.4
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -130,15 +130,15 @@ v0.9.4
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -3079,7 +3079,7 @@ a call to `readable.read(size)`, regardless of the value of the`size` argument.
If the `readable.read()` method returns a chunk of data, a `'data'` event will
also be emitted.
Calling [read](admin_discounts.internal.PassThrough.mdx#read) after the `'end'` event has
Calling [read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#read) after the `'end'` event has
been emitted will return `null`. No runtime error will be raised.
#### Parameters
@@ -3756,7 +3756,7 @@ ___
▸ **unpipe**(`destination?`): [`Readable`](admin_discounts.internal.Readable.mdx)
The `readable.unpipe()` method detaches a `Writable` stream previously attached
using the [pipe](admin_discounts.internal.PassThrough.mdx#pipe) method.
using the [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe) method.
If the `destination` is not specified, then _all_ pipes are detached.
@@ -3872,11 +3872,11 @@ function parseHeader(stream, callback) {
}
```
Unlike [push](admin_discounts.internal.PassThrough.mdx#push), `stream.unshift(chunk)` will not
Unlike [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push), `stream.unshift(chunk)` will not
end the reading process by resetting the internal reading state of the stream.
This can cause unexpected results if `readable.unshift()` is called during a
read (i.e. from within a [_read](admin_discounts.internal.PassThrough.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](admin_discounts.internal.PassThrough.mdx#push) will reset the reading state appropriately,
read (i.e. from within a [_read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push) will reset the reading state appropriately,
however it is best to simply avoid calling `readable.unshift()` while in the
process of performing a read.
@@ -3933,7 +3933,7 @@ ___
Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
information.)
When using an older Node.js library that emits `'data'` events and has a [pause](admin_discounts.internal.PassThrough.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
When using an older Node.js library that emits `'data'` events and has a [pause](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
stream that uses
the old stream as its data source.
@@ -33,7 +33,7 @@ v0.1.26
{
"name": "closed",
"type": "`boolean`",
"description": "Is `true` after `'close'` has been emitted.",
"description": "Is `true` after `'close'` has been emitted. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -41,7 +41,7 @@ v0.1.26
{
"name": "destroyed",
"type": "`boolean`",
"description": "Is `true` after `readable.destroy()` has been called.",
"description": "Is `true` after `readable.destroy()` has been called. #### Since v8.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -49,7 +49,7 @@ v0.1.26
{
"name": "errored",
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
"description": "Returns error if the stream has been destroyed with an error.",
"description": "Returns error if the stream has been destroyed with an error. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -57,7 +57,7 @@ v0.1.26
{
"name": "readable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`.",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -65,7 +65,7 @@ v0.1.26
{
"name": "readableAborted",
"type": "`boolean`",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`.",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`. #### Since v16.8.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -73,7 +73,7 @@ v0.1.26
{
"name": "readableDidRead",
"type": "`boolean`",
"description": "Returns whether `'data'` has been emitted.",
"description": "Returns whether `'data'` has been emitted. #### Since v16.7.0, v14.18.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -81,7 +81,7 @@ v0.1.26
{
"name": "readableEncoding",
"type": "``null`` \\| [`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. #### Since v12.7.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -89,7 +89,7 @@ v0.1.26
{
"name": "readableEnded",
"type": "`boolean`",
"description": "Becomes `true` when `'end'` event is emitted.",
"description": "Becomes `true` when `'end'` event is emitted. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -97,7 +97,7 @@ v0.1.26
{
"name": "readableFlowing",
"type": "``null`` \\| `boolean`",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section.",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -105,7 +105,7 @@ v0.1.26
{
"name": "readableHighWaterMark",
"type": "`number`",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`.",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -113,7 +113,7 @@ v0.1.26
{
"name": "readableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -121,15 +121,15 @@ v0.1.26
{
"name": "readableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Readable` stream.",
"description": "Getter for the property `objectMode` of a given `Readable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -137,7 +137,7 @@ v0.1.26
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -145,15 +145,15 @@ v0.1.26
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -3294,7 +3294,7 @@ a call to `readable.read(size)`, regardless of the value of the`size` argument.
If the `readable.read()` method returns a chunk of data, a `'data'` event will
also be emitted.
Calling [read](admin_discounts.internal.PassThrough.mdx#read) after the `'end'` event has
Calling [read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#read) after the `'end'` event has
been emitted will return `null`. No runtime error will be raised.
#### Parameters
@@ -4011,7 +4011,7 @@ ___
▸ **unpipe**(`destination?`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
The `readable.unpipe()` method detaches a `Writable` stream previously attached
using the [pipe](admin_discounts.internal.PassThrough.mdx#pipe) method.
using the [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe) method.
If the `destination` is not specified, then _all_ pipes are detached.
@@ -4127,11 +4127,11 @@ function parseHeader(stream, callback) {
}
```
Unlike [push](admin_discounts.internal.PassThrough.mdx#push), `stream.unshift(chunk)` will not
Unlike [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push), `stream.unshift(chunk)` will not
end the reading process by resetting the internal reading state of the stream.
This can cause unexpected results if `readable.unshift()` is called during a
read (i.e. from within a [_read](admin_discounts.internal.PassThrough.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](admin_discounts.internal.PassThrough.mdx#push) will reset the reading state appropriately,
read (i.e. from within a [_read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push) will reset the reading state appropriately,
however it is best to simply avoid calling `readable.unshift()` while in the
process of performing a read.
@@ -4188,7 +4188,7 @@ ___
Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
information.)
When using an older Node.js library that emits `'data'` events and has a [pause](admin_discounts.internal.PassThrough.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
When using an older Node.js library that emits `'data'` events and has a [pause](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
stream that uses
the old stream as its data source.
@@ -28,8 +28,8 @@ v0.1.26
<ParameterTypes parameters={[
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -37,7 +37,7 @@ v0.1.26
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -45,15 +45,15 @@ v0.1.26
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -27,7 +27,7 @@ v0.9.4
{
"name": "allowHalfOpen",
"type": "`boolean`",
"description": "If `false` then the stream will automatically end the writable side when the readable side ends. Set initially by the `allowHalfOpen` constructor option, which defaults to `true`. This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is emitted.",
"description": "If `false` then the stream will automatically end the writable side when the readable side ends. Set initially by the `allowHalfOpen` constructor option, which defaults to `true`. This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is emitted. #### Since v0.9.4",
"optional": false,
"defaultValue": "",
"children": []
@@ -35,7 +35,7 @@ v0.9.4
{
"name": "closed",
"type": "`boolean`",
"description": "Is `true` after `'close'` has been emitted.",
"description": "Is `true` after `'close'` has been emitted. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -43,7 +43,7 @@ v0.9.4
{
"name": "destroyed",
"type": "`boolean`",
"description": "Is `true` after `readable.destroy()` has been called.",
"description": "Is `true` after `readable.destroy()` has been called. #### Since v8.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -51,7 +51,7 @@ v0.9.4
{
"name": "errored",
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
"description": "Returns error if the stream has been destroyed with an error.",
"description": "Returns error if the stream has been destroyed with an error. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -59,7 +59,7 @@ v0.9.4
{
"name": "readable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`.",
"description": "Is `true` if it is safe to call `readable.read()`, which means the stream has not been destroyed or emitted `'error'` or `'end'`. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -67,7 +67,7 @@ v0.9.4
{
"name": "readableAborted",
"type": "`boolean`",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`.",
"description": "Returns whether the stream was destroyed or errored before emitting `'end'`. #### Since v16.8.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -75,7 +75,7 @@ v0.9.4
{
"name": "readableDidRead",
"type": "`boolean`",
"description": "Returns whether `'data'` has been emitted.",
"description": "Returns whether `'data'` has been emitted. #### Since v16.7.0, v14.18.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -83,7 +83,7 @@ v0.9.4
{
"name": "readableEncoding",
"type": "``null`` \\| [`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.",
"description": "Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. #### Since v12.7.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -91,7 +91,7 @@ v0.9.4
{
"name": "readableEnded",
"type": "`boolean`",
"description": "Becomes `true` when `'end'` event is emitted.",
"description": "Becomes `true` when `'end'` event is emitted. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -99,7 +99,7 @@ v0.9.4
{
"name": "readableFlowing",
"type": "``null`` \\| `boolean`",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section.",
"description": "This property reflects the current state of a `Readable` stream as described in the `Three states` section. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -107,7 +107,7 @@ v0.9.4
{
"name": "readableHighWaterMark",
"type": "`number`",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`.",
"description": "Returns the value of `highWaterMark` passed when creating this `Readable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -115,7 +115,7 @@ v0.9.4
{
"name": "readableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -123,7 +123,7 @@ v0.9.4
{
"name": "readableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Readable` stream.",
"description": "Getter for the property `objectMode` of a given `Readable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -131,7 +131,7 @@ v0.9.4
{
"name": "writable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended.",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -139,7 +139,7 @@ v0.9.4
{
"name": "writableCorked",
"type": "`number`",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream.",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream. #### Since v13.2.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -147,7 +147,7 @@ v0.9.4
{
"name": "writableEnded",
"type": "`boolean`",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -155,7 +155,7 @@ v0.9.4
{
"name": "writableFinished",
"type": "`boolean`",
"description": "Is set to `true` immediately before the `'finish'` event is emitted.",
"description": "Is set to `true` immediately before the `'finish'` event is emitted. #### Since v12.6.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -163,7 +163,7 @@ v0.9.4
{
"name": "writableHighWaterMark",
"type": "`number`",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`.",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -171,7 +171,7 @@ v0.9.4
{
"name": "writableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -179,7 +179,7 @@ v0.9.4
{
"name": "writableNeedDrain",
"type": "`boolean`",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`.",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`. #### Since v15.2.0, v14.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -187,15 +187,15 @@ v0.9.4
{
"name": "writableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Writable` stream.",
"description": "Getter for the property `objectMode` of a given `Writable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -203,7 +203,7 @@ v0.9.4
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -211,15 +211,15 @@ v0.9.4
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -1133,7 +1133,7 @@ ___
▸ **cork**(): `void`
The `writable.cork()` method forces all written data to be buffered in memory.
The buffered data will be flushed when either the [uncork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#uncork) or [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) methods are called.
The buffered data will be flushed when either the [uncork](admin_discounts.internal.WritableBase.mdx#uncork) or [end](admin_discounts.internal.WritableBase.mdx#end) methods are called.
The primary intent of `writable.cork()` is to accommodate a situation in which
several small chunks are written to the stream in rapid succession. Instead of
@@ -1722,7 +1722,7 @@ to the `Writable`. The optional `chunk` and `encoding` arguments allow one
final additional chunk of data to be written immediately before closing the
stream.
Calling the [write](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#write) method after calling [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) will raise an error.
Calling the [write](admin_discounts.internal.WritableBase.mdx#write) method after calling [end](admin_discounts.internal.WritableBase.mdx#end) will raise an error.
```js
// Write 'hello, ' and then end with 'world!'.
@@ -4569,7 +4569,7 @@ a call to `readable.read(size)`, regardless of the value of the`size` argument.
If the `readable.read()` method returns a chunk of data, a `'data'` event will
also be emitted.
Calling [read](admin_discounts.internal.PassThrough.mdx#read) after the `'end'` event has
Calling [read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#read) after the `'end'` event has
been emitted will return `null`. No runtime error will be raised.
#### Parameters
@@ -5457,7 +5457,7 @@ ___
▸ **uncork**(): `void`
The `writable.uncork()` method flushes all data buffered since [cork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#cork) was called.
The `writable.uncork()` method flushes all data buffered since [cork](admin_discounts.internal.WritableBase.mdx#cork) was called.
When using `writable.cork()` and `writable.uncork()` to manage the buffering
of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
@@ -5518,7 +5518,7 @@ ___
▸ **unpipe**(`destination?`): [`Transform`](admin_discounts.internal.Transform.mdx)
The `readable.unpipe()` method detaches a `Writable` stream previously attached
using the [pipe](admin_discounts.internal.PassThrough.mdx#pipe) method.
using the [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe) method.
If the `destination` is not specified, then _all_ pipes are detached.
@@ -5634,11 +5634,11 @@ function parseHeader(stream, callback) {
}
```
Unlike [push](admin_discounts.internal.PassThrough.mdx#push), `stream.unshift(chunk)` will not
Unlike [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push), `stream.unshift(chunk)` will not
end the reading process by resetting the internal reading state of the stream.
This can cause unexpected results if `readable.unshift()` is called during a
read (i.e. from within a [_read](admin_discounts.internal.PassThrough.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](admin_discounts.internal.PassThrough.mdx#push) will reset the reading state appropriately,
read (i.e. from within a [_read](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#_read) implementation on a
custom stream). Following the call to `readable.unshift()` with an immediate [push](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#push) will reset the reading state appropriately,
however it is best to simply avoid calling `readable.unshift()` while in the
process of performing a read.
@@ -5695,7 +5695,7 @@ ___
Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
information.)
When using an older Node.js library that emits `'data'` events and has a [pause](admin_discounts.internal.PassThrough.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
When using an older Node.js library that emits `'data'` events and has a [pause](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pause) method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
stream that uses
the old stream as its data source.
@@ -5785,7 +5785,7 @@ by default until they are piped or a `'data'` or `'readable'` event handler
is added.
If the data to be written can be generated or fetched on demand, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](admin_discounts.internal.PassThrough.mdx#pipe). However, if calling `write()` is preferred, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe). However, if calling `write()` is preferred, it is
possible to respect backpressure and avoid memory issues using the `'drain'` event:
```js
@@ -5928,7 +5928,7 @@ A utility method for creating duplex streams.
<ParameterTypes parameters={[
{
"name": "src",
"type": "`string` \\| [`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object) \\| `Promise`<`any`\\> \\| `ArrayBuffer` \\| [`Stream`](admin_discounts.internal.Stream.mdx) \\| [`Blob`](admin_discounts.internal.Blob.mdx) \\| [`Iterable`](../interfaces/admin_discounts.internal.Iterable.mdx)<`any`\\> \\| [`AsyncIterable`](../interfaces/admin_discounts.internal.AsyncIterable.mdx)<`any`\\> \\| [`AsyncGeneratorFunction`](../interfaces/admin_discounts.internal.AsyncGeneratorFunction.mdx)",
"type": "`string` \\| [`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object) \\| `Promise`<`any`\\> \\| [`Stream`](admin_discounts.internal.Stream.mdx) \\| `ArrayBuffer` \\| [`Blob`](admin_discounts.internal.Blob.mdx) \\| [`Iterable`](../interfaces/admin_discounts.internal.Iterable.mdx)<`any`\\> \\| [`AsyncIterable`](../interfaces/admin_discounts.internal.AsyncIterable.mdx)<`any`\\> \\| [`AsyncGeneratorFunction`](../interfaces/admin_discounts.internal.AsyncGeneratorFunction.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -37,7 +37,7 @@ v0.1.26
{
"name": "closed",
"type": "`boolean`",
"description": "Is `true` after `'close'` has been emitted.",
"description": "Is `true` after `'close'` has been emitted. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -45,7 +45,7 @@ v0.1.26
{
"name": "destroyed",
"type": "`boolean`",
"description": "Is `true` after `writable.destroy()` has been called.",
"description": "Is `true` after `writable.destroy()` has been called. #### Since v8.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -53,7 +53,7 @@ v0.1.26
{
"name": "errored",
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
"description": "Returns error if the stream has been destroyed with an error.",
"description": "Returns error if the stream has been destroyed with an error. #### Since v18.0.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -61,7 +61,7 @@ v0.1.26
{
"name": "writable",
"type": "`boolean`",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended.",
"description": "Is `true` if it is safe to call `writable.write()`, which means the stream has not been destroyed, errored, or ended. #### Since v11.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -69,7 +69,7 @@ v0.1.26
{
"name": "writableCorked",
"type": "`number`",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream.",
"description": "Number of times `writable.uncork()` needs to be called in order to fully uncork the stream. #### Since v13.2.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -77,7 +77,7 @@ v0.1.26
{
"name": "writableEnded",
"type": "`boolean`",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.",
"description": "Is `true` after `writable.end()` has been called. This property does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. #### Since v12.9.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -85,7 +85,7 @@ v0.1.26
{
"name": "writableFinished",
"type": "`boolean`",
"description": "Is set to `true` immediately before the `'finish'` event is emitted.",
"description": "Is set to `true` immediately before the `'finish'` event is emitted. #### Since v12.6.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -93,7 +93,7 @@ v0.1.26
{
"name": "writableHighWaterMark",
"type": "`number`",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`.",
"description": "Return the value of `highWaterMark` passed when creating this `Writable`. #### Since v9.3.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -101,7 +101,7 @@ v0.1.26
{
"name": "writableLength",
"type": "`number`",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`.",
"description": "This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`. #### Since v9.4.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -109,7 +109,7 @@ v0.1.26
{
"name": "writableNeedDrain",
"type": "`boolean`",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`.",
"description": "Is `true` if the stream's buffer has been full and stream will emit `'drain'`. #### Since v15.2.0, v14.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -117,15 +117,15 @@ v0.1.26
{
"name": "writableObjectMode",
"type": "`boolean`",
"description": "Getter for the property `objectMode` of a given `Writable` stream.",
"description": "Getter for the property `objectMode` of a given `Writable` stream. #### Since v12.3.0",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -133,7 +133,7 @@ v0.1.26
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -141,15 +141,15 @@ v0.1.26
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -700,7 +700,7 @@ ___
▸ **cork**(): `void`
The `writable.cork()` method forces all written data to be buffered in memory.
The buffered data will be flushed when either the [uncork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#uncork) or [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) methods are called.
The buffered data will be flushed when either the [uncork](admin_discounts.internal.WritableBase.mdx#uncork) or [end](admin_discounts.internal.WritableBase.mdx#end) methods are called.
The primary intent of `writable.cork()` is to accommodate a situation in which
several small chunks are written to the stream in rapid succession. Instead of
@@ -1136,7 +1136,7 @@ to the `Writable`. The optional `chunk` and `encoding` arguments allow one
final additional chunk of data to be written immediately before closing the
stream.
Calling the [write](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#write) method after calling [end](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#end) will raise an error.
Calling the [write](admin_discounts.internal.WritableBase.mdx#write) method after calling [end](admin_discounts.internal.WritableBase.mdx#end) will raise an error.
```js
// Write 'hello, ' and then end with 'world!'.
@@ -3629,7 +3629,7 @@ ___
▸ **uncork**(): `void`
The `writable.uncork()` method flushes all data buffered since [cork](../../internal-2/classes/admin_discounts.internal.internal-2.Writable.mdx#cork) was called.
The `writable.uncork()` method flushes all data buffered since [cork](admin_discounts.internal.WritableBase.mdx#cork) was called.
When using `writable.cork()` and `writable.uncork()` to manage the buffering
of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
@@ -3714,7 +3714,7 @@ by default until they are piped or a `'data'` or `'readable'` event handler
is added.
If the data to be written can be generated or fetched on demand, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](admin_discounts.internal.PassThrough.mdx#pipe). However, if calling `write()` is preferred, it is
recommended to encapsulate the logic into a `Readable` and use [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe). However, if calling `write()` is preferred, it is
possible to respect backpressure and avoid memory issues using the `'drain'` event:
```js
@@ -28,8 +28,8 @@ v0.1.26
<ParameterTypes parameters={[
{
"name": "captureRejectionSymbol",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.PassThrough.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`.",
"type": "typeof [`captureRejectionSymbol`](admin_discounts.internal.Socket.mdx#capturerejectionsymbol)",
"description": "Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -37,7 +37,7 @@ v0.1.26
{
"name": "captureRejections",
"type": "`boolean`",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects.",
"description": "Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -45,15 +45,15 @@ v0.1.26
{
"name": "defaultMaxListeners",
"type": "`number`",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`.",
"description": "By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_`EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a \"possible EventEmitter memory leak\" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "errorMonitor",
"type": "typeof [`errorMonitor`](admin_discounts.internal.PassThrough.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed.",
"type": "typeof [`errorMonitor`](admin_discounts.internal.Socket.mdx#errormonitor)",
"description": "This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0",
"optional": false,
"defaultValue": "",
"children": []
@@ -164,7 +164,7 @@ The title of the Product`published`.
"name": "status",
"type": "[`ProductStatus`](../enums/admin_collections.internal.ProductStatus.mdx)",
"description": "",
"optional": true,
"optional": false,
"defaultValue": "",
"children": []
},
@@ -651,7 +651,7 @@ Gets the prices for a shipping option.
{
"name": "PricedShippingOption",
"type": "[`Partial`](../../admin_discounts/modules/admin_discounts.internal.mdx#partial)<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\\> & [`ShippingOptionPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingoptionpricing)",
"description": "",
"description": "#### Schema PricedShippingOption title: \"Priced Shipping Option\" type: object allOf: - $ref: \"#/components/schemas/ShippingOption\" - type: object properties: price_incl_tax: type: number description: Price including taxes tax_rates: type: array description: An array of applied tax rates items: type: object properties: rate: type: number description: The tax rate value name: type: string description: The name of the tax rate code: type: string description: The code of the tax rate tax_amount: type: number description: The taxes applied.",
"optional": false,
"defaultValue": "",
"children": []
@@ -773,7 +773,7 @@ Set additional prices on a list of shipping options.
{
"name": "PricedShippingOption",
"type": "[`Partial`](../../admin_discounts/modules/admin_discounts.internal.mdx#partial)<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\\> & [`ShippingOptionPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingoptionpricing)",
"description": "",
"description": "#### Schema PricedShippingOption title: \"Priced Shipping Option\" type: object allOf: - $ref: \"#/components/schemas/ShippingOption\" - type: object properties: price_incl_tax: type: number description: Price including taxes tax_rates: type: array description: An array of applied tax rates items: type: object properties: rate: type: number description: The tax rate value name: type: string description: The name of the tax rate code: type: string description: The code of the tax rate tax_amount: type: number description: The taxes applied.",
"optional": false,
"defaultValue": "",
"children": []
@@ -835,7 +835,7 @@ Set additional prices on a list of product variants.
{
"name": "PricedVariant",
"type": "[`Partial`](../../admin_discounts/modules/admin_discounts.internal.mdx#partial)<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\\> & [`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)",
"description": "",
"description": "#### Schema PricedVariant title: \"Priced Product Variant\" type: object allOf: - $ref: \"#/components/schemas/ProductVariant\" - type: object properties: original_price: type: number description: The original price of the variant without any discounted prices applied. calculated_price: type: number description: The calculated price of the variant. Can be a discounted price. original_price_incl_tax: type: number description: The original price of the variant including taxes. calculated_price_incl_tax: type: number description: The calculated price of the variant including taxes. original_tax: type: number description: The taxes applied on the original price. calculated_tax: type: number description: The taxes applied on the calculated price. tax_rates: type: array description: An array of applied tax rates items: type: object properties: rate: type: number description: The tax rate value name: type: string description: The name of the tax rate code: type: string description: The code of the tax rate",
"optional": false,
"defaultValue": "",
"children": []
@@ -821,7 +821,7 @@ lists inventory items for a given variant
{
"name": "InventoryItemDTO",
"type": "`object`",
"description": "",
"description": "#### Schema Title of the inventory item",
"optional": false,
"defaultValue": "",
"children": []
@@ -64,7 +64,7 @@ Finds tax providers and assists in tax related operations.
{
"name": "getCacheKey",
"type": "`any`",
"description": "The cache key to get cache hits by.",
"description": "The cache key to get cache hits by. #### Param the entity id to cache #### Param the region id to cache",
"optional": false,
"defaultValue": "",
"children": []