|
|
@@ -14,7 +14,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"
|
|
|
@@ -29,7 +29,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/developer-guide/importing-product-data/#product-import-format) and
|
|
|
+Parses the contents of the [product import CSV file](/guides/how-to/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>.
|
|
|
|
|
|
|
|
|
@@ -40,15 +40,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[];
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -57,7 +57,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[]; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -69,15 +69,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;
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -86,7 +86,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; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -98,7 +98,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"
|
|
|
@@ -110,12 +110,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;
|
|
|
+ };
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -159,7 +159,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; }; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -171,7 +171,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"
|
|
|
@@ -179,14 +179,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;
|
|
|
+ };
|
|
|
}>;
|
|
|
}
|
|
|
```
|
|
|
@@ -210,7 +210,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; }; }>`} />
|
|
|
|
|
|
|
|
|
|
|
|
@@ -222,7 +222,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"
|