Skip to content

Commit

Permalink
docs: Add some extra docs country, regenerate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Feb 28, 2024
1 parent 355df0e commit 1bd5e8a
Show file tree
Hide file tree
Showing 26 changed files with 32,432 additions and 22,480 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription';

## ElasticsearchOptions

<GenerationInfo sourceFile="packages/elasticsearch-plugin/src/options.ts" sourceLine="30" packageName="@vendure/elasticsearch-plugin" />
<GenerationInfo sourceFile="packages/elasticsearch-plugin/src/options.ts" sourceLine="29" packageName="@vendure/elasticsearch-plugin" />

Configuration options for the <a href='/reference/core-plugins/elasticsearch-plugin/#elasticsearchplugin'>ElasticsearchPlugin</a>.

Expand All @@ -27,7 +27,8 @@ interface ElasticsearchOptions {
indexMappingProperties?: {
[indexName: string]: object;
};
batchSize?: number;
reindexProductsChunkSize?: number;
reindexBulkOperationSizeLimit?: number;
searchConfig?: SearchConfig;
customProductMappings?: {
[fieldName: string]: CustomMapping<[Product, ProductVariant[], LanguageCode, Injector]>;
Expand Down Expand Up @@ -157,11 +158,18 @@ indexMappingProperties: {
}
}
```
### batchSize
### reindexProductsChunkSize

<MemberInfo kind="property" type={`number`} default="2000" />
<MemberInfo kind="property" type={`number`} default="2500" since="2.1.7" />

Batch size for bulk operations (e.g. when rebuilding the indices).
Products limit chunk size for each loop iteration when indexing products.
### reindexBulkOperationSizeLimit

<MemberInfo kind="property" type={`number`} default="3000" since="2.1.7" />

Index operations are performed in bulk, with each bulk operation containing a number of individual
index operations. This option sets the maximum number of operations in the memory buffer before a
bulk operation is executed.
### searchConfig

<MemberInfo kind="property" type={`<a href='/reference/core-plugins/elasticsearch-plugin/elasticsearch-options#searchconfig'>SearchConfig</a>`} />
Expand Down Expand Up @@ -364,7 +372,7 @@ extend input SearchResultSortParameter {

## SearchConfig

<GenerationInfo sourceFile="packages/elasticsearch-plugin/src/options.ts" sourceLine="385" packageName="@vendure/elasticsearch-plugin" />
<GenerationInfo sourceFile="packages/elasticsearch-plugin/src/options.ts" sourceLine="394" packageName="@vendure/elasticsearch-plugin" />

Configuration options for the internal Elasticsearch query which is generated when performing a search.

Expand Down Expand Up @@ -645,7 +653,7 @@ searchConfig: {

## BoostFieldsConfig

<GenerationInfo sourceFile="packages/elasticsearch-plugin/src/options.ts" sourceLine="670" packageName="@vendure/elasticsearch-plugin" />
<GenerationInfo sourceFile="packages/elasticsearch-plugin/src/options.ts" sourceLine="679" packageName="@vendure/elasticsearch-plugin" />

Configuration for [boosting](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#field-boost)
the scores of given fields when performing a search against a term.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Configuration for the EmailPlugin.
interface EmailPluginOptions {
templatePath?: string;
templateLoader?: TemplateLoader;
transport:
| EmailTransportOptions
| ((
injector?: Injector,
ctx?: RequestContext,
transport:
| EmailTransportOptions
| ((
injector?: Injector,
ctx?: RequestContext,
) => EmailTransportOptions | Promise<EmailTransportOptions>);
handlers: Array<EmailEventHandler<string, any>>;
globalTemplateVars?: { [key: string]: any };
Expand All @@ -38,43 +38,43 @@ interface EmailPluginOptions {

<MemberInfo kind="property" type={`string`} />

The path to the location of the email templates. In a default Vendure installation,
The path to the location of the email templates. In a default Vendure installation,
the templates are installed to `<project root>/vendure/email/templates`.
### templateLoader

<MemberInfo kind="property" type={`<a href='/reference/core-plugins/email-plugin/template-loader#templateloader'>TemplateLoader</a>`} since="2.0.0" />

An optional TemplateLoader which can be used to load templates from a custom location or async service.
An optional TemplateLoader which can be used to load templates from a custom location or async service.
The default uses the FileBasedTemplateLoader which loads templates from `<project root>/vendure/email/templates`
### transport

<MemberInfo kind="property" type={`| <a href='/reference/core-plugins/email-plugin/transport-options#emailtransportoptions'>EmailTransportOptions</a> | (( injector?: <a href='/reference/typescript-api/common/injector#injector'>Injector</a>, ctx?: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, ) =&#62; <a href='/reference/core-plugins/email-plugin/transport-options#emailtransportoptions'>EmailTransportOptions</a> | Promise&#60;<a href='/reference/core-plugins/email-plugin/transport-options#emailtransportoptions'>EmailTransportOptions</a>&#62;)`} />
<MemberInfo kind="property" type={`| <a href='/reference/core-plugins/email-plugin/transport-options#emailtransportoptions'>EmailTransportOptions</a> | (( injector?: <a href='/reference/typescript-api/common/injector#injector'>Injector</a>, ctx?: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, ) =&#62; <a href='/reference/core-plugins/email-plugin/transport-options#emailtransportoptions'>EmailTransportOptions</a> | Promise&#60;<a href='/reference/core-plugins/email-plugin/transport-options#emailtransportoptions'>EmailTransportOptions</a>&#62;)`} />

Configures how the emails are sent.
### handlers

<MemberInfo kind="property" type={`Array&#60;<a href='/reference/core-plugins/email-plugin/email-event-handler#emaileventhandler'>EmailEventHandler</a>&#60;string, any&#62;&#62;`} />

An array of <a href='/reference/core-plugins/email-plugin/email-event-handler#emaileventhandler'>EmailEventHandler</a>s which define which Vendure events will trigger
An array of <a href='/reference/core-plugins/email-plugin/email-event-handler#emaileventhandler'>EmailEventHandler</a>s which define which Vendure events will trigger
emails, and how those emails are generated.
### globalTemplateVars

<MemberInfo kind="property" type={`{ [key: string]: any }`} />

An object containing variables which are made available to all templates. For example,
the storefront URL could be defined here and then used in the "email address verification"
An object containing variables which are made available to all templates. For example,
the storefront URL could be defined here and then used in the "email address verification"
email.
### emailSender

<MemberInfo kind="property" type={`<a href='/reference/core-plugins/email-plugin/email-sender#emailsender'>EmailSender</a>`} default="<a href='/reference/core-plugins/email-plugin/email-sender#nodemaileremailsender'>NodemailerEmailSender</a>" />

An optional allowed EmailSender, used to allow custom implementations of the send functionality
An optional allowed EmailSender, used to allow custom implementations of the send functionality
while still utilizing the existing emailPlugin functionality.
### emailGenerator

<MemberInfo kind="property" type={`<a href='/reference/core-plugins/email-plugin/email-generator#emailgenerator'>EmailGenerator</a>`} default="<a href='/reference/core-plugins/email-plugin/email-generator#handlebarsmjmlgenerator'>HandlebarsMjmlGenerator</a>" />

An optional allowed EmailGenerator, used to allow custom email generation functionality to
An optional allowed EmailGenerator, used to allow custom email generation functionality to
better match with custom email sending functionality.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export const config: VendureConfig = {
}),
],
};
```

Note: If the `paymentIntentCreateParams` is also used and returns a `metadata` key, then the values
returned by both functions will be merged.
Expand Down
22 changes: 22 additions & 0 deletions docs/docs/reference/graphql-api/admin/input-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,17 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CreateAddressInput

<div class="graphql-code-block">
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level comment">Input used to create an Address.</div>

<div class="graphql-code-line top-level comment"></div>

<div class="graphql-code-line top-level comment">The countryCode must correspond to a <code>code</code> property of a Country that has been defined in the</div>

<div class="graphql-code-line top-level comment">Vendure server. The <code>code</code> property is typically a 2-character ISO code such as "GB", "US", "DE" etc.</div>

<div class="graphql-code-line top-level comment">If an invalid code is passed, the mutation will fail.</div>
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level">input <span class="graphql-code-identifier">CreateAddressInput</span>
&#123;</div>
<div class="graphql-code-line ">fullName: <a href="/reference/graphql-api/admin/object-types#string">String</a></div>
Expand Down Expand Up @@ -3971,6 +3982,17 @@ import MemberDescription from '@site/src/components/MemberDescription';
## UpdateAddressInput

<div class="graphql-code-block">
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level comment">Input used to update an Address.</div>

<div class="graphql-code-line top-level comment"></div>

<div class="graphql-code-line top-level comment">The countryCode must correspond to a <code>code</code> property of a Country that has been defined in the</div>

<div class="graphql-code-line top-level comment">Vendure server. The <code>code</code> property is typically a 2-character ISO code such as "GB", "US", "DE" etc.</div>

<div class="graphql-code-line top-level comment">If an invalid code is passed, the mutation will fail.</div>
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level">input <span class="graphql-code-identifier">UpdateAddressInput</span>
&#123;</div>
<div class="graphql-code-line ">id: <a href="/reference/graphql-api/admin/object-types#id">ID</a>!</div>
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/reference/graphql-api/admin/object-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,15 @@ import MemberDescription from '@site/src/components/MemberDescription';
## Country

<div class="graphql-code-block">
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level comment">A Country of the world which your shop operates in.</div>

<div class="graphql-code-line top-level comment"></div>

<div class="graphql-code-line top-level comment">The <code>code</code> field is typically a 2-character ISO code such as "GB", "US", "DE" etc. This code is used in certain inputs such as</div>

<div class="graphql-code-line top-level comment">`UpdateAddressInput` and <code>CreateAddressInput</code> to specify the country.</div>
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level">type <span class="graphql-code-identifier">Country</span>
&#123;</div>
<div class="graphql-code-line ">id: <a href="/reference/graphql-api/admin/object-types#id">ID</a>!</div>
Expand Down
22 changes: 22 additions & 0 deletions docs/docs/reference/graphql-api/shop/input-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@ import MemberDescription from '@site/src/components/MemberDescription';
## CreateAddressInput

<div class="graphql-code-block">
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level comment">Input used to create an Address.</div>

<div class="graphql-code-line top-level comment"></div>

<div class="graphql-code-line top-level comment">The countryCode must correspond to a <code>code</code> property of a Country that has been defined in the</div>

<div class="graphql-code-line top-level comment">Vendure server. The <code>code</code> property is typically a 2-character ISO code such as "GB", "US", "DE" etc.</div>

<div class="graphql-code-line top-level comment">If an invalid code is passed, the mutation will fail.</div>
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level">input <span class="graphql-code-identifier">CreateAddressInput</span>
&#123;</div>
<div class="graphql-code-line ">fullName: <a href="/reference/graphql-api/shop/object-types#string">String</a></div>
Expand Down Expand Up @@ -1162,6 +1173,17 @@ import MemberDescription from '@site/src/components/MemberDescription';
## UpdateAddressInput

<div class="graphql-code-block">
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level comment">Input used to update an Address.</div>

<div class="graphql-code-line top-level comment"></div>

<div class="graphql-code-line top-level comment">The countryCode must correspond to a <code>code</code> property of a Country that has been defined in the</div>

<div class="graphql-code-line top-level comment">Vendure server. The <code>code</code> property is typically a 2-character ISO code such as "GB", "US", "DE" etc.</div>

<div class="graphql-code-line top-level comment">If an invalid code is passed, the mutation will fail.</div>
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level">input <span class="graphql-code-identifier">UpdateAddressInput</span>
&#123;</div>
<div class="graphql-code-line ">id: <a href="/reference/graphql-api/shop/object-types#id">ID</a>!</div>
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/reference/graphql-api/shop/object-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,15 @@ import MemberDescription from '@site/src/components/MemberDescription';
## Country

<div class="graphql-code-block">
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level comment">A Country of the world which your shop operates in.</div>

<div class="graphql-code-line top-level comment"></div>

<div class="graphql-code-line top-level comment">The <code>code</code> field is typically a 2-character ISO code such as "GB", "US", "DE" etc. This code is used in certain inputs such as</div>

<div class="graphql-code-line top-level comment">`UpdateAddressInput` and <code>CreateAddressInput</code> to specify the country.</div>
<div class="graphql-code-line top-level comment">"""</div>
<div class="graphql-code-line top-level">type <span class="graphql-code-identifier">Country</span>
&#123;</div>
<div class="graphql-code-line ">id: <a href="/reference/graphql-api/shop/object-types#id">ID</a>!</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Plugins which rely on external services (web services, databases etc.) can make
service to add a check for that dependency to the Vendure health check.


Since v1.6.0, the preferred way to implement a custom health check is by creating a new
<a href='/reference/typescript-api/health-check/health-check-strategy#healthcheckstrategy'>HealthCheckStrategy</a> and then passing it to the `systemOptions.healthChecks` array.
Since v1.6.0, the preferred way to implement a custom health check is by creating a new <a href='/reference/typescript-api/health-check/health-check-strategy#healthcheckstrategy'>HealthCheckStrategy</a>
and then passing it to the `systemOptions.healthChecks` array.
See the <a href='/reference/typescript-api/health-check/health-check-strategy#healthcheckstrategy'>HealthCheckStrategy</a> docs for an example configuration.

The alternative way to register a health check is by injecting this service directly into your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription';

## HttpHealthCheckStrategy

<GenerationInfo sourceFile="packages/core/src/health-check/http-health-check-strategy.ts" sourceLine="36" packageName="@vendure/core" />
<GenerationInfo sourceFile="packages/core/src/health-check/http-health-check-strategy.ts" sourceLine="37" packageName="@vendure/core" />

A <a href='/reference/typescript-api/health-check/health-check-strategy#healthcheckstrategy'>HealthCheckStrategy</a> used to check health by pinging a url. Internally it uses
the [NestJS HttpHealthIndicator](https://docs.nestjs.com/recipes/terminus#http-healthcheck).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription';

## PollingJobQueueStrategy

<GenerationInfo sourceFile="packages/core/src/job-queue/polling-job-queue-strategy.ts" sourceLine="192" packageName="@vendure/core" />
<GenerationInfo sourceFile="packages/core/src/job-queue/polling-job-queue-strategy.ts" sourceLine="224" packageName="@vendure/core" />

This class allows easier implementation of <a href='/reference/typescript-api/job-queue/job-queue-strategy#jobqueuestrategy'>JobQueueStrategy</a> in a polling style.
Instead of providing <a href='/reference/typescript-api/job-queue/job-queue-strategy#jobqueuestrategy'>JobQueueStrategy</a> `start()` you should provide a `next` method.
Expand All @@ -25,6 +25,7 @@ class PollingJobQueueStrategy extends InjectableJobQueueStrategy {
public pollInterval: number | ((queueName: string) => number);
public setRetries: (queueName: string, job: Job) => number;
public backOffStrategy?: BackoffStrategy;
protected activeQueues = new QueueNameProcessStorage<ActiveQueue<any>>();
constructor(config?: PollingJobQueueStrategyConfig)
constructor(concurrency?: number, pollInterval?: number)
constructor(concurrencyOrConfig?: number | PollingJobQueueStrategyConfig, maybePollInterval?: number)
Expand Down Expand Up @@ -62,6 +63,11 @@ class PollingJobQueueStrategy extends InjectableJobQueueStrategy {
<MemberInfo kind="property" type={`<a href='/reference/typescript-api/job-queue/types#backoffstrategy'>BackoffStrategy</a>`} />


### activeQueues

<MemberInfo kind="property" type={``} />


### constructor

<MemberInfo kind="method" type={`(config?: PollingJobQueueStrategyConfig) => PollingJobQueueStrategy`} />
Expand Down
20 changes: 10 additions & 10 deletions docs/docs/reference/typescript-api/testing/simple-graph-qlclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class SimpleGraphQLClient {
asUserWithCredentials(username: string, password: string) => ;
asSuperAdmin() => ;
asAnonymousUser() => ;
fileUploadMutation(options: {
mutation: DocumentNode;
filePaths: string[];
mapVariables: (filePaths: string[]) => any;
fileUploadMutation(options: {
mutation: DocumentNode;
filePaths: string[];
mapVariables: (filePaths: string[]) => any;
}) => Promise<any>;
}
```
Expand Down Expand Up @@ -66,8 +66,8 @@ Performs both query and mutation operations.

