|
|
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
|
|
|
|
|
|
<GenerationInfo sourceFile="packages/core/src/data-import/providers/import-parser/import-parser.ts" sourceLine="152" packageName="@vendure/core" />
|
|
|
|
|
|
-Validates and parses CSV files into a data structure which can then be used to created new entities.
|
|
|
+Validates and parses CSV files into a data structure which can then be used to created new entities.
|
|
|
This is used internally by the <a href='/reference/typescript-api/import-export/importer#importer'>Importer</a>.
|
|
|
|
|
|
```ts title="Signature"
|
|
|
@@ -28,7 +28,7 @@ class ImportParser {
|
|
|
|
|
|
<MemberInfo kind="method" type={`(input: string | Stream, mainLanguage: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a> = this.configService.defaultLanguageCode) => Promise<<a href='/reference/typescript-api/import-export/import-parser#parseresult'>ParseResult</a><<a href='/reference/typescript-api/import-export/import-parser#parsedproductwithvariants'>ParsedProductWithVariants</a>>>`} />
|
|
|
|
|
|
-Parses the contents of the [product import CSV file](/guides/how-to/importing-data/#product-import-format) and
|
|
|
+Parses the contents of the [product import CSV file](/guides/developer-guide/importing-data/#product-import-format) and
|
|
|
returns a data structure which can then be used to populate Vendure using the <a href='/reference/typescript-api/import-export/fast-importer-service#fastimporterservice'>FastImporterService</a>.
|
|
|
|
|
|
|
|
|
@@ -39,15 +39,15 @@ returns a data structure which can then be used to populate Vendure using the <a
|
|
|
|
|
|
<GenerationInfo sourceFile="packages/core/src/data-import/providers/import-parser/import-parser.ts" sourceLine="45" packageName="@vendure/core" />
|
|
|
|
|
|
-The intermediate representation of an OptionGroup after it has been parsed
|
|
|
+The intermediate representation of an OptionGroup after it has been parsed
|
|
|
by the <a href='/reference/typescript-api/import-export/import-parser#importparser'>ImportParser</a>.
|
|
|
|
|
|
```ts title="Signature"
|
|
|
interface ParsedOptionGroup {
|
|
|
- translations: Array<{
|
|
|
- languageCode: LanguageCode;
|
|
|
- name: string;
|
|
|
- values: string[];
|
|
|
+ translations: Array<{
|
|
|
+ languageCode: LanguageCode;
|
|
|
+ name: string;
|
|
|
+ values: string[];
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -56,7 +56,7 @@ interface ParsedOptionGroup {
|
|
|
|
|
|
### translations
|
|
|
|
|
|
-<MemberInfo kind="property" type={`Array<{
languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>;
name: string;
values: string[];
}>`} />
|
|
|
+<MemberInfo kind="property" type={`Array<{ languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>; name: string; values: string[]; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -68,15 +68,15 @@ interface ParsedOptionGroup {
|
|
|
|
|
|
<GenerationInfo sourceFile="packages/core/src/data-import/providers/import-parser/import-parser.ts" sourceLine="61" packageName="@vendure/core" />
|
|
|
|
|
|
-The intermediate representation of a Facet after it has been parsed
|
|
|
+The intermediate representation of a Facet after it has been parsed
|
|
|
by the <a href='/reference/typescript-api/import-export/import-parser#importparser'>ImportParser</a>.
|
|
|
|
|
|
```ts title="Signature"
|
|
|
interface ParsedFacet {
|
|
|
- translations: Array<{
|
|
|
- languageCode: LanguageCode;
|
|
|
- facet: string;
|
|
|
- value: string;
|
|
|
+ translations: Array<{
|
|
|
+ languageCode: LanguageCode;
|
|
|
+ facet: string;
|
|
|
+ value: string;
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -85,7 +85,7 @@ interface ParsedFacet {
|
|
|
|
|
|
### translations
|
|
|
|
|
|
-<MemberInfo kind="property" type={`Array<{
languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>;
facet: string;
value: string;
}>`} />
|
|
|
+<MemberInfo kind="property" type={`Array<{ languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>; facet: string; value: string; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -97,7 +97,7 @@ interface ParsedFacet {
|
|
|
|
|
|
<GenerationInfo sourceFile="packages/core/src/data-import/providers/import-parser/import-parser.ts" sourceLine="77" packageName="@vendure/core" />
|
|
|
|
|
|
-The intermediate representation of a ProductVariant after it has been parsed
|
|
|
+The intermediate representation of a ProductVariant after it has been parsed
|
|
|
by the <a href='/reference/typescript-api/import-export/import-parser#importparser'>ImportParser</a>.
|
|
|
|
|
|
```ts title="Signature"
|
|
|
@@ -109,12 +109,12 @@ interface ParsedProductVariant {
|
|
|
trackInventory: GlobalFlag;
|
|
|
assetPaths: string[];
|
|
|
facets: ParsedFacet[];
|
|
|
- translations: Array<{
|
|
|
- languageCode: LanguageCode;
|
|
|
- optionValues: string[];
|
|
|
- customFields: {
|
|
|
- [name: string]: string;
|
|
|
- };
|
|
|
+ translations: Array<{
|
|
|
+ languageCode: LanguageCode;
|
|
|
+ optionValues: string[];
|
|
|
+ customFields: {
|
|
|
+ [name: string]: string;
|
|
|
+ };
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -158,7 +158,7 @@ interface ParsedProductVariant {
|
|
|
|
|
|
### translations
|
|
|
|
|
|
-<MemberInfo kind="property" type={`Array<{
languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>;
optionValues: string[];
customFields: {
[name: string]: string;
};
}>`} />
|
|
|
+<MemberInfo kind="property" type={`Array<{ languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>; optionValues: string[]; customFields: { [name: string]: string; }; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -170,7 +170,7 @@ interface ParsedProductVariant {
|
|
|
|
|
|
<GenerationInfo sourceFile="packages/core/src/data-import/providers/import-parser/import-parser.ts" sourceLine="102" packageName="@vendure/core" />
|
|
|
|
|
|
-The intermediate representation of a Product after it has been parsed
|
|
|
+The intermediate representation of a Product after it has been parsed
|
|
|
by the <a href='/reference/typescript-api/import-export/import-parser#importparser'>ImportParser</a>.
|
|
|
|
|
|
```ts title="Signature"
|
|
|
@@ -178,14 +178,14 @@ interface ParsedProduct {
|
|
|
assetPaths: string[];
|
|
|
optionGroups: ParsedOptionGroup[];
|
|
|
facets: ParsedFacet[];
|
|
|
- translations: Array<{
|
|
|
- languageCode: LanguageCode;
|
|
|
- name: string;
|
|
|
- slug: string;
|
|
|
- description: string;
|
|
|
- customFields: {
|
|
|
- [name: string]: string;
|
|
|
- };
|
|
|
+ translations: Array<{
|
|
|
+ languageCode: LanguageCode;
|
|
|
+ name: string;
|
|
|
+ slug: string;
|
|
|
+ description: string;
|
|
|
+ customFields: {
|
|
|
+ [name: string]: string;
|
|
|
+ };
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -209,7 +209,7 @@ interface ParsedProduct {
|
|
|
|
|
|
### translations
|
|
|
|
|
|
-<MemberInfo kind="property" type={`Array<{
languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>;
name: string;
slug: string;
description: string;
customFields: {
[name: string]: string;
};
}>`} />
|
|
|
+<MemberInfo kind="property" type={`Array<{ languageCode: <a href='/reference/typescript-api/common/language-code#languagecode'>LanguageCode</a>; name: string; slug: string; description: string; customFields: { [name: string]: string; }; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -221,7 +221,7 @@ interface ParsedProduct {
|
|
|
|
|
|
<GenerationInfo sourceFile="packages/core/src/data-import/providers/import-parser/import-parser.ts" sourceLine="125" packageName="@vendure/core" />
|
|
|
|
|
|
-The data structure into which an import CSV file is parsed by the
|
|
|
+The data structure into which an import CSV file is parsed by the
|
|
|
<a href='/reference/typescript-api/import-export/import-parser#importparser'>ImportParser</a> `parseProducts()` method.
|
|
|
|
|
|
```ts title="Signature"
|