chore(docs): Generated JS Client Reference (#5421)
* chore(docs): Generated JS Client Reference (automated) * fix js client reference * fix links --------- Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com> Co-authored-by: Shahed nasser <shahednasser@gmail.com>
This commit is contained in:
1604 files changed
+211689
-151746
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Boolean
|
||||
|
||||
[admin/collections](../../modules/admin_collections.mdx).[internal](../../admin_collections/modules/admin_collections.internal.mdx).Boolean
|
||||
|
||||
## Methods
|
||||
|
||||
### valueOf
|
||||
|
||||
▸ **valueOf**(): `boolean`
|
||||
|
||||
Returns the primitive value of the specified object.
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# RequestOptions
|
||||
|
||||
[admin/custom](../../modules/admin_custom.mdx).[internal](../../admin_custom/modules/admin_custom.internal.mdx).RequestOptions
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "numberOfRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ArrayBufferView
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ArrayBufferView
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "buffer",
|
||||
"type": "[`ArrayBufferLike`](../../admin_discounts/modules/admin_discounts.internal.mdx#arraybufferlike)",
|
||||
"description": "The ArrayBuffer instance referenced by the array.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "byteLength",
|
||||
"type": "`number`",
|
||||
"description": "The length in bytes of the array.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "byteOffset",
|
||||
"type": "`number`",
|
||||
"description": "The offset in bytes of the array.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ArrayLike
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ArrayLike
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Indexable
|
||||
|
||||
▪ [n: `number`]: `T`
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "length",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+200
@@ -0,0 +1,200 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AsyncGenerator
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).AsyncGenerator
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TReturn",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TNext",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### [asyncIterator]
|
||||
|
||||
▸ **[asyncIterator]**(): [`AsyncGenerator`](admin_discounts.internal.AsyncGenerator.mdx)<`T`, `TReturn`, `TNext`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`AsyncGenerator`](admin_discounts.internal.AsyncGenerator.mdx)<`T`, `TReturn`, `TNext`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "AsyncGenerator",
|
||||
"type": "[`AsyncGenerator`](admin_discounts.internal.AsyncGenerator.mdx)<`T`, `TReturn`, `TNext`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### next
|
||||
|
||||
▸ **next**(`...args`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "[] \\| [`TNext`]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[AsyncIterator](admin_discounts.internal.AsyncIterator.mdx).[next](admin_discounts.internal.AsyncIterator.mdx#next)
|
||||
|
||||
___
|
||||
|
||||
### return
|
||||
|
||||
▸ **return**(`value`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`TReturn` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`TReturn`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[AsyncIterator](admin_discounts.internal.AsyncIterator.mdx).[return](admin_discounts.internal.AsyncIterator.mdx#return)
|
||||
|
||||
___
|
||||
|
||||
### throw
|
||||
|
||||
▸ **throw**(`e`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[AsyncIterator](admin_discounts.internal.AsyncIterator.mdx).[throw](admin_discounts.internal.AsyncIterator.mdx#throw)
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AsyncGeneratorFunction
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).AsyncGeneratorFunction
|
||||
|
||||
## Callable
|
||||
|
||||
### AsyncGeneratorFunction
|
||||
|
||||
▸ **AsyncGeneratorFunction**(`...args`): [`AsyncGenerator`](admin_discounts.internal.AsyncGenerator.mdx)<`unknown`, `any`, `unknown`\>
|
||||
|
||||
Creates a new AsyncGenerator object.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "`any`[]",
|
||||
"description": "A list of arguments the function accepts.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`AsyncGenerator`](admin_discounts.internal.AsyncGenerator.mdx)<`unknown`, `any`, `unknown`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "AsyncGenerator",
|
||||
"type": "[`AsyncGenerator`](admin_discounts.internal.AsyncGenerator.mdx)<`unknown`, `any`, `unknown`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "length",
|
||||
"type": "`number`",
|
||||
"description": "The length of the arguments.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "Returns the name of the function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "prototype",
|
||||
"type": "[`AsyncGenerator`](admin_discounts.internal.AsyncGenerator.mdx)<`unknown`, `any`, `unknown`\\>",
|
||||
"description": "A reference to the prototype.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AsyncIterable
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).AsyncIterable
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### [asyncIterator]
|
||||
|
||||
▸ **[asyncIterator]**(): [`AsyncIterator`](admin_discounts.internal.AsyncIterator.mdx)<`T`, `any`, `undefined`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`AsyncIterator`](admin_discounts.internal.AsyncIterator.mdx)<`T`, `any`, `undefined`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "AsyncIterator",
|
||||
"type": "[`AsyncIterator`](admin_discounts.internal.AsyncIterator.mdx)<`T`, `any`, `undefined`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "undefined",
|
||||
"type": "`undefined`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AsyncIterableIterator
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).AsyncIterableIterator
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### [asyncIterator]
|
||||
|
||||
▸ **[asyncIterator]**(): [`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`T`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`T`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "AsyncIterableIterator",
|
||||
"type": "[`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`T`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### next
|
||||
|
||||
▸ **next**(`...args`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "[] \\| [`undefined`]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[AsyncIterator](admin_discounts.internal.AsyncIterator.mdx).[next](admin_discounts.internal.AsyncIterator.mdx#next)
|
||||
|
||||
___
|
||||
|
||||
### return
|
||||
|
||||
▸ `Optional` **return**(`value?`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[AsyncIterator](admin_discounts.internal.AsyncIterator.mdx).[return](admin_discounts.internal.AsyncIterator.mdx#return)
|
||||
|
||||
___
|
||||
|
||||
### throw
|
||||
|
||||
▸ `Optional` **throw**(`e?`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[AsyncIterator](admin_discounts.internal.AsyncIterator.mdx).[throw](admin_discounts.internal.AsyncIterator.mdx#throw)
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AsyncIterator
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).AsyncIterator
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TReturn",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TNext",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### next
|
||||
|
||||
▸ **next**(`...args`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "[] \\| [`TNext`]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### return
|
||||
|
||||
▸ `Optional` **return**(`value?`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`TReturn` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`TReturn`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### throw
|
||||
|
||||
▸ `Optional` **throw**(`e?`): `Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# BlobOptions
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).BlobOptions
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`string`",
|
||||
"description": "The Blob content-type. The intent is for `type` to convey the MIME media type of the data, however no validation of the type format is performed.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+5989
File diff suppressed because it is too large.
Load diff
+866
@@ -0,0 +1,866 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# BufferConstructor
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).BufferConstructor
|
||||
|
||||
Raw data is stored in instances of the Buffer class.
|
||||
A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
|
||||
Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "poolSize",
|
||||
"type": "`number`",
|
||||
"description": "This is the size (in bytes) of pre-allocated internal `Buffer` instances used for pooling. This value may be modified.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### alloc
|
||||
|
||||
▸ **alloc**(`size`, `fill?`, `encoding?`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
const buf = Buffer.alloc(5);
|
||||
|
||||
console.log(buf);
|
||||
// Prints: <Buffer 00 00 00 00 00>
|
||||
```
|
||||
|
||||
If `size` is larger than constants.MAX_LENGTH or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
|
||||
|
||||
If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
const buf = Buffer.alloc(5, 'a');
|
||||
|
||||
console.log(buf);
|
||||
// Prints: <Buffer 61 61 61 61 61>
|
||||
```
|
||||
|
||||
If both `fill` and `encoding` are specified, the allocated `Buffer` will be
|
||||
initialized by calling `buf.fill(fill, encoding)`.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
|
||||
|
||||
console.log(buf);
|
||||
// Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
|
||||
```
|
||||
|
||||
Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
|
||||
contents will never contain sensitive data from previous allocations, including
|
||||
data that might not have been allocated for `Buffer`s.
|
||||
|
||||
A `TypeError` will be thrown if `size` is not a number.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "size",
|
||||
"type": "`number`",
|
||||
"description": "The desired length of the new `Buffer`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "fill",
|
||||
"type": "`string` \\| `number` \\| `Uint8Array`",
|
||||
"description": "A value to pre-fill the new `Buffer` with.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "If `fill` is a string, this is its encoding.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v5.10.0
|
||||
|
||||
___
|
||||
|
||||
### allocUnsafe
|
||||
|
||||
▸ **allocUnsafe**(`size`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Allocates a new `Buffer` of `size` bytes. If `size` is larger than constants.MAX_LENGTH or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
|
||||
|
||||
The underlying memory for `Buffer` instances created in this way is _not_
|
||||
_initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
const buf = Buffer.allocUnsafe(10);
|
||||
|
||||
console.log(buf);
|
||||
// Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
|
||||
|
||||
buf.fill(0);
|
||||
|
||||
console.log(buf);
|
||||
// Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
|
||||
```
|
||||
|
||||
A `TypeError` will be thrown if `size` is not a number.
|
||||
|
||||
The `Buffer` module pre-allocates an internal `Buffer` instance of
|
||||
size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
|
||||
and `Buffer.concat()` only when `size` is less than or equal to`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
|
||||
|
||||
Use of this pre-allocated internal memory pool is a key difference between
|
||||
calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
|
||||
Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
|
||||
than or equal to half `Buffer.poolSize`. The
|
||||
difference is subtle but can be important when an application requires the
|
||||
additional performance that `Buffer.allocUnsafe()` provides.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "size",
|
||||
"type": "`number`",
|
||||
"description": "The desired length of the new `Buffer`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v5.10.0
|
||||
|
||||
___
|
||||
|
||||
### allocUnsafeSlow
|
||||
|
||||
▸ **allocUnsafeSlow**(`size`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Allocates a new `Buffer` of `size` bytes. If `size` is larger than constants.MAX_LENGTH or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
|
||||
`size` is 0.
|
||||
|
||||
The underlying memory for `Buffer` instances created in this way is _not_
|
||||
_initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
|
||||
such `Buffer` instances with zeroes.
|
||||
|
||||
When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
|
||||
allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
|
||||
allows applications to avoid the garbage collection overhead of creating many
|
||||
individually allocated `Buffer` instances. This approach improves both
|
||||
performance and memory usage by eliminating the need to track and clean up as
|
||||
many individual `ArrayBuffer` objects.
|
||||
|
||||
However, in the case where a developer may need to retain a small chunk of
|
||||
memory from a pool for an indeterminate amount of time, it may be appropriate
|
||||
to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
|
||||
then copying out the relevant bits.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
// Need to keep around a few small chunks of memory.
|
||||
const store = [];
|
||||
|
||||
socket.on('readable', () => {
|
||||
let data;
|
||||
while (null !== (data = readable.read())) {
|
||||
// Allocate for retained data.
|
||||
const sb = Buffer.allocUnsafeSlow(10);
|
||||
|
||||
// Copy the data into the new allocation.
|
||||
data.copy(sb, 0, 0, 10);
|
||||
|
||||
store.push(sb);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
A `TypeError` will be thrown if `size` is not a number.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "size",
|
||||
"type": "`number`",
|
||||
"description": "The desired length of the new `Buffer`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v5.12.0
|
||||
|
||||
___
|
||||
|
||||
### byteLength
|
||||
|
||||
▸ **byteLength**(`string`, `encoding?`): `number`
|
||||
|
||||
Returns the byte length of a string when encoded using `encoding`.
|
||||
This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
|
||||
for the encoding that is used to convert the string into bytes.
|
||||
|
||||
For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
|
||||
For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
|
||||
return value might be greater than the length of a `Buffer` created from the
|
||||
string.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
const str = '\u00bd + \u00bc = \u00be';
|
||||
|
||||
console.log(`${str}: ${str.length} characters, ` +
|
||||
`${Buffer.byteLength(str, 'utf8')} bytes`);
|
||||
// Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
|
||||
```
|
||||
|
||||
When `string` is a
|
||||
`Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
|
||||
Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
|
||||
er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string` \\| `ArrayBuffer` \\| [`SharedArrayBuffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedarraybuffer) \\| [`ArrayBufferView`](../../admin_discounts/modules/admin_discounts.internal.mdx#arraybufferview)",
|
||||
"description": "A value to calculate the length of.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "If `string` is a string, this is its encoding.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "The number of bytes contained within `string`.",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.90
|
||||
|
||||
___
|
||||
|
||||
### compare
|
||||
|
||||
▸ **compare**(`buf1`, `buf2`): ``0`` \| ``1`` \| ``-1``
|
||||
|
||||
Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
const buf1 = Buffer.from('1234');
|
||||
const buf2 = Buffer.from('0123');
|
||||
const arr = [buf1, buf2];
|
||||
|
||||
console.log(arr.sort(Buffer.compare));
|
||||
// Prints: [ <Buffer 30 31 32 33>, <Buffer 31 32 33 34> ]
|
||||
// (This result is equal to: [buf2, buf1].)
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "buf1",
|
||||
"type": "`Uint8Array`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "buf2",
|
||||
"type": "`Uint8Array`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
``0`` \| ``1`` \| ``-1``
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "``0`` \\| ``1`` \\| ``-1``",
|
||||
"type": "``0`` \\| ``1`` \\| ``-1``",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.11.13
|
||||
|
||||
___
|
||||
|
||||
### concat
|
||||
|
||||
▸ **concat**(`list`, `totalLength?`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
|
||||
|
||||
If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
|
||||
|
||||
If `totalLength` is not provided, it is calculated from the `Buffer` instances
|
||||
in `list` by adding their lengths.
|
||||
|
||||
If `totalLength` is provided, it is coerced to an unsigned integer. If the
|
||||
combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
|
||||
truncated to `totalLength`.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
// Create a single `Buffer` from a list of three `Buffer` instances.
|
||||
|
||||
const buf1 = Buffer.alloc(10);
|
||||
const buf2 = Buffer.alloc(14);
|
||||
const buf3 = Buffer.alloc(18);
|
||||
const totalLength = buf1.length + buf2.length + buf3.length;
|
||||
|
||||
console.log(totalLength);
|
||||
// Prints: 42
|
||||
|
||||
const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
|
||||
|
||||
console.log(bufA);
|
||||
// Prints: <Buffer 00 00 00 00 ...>
|
||||
console.log(bufA.length);
|
||||
// Prints: 42
|
||||
```
|
||||
|
||||
`Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "list",
|
||||
"type": "readonly `Uint8Array`[]",
|
||||
"description": "List of `Buffer` or Uint8Array instances to concatenate.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "totalLength",
|
||||
"type": "`number`",
|
||||
"description": "Total length of the `Buffer` instances in `list` when concatenated.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.7.11
|
||||
|
||||
___
|
||||
|
||||
### copyBytesFrom
|
||||
|
||||
▸ **copyBytesFrom**(`view`, `offset?`, `length?`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Copies the underlying memory of `view` into a new `Buffer`.
|
||||
|
||||
```js
|
||||
const u16 = new Uint16Array([0, 0xffff]);
|
||||
const buf = Buffer.copyBytesFrom(u16, 1, 1);
|
||||
u16[1] = 0;
|
||||
console.log(buf.length); // 2
|
||||
console.log(buf[0]); // 255
|
||||
console.log(buf[1]); // 255
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "view",
|
||||
"type": "[`TypedArray`](../../admin_discounts/modules/admin_discounts.internal.mdx#typedarray)",
|
||||
"description": "The {TypedArray} to copy.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"type": "`number`",
|
||||
"description": "The starting offset within `view`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "length",
|
||||
"type": "`number`",
|
||||
"description": "The number of elements from `view` to copy.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v19.8.0
|
||||
|
||||
___
|
||||
|
||||
### from
|
||||
|
||||
▸ **from**(`arrayBuffer`, `byteOffset?`, `length?`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
|
||||
Array entries outside that range will be truncated to fit into it.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
// Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
|
||||
const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
|
||||
```
|
||||
|
||||
If `array` is an `Array`\-like object (that is, one with a `length` property of
|
||||
type `number`), it is treated as if it is an array, unless it is a `Buffer` or
|
||||
a `Uint8Array`. This means all other `TypedArray` variants get treated as an`Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`.
|
||||
|
||||
A `TypeError` will be thrown if `array` is not an `Array` or another type
|
||||
appropriate for `Buffer.from()` variants.
|
||||
|
||||
`Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "arrayBuffer",
|
||||
"type": "[`WithImplicitCoercion`](../../admin_discounts/modules/admin_discounts.internal.mdx#withimplicitcoercion)<`ArrayBuffer` \\| [`SharedArrayBuffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedarraybuffer)\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "byteOffset",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "length",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v5.10.0
|
||||
|
||||
▸ **from**(`data`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Creates a new Buffer using the passed {data}
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`Uint8Array` \\| readonly `number`[]",
|
||||
"description": "data to create a new Buffer",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **from**(`data`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`WithImplicitCoercion`](../../admin_discounts/modules/admin_discounts.internal.mdx#withimplicitcoercion)<`string` \\| `Uint8Array` \\| readonly `number`[]\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **from**(`str`, `encoding?`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Creates a new Buffer containing the given JavaScript string {str}.
|
||||
If provided, the {encoding} parameter identifies the character encoding.
|
||||
If not provided, {encoding} defaults to 'utf8'.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "str",
|
||||
"type": "[`WithImplicitCoercion`](../../admin_discounts/modules/admin_discounts.internal.mdx#withimplicitcoercion)<`string`\\> \\| { `[toPrimitive]`: Method [toPrimitive] }",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### isBuffer
|
||||
|
||||
▸ **isBuffer**(`obj`): obj is Buffer
|
||||
|
||||
Returns `true` if `obj` is a `Buffer`, `false` otherwise.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
Buffer.isBuffer(Buffer.alloc(10)); // true
|
||||
Buffer.isBuffer(Buffer.from('foo')); // true
|
||||
Buffer.isBuffer('a string'); // false
|
||||
Buffer.isBuffer([]); // false
|
||||
Buffer.isBuffer(new Uint8Array(1024)); // false
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "obj",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
obj is Buffer
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "obj",
|
||||
"type": "obj is Buffer",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.101
|
||||
|
||||
___
|
||||
|
||||
### isEncoding
|
||||
|
||||
▸ **isEncoding**(`encoding`): encoding is BufferEncoding
|
||||
|
||||
Returns `true` if `encoding` is the name of a supported character encoding,
|
||||
or `false` otherwise.
|
||||
|
||||
```js
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
||||
console.log(Buffer.isEncoding('utf8'));
|
||||
// Prints: true
|
||||
|
||||
console.log(Buffer.isEncoding('hex'));
|
||||
// Prints: true
|
||||
|
||||
console.log(Buffer.isEncoding('utf/8'));
|
||||
// Prints: false
|
||||
|
||||
console.log(Buffer.isEncoding(''));
|
||||
// Prints: false
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "`string`",
|
||||
"description": "A character encoding name to check.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
encoding is BufferEncoding
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "encoding is BufferEncoding",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.9.1
|
||||
|
||||
___
|
||||
|
||||
### of
|
||||
|
||||
▸ **of**(`...items`): [`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
Creates a new Buffer using the passed {data}
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "items",
|
||||
"type": "`number`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Buffer",
|
||||
"type": "[`Buffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#buffer)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+315
@@ -0,0 +1,315 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# CallSite
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).CallSite
|
||||
|
||||
## Methods
|
||||
|
||||
### getColumnNumber
|
||||
|
||||
▸ **getColumnNumber**(): ``null`` \| `number`
|
||||
|
||||
Current column number [if this function was defined in a script]
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `number`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "``null`` \\| number",
|
||||
"type": "``null`` \\| `number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getEvalOrigin
|
||||
|
||||
▸ **getEvalOrigin**(): `undefined` \| `string`
|
||||
|
||||
A call site object representing the location where eval was called
|
||||
[if this function was created using a call to eval]
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "undefined \\| string",
|
||||
"type": "`undefined` \\| `string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getFileName
|
||||
|
||||
▸ **getFileName**(): `undefined` \| `string`
|
||||
|
||||
Name of the script [if this function was defined in a script]
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "undefined \\| string",
|
||||
"type": "`undefined` \\| `string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getFunction
|
||||
|
||||
▸ **getFunction**(): `undefined` \| `Function`
|
||||
|
||||
Current function
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `Function`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "undefined \\| Function",
|
||||
"type": "`undefined` \\| `Function`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getFunctionName
|
||||
|
||||
▸ **getFunctionName**(): ``null`` \| `string`
|
||||
|
||||
Name of the current function, typically its name property.
|
||||
If a name property is not available an attempt will be made to try
|
||||
to infer a name from the function's context.
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "``null`` \\| string",
|
||||
"type": "``null`` \\| `string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getLineNumber
|
||||
|
||||
▸ **getLineNumber**(): ``null`` \| `number`
|
||||
|
||||
Current line number [if this function was defined in a script]
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `number`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "``null`` \\| number",
|
||||
"type": "``null`` \\| `number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getMethodName
|
||||
|
||||
▸ **getMethodName**(): ``null`` \| `string`
|
||||
|
||||
Name of the property [of "this" or one of its prototypes] that holds
|
||||
the current function
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "``null`` \\| string",
|
||||
"type": "``null`` \\| `string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getThis
|
||||
|
||||
▸ **getThis**(): `unknown`
|
||||
|
||||
Value of "this"
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getTypeName
|
||||
|
||||
▸ **getTypeName**(): ``null`` \| `string`
|
||||
|
||||
Type of "this" as a string.
|
||||
This is the name of the function stored in the constructor field of
|
||||
"this", if available. Otherwise the object's [[Class]] internal
|
||||
property.
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "``null`` \\| string",
|
||||
"type": "``null`` \\| `string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### isConstructor
|
||||
|
||||
▸ **isConstructor**(): `boolean`
|
||||
|
||||
Is this a constructor call?
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### isEval
|
||||
|
||||
▸ **isEval**(): `boolean`
|
||||
|
||||
Does this call take place in code defined by a call to eval?
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### isNative
|
||||
|
||||
▸ **isNative**(): `boolean`
|
||||
|
||||
Is this call in native V8 code?
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### isToplevel
|
||||
|
||||
▸ **isToplevel**(): `boolean`
|
||||
|
||||
Is this a toplevel invocation, that is, is "this" the global object?
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# CreateNoteInput
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).CreateNoteInput
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "author",
|
||||
"type": "[`User`](../classes/admin_auth.internal.User.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "author_id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "resource_id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "resource_type",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# CreateUserInput
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).CreateUserInput
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "api_token",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "email",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "first_name",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "last_name",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "role",
|
||||
"type": "[`UserRoles`](../enums/admin_auth.internal.UserRoles.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+434
@@ -0,0 +1,434 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# DuplexOptions
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).DuplexOptions
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "allowHalfOpen",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "autoDestroy",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "decodeStrings",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultEncoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "emitClose",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "highWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "objectMode",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "readableHighWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "readableObjectMode",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "signal",
|
||||
"type": "`AbortSignal`",
|
||||
"description": "When provided the corresponding `AbortController` can be used to cancel an asynchronous action.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "writableCorked",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "writableHighWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "writableObjectMode",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### construct
|
||||
|
||||
▸ `Optional` **construct**(`this`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Duplex`](../classes/admin_discounts.internal.Duplex.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[WritableOptions](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx).[construct](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx#construct)
|
||||
|
||||
___
|
||||
|
||||
### destroy
|
||||
|
||||
▸ `Optional` **destroy**(`this`, `error`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Duplex`](../classes/admin_discounts.internal.Duplex.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[WritableOptions](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx).[destroy](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx#destroy)
|
||||
|
||||
___
|
||||
|
||||
### final
|
||||
|
||||
▸ `Optional` **final**(`this`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Duplex`](../classes/admin_discounts.internal.Duplex.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[WritableOptions](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx).[final](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx#final)
|
||||
|
||||
___
|
||||
|
||||
### read
|
||||
|
||||
▸ `Optional` **read**(`this`, `size`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Duplex`](../classes/admin_discounts.internal.Duplex.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[ReadableOptions](../../internal-2/interfaces/admin_discounts.internal.internal-2.ReadableOptions.mdx).[read](../../internal-2/interfaces/admin_discounts.internal.internal-2.ReadableOptions.mdx#read)
|
||||
|
||||
___
|
||||
|
||||
### write
|
||||
|
||||
▸ `Optional` **write**(`this`, `chunk`, `encoding`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Duplex`](../classes/admin_discounts.internal.Duplex.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[WritableOptions](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx).[write](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx#write)
|
||||
|
||||
___
|
||||
|
||||
### writev
|
||||
|
||||
▸ `Optional` **writev**(`this`, `chunks`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Duplex`](../classes/admin_discounts.internal.Duplex.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "chunks",
|
||||
"type": "{ `chunk`: `any` ; `encoding`: [`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding) }[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[WritableOptions](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx).[writev](../../internal-2/interfaces/admin_discounts.internal.internal-2.WritableOptions.mdx#writev)
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ErrnoException
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ErrnoException
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "code",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "errno",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "stack",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "syscall",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Error
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).Error
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "message",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "stack",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+909
@@ -0,0 +1,909 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# EventEmitter
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).EventEmitter
|
||||
|
||||
## Methods
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Alias for `emitter.on(eventName, listener)`.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.26
|
||||
|
||||
___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`eventName`, `...args`): `boolean`
|
||||
|
||||
Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
|
||||
to each.
|
||||
|
||||
Returns `true` if the event had listeners, `false` otherwise.
|
||||
|
||||
```js
|
||||
import { EventEmitter } from 'node:events';
|
||||
const myEmitter = new EventEmitter();
|
||||
|
||||
// First listener
|
||||
myEmitter.on('event', function firstListener() {
|
||||
console.log('Helloooo! first listener');
|
||||
});
|
||||
// Second listener
|
||||
myEmitter.on('event', function secondListener(arg1, arg2) {
|
||||
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
|
||||
});
|
||||
// Third listener
|
||||
myEmitter.on('event', function thirdListener(...args) {
|
||||
const parameters = args.join(', ');
|
||||
console.log(`event with parameters ${parameters} in third listener`);
|
||||
});
|
||||
|
||||
console.log(myEmitter.listeners('event'));
|
||||
|
||||
myEmitter.emit('event', 1, 2, 3, 4, 5);
|
||||
|
||||
// Prints:
|
||||
// [
|
||||
// [Function: firstListener],
|
||||
// [Function: secondListener],
|
||||
// [Function: thirdListener]
|
||||
// ]
|
||||
// Helloooo! first listener
|
||||
// event with parameters 1, 2 in second listener
|
||||
// event with parameters 1, 2, 3, 4, 5 in third listener
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"type": "`any`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.26
|
||||
|
||||
___
|
||||
|
||||
### eventNames
|
||||
|
||||
▸ **eventNames**(): (`string` \| `symbol`)[]
|
||||
|
||||
Returns an array listing the events for which the emitter has registered
|
||||
listeners. The values in the array are strings or `Symbol`s.
|
||||
|
||||
```js
|
||||
import { EventEmitter } from 'node:events';
|
||||
|
||||
const myEE = new EventEmitter();
|
||||
myEE.on('foo', () => {});
|
||||
myEE.on('bar', () => {});
|
||||
|
||||
const sym = Symbol('symbol');
|
||||
myEE.on(sym, () => {});
|
||||
|
||||
console.log(myEE.eventNames());
|
||||
// Prints: [ 'foo', 'bar', Symbol(symbol) ]
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
(`string` \| `symbol`)[]
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "(string \\| symbol)[]",
|
||||
"type": "(`string` \\| `symbol`)[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "string \\| symbol",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v6.0.0
|
||||
|
||||
___
|
||||
|
||||
### getMaxListeners
|
||||
|
||||
▸ **getMaxListeners**(): `number`
|
||||
|
||||
Returns the current max listener value for the `EventEmitter` which is either
|
||||
set by `emitter.setMaxListeners(n)` or defaults to defaultMaxListeners.
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v1.0.0
|
||||
|
||||
___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening for the event named `eventName`.
|
||||
If `listener` is provided, it will return how many times the listener is found
|
||||
in the list of the listeners of the event.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "The name of the event being listened for",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "`Function`",
|
||||
"description": "The event handler function",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v3.2.0
|
||||
|
||||
___
|
||||
|
||||
### listeners
|
||||
|
||||
▸ **listeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
```js
|
||||
server.on('connection', (stream) => {
|
||||
console.log('someone connected!');
|
||||
});
|
||||
console.log(util.inspect(server.listeners('connection')));
|
||||
// Prints: [ [Function] ]
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Function`[]
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Function[]",
|
||||
"type": "`Function`[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.26
|
||||
|
||||
___
|
||||
|
||||
### off
|
||||
|
||||
▸ **off**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Alias for `emitter.removeListener()`.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v10.0.0
|
||||
|
||||
___
|
||||
|
||||
### on
|
||||
|
||||
▸ **on**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Adds the `listener` function to the end of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
|
||||
times.
|
||||
|
||||
```js
|
||||
server.on('connection', (stream) => {
|
||||
console.log('someone connected!');
|
||||
});
|
||||
```
|
||||
|
||||
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
||||
|
||||
By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
|
||||
event listener to the beginning of the listeners array.
|
||||
|
||||
```js
|
||||
import { EventEmitter } from 'node:events';
|
||||
const myEE = new EventEmitter();
|
||||
myEE.on('foo', () => console.log('a'));
|
||||
myEE.prependListener('foo', () => console.log('b'));
|
||||
myEE.emit('foo');
|
||||
// Prints:
|
||||
// b
|
||||
// a
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "The name of the event.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "The callback function",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.101
|
||||
|
||||
___
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName`. The
|
||||
next time `eventName` is triggered, this listener is removed and then invoked.
|
||||
|
||||
```js
|
||||
server.once('connection', (stream) => {
|
||||
console.log('Ah, we have our first user!');
|
||||
});
|
||||
```
|
||||
|
||||
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
||||
|
||||
By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
|
||||
event listener to the beginning of the listeners array.
|
||||
|
||||
```js
|
||||
import { EventEmitter } from 'node:events';
|
||||
const myEE = new EventEmitter();
|
||||
myEE.once('foo', () => console.log('a'));
|
||||
myEE.prependOnceListener('foo', () => console.log('b'));
|
||||
myEE.emit('foo');
|
||||
// Prints:
|
||||
// b
|
||||
// a
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "The name of the event.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "The callback function",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.3.0
|
||||
|
||||
___
|
||||
|
||||
### prependListener
|
||||
|
||||
▸ **prependListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Adds the `listener` function to the _beginning_ of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
|
||||
times.
|
||||
|
||||
```js
|
||||
server.prependListener('connection', (stream) => {
|
||||
console.log('someone connected!');
|
||||
});
|
||||
```
|
||||
|
||||
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "The name of the event.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "The callback function",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v6.0.0
|
||||
|
||||
___
|
||||
|
||||
### prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
||||
listener is removed, and then invoked.
|
||||
|
||||
```js
|
||||
server.prependOnceListener('connection', (stream) => {
|
||||
console.log('Ah, we have our first user!');
|
||||
});
|
||||
```
|
||||
|
||||
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "The name of the event.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "The callback function",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v6.0.0
|
||||
|
||||
___
|
||||
|
||||
### rawListeners
|
||||
|
||||
▸ **rawListeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`,
|
||||
including any wrappers (such as those created by `.once()`).
|
||||
|
||||
```js
|
||||
import { EventEmitter } from 'node:events';
|
||||
const emitter = new EventEmitter();
|
||||
emitter.once('log', () => console.log('log once'));
|
||||
|
||||
// Returns a new Array with a function `onceWrapper` which has a property
|
||||
// `listener` which contains the original listener bound above
|
||||
const listeners = emitter.rawListeners('log');
|
||||
const logFnWrapper = listeners[0];
|
||||
|
||||
// Logs "log once" to the console and does not unbind the `once` event
|
||||
logFnWrapper.listener();
|
||||
|
||||
// Logs "log once" to the console and removes the listener
|
||||
logFnWrapper();
|
||||
|
||||
emitter.on('log', () => console.log('log persistently'));
|
||||
// Will return a new Array with a single function bound by `.on()` above
|
||||
const newListeners = emitter.rawListeners('log');
|
||||
|
||||
// Logs "log persistently" twice
|
||||
newListeners[0]();
|
||||
emitter.emit('log');
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Function`[]
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Function[]",
|
||||
"type": "`Function`[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v9.4.0
|
||||
|
||||
___
|
||||
|
||||
### removeAllListeners
|
||||
|
||||
▸ **removeAllListeners**(`event?`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Removes all listeners, or those of the specified `eventName`.
|
||||
|
||||
It is bad practice to remove listeners added elsewhere in the code,
|
||||
particularly when the `EventEmitter` instance was created by some other
|
||||
component or module (e.g. sockets or file streams).
|
||||
|
||||
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "event",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.26
|
||||
|
||||
___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
Removes the specified `listener` from the listener array for the event named`eventName`.
|
||||
|
||||
```js
|
||||
const callback = (stream) => {
|
||||
console.log('someone connected!');
|
||||
};
|
||||
server.on('connection', callback);
|
||||
// ...
|
||||
server.removeListener('connection', callback);
|
||||
```
|
||||
|
||||
`removeListener()` will remove, at most, one instance of a listener from the
|
||||
listener array. If any single listener has been added multiple times to the
|
||||
listener array for the specified `eventName`, then `removeListener()` must be
|
||||
called multiple times to remove each instance.
|
||||
|
||||
Once an event is emitted, all listeners attached to it at the
|
||||
time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
|
||||
will not remove them from`emit()` in progress. Subsequent events behave as expected.
|
||||
|
||||
```js
|
||||
import { EventEmitter } from 'node:events';
|
||||
class MyEmitter extends EventEmitter {}
|
||||
const myEmitter = new MyEmitter();
|
||||
|
||||
const callbackA = () => {
|
||||
console.log('A');
|
||||
myEmitter.removeListener('event', callbackB);
|
||||
};
|
||||
|
||||
const callbackB = () => {
|
||||
console.log('B');
|
||||
};
|
||||
|
||||
myEmitter.on('event', callbackA);
|
||||
|
||||
myEmitter.on('event', callbackB);
|
||||
|
||||
// callbackA removes listener callbackB but it will still be called.
|
||||
// Internal listener array at time of emit [callbackA, callbackB]
|
||||
myEmitter.emit('event');
|
||||
// Prints:
|
||||
// A
|
||||
// B
|
||||
|
||||
// callbackB is now removed.
|
||||
// Internal listener array [callbackA]
|
||||
myEmitter.emit('event');
|
||||
// Prints:
|
||||
// A
|
||||
```
|
||||
|
||||
Because listeners are managed using an internal array, calling this will
|
||||
change the position indices of any listener registered _after_ the listener
|
||||
being removed. This will not impact the order in which listeners are called,
|
||||
but it means that any copies of the listener array as returned by
|
||||
the `emitter.listeners()` method will need to be recreated.
|
||||
|
||||
When a single function has been added as a handler multiple times for a single
|
||||
event (as in the example below), `removeListener()` will remove the most
|
||||
recently added instance. In the example the `once('ping')`listener is removed:
|
||||
|
||||
```js
|
||||
import { EventEmitter } from 'node:events';
|
||||
const ee = new EventEmitter();
|
||||
|
||||
function pong() {
|
||||
console.log('pong');
|
||||
}
|
||||
|
||||
ee.on('ping', pong);
|
||||
ee.once('ping', pong);
|
||||
ee.removeListener('ping', pong);
|
||||
|
||||
ee.emit('ping');
|
||||
ee.emit('ping');
|
||||
```
|
||||
|
||||
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.1.26
|
||||
|
||||
___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ **setMaxListeners**(`n`): [`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
By default `EventEmitter`s will print a warning if more than `10` listeners are
|
||||
added for a particular event. This is a useful default that helps finding
|
||||
memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
|
||||
modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
|
||||
|
||||
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "n",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EventEmitter",
|
||||
"type": "[`EventEmitter`](admin_discounts.internal.EventEmitter-2.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Since
|
||||
|
||||
v0.3.5
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# EventEmitterOptions
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).EventEmitterOptions
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "captureRejections",
|
||||
"type": "`boolean`",
|
||||
"description": "Enables automatic capturing of promise rejection.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# FindConfig
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).FindConfig
|
||||
|
||||
An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
|
||||
which provides correct typing of field names in its properties.
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Entity",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "order",
|
||||
"type": "`object`",
|
||||
"description": "An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC` to sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "relations",
|
||||
"type": "`string`[]",
|
||||
"description": "An array of strings, each being relation names of the entity to retrieve in the result.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "(`string` \\| keyof `Entity`)[]",
|
||||
"description": "An array of strings, each being attribute names of the entity to retrieve in the result.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "skip",
|
||||
"type": "`number`",
|
||||
"description": "A number indicating the number of records to skip before retrieving the results.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "take",
|
||||
"type": "`number`",
|
||||
"description": "A number indicating the number of records to return in the result.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "withDeleted",
|
||||
"type": "`boolean`",
|
||||
"description": "A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the `SoftDeletableEntity` class.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ICacheService
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ICacheService
|
||||
|
||||
## Methods
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`\>(`key`): `Promise`<``null`` \| `T`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<``null`` \| `T`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<``null`` \\| `T`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "``null`` \\| T",
|
||||
"type": "``null`` \\| `T`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### invalidate
|
||||
|
||||
▸ **invalidate**(`key`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
|
||||
▸ **set**(`key`, `data`, `ttl?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ttl",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+215
@@ -0,0 +1,215 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IEventBusModuleService
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).IEventBusModuleService
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractEventBusModuleService`](../classes/admin_discounts.internal.AbstractEventBusModuleService.mdx)
|
||||
|
||||
## Methods
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**<`T`\>(`eventName`, `data`, `options?`): `Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **emit**<`T`\>(`data`): `Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`EmitData`](../../admin_discounts/modules/admin_discounts.internal.mdx#emitdata)<`T`\\>[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### subscribe
|
||||
|
||||
▸ **subscribe**(`eventName`, `subscriber`, `context?`): [`IEventBusModuleService`](admin_discounts.internal.IEventBusModuleService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "subscriber",
|
||||
"type": "[`Subscriber`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscriber)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SubscriberContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscribercontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IEventBusModuleService`](admin_discounts.internal.IEventBusModuleService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IEventBusModuleService",
|
||||
"type": "[`IEventBusModuleService`](admin_discounts.internal.IEventBusModuleService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### unsubscribe
|
||||
|
||||
▸ **unsubscribe**(`eventName`, `subscriber`, `context?`): [`IEventBusModuleService`](admin_discounts.internal.IEventBusModuleService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "subscriber",
|
||||
"type": "[`Subscriber`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscriber)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SubscriberContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscribercontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IEventBusModuleService`](admin_discounts.internal.IEventBusModuleService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IEventBusModuleService",
|
||||
"type": "[`IEventBusModuleService`](admin_discounts.internal.IEventBusModuleService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IEventBusService
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).IEventBusService
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`EventBusService`](../classes/admin_discounts.internal.internal.EventBusService.mdx)
|
||||
|
||||
## Methods
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**<`T`\>(`event`, `data`, `options?`): `Promise`<`unknown`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "event",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`unknown`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`unknown`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### subscribe
|
||||
|
||||
▸ **subscribe**(`eventName`, `subscriber`, `context?`): [`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "subscriber",
|
||||
"type": "[`Subscriber`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscriber)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SubscriberContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscribercontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IEventBusService",
|
||||
"type": "[`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### unsubscribe
|
||||
|
||||
▸ **unsubscribe**(`eventName`, `subscriber`, `context?`): [`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "subscriber",
|
||||
"type": "[`Subscriber`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscriber)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SubscriberContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscribercontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IEventBusService",
|
||||
"type": "[`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IEventBusService",
|
||||
"type": "[`IEventBusService`](admin_discounts.internal.IEventBusService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[ITransactionBaseService](admin_discounts.internal.ITransactionBaseService.mdx).[withTransaction](admin_discounts.internal.ITransactionBaseService.mdx#withtransaction)
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IFlagRouter
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).IFlagRouter
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`FlagRouter`](../classes/admin_discounts.internal.FlagRouter.mdx)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "isFeatureEnabled",
|
||||
"type": "(`key`: `string`) => `boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listFlags",
|
||||
"type": "() => [`FeatureFlagsResponse`](../../admin_discounts/modules/admin_discounts.internal.mdx#featureflagsresponse-1)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+1549
File diff suppressed because it is too large.
Load diff
+386
@@ -0,0 +1,386 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ISearchService
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ISearchService
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractSearchService`](../classes/admin_discounts.internal.AbstractSearchService.mdx)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### addDocuments
|
||||
|
||||
▸ **addDocuments**(`indexName`, `documents`, `type`): `unknown`
|
||||
|
||||
Used to index documents by the search engine provider
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "documents",
|
||||
"type": "`unknown`",
|
||||
"description": "documents array to be indexed",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`string`",
|
||||
"description": "of documents to be added (e.g: products, regions, orders, etc)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### createIndex
|
||||
|
||||
▸ **createIndex**(`indexName`, `options`): `unknown`
|
||||
|
||||
Used to create an index
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`unknown`",
|
||||
"description": "the options",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### deleteAllDocuments
|
||||
|
||||
▸ **deleteAllDocuments**(`indexName`): `unknown`
|
||||
|
||||
Used to delete all documents
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### deleteDocument
|
||||
|
||||
▸ **deleteDocument**(`indexName`, `document_id`): `unknown`
|
||||
|
||||
Used to delete document
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "document_id",
|
||||
"type": "`string` \\| `number`",
|
||||
"description": "the id of the document",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getIndex
|
||||
|
||||
▸ **getIndex**(`indexName`): `unknown`
|
||||
|
||||
Used to get an index
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### replaceDocuments
|
||||
|
||||
▸ **replaceDocuments**(`indexName`, `documents`, `type`): `unknown`
|
||||
|
||||
Used to replace documents
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "documents",
|
||||
"type": "`unknown`",
|
||||
"description": "array of document objects that will replace existing documents",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`string`",
|
||||
"description": "type of documents to be replaced (e.g: products, regions, orders, etc)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### search
|
||||
|
||||
▸ **search**(`indexName`, `query`, `options`): `unknown`
|
||||
|
||||
Used to search for a document in an index
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"type": "``null`` \\| `string`",
|
||||
"description": "the search query",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`unknown`",
|
||||
"description": "any options passed to the request object other than the query and indexName - additionalOptions contain any provider specific options",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### updateSettings
|
||||
|
||||
▸ **updateSettings**(`indexName`, `settings`): `unknown`
|
||||
|
||||
Used to update the settings of an index
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "indexName",
|
||||
"type": "`string`",
|
||||
"description": "the index name",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "settings",
|
||||
"type": "`unknown`",
|
||||
"description": "settings object",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "returns response from search engine provider",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+376
@@ -0,0 +1,376 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IStockLocationService
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).IStockLocationService
|
||||
|
||||
## Methods
|
||||
|
||||
### \_\_joinerConfig
|
||||
|
||||
▸ **__joinerConfig**(): [`ModuleJoinerConfig`](../../admin_discounts/modules/admin_discounts.internal.mdx#modulejoinerconfig)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ModuleJoinerConfig`](../../admin_discounts/modules/admin_discounts.internal.mdx#modulejoinerconfig)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ModuleJoinerConfig",
|
||||
"type": "[`Omit`](../../admin_auth/modules/admin_auth.internal.mdx#omit)<[`JoinerServiceConfig`](admin_discounts.internal.JoinerServiceConfig.mdx), ``\"serviceName\"`` \\| ``\"primaryKeys\"`` \\| ``\"relationships\"`` \\| ``\"extends\"``\\> & { `databaseConfig?`: { `extraFields?`: Record<`string`, { `defaultValue?`: `string` ; `nullable?`: `boolean` ; `options?`: Record<`string`, `unknown`\\> ; `type`: ``\"date\"`` \\| ``\"time\"`` \\| ``\"datetime\"`` \\| ``\"bigint\"`` \\| ``\"blob\"`` \\| ``\"uint8array\"`` \\| ``\"array\"`` \\| ``\"enumArray\"`` \\| ``\"enum\"`` \\| ``\"json\"`` \\| ``\"integer\"`` \\| ``\"smallint\"`` \\| ``\"tinyint\"`` \\| ``\"mediumint\"`` \\| ``\"float\"`` \\| ``\"double\"`` \\| ``\"boolean\"`` \\| ``\"decimal\"`` \\| ``\"string\"`` \\| ``\"uuid\"`` \\| ``\"text\"`` }\\> ; `idPrefix?`: `string` ; `tableName?`: `string` } ; `extends?`: { `fieldAlias?`: Record<`string`, `string` \\| { `forwardArgumentsOnPath`: `string`[] ; `path`: `string` }\\> ; `relationship`: [`ModuleJoinerRelationship`](../../admin_discounts/modules/admin_discounts.internal.mdx#modulejoinerrelationship) ; `serviceName`: `string` }[] ; `isLink?`: `boolean` ; `isReadOnlyLink?`: `boolean` ; `linkableKeys?`: Record<`string`, `string`\\> ; `primaryKeys?`: `string`[] ; `relationships?`: [`ModuleJoinerRelationship`](../../admin_discounts/modules/admin_discounts.internal.mdx#modulejoinerrelationship)[] ; `schema?`: `string` ; `serviceName?`: `string` }",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`input`, `context?`): `Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "input",
|
||||
"type": "[`CreateStockLocationInput`](../../admin_discounts/modules/admin_discounts.internal.mdx#createstocklocationinput)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SharedContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedcontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StockLocationDTO",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`id`, `context?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SharedContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedcontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`, `context?`): `Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "selector",
|
||||
"type": "[`FilterableStockLocationProps`](../../admin_discounts/modules/admin_discounts.internal.mdx#filterablestocklocationprops)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`FindConfig`](admin_discounts.internal.FindConfig.mdx)<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SharedContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedcontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[]\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[]\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StockLocationDTO[]",
|
||||
"type": "[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StockLocationDTO",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`, `context?`): `Promise`<[[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "selector",
|
||||
"type": "[`FilterableStockLocationProps`](../../admin_discounts/modules/admin_discounts.internal.mdx#filterablestocklocationprops)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`FindConfig`](admin_discounts.internal.FindConfig.mdx)<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SharedContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedcontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[], `number`]\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[], `number`]\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StockLocationDTO[]",
|
||||
"type": "[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`id`, `config?`, `context?`): `Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`FindConfig`](admin_discounts.internal.FindConfig.mdx)<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SharedContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedcontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StockLocationDTO",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `input`, `context?`): `Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "input",
|
||||
"type": "[`UpdateStockLocationInput`](../../admin_discounts/modules/admin_discounts.internal.mdx#updatestocklocationinput)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`SharedContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedcontext)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`StockLocationDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#stocklocationdto)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StockLocationDTO",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ITransactionBaseService
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ITransactionBaseService
|
||||
|
||||
## Methods
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ITransactionBaseService`](admin_discounts.internal.ITransactionBaseService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ITransactionBaseService`](admin_discounts.internal.ITransactionBaseService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ITransactionBaseService",
|
||||
"type": "[`ITransactionBaseService`](admin_discounts.internal.ITransactionBaseService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Iterable
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).Iterable
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### [iterator]
|
||||
|
||||
▸ **[iterator]**(): [`Iterator`](admin_discounts.internal.Iterator.mdx)<`T`, `any`, `undefined`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Iterator`](admin_discounts.internal.Iterator.mdx)<`T`, `any`, `undefined`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Iterator",
|
||||
"type": "[`Iterator`](admin_discounts.internal.Iterator.mdx)<`T`, `any`, `undefined`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "undefined",
|
||||
"type": "`undefined`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IterableIterator
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).IterableIterator
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### [iterator]
|
||||
|
||||
▸ **[iterator]**(): [`IterableIterator`](admin_discounts.internal.IterableIterator.mdx)<`T`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IterableIterator`](admin_discounts.internal.IterableIterator.mdx)<`T`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IterableIterator",
|
||||
"type": "[`IterableIterator`](admin_discounts.internal.IterableIterator.mdx)<`T`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### next
|
||||
|
||||
▸ **next**(`...args`): [`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "[] \\| [`undefined`]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Iterator](admin_discounts.internal.Iterator.mdx).[next](admin_discounts.internal.Iterator.mdx#next)
|
||||
|
||||
___
|
||||
|
||||
### return
|
||||
|
||||
▸ `Optional` **return**(`value?`): [`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Iterator](admin_discounts.internal.Iterator.mdx).[return](admin_discounts.internal.Iterator.mdx#return)
|
||||
|
||||
___
|
||||
|
||||
### throw
|
||||
|
||||
▸ `Optional` **throw**(`e?`): [`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Iterator](admin_discounts.internal.Iterator.mdx).[throw](admin_discounts.internal.Iterator.mdx#throw)
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Iterator
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).Iterator
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TReturn",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TNext",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### next
|
||||
|
||||
▸ **next**(`...args`): [`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "[] \\| [`TNext`]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### return
|
||||
|
||||
▸ `Optional` **return**(`value?`): [`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`TReturn`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### throw
|
||||
|
||||
▸ `Optional` **throw**(`e?`): [`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IteratorResult",
|
||||
"type": "[`IteratorResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#iteratorresult)<`T`, `TReturn`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IteratorReturnResult
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).IteratorReturnResult
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TReturn",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "done",
|
||||
"type": "``true``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`TReturn`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IteratorYieldResult
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).IteratorYieldResult
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TYield",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "done",
|
||||
"type": "``false``",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`TYield`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# JoinerServiceConfig
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).JoinerServiceConfig
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "alias",
|
||||
"type": "[`JoinerServiceConfigAlias`](admin_discounts.internal.JoinerServiceConfigAlias.mdx) \\| [`JoinerServiceConfigAlias`](admin_discounts.internal.JoinerServiceConfigAlias.mdx)[]",
|
||||
"description": "Property name to use as entrypoint to the service",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "extends",
|
||||
"type": "{ `relationship`: [`JoinerRelationship`](../../admin_discounts/modules/admin_discounts.internal.mdx#joinerrelationship) ; `serviceName`: `string` }[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "fieldAlias",
|
||||
"type": "Record<`string`, `string` \\| { `forwardArgumentsOnPath`: `string`[] ; `path`: `string` }\\>",
|
||||
"description": "alias for deeper nested relationships (e.g. { 'price': 'prices.calculated_price_set.amount' })",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "primaryKeys",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "relationships",
|
||||
"type": "[`JoinerRelationship`](../../admin_discounts/modules/admin_discounts.internal.mdx#joinerrelationship)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "serviceName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# JoinerServiceConfigAlias
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).JoinerServiceConfigAlias
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Logger
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).Logger
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "activity",
|
||||
"type": "(`message`: `string`, `config?`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "debug",
|
||||
"type": "(`message`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "(`messageOrError`: `any`, `error?`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "failure",
|
||||
"type": "(`activityId`: `any`, `message`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "info",
|
||||
"type": "(`message`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "log",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "panic",
|
||||
"type": "(`data`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "progress",
|
||||
"type": "(`activityId`: `any`, `message`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "setLogLevel",
|
||||
"type": "(`level`: `string`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "shouldLog",
|
||||
"type": "(`level`: `string`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "success",
|
||||
"type": "(`activityId`: `any`, `message`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "unsetLogLevel",
|
||||
"type": "() => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "warn",
|
||||
"type": "(`message`: `any`) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# NumericalComparisonOperator
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).NumericalComparisonOperator
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "gt",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "gte",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lt",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lte",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Object
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).Object
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "constructor",
|
||||
"type": "`Function`",
|
||||
"description": "The initial value of Object.prototype.constructor is the standard built-in Object constructor.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### hasOwnProperty
|
||||
|
||||
▸ **hasOwnProperty**(`v`): `boolean`
|
||||
|
||||
Determines whether an object has a property with the specified name.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "v",
|
||||
"type": "[`PropertyKey`](../../admin_discounts/modules/admin_discounts.internal.mdx#propertykey)",
|
||||
"description": "A property name.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### isPrototypeOf
|
||||
|
||||
▸ **isPrototypeOf**(`v`): `boolean`
|
||||
|
||||
Determines whether an object exists in another object's prototype chain.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "v",
|
||||
"type": "[`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object)",
|
||||
"description": "Another object whose prototype chain is to be checked.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### propertyIsEnumerable
|
||||
|
||||
▸ **propertyIsEnumerable**(`v`): `boolean`
|
||||
|
||||
Determines whether a specified property is enumerable.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "v",
|
||||
"type": "[`PropertyKey`](../../admin_discounts/modules/admin_discounts.internal.mdx#propertykey)",
|
||||
"description": "A property name.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### toLocaleString
|
||||
|
||||
▸ **toLocaleString**(): `string`
|
||||
|
||||
Returns a date converted to a string using the current locale.
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### toString
|
||||
|
||||
▸ **toString**(): `string`
|
||||
|
||||
Returns a string representation of an object.
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### valueOf
|
||||
|
||||
▸ **valueOf**(): [`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object)
|
||||
|
||||
Returns the primitive value of the specified object.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Object`](../../admin_discounts/modules/admin_discounts.internal.mdx#object)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Object",
|
||||
"type": "() => `any`(`value`: `any`) => `any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# PromiseLike
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).PromiseLike
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### then
|
||||
|
||||
▸ **then**<`TResult1`, `TResult2`\>(`onfulfilled?`, `onrejected?`): [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`TResult1` \| `TResult2`\>
|
||||
|
||||
Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult1",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TResult2",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "onfulfilled",
|
||||
"type": "``null`` \\| (`value`: `T`) => `TResult1` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`TResult1`\\>",
|
||||
"description": "The callback to execute when the Promise is resolved.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "onrejected",
|
||||
"type": "``null`` \\| (`reason`: `any`) => `TResult2` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`TResult2`\\>",
|
||||
"description": "The callback to execute when the Promise is rejected.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`TResult1` \| `TResult2`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "PromiseLike",
|
||||
"type": "[`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`TResult1` \\| `TResult2`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "A Promise for the completion of which ever callback is executed.",
|
||||
"children": [
|
||||
{
|
||||
"name": "TResult1 \\| TResult2",
|
||||
"type": "`TResult1` \\| `TResult2`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# QueuingStrategy
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).QueuingStrategy
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "highWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"type": "[`QueuingStrategySize`](admin_discounts.internal.QueuingStrategySize.mdx)<`T`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# QueuingStrategySize
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).QueuingStrategySize
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Callable
|
||||
|
||||
### QueuingStrategySize
|
||||
|
||||
▸ **QueuingStrategySize**(`chunk?`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+1579
File diff suppressed because it is too large.
Load diff
+119
@@ -0,0 +1,119 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableByteStreamController
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableByteStreamController
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "byobRequest",
|
||||
"type": "`undefined`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "desiredSize",
|
||||
"type": "``null`` \\| `number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### close
|
||||
|
||||
▸ **close**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### enqueue
|
||||
|
||||
▸ **enqueue**(`chunk`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "[`ArrayBufferView`](admin_discounts.internal.ArrayBufferView.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`error?`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableByteStreamControllerCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableByteStreamControllerCallback
|
||||
|
||||
## Callable
|
||||
|
||||
### ReadableByteStreamControllerCallback
|
||||
|
||||
▸ **ReadableByteStreamControllerCallback**(`controller`): `void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "controller",
|
||||
"type": "[`ReadableByteStreamController`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablebytestreamcontroller)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| PromiseLike<void\\>",
|
||||
"type": "`void` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\\>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+288
@@ -0,0 +1,288 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStream
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableStream
|
||||
|
||||
This Streams API interface represents a readable stream of byte data.
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "locked",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### [asyncIterator]
|
||||
|
||||
▸ **[asyncIterator]**(): [`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`R`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "AsyncIterableIterator",
|
||||
"type": "[`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`reason?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getReader
|
||||
|
||||
▸ **getReader**(): [`ReadableStreamDefaultReader`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamdefaultreader)<`R`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReadableStreamDefaultReader`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamdefaultreader)<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReadableStreamDefaultReader",
|
||||
"type": "[`ReadableStreamDefaultReader`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamdefaultreader)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### pipeThrough
|
||||
|
||||
▸ **pipeThrough**<`T`\>(`transform`, `options?`): [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`T`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transform",
|
||||
"type": "[`ReadableWritablePair`](admin_discounts.internal.ReadableWritablePair.mdx)<`T`, `R`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "[`StreamPipeOptions`](admin_discounts.internal.StreamPipeOptions.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`T`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`T`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### pipeTo
|
||||
|
||||
▸ **pipeTo**(`destination`, `options?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "destination",
|
||||
"type": "[`WritableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#writablestream)<`R`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "[`StreamPipeOptions`](admin_discounts.internal.StreamPipeOptions.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### tee
|
||||
|
||||
▸ **tee**(): [[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\>, [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\>]
|
||||
|
||||
#### Returns
|
||||
|
||||
[[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\>, [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\>]
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "[[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\\>, [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\\>]",
|
||||
"type": "[[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\\>, [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\\>]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### values
|
||||
|
||||
▸ **values**(`options?`): [`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`R`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options.preventCancel",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "AsyncIterableIterator",
|
||||
"type": "[`AsyncIterableIterator`](admin_discounts.internal.AsyncIterableIterator.mdx)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+1309
File diff suppressed because it is too large.
Load diff
+124
@@ -0,0 +1,124 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamDefaultController
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableStreamDefaultController
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "desiredSize",
|
||||
"type": "``null`` \\| `number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### close
|
||||
|
||||
▸ **close**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### enqueue
|
||||
|
||||
▸ **enqueue**(`chunk?`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`R`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`e?`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamDefaultReadDoneResult
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableStreamDefaultReadDoneResult
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "done",
|
||||
"type": "``true``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`undefined`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamDefaultReadValueResult
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableStreamDefaultReadValueResult
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "done",
|
||||
"type": "``false``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamDefaultReader
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableStreamDefaultReader
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "closed",
|
||||
"type": "`Promise`<`undefined`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`reason?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[ReadableStreamGenericReader](admin_discounts.internal.ReadableStreamGenericReader.mdx).[cancel](admin_discounts.internal.ReadableStreamGenericReader.mdx#cancel)
|
||||
|
||||
___
|
||||
|
||||
### read
|
||||
|
||||
▸ **read**(): `Promise`<[`ReadableStreamDefaultReadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamdefaultreadresult)<`R`\>\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ReadableStreamDefaultReadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamdefaultreadresult)<`R`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ReadableStreamDefaultReadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamdefaultreadresult)<`R`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "ReadableStreamDefaultReadResult",
|
||||
"type": "[`ReadableStreamDefaultReadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamdefaultreadresult)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### releaseLock
|
||||
|
||||
▸ **releaseLock**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamErrorCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableStreamErrorCallback
|
||||
|
||||
## Callable
|
||||
|
||||
### ReadableStreamErrorCallback
|
||||
|
||||
▸ **ReadableStreamErrorCallback**(`reason`): `void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| PromiseLike<void\\>",
|
||||
"type": "`void` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\\>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamGenericReader
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableStreamGenericReader
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "closed",
|
||||
"type": "`Promise`<`undefined`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`reason?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableWritablePair
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).ReadableWritablePair
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "W",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "readable",
|
||||
"type": "[`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`R`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "writable",
|
||||
"type": "[`WritableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#writablestream)<`W`\\>",
|
||||
"description": "Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use. Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# SharedArrayBuffer
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).SharedArrayBuffer
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "[species]",
|
||||
"type": "[`SharedArrayBuffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedarraybuffer)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "[toStringTag]",
|
||||
"type": "``\"SharedArrayBuffer\"``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "byteLength",
|
||||
"type": "`number`",
|
||||
"description": "Read-only. The length of the ArrayBuffer (in bytes).",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### slice
|
||||
|
||||
▸ **slice**(`begin`, `end?`): [`SharedArrayBuffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedarraybuffer)
|
||||
|
||||
Returns a section of an SharedArrayBuffer.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "begin",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "end",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SharedArrayBuffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedarraybuffer)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "SharedArrayBuffer",
|
||||
"type": "[`SharedArrayBufferConstructor`](admin_discounts.internal.SharedArrayBufferConstructor.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# SharedArrayBufferConstructor
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).SharedArrayBufferConstructor
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "prototype",
|
||||
"type": "[`SharedArrayBuffer`](../../admin_discounts/modules/admin_discounts.internal.mdx#sharedarraybuffer)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# StaticEventEmitterOptions
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).StaticEventEmitterOptions
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "signal",
|
||||
"type": "`AbortSignal`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# StreamPipeOptions
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).StreamPipeOptions
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "preventAbort",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "preventCancel",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "preventClose",
|
||||
"type": "`boolean`",
|
||||
"description": "Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered. Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. Errors and closures of the source and destination streams propagate as follows: An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination. An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source. When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error. If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source. The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "signal",
|
||||
"type": "`AbortSignal`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# StringComparisonOperator
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).StringComparisonOperator
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "contains",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ends_with",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "gt",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "gte",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lt",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lte",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "starts_with",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+534
@@ -0,0 +1,534 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransformOptions
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).TransformOptions
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "allowHalfOpen",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "autoDestroy",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "decodeStrings",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultEncoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "emitClose",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "highWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "objectMode",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "readableHighWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "readableObjectMode",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "signal",
|
||||
"type": "`AbortSignal`",
|
||||
"description": "When provided the corresponding `AbortController` can be used to cancel an asynchronous action.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "writableCorked",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "writableHighWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "writableObjectMode",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### construct
|
||||
|
||||
▸ `Optional` **construct**(`this`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[DuplexOptions](admin_discounts.internal.DuplexOptions.mdx).[construct](admin_discounts.internal.DuplexOptions.mdx#construct)
|
||||
|
||||
___
|
||||
|
||||
### destroy
|
||||
|
||||
▸ `Optional` **destroy**(`this`, `error`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[DuplexOptions](admin_discounts.internal.DuplexOptions.mdx).[destroy](admin_discounts.internal.DuplexOptions.mdx#destroy)
|
||||
|
||||
___
|
||||
|
||||
### final
|
||||
|
||||
▸ `Optional` **final**(`this`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[DuplexOptions](admin_discounts.internal.DuplexOptions.mdx).[final](admin_discounts.internal.DuplexOptions.mdx#final)
|
||||
|
||||
___
|
||||
|
||||
### flush
|
||||
|
||||
▸ `Optional` **flush**(`this`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "[`TransformCallback`](../../admin_discounts/modules/admin_discounts.internal.mdx#transformcallback)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### read
|
||||
|
||||
▸ `Optional` **read**(`this`, `size`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[DuplexOptions](admin_discounts.internal.DuplexOptions.mdx).[read](admin_discounts.internal.DuplexOptions.mdx#read)
|
||||
|
||||
___
|
||||
|
||||
### transform
|
||||
|
||||
▸ `Optional` **transform**(`this`, `chunk`, `encoding`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "[`TransformCallback`](../../admin_discounts/modules/admin_discounts.internal.mdx#transformcallback)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### write
|
||||
|
||||
▸ `Optional` **write**(`this`, `chunk`, `encoding`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "encoding",
|
||||
"type": "[`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[DuplexOptions](admin_discounts.internal.DuplexOptions.mdx).[write](admin_discounts.internal.DuplexOptions.mdx#write)
|
||||
|
||||
___
|
||||
|
||||
### writev
|
||||
|
||||
▸ `Optional` **writev**(`this`, `chunks`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[`Transform`](../classes/admin_discounts.internal.Transform.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "chunks",
|
||||
"type": "{ `chunk`: `any` ; `encoding`: [`BufferEncoding`](../../admin_discounts/modules/admin_discounts.internal.mdx#bufferencoding) }[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "(`error?`: ``null`` \\| [`Error`](../../admin_discounts/modules/admin_discounts.internal.mdx#error)) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Overrides
|
||||
|
||||
[DuplexOptions](admin_discounts.internal.DuplexOptions.mdx).[writev](admin_discounts.internal.DuplexOptions.mdx#writev)
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingByteSource
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingByteSource
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "autoAllocateChunkSize",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "cancel",
|
||||
"type": "[`ReadableStreamErrorCallback`](admin_discounts.internal.ReadableStreamErrorCallback.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "pull",
|
||||
"type": "[`ReadableByteStreamControllerCallback`](admin_discounts.internal.ReadableByteStreamControllerCallback.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "[`ReadableByteStreamControllerCallback`](admin_discounts.internal.ReadableByteStreamControllerCallback.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "``\"bytes\"``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSink
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSink
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "W",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "abort",
|
||||
"type": "[`UnderlyingSinkAbortCallback`](admin_discounts.internal.UnderlyingSinkAbortCallback.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "close",
|
||||
"type": "[`UnderlyingSinkCloseCallback`](admin_discounts.internal.UnderlyingSinkCloseCallback.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "[`UnderlyingSinkStartCallback`](admin_discounts.internal.UnderlyingSinkStartCallback.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`undefined`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "write",
|
||||
"type": "[`UnderlyingSinkWriteCallback`](admin_discounts.internal.UnderlyingSinkWriteCallback.mdx)<`W`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSinkAbortCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSinkAbortCallback
|
||||
|
||||
## Callable
|
||||
|
||||
### UnderlyingSinkAbortCallback
|
||||
|
||||
▸ **UnderlyingSinkAbortCallback**(`reason?`): `void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| PromiseLike<void\\>",
|
||||
"type": "`void` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\\>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSinkCloseCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSinkCloseCallback
|
||||
|
||||
## Callable
|
||||
|
||||
### UnderlyingSinkCloseCallback
|
||||
|
||||
▸ **UnderlyingSinkCloseCallback**(): `void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| PromiseLike<void\\>",
|
||||
"type": "`void` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\\>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSinkStartCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSinkStartCallback
|
||||
|
||||
## Callable
|
||||
|
||||
### UnderlyingSinkStartCallback
|
||||
|
||||
▸ **UnderlyingSinkStartCallback**(`controller`): `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "controller",
|
||||
"type": "[`WritableStreamDefaultController`](../../admin_discounts/modules/admin_discounts.internal.mdx#writablestreamdefaultcontroller)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`any`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSinkWriteCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSinkWriteCallback
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "W",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Callable
|
||||
|
||||
### UnderlyingSinkWriteCallback
|
||||
|
||||
▸ **UnderlyingSinkWriteCallback**(`chunk`, `controller`): `void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`W`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "controller",
|
||||
"type": "[`WritableStreamDefaultController`](../../admin_discounts/modules/admin_discounts.internal.mdx#writablestreamdefaultcontroller)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| PromiseLike<void\\>",
|
||||
"type": "`void` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\\>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSource
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSource
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cancel",
|
||||
"type": "[`UnderlyingSourceCancelCallback`](admin_discounts.internal.UnderlyingSourceCancelCallback.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "pull",
|
||||
"type": "[`UnderlyingSourcePullCallback`](admin_discounts.internal.UnderlyingSourcePullCallback.mdx)<`R`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "[`UnderlyingSourceStartCallback`](admin_discounts.internal.UnderlyingSourceStartCallback.mdx)<`R`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`undefined`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSourceCancelCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSourceCancelCallback
|
||||
|
||||
## Callable
|
||||
|
||||
### UnderlyingSourceCancelCallback
|
||||
|
||||
▸ **UnderlyingSourceCancelCallback**(`reason?`): `void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| PromiseLike<void\\>",
|
||||
"type": "`void` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\\>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSourcePullCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSourcePullCallback
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Callable
|
||||
|
||||
### UnderlyingSourcePullCallback
|
||||
|
||||
▸ **UnderlyingSourcePullCallback**(`controller`): `void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "controller",
|
||||
"type": "[`ReadableStreamController`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamcontroller)<`R`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| PromiseLike<void\\>",
|
||||
"type": "`void` \\| [`PromiseLike`](admin_discounts.internal.PromiseLike.mdx)<`void`\\>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UnderlyingSourceStartCallback
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UnderlyingSourceStartCallback
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Callable
|
||||
|
||||
### UnderlyingSourceStartCallback
|
||||
|
||||
▸ **UnderlyingSourceStartCallback**(`controller`): `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "controller",
|
||||
"type": "[`ReadableStreamController`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestreamcontroller)<`R`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`any`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# UpdateUserInput
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).UpdateUserInput
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "api_token",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "email",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "first_name",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "last_name",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "password_hash",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "role",
|
||||
"type": "[`UserRoles`](../enums/admin_auth.internal.UserRoles.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# WritableStream
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).WritableStream
|
||||
|
||||
This Streams API interface provides a standard abstraction for writing
|
||||
streaming data to a destination, known as a sink. This object comes with
|
||||
built-in back pressure and queuing.
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "W",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "locked",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### abort
|
||||
|
||||
▸ **abort**(`reason?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### close
|
||||
|
||||
▸ **close**(): `Promise`<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getWriter
|
||||
|
||||
▸ **getWriter**(): [`WritableStreamDefaultWriter`](../../admin_discounts/modules/admin_discounts.internal.mdx#writablestreamdefaultwriter)<`W`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`WritableStreamDefaultWriter`](../../admin_discounts/modules/admin_discounts.internal.mdx#writablestreamdefaultwriter)<`W`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "WritableStreamDefaultWriter",
|
||||
"type": "[`WritableStreamDefaultWriter`](../../admin_discounts/modules/admin_discounts.internal.mdx#writablestreamdefaultwriter)<`W`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+1192
File diff suppressed because it is too large.
Load diff
+48
@@ -0,0 +1,48 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# WritableStreamDefaultController
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).WritableStreamDefaultController
|
||||
|
||||
This Streams API interface represents a controller allowing control of a
|
||||
WritableStream's state. When constructing a WritableStream, the
|
||||
underlying sink is given a corresponding WritableStreamDefaultController
|
||||
instance to manipulate.
|
||||
|
||||
## Methods
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`e?`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# WritableStreamDefaultWriter
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).WritableStreamDefaultWriter
|
||||
|
||||
This Streams API interface is the object returned by
|
||||
WritableStream.getWriter() and once created locks the < writer to the
|
||||
WritableStream ensuring that no other streams can write to the underlying
|
||||
sink.
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "W",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "closed",
|
||||
"type": "`Promise`<`undefined`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "desiredSize",
|
||||
"type": "``null`` \\| `number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ready",
|
||||
"type": "`Promise`<`undefined`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### abort
|
||||
|
||||
▸ **abort**(`reason?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### close
|
||||
|
||||
▸ **close**(): `Promise`<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### releaseLock
|
||||
|
||||
▸ **releaseLock**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### write
|
||||
|
||||
▸ **write**(`chunk?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`W`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# \_DOMEventTarget
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx)._DOMEventTarget
|
||||
|
||||
## Methods
|
||||
|
||||
### addEventListener
|
||||
|
||||
▸ **addEventListener**(`eventName`, `listener`, `opts?`): `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "opts",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "opts.once",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`any`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# \_NodeEventTarget
|
||||
|
||||
[admin/discounts](../../modules/admin_discounts.mdx).[internal](../../admin_discounts/modules/admin_discounts.internal.mdx)._NodeEventTarget
|
||||
|
||||
## Methods
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`eventName`, `listener`): [`_NodeEventTarget`](admin_discounts.internal._NodeEventTarget.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "eventName",
|
||||
"type": "`string` \\| `symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "listener",
|
||||
"type": "(...`args`: `any`[]) => `void`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`_NodeEventTarget`](admin_discounts.internal._NodeEventTarget.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "_NodeEventTarget",
|
||||
"type": "[`_NodeEventTarget`](admin_discounts.internal._NodeEventTarget.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# CustomFindOptions
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).CustomFindOptions
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TModel",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "InKeys",
|
||||
"type": "keyof `TModel`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "order",
|
||||
"type": "`OrderByCondition`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "`FindOptionsSelect`<`TModel`\\> \\| `FindOptionsSelectByString`<`TModel`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "skip",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "take",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "where",
|
||||
"type": "`FindOptionsWhere`<`TModel`\\> & { [P in string \\| number \\| symbol]?: TModel[P][] } \\| `FindOptionsWhere`<`TModel`\\>[] & { [P in string \\| number \\| symbol]?: TModel[P][] }",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# FindConfig
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).FindConfig
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Entity",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "order",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "relations",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "keyof `Entity`[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "skip",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "take",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+684
@@ -0,0 +1,684 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# FulfillmentService
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).FulfillmentService
|
||||
|
||||
Fulfillment Provider interface
|
||||
Fullfillment provider plugin services should extend the AbstractFulfillmentService from this file
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractFulfillmentService`](../classes/admin_discounts.internal.internal.AbstractFulfillmentService.mdx)
|
||||
|
||||
## Methods
|
||||
|
||||
### calculatePrice
|
||||
|
||||
▸ **calculatePrice**(`optionData`, `data`, `cart`): `Promise`<`number`\>
|
||||
|
||||
Used to calculate a price for a given shipping option.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "optionData",
|
||||
"type": "[`ShippingOptionData`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingoptiondata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "cart",
|
||||
"type": "[`Cart`](../classes/admin_collections.internal.Cart.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`number`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### canCalculate
|
||||
|
||||
▸ **canCalculate**(`data`): `Promise`<`boolean`\>
|
||||
|
||||
Used to determine if a shipping option can have a calculated price
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`ShippingOptionData`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingoptiondata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`boolean`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`boolean`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
▸ **cancelFulfillment**(`fulfillmentData`): `Promise`<`any`\>
|
||||
|
||||
Cancel a fulfillment using data from the fulfillment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "fulfillmentData",
|
||||
"type": "[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
▸ **createFulfillment**(`data`, `items`, `order`, `fulfillment`): `Promise`<[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)\>
|
||||
|
||||
Create a fulfillment using data from shipping method, line items, and fulfillment. All from the order.
|
||||
The returned value of this method will populate the `fulfillment.data` field.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`ShippingMethodData`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethoddata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "items",
|
||||
"type": "[`LineItem`](../classes/admin_collections.internal.LineItem.mdx)[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"type": "[`Order`](../classes/admin_collections.internal.Order.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "fulfillment",
|
||||
"type": "[`Fulfillment`](../classes/admin_collections.internal.Fulfillment.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "FulfillmentProviderData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### createReturn
|
||||
|
||||
▸ **createReturn**(`returnOrder`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
Used to create a return order. Should return the data necessary for future
|
||||
operations on the return; in particular the data may be used to receive
|
||||
documents attached to the return.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "returnOrder",
|
||||
"type": "[`CreateReturnType`](../../admin_discounts/modules/admin_discounts.internal.mdx#createreturntype)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getFulfillmentDocuments
|
||||
|
||||
▸ **getFulfillmentDocuments**(`data`): `Promise`<`any`\>
|
||||
|
||||
Used to retrieve documents associated with a fulfillment.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getFulfillmentOptions
|
||||
|
||||
▸ **getFulfillmentOptions**(): `Promise`<`any`[]\>
|
||||
|
||||
Called before a shipping option is created in Admin. The method should
|
||||
return all of the options that the fulfillment provider can be used with,
|
||||
and it is here the distinction between different shipping options are
|
||||
enforced. For example, a fulfillment provider may offer Standard Shipping
|
||||
and Express Shipping as fulfillment options, it is up to the store operator
|
||||
to create shipping options in Medusa that are offered to the customer.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`[]\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`any`[]\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any[]",
|
||||
"type": "`any`[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getIdentifier
|
||||
|
||||
▸ **getIdentifier**(): `string`
|
||||
|
||||
Return a unique identifier to retrieve the fulfillment plugin provider
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getReturnDocuments
|
||||
|
||||
▸ **getReturnDocuments**(`data`): `Promise`<`any`\>
|
||||
|
||||
Used to retrieve documents related to a return order.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getShipmentDocuments
|
||||
|
||||
▸ **getShipmentDocuments**(`data`): `Promise`<`any`\>
|
||||
|
||||
Used to retrieve documents related to a shipment.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### retrieveDocuments
|
||||
|
||||
▸ **retrieveDocuments**(`fulfillmentData`, `documentType`): `Promise`<`any`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "fulfillmentData",
|
||||
"type": "[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "documentType",
|
||||
"type": "``\"label\"`` \\| ``\"invoice\"``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`any`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "any",
|
||||
"type": "`any`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### validateFulfillmentData
|
||||
|
||||
▸ **validateFulfillmentData**(`optionData`, `data`, `cart`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
Called before a shipping method is set on a cart to ensure that the data
|
||||
sent with the shipping method is valid. The data object may contain extra
|
||||
data about the shipment such as an id of a drop point. It is up to the
|
||||
fulfillment provider to enforce that the correct data is being sent
|
||||
through.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "optionData",
|
||||
"type": "[`ShippingOptionData`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingoptiondata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "cart",
|
||||
"type": "[`Cart`](../classes/admin_collections.internal.Cart.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the data to populate `cart.shipping_methods.$.data` this\n is usually important for future actions like generating shipping labels",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "unknown",
|
||||
"type": "`unknown`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### validateOption
|
||||
|
||||
▸ **validateOption**(`data`): `Promise`<`boolean`\>
|
||||
|
||||
Called before a shipping option is created in Admin. Use this to ensure
|
||||
that a fulfillment option does in fact exist.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "[`ShippingOptionData`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingoptiondata)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`boolean`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`boolean`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+393
@@ -0,0 +1,393 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IBatchJobStrategy
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).IBatchJobStrategy
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractBatchJobStrategy`](../classes/admin_discounts.internal.internal.AbstractBatchJobStrategy.mdx)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__configModule__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__container__",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__moduleDeclaration__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager_",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager_",
|
||||
"type": "`undefined` \\| `EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Accessors
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
`EntityManager`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EntityManager",
|
||||
"type": "`EntityManager`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.activeManager\_
|
||||
|
||||
## Methods
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
|
||||
Wraps some work within a transactional block. If the service already has
|
||||
a transaction manager attached this will be reused, otherwise a new
|
||||
transaction manager is created.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TError",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "work",
|
||||
"type": "(`transactionManager`: `EntityManager`) => `Promise`<`TResult`\\>",
|
||||
"description": "the transactional work to be done",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationOrErrorHandler",
|
||||
"type": "`IsolationLevel` \\| (`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
||||
"description": "the isolation level to be used for the work.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maybeErrorHandlerOrDontFail",
|
||||
"type": "(`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
||||
"description": "Potential error handler",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`TResult`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`TResult`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the transactional work",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[atomicPhase_](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#atomicphase_)
|
||||
|
||||
___
|
||||
|
||||
### buildTemplate
|
||||
|
||||
▸ **buildTemplate**(): `Promise`<`string`\>
|
||||
|
||||
Builds and returns a template file that can be downloaded and filled in
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`string`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### preProcessBatchJob
|
||||
|
||||
▸ **preProcessBatchJob**(`batchJobId`): `Promise`<`void`\>
|
||||
|
||||
Method for pre-processing a batch job
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "batchJobId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### prepareBatchJobForProcessing
|
||||
|
||||
▸ **prepareBatchJobForProcessing**(`batchJobEntity`, `req`): `Promise`<[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)\>
|
||||
|
||||
Method for preparing a batch job for processing
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "batchJobEntity",
|
||||
"type": "[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "req",
|
||||
"type": "`Request`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "CreateBatchJobInput",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### processJob
|
||||
|
||||
▸ **processJob**(`batchJobId`): `Promise`<`void`\>
|
||||
|
||||
Method does the actual processing of the job. Should report back on the progress of the operation.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "batchJobId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "err",
|
||||
"type": "Record<`string`, `unknown`\\> \\| { `code`: `string` }",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[shouldRetryTransaction_](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#shouldretrytransaction_)
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`IBatchJobStrategy`](admin_discounts.internal.internal.IBatchJobStrategy.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IBatchJobStrategy`](admin_discounts.internal.internal.IBatchJobStrategy.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IBatchJobStrategy",
|
||||
"type": "[`IBatchJobStrategy`](admin_discounts.internal.internal.IBatchJobStrategy.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[withTransaction](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#withtransaction)
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ICartCompletionStrategy
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).ICartCompletionStrategy
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractCartCompletionStrategy`](../classes/admin_discounts.internal.internal.AbstractCartCompletionStrategy.mdx)
|
||||
|
||||
## Methods
|
||||
|
||||
### complete
|
||||
|
||||
▸ **complete**(`cartId`, `idempotencyKey`, `context`): `Promise`<[`CartCompletionResponse`](../modules/admin_discounts.internal.internal.mdx#cartcompletionresponse)\>
|
||||
|
||||
Takes a cart id and completes the cart. This for example takes place when
|
||||
creating an order or confirming a swap.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cartId",
|
||||
"type": "`string`",
|
||||
"description": "the id of the Cart to complete.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "idempotencyKey",
|
||||
"type": "[`IdempotencyKey`](../classes/admin_discounts.internal.internal.IdempotencyKey.mdx)",
|
||||
"description": "the idempotency key for the request",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`RequestContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#requestcontext)",
|
||||
"description": "the request context for the completion request",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CartCompletionResponse`](../modules/admin_discounts.internal.internal.mdx#cartcompletionresponse)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`CartCompletionResponse`](../modules/admin_discounts.internal.internal.mdx#cartcompletionresponse)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the response for the completion request",
|
||||
"children": [
|
||||
{
|
||||
"name": "CartCompletionResponse",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+497
@@ -0,0 +1,497 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IFileService
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).IFileService
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractFileService`](../classes/admin_discounts.internal.internal.AbstractFileService.mdx)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__configModule__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__container__",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__moduleDeclaration__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager_",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager_",
|
||||
"type": "`undefined` \\| `EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Accessors
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
`EntityManager`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EntityManager",
|
||||
"type": "`EntityManager`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.activeManager\_
|
||||
|
||||
## Methods
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
|
||||
Wraps some work within a transactional block. If the service already has
|
||||
a transaction manager attached this will be reused, otherwise a new
|
||||
transaction manager is created.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TError",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "work",
|
||||
"type": "(`transactionManager`: `EntityManager`) => `Promise`<`TResult`\\>",
|
||||
"description": "the transactional work to be done",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationOrErrorHandler",
|
||||
"type": "`IsolationLevel` \\| (`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
||||
"description": "the isolation level to be used for the work.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maybeErrorHandlerOrDontFail",
|
||||
"type": "(`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
||||
"description": "Potential error handler",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`TResult`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`TResult`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the transactional work",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[atomicPhase_](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#atomicphase_)
|
||||
|
||||
___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`fileData`): `Promise`<`void`\>
|
||||
|
||||
remove file from fileservice
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "fileData",
|
||||
"type": "[`DeleteFileType`](../../admin_discounts/modules/admin_discounts.internal.mdx#deletefiletype)",
|
||||
"description": "Remove file described by record",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getDownloadStream
|
||||
|
||||
▸ **getDownloadStream**(`fileData`): `Promise`<[`ReadableStream`](admin_discounts.internal.ReadableStream.mdx)\>
|
||||
|
||||
download file from fileservice as stream
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "fileData",
|
||||
"type": "[`GetUploadedFileType`](../../admin_discounts/modules/admin_discounts.internal.mdx#getuploadedfiletype)",
|
||||
"description": "file metadata relevant for fileservice to download the file",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ReadableStream`](admin_discounts.internal.ReadableStream.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ReadableStream`](admin_discounts.internal.ReadableStream.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "readable stream of the file to download",
|
||||
"children": [
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](admin_discounts.internal.ReadableStream.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getPresignedDownloadUrl
|
||||
|
||||
▸ **getPresignedDownloadUrl**(`fileData`): `Promise`<`string`\>
|
||||
|
||||
Generate a presigned download url to obtain a file
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "fileData",
|
||||
"type": "[`GetUploadedFileType`](../../admin_discounts/modules/admin_discounts.internal.mdx#getuploadedfiletype)",
|
||||
"description": "file metadata relevant for fileservice to download the file",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`string`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "presigned url to download the file",
|
||||
"children": [
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getUploadStreamDescriptor
|
||||
|
||||
▸ **getUploadStreamDescriptor**(`fileData`): `Promise`<[`FileServiceGetUploadStreamResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileservicegetuploadstreamresult)\>
|
||||
|
||||
upload file to fileservice from stream
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "fileData",
|
||||
"type": "[`UploadStreamDescriptorType`](../../admin_discounts/modules/admin_discounts.internal.mdx#uploadstreamdescriptortype)",
|
||||
"description": "file metadata relevant for fileservice to create and upload the file",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FileServiceGetUploadStreamResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileservicegetuploadstreamresult)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`FileServiceGetUploadStreamResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileservicegetuploadstreamresult)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "FileServiceGetUploadStreamResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "err",
|
||||
"type": "Record<`string`, `unknown`\\> \\| { `code`: `string` }",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[shouldRetryTransaction_](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#shouldretrytransaction_)
|
||||
|
||||
___
|
||||
|
||||
### upload
|
||||
|
||||
▸ **upload**(`file`): `Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
|
||||
upload file to fileservice
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "file",
|
||||
"type": "`File`",
|
||||
"description": "Multer file from express multipart/form-data",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "FileServiceUploadResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### uploadProtected
|
||||
|
||||
▸ **uploadProtected**(`file`): `Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
|
||||
upload private file to fileservice
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "file",
|
||||
"type": "`File`",
|
||||
"description": "Multer file from express multipart/form-data",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "FileServiceUploadResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`IFileService`](admin_discounts.internal.internal.IFileService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IFileService`](admin_discounts.internal.internal.IFileService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IFileService",
|
||||
"type": "[`IFileService`](admin_discounts.internal.internal.IFileService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[withTransaction](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#withtransaction)
|
||||
+354
@@ -0,0 +1,354 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# INotificationService
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).INotificationService
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractNotificationService`](../classes/admin_discounts.internal.internal.AbstractNotificationService.mdx)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__configModule__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__container__",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__moduleDeclaration__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager_",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager_",
|
||||
"type": "`undefined` \\| `EntityManager`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Accessors
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
`EntityManager`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EntityManager",
|
||||
"type": "`EntityManager`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.activeManager\_
|
||||
|
||||
## Methods
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
|
||||
Wraps some work within a transactional block. If the service already has
|
||||
a transaction manager attached this will be reused, otherwise a new
|
||||
transaction manager is created.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TError",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "work",
|
||||
"type": "(`transactionManager`: `EntityManager`) => `Promise`<`TResult`\\>",
|
||||
"description": "the transactional work to be done",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationOrErrorHandler",
|
||||
"type": "`IsolationLevel` \\| (`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
||||
"description": "the isolation level to be used for the work.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maybeErrorHandlerOrDontFail",
|
||||
"type": "(`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
||||
"description": "Potential error handler",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`TResult`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`TResult`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the transactional work",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[atomicPhase_](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#atomicphase_)
|
||||
|
||||
___
|
||||
|
||||
### resendNotification
|
||||
|
||||
▸ **resendNotification**(`notification`, `config`, `attachmentGenerator`): `Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "notification",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "attachmentGenerator",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "ReturnedData",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### sendNotification
|
||||
|
||||
▸ **sendNotification**(`event`, `data`, `attachmentGenerator`): `Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "event",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "attachmentGenerator",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "ReturnedData",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "err",
|
||||
"type": "Record<`string`, `unknown`\\> \\| { `code`: `string` }",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[shouldRetryTransaction_](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#shouldretrytransaction_)
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`INotificationService`](admin_discounts.internal.internal.INotificationService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`INotificationService`](admin_discounts.internal.internal.INotificationService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "INotificationService",
|
||||
"type": "[`INotificationService`](admin_discounts.internal.internal.INotificationService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TransactionBaseService](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx).[withTransaction](../classes/admin_discounts.internal.internal.TransactionBaseService.mdx#withtransaction)
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IPriceSelectionStrategy
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).IPriceSelectionStrategy
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractPriceSelectionStrategy`](../classes/admin_discounts.internal.internal.AbstractPriceSelectionStrategy.mdx)
|
||||
|
||||
## Methods
|
||||
|
||||
### calculateVariantPrice
|
||||
|
||||
▸ **calculateVariantPrice**(`data`, `context`): `Promise`<`Map`<`string`, [`PriceSelectionResult`](../modules/admin_discounts.internal.internal.mdx#priceselectionresult)\>\>
|
||||
|
||||
Calculate the original and discount price for a given variant in a set of
|
||||
circumstances described in the context.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "data",
|
||||
"type": "{ `quantity?`: `number` ; `variantId`: `string` }[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`PriceSelectionContext`](../modules/admin_discounts.internal.internal.mdx#priceselectioncontext)",
|
||||
"description": "Details relevant to determine the correct pricing of the variant",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Map`<`string`, [`PriceSelectionResult`](../modules/admin_discounts.internal.internal.mdx#priceselectionresult)\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`Map`<`string`, [`PriceSelectionResult`](../modules/admin_discounts.internal.internal.mdx#priceselectionresult)\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "pricing details in an object containing the calculated lowest price,\nthe default price an all valid prices for the given variant",
|
||||
"children": [
|
||||
{
|
||||
"name": "Map",
|
||||
"type": "`Map`<`string`, [`PriceSelectionResult`](../modules/admin_discounts.internal.internal.mdx#priceselectionresult)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "PriceSelectionResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### onVariantsPricesUpdate
|
||||
|
||||
▸ **onVariantsPricesUpdate**(`variantIds`): `Promise`<`void`\>
|
||||
|
||||
Notify price selection strategy that variants prices have been updated.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "variantIds",
|
||||
"type": "`string`[]",
|
||||
"description": "The ids of the updated variants",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`IPriceSelectionStrategy`](admin_discounts.internal.internal.IPriceSelectionStrategy.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`IPriceSelectionStrategy`](admin_discounts.internal.internal.IPriceSelectionStrategy.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "IPriceSelectionStrategy",
|
||||
"type": "[`IPriceSelectionStrategy`](admin_discounts.internal.internal.IPriceSelectionStrategy.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[ITransactionBaseService](admin_discounts.internal.ITransactionBaseService.mdx).[withTransaction](admin_discounts.internal.ITransactionBaseService.mdx#withtransaction)
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ITaxCalculationStrategy
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).ITaxCalculationStrategy
|
||||
|
||||
## Methods
|
||||
|
||||
### calculate
|
||||
|
||||
▸ **calculate**(`items`, `taxLines`, `calculationContext`): `Promise`<`number`\>
|
||||
|
||||
Calculates the tax amount for a given set of line items under applicable
|
||||
tax conditions and calculation contexts.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "items",
|
||||
"type": "[`LineItem`](../classes/admin_collections.internal.LineItem.mdx)[]",
|
||||
"description": "the line items to calculate the tax total for",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "taxLines",
|
||||
"type": "([`ShippingMethodTaxLine`](../classes/admin_collections.internal.ShippingMethodTaxLine.mdx) \\| [`LineItemTaxLine`](../classes/admin_collections.internal.LineItemTaxLine.mdx))[]",
|
||||
"description": "the tax lines that applies to the calculation",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "calculationContext",
|
||||
"type": "[`TaxCalculationContext`](../modules/admin_discounts.internal.internal.mdx#taxcalculationcontext)",
|
||||
"description": "other details relevant for the calculation",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`number`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the tax total",
|
||||
"children": [
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ITaxService
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).ITaxService
|
||||
|
||||
Interface to be implemented by tax provider plugins. The interface defines a
|
||||
single method `getTaxLines` that returns numerical rates to apply to line
|
||||
items and shipping methods.
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractTaxService`](../classes/admin_discounts.internal.internal.AbstractTaxService.mdx)
|
||||
|
||||
## Methods
|
||||
|
||||
### getTaxLines
|
||||
|
||||
▸ **getTaxLines**(`itemLines`, `shippingLines`, `context`): `Promise`<[`ProviderTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providertaxline)[]\>
|
||||
|
||||
Retrieves the numerical tax lines for a calculation context.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "itemLines",
|
||||
"type": "[`ItemTaxCalculationLine`](../modules/admin_discounts.internal.internal.mdx#itemtaxcalculationline)[]",
|
||||
"description": "the line item calculation lines",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "shippingLines",
|
||||
"type": "[`ShippingTaxCalculationLine`](../modules/admin_discounts.internal.internal.mdx#shippingtaxcalculationline)[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`TaxCalculationContext`](../modules/admin_discounts.internal.internal.mdx#taxcalculationcontext)",
|
||||
"description": "other details relevant to the tax determination",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ProviderTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providertaxline)[]\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ProviderTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providertaxline)[]\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "numerical tax rates that should apply to the provided calculation\n lines",
|
||||
"children": [
|
||||
{
|
||||
"name": "ProviderTaxLine[]",
|
||||
"type": "[`ProviderTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providertaxline)[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "ProviderTaxLine",
|
||||
"type": "[`ProviderLineItemTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providerlineitemtaxline) \\| [`ProviderShippingMethodTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providershippingmethodtaxline)",
|
||||
"description": "A union type of the possible provider tax lines.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+545
@@ -0,0 +1,545 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# PaymentProcessor
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).PaymentProcessor
|
||||
|
||||
The new payment service plugin interface
|
||||
This work is still experimental and can be changed until it becomes stable
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`AbstractPaymentProcessor`](../classes/admin_discounts.internal.internal.AbstractPaymentProcessor.mdx)
|
||||
|
||||
## Methods
|
||||
|
||||
### authorizePayment
|
||||
|
||||
▸ **authorizePayment**(`paymentSessionData`, `context`): `Promise`<[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \| { `data`: Record<`string`, `unknown`\> ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }\>
|
||||
|
||||
Authorize an existing session if it is not already authorized
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "paymentSessionData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \| { `data`: Record<`string`, `unknown`\> ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \\| { `data`: Record<`string`, `unknown`\\> ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "PaymentProcessorError \\| { `data`: Record<`string`, `unknown`\\> ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }",
|
||||
"type": "[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \\| { `data`: Record<`string`, `unknown`\\> ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### cancelPayment
|
||||
|
||||
▸ **cancelPayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Cancel an existing session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "paymentSessionData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record<string, unknown\\> \\| PaymentProcessorError",
|
||||
"type": "Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### capturePayment
|
||||
|
||||
▸ **capturePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Capture an existing session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "paymentSessionData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record<string, unknown\\> \\| PaymentProcessorError",
|
||||
"type": "Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### deletePayment
|
||||
|
||||
▸ **deletePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Delete an existing session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "paymentSessionData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record<string, unknown\\> \\| PaymentProcessorError",
|
||||
"type": "Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getIdentifier
|
||||
|
||||
▸ **getIdentifier**(): `string`
|
||||
|
||||
Return a unique identifier to retrieve the payment plugin provider
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getPaymentStatus
|
||||
|
||||
▸ **getPaymentStatus**(`paymentSessionData`): `Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
|
||||
Return the status of the session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "paymentSessionData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "AUTHORIZED",
|
||||
"type": "``\"authorized\"``",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "CANCELED",
|
||||
"type": "``\"canceled\"``",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ERROR",
|
||||
"type": "``\"error\"``",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "PENDING",
|
||||
"type": "``\"pending\"``",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REQUIRES_MORE",
|
||||
"type": "``\"requires_more\"``",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### initiatePayment
|
||||
|
||||
▸ **initiatePayment**(`context`): `Promise`<[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
|
||||
Initiate a payment session with the external provider
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`PaymentProcessorContext`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorcontext)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \\| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "PaymentProcessorError \\| PaymentProcessorSessionResponse",
|
||||
"type": "[`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \\| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### refundPayment
|
||||
|
||||
▸ **refundPayment**(`paymentSessionData`, `refundAmount`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Refund an existing session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "paymentSessionData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "refundAmount",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record<string, unknown\\> \\| PaymentProcessorError",
|
||||
"type": "Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### retrievePayment
|
||||
|
||||
▸ **retrievePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Retrieve an existing session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "paymentSessionData",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record<string, unknown\\> \\| PaymentProcessorError",
|
||||
"type": "Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### updatePayment
|
||||
|
||||
▸ **updatePayment**(`context`): `Promise`<`void` \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
|
||||
Update an existing payment session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[`PaymentProcessorContext`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorcontext)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void` \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void` \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \\| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "void \\| PaymentProcessorError \\| PaymentProcessorSessionResponse",
|
||||
"type": "`void` \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx) \\| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### updatePaymentData
|
||||
|
||||
▸ **updatePaymentData**(`sessionId`, `data`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Update the session data for a payment session
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "sessionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Record<string, unknown\\> \\| PaymentProcessorError",
|
||||
"type": "Record<`string`, `unknown`\\> \\| [`PaymentProcessorError`](admin_discounts.internal.internal.PaymentProcessorError.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# PaymentProcessorError
|
||||
|
||||
[internal](../../admin_discounts/modules/admin_discounts.internal.mdx).[internal](../modules/admin_discounts.internal.internal.mdx).PaymentProcessorError
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "code",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "detail",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+1007
File diff suppressed because it is too large.
Load diff
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# BlobPropertyBag
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).BlobPropertyBag
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "endings",
|
||||
"type": "[`EndingType`](../../admin_uploads/modules/admin_uploads.internal.mdx#endingtype)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# File
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).File
|
||||
|
||||
Provides information about files and allows JavaScript in a web page to access their content.
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "lastModified",
|
||||
"type": "`number`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "prototype",
|
||||
"type": "`Blob`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"type": "`number`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`string`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "webkitRelativePath",
|
||||
"type": "`string`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### arrayBuffer
|
||||
|
||||
▸ **arrayBuffer**(): `Promise`<`ArrayBuffer`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`ArrayBuffer`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`ArrayBuffer`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Blob.arrayBuffer
|
||||
|
||||
___
|
||||
|
||||
### slice
|
||||
|
||||
▸ **slice**(`start?`, `end?`, `contentType?`): `Blob`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "start",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "end",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "contentType",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Blob`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Blob",
|
||||
"type": "`Blob`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Blob.slice
|
||||
|
||||
___
|
||||
|
||||
### stream
|
||||
|
||||
▸ **stream**(): [`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`Uint8Array`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`Uint8Array`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`Uint8Array`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "Uint8Array",
|
||||
"type": "`Uint8Array`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Blob.stream
|
||||
|
||||
___
|
||||
|
||||
### text
|
||||
|
||||
▸ **text**(): `Promise`<`string`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`string`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Blob.text
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# FilePropertyBag
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).FilePropertyBag
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "endings",
|
||||
"type": "[`EndingType`](../../admin_uploads/modules/admin_uploads.internal.mdx#endingtype)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "lastModified",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# QueuingStrategy
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).QueuingStrategy
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "highWaterMark",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"type": "[`QueuingStrategySize`](admin_uploads.internal.QueuingStrategySize.mdx)<`T`\\>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# QueuingStrategySize
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).QueuingStrategySize
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Callable
|
||||
|
||||
### QueuingStrategySize
|
||||
|
||||
▸ **QueuingStrategySize**(`chunk`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "number",
|
||||
"type": "`number`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableByteStreamController
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).ReadableByteStreamController
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "byobRequest",
|
||||
"type": "``null`` \\| [`ReadableStreamBYOBRequest`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreambyobrequest)",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "desiredSize",
|
||||
"type": "``null`` \\| `number`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### close
|
||||
|
||||
▸ **close**(): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### enqueue
|
||||
|
||||
▸ **enqueue**(`chunk`): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "[`ArrayBufferView`](admin_discounts.internal.ArrayBufferView.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`e?`): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+305
@@ -0,0 +1,305 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStream
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).ReadableStream
|
||||
|
||||
This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "locked",
|
||||
"type": "`boolean`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`reason?`): `Promise`<`void`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### getReader
|
||||
|
||||
▸ **getReader**(`options`): [`ReadableStreamBYOBReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreambyobreader)
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options.mode",
|
||||
"type": "``\"byob\"``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReadableStreamBYOBReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreambyobreader)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReadableStreamBYOBReader",
|
||||
"type": "(`stream`: [`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`any`\\>) => [`ReadableStreamBYOBReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreambyobreader)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **getReader**(): [`ReadableStreamDefaultReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamdefaultreader)<`R`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReadableStreamDefaultReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamdefaultreader)<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReadableStreamDefaultReader",
|
||||
"type": "[`ReadableStreamDefaultReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamdefaultreader)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **getReader**(`options?`): [`ReadableStreamReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamreader)<`R`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "options",
|
||||
"type": "[`ReadableStreamGetReaderOptions`](admin_uploads.internal.ReadableStreamGetReaderOptions.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReadableStreamReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamreader)<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReadableStreamReader",
|
||||
"type": "[`ReadableStreamReader`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamreader)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### pipeThrough
|
||||
|
||||
▸ **pipeThrough**<`T`\>(`transform`, `options?`): [`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`T`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transform",
|
||||
"type": "[`ReadableWritablePair`](admin_uploads.internal.ReadableWritablePair.mdx)<`T`, `R`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "[`StreamPipeOptions`](admin_uploads.internal.StreamPipeOptions.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`T`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`T`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### pipeTo
|
||||
|
||||
▸ **pipeTo**(`destination`, `options?`): `Promise`<`void`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "destination",
|
||||
"type": "[`WritableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#writablestream)<`R`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "[`StreamPipeOptions`](admin_uploads.internal.StreamPipeOptions.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### tee
|
||||
|
||||
▸ **tee**(): [[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\>, [`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\>]
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
||||
|
||||
#### Returns
|
||||
|
||||
[[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\>, [`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\>]
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "[[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\\>, [`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\\>]",
|
||||
"type": "[[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\\>, [`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\\>]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ReadableStream",
|
||||
"type": "[`ReadableStream`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestream)<`R`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamBYOBReader
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).ReadableStreamBYOBReader
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "closed",
|
||||
"type": "`Promise`<`undefined`\\>",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`reason?`): `Promise`<`void`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "reason",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[ReadableStreamGenericReader](admin_uploads.internal.ReadableStreamGenericReader.mdx).[cancel](admin_uploads.internal.ReadableStreamGenericReader.mdx#cancel)
|
||||
|
||||
___
|
||||
|
||||
### read
|
||||
|
||||
▸ **read**<`T`\>(`view`): `Promise`<[`ReadableStreamReadResult`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamreadresult)<`T`\>\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "[`ArrayBufferView`](admin_discounts.internal.ArrayBufferView.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "view",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ReadableStreamReadResult`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamreadresult)<`T`\>\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ReadableStreamReadResult`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamreadresult)<`T`\\>\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "ReadableStreamReadResult",
|
||||
"type": "[`ReadableStreamReadResult`](../../admin_uploads/modules/admin_uploads.internal.mdx#readablestreamreadresult)<`T`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### releaseLock
|
||||
|
||||
▸ **releaseLock**(): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamBYOBRequest
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).ReadableStreamBYOBRequest
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "view",
|
||||
"type": "``null`` \\| [`ArrayBufferView`](admin_discounts.internal.ArrayBufferView.mdx)",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### respond
|
||||
|
||||
▸ **respond**(`bytesWritten`): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "bytesWritten",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### respondWithNewView
|
||||
|
||||
▸ **respondWithNewView**(`view`): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "view",
|
||||
"type": "[`ArrayBufferView`](admin_discounts.internal.ArrayBufferView.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReadableStreamDefaultController
|
||||
|
||||
[admin/uploads](../../modules/admin_uploads.mdx).[internal](../../admin_uploads/modules/admin_uploads.internal.mdx).ReadableStreamDefaultController
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "R",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "desiredSize",
|
||||
"type": "``null`` \\| `number`",
|
||||
"description": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### close
|
||||
|
||||
▸ **close**(): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### enqueue
|
||||
|
||||
▸ **enqueue**(`chunk?`): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "chunk",
|
||||
"type": "`R`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`e?`): `void`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "e",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
Loaded 100 of 1604 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user