<MemberInfo kind="method" type={`(url: string, options: RequestInit = {}) => Promise&#60;Response&#62;`} />

Performs a raw HTTP request to the given URL, but also includes the authToken & channelToken
headers if they have been set. Useful for testing non-GraphQL endpoints, e.g. for plugins
Performs a raw HTTP request to the given URL, but also includes the authToken & channelToken
headers if they have been set. Useful for testing non-GraphQL endpoints, e.g. for plugins
which make use of REST controllers.
### queryStatus

Expand All @@ -91,11 +91,11 @@ Logs in as the SuperAdmin user.
Logs out so that the client is then treated as an anonymous user.
### fileUploadMutation

<MemberInfo kind="method" type={`(options: { mutation: DocumentNode; filePaths: string[]; mapVariables: (filePaths: string[]) =&#62; any; }) => Promise&#60;any&#62;`} />
<MemberInfo kind="method" type={`(options: { mutation: DocumentNode; filePaths: string[]; mapVariables: (filePaths: string[]) =&#62; any; }) => Promise&#60;any&#62;`} />

Perform a file upload mutation.

Upload spec: https://github.com/jaydenseric/graphql-multipart-request-spec
Perform a file upload mutation.

Upload spec: https://github.com/jaydenseric/graphql-multipart-request-spec
Discussion of issue: https://github.com/jaydenseric/apollo-upload-client/issues/32


Expand Down
Loading

0 comments on commit 1bd5e8a

Please sign in to comment